필터 지우기
필터 지우기

counting the light frequency in a video

조회 수: 1 (최근 30일)
Luke Abellanosa
Luke Abellanosa 2021년 2월 4일
댓글: Walter Roberson 2021년 2월 4일
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
Walter Roberson 2021년 2월 4일
That has nothing to convince me that this can be modeled as bi-level.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by