counting the light frequency in a video

2 Ansichten (letzte 30 Tage)
Luke Abellanosa
Luke Abellanosa am 4 Feb. 2021
Kommentiert: Walter Roberson am 4 Feb. 2021
hello can someone suggest a way to count the frequency value in a video similar to this research experiment
i was able to find this code though for some reason the frequency value does not change even if i inputed a different video
vidObj = VideoReader( '1.avi' ) ;
nFrames = vidObj.NumberOfFrames ;
tFrame = (1:nFrames) / vidObj.FrameRate ;
ghostCom = zeros( nFrames, 1 ) ;
for fId = 1 : nFrames
grayImage = rgb2gray( read( vidObj, fId )) ;
ghostCom(fId) = sum( grayImage(:) ) ;
end
figure() ; clf ;
set( gcf, 'Color', 'White', 'Units', 'Normalized', ...
'OuterPosition', [0, 0.1, 1, 0.6] ) ;
plot( tFrame, ghostCom/max(ghostCom), 'b' ) ;
set( gca, 'YTick', [0, 1] ) ;
xlabel( 'Time [s]' ) ;
[r] =risetime(ghostCom);
FREQUENCY =numel(r)/60;
sorry i'm new to this thank you in advance for the reply.
  3 Kommentare
Walter Roberson
Walter Roberson am 4 Feb. 2021
That has nothing to convince me that this can be modeled as bi-level.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by