Goal: I have a video stream from a webcam. I need get frequency of the green color changes on the video.
Video color space is RGB The signal looks sinusoidal with a frequency range 0.5 - 2.4 Hz
I performed the following steps:
- Capture Video frames into collection.
- Processing frames by Gaussian pyramid down level 4. (frame size now is ~ 37x32)
- use DFT/FFT with sample rate 30
- get spectrum
- calculate frequency
on DFT I put data from each frame: video frames quantity = 60
Method 1: I collect green channel from frame and join with the green channel from a next frame, in result I have a big data array.
1184*60=71040 the size of the sample buffer
one long array with 71040 data point of all pixels in the green channel of each frame. (all green pixels from one frame + from next frame)
Method 2: I collect the green channel from an each pixel on the frame and join with the same green channel pixel from a next frame, as a result I have a big data array.
1184 arrays with 60 data points (each green pixel from one frame + from next frame)
Which method is the correct one?