Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1471
Number of posts: 2147

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Calculate real-time signal frequency Posted by Viper_Scull on 19 Dec 2012 at 8:33 AM
Hello everyone.


I'm trying to program the following scenario:


I want to be monitoring with a camera a spot of a grayscale image that is going to be changing its intensity with a certain frequency (around 1 Hz, but I need to be as accurate as possible). I will probably acquire de images through labview, but i can embed analysis matlab code in it. So I'd like to be receiving real-time data (images = pixels) and analysing them with matlab in order to know the frequency. The intensity of the maximums is going to be decreasing with every cycle. The signal could last about 10 seconds . It is likely that the signal will have some noise due to the surrounding pixels, although in general they have a smaller intensity compared to the targeted spot.


I've thought of 2 ways to implement it, but i need your advice.


1. Calculate the mean of the pixels of each image (there is no restrictions with the number of frames per second since the camera can record up to 340fps) and see when it's changing from ascending to descending and vice-versa and see the time difference between maximums. (I imagine it could be done by seeing when the derivative is equal to zero). This way I could plot the intensities and the time so see the signal.


2. Use fft to estimate the frequency. I don't know if this is possible in real-time nor if it could be used when the maximums are changing.


Can you give me any insight?


English is not my mother tongue so if you didn't understand something just ask. Thanks.
Thread Tree
Viper_Scull Calculate real-time signal frequency on 19 Dec 2012 at 8:33 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.