counting the light frequency in a video
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Walter Roberson
2021 年 2 月 4 日
That has nothing to convince me that this can be modeled as bi-level.
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!