- Read the video, using “VideoReader” function and extract frames for further processing.
- As you mentioned you would like to compute FFT of a small section of frames, thus segregate your frames in small groups.
- Convert the frames to grayscale, using “rgb2gray” function. This will simplify the analysis and intensity changes can be detected.
- Apply FFT analysis using “fft” function on the selected frames, thus obtaining the frequency domain of the frames.
- Analyse the frequencies from the FFT, observe the peaks in the frequency domain representation to determine the frequencies associated with the flashing lights.
- “VideoReader”: https://www.mathworks.com/help/matlab/ref/videoreader.html
- “rgb2gray”: https://www.mathworks.com/help/matlab/ref/rgb2gray.html
- “fft”: https://www.mathworks.com/help/matlab/ref/fft.html
- “Fourier Transform” documentation: https://www.mathworks.com/help/images/fourier-transform.html