counting the light frequency in a video
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
am 4 Feb. 2021
That has nothing to convince me that this can be modeled as bi-level.
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!