How to count the frequency of flashing light in a video

10 ビュー (過去 30 日間)
Emerson De Souza
Emerson De Souza 2015 年 4 月 30 日
コメント済み: Luke Abellanosa 2021 年 2 月 4 日
Hi, I have a video-file, rgb, format avi, dimension 62x62, rate 60fps. duration 1min. The event is a flashing red light otherwise dark.
The flashing frequency very from video to video. So I wonder if someone could suggest me how to count the frequency using image-processing or video-processing tool box.
Thank you in advance for your attention
Emerson
  1 件のコメント
Luke Abellanosa
Luke Abellanosa 2021 年 2 月 4 日
hello emerson were you able to get the exact value of the frequency??

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2015 年 4 月 30 日
Cedric Wannaz posted this code to do just that about a year ago. You can probably adapt it to your application.
  5 件のコメント
Star Strider
Star Strider 2020 年 12 月 1 日
Luke Abellanosa —
I just now looked through the Supplements, and (as you already discovered) neither the code nor the algorithm is published. You’d likely have to write to the authors, however I doubt they’d currently be forthcoming with the information.
Note that in the Acknowledgements section:
  • Competing interests: A U.S. provisional patent application has been filed by Duke University on 12 June 2020. The authors of the current manuscript are identical to the inventors on the patent application. The patent information is as follows: Title: “Optical Method to Test Efficacy of Face Masks”; inventors: M.C.F., E.P.F., D.G., W.S.W., I.H., and E.W.; application number: 63/038331.
Since they’re applying for a U.S. patent (and likely foreign patents) on this technique, that information will not be available until the patent is granted (typically about four years after the application is filed).
In the interim, see if anything in the Image Processing Toolbox — Examples documentation section has anything you can use to build on. (I have done some medical image processing, however it is not an area of my expertise, so I likely cannot help you with it.)
Luke Abellanosa
Luke Abellanosa 2021 年 2 月 4 日
hello again can i ask if what are to be edited in this script depending on the properties of the video im still a beginner to this
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;

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by