using a video instead of a sequence of Images

조회 수: 1 (최근 30일)
engineer
engineer 2019년 1월 31일
댓글: KSSV 2019년 1월 31일
Hello everybody
I am really curious about this. Please let me know if you have got an idea. I have got a matlab code which process 200 images and reports the coordinate of the specific point of my object. When I record the images, I have got an option to save the image sequences as video. Would it be possible to use one single video instead of processing image by image and get the same result.
Thanks alot in advance!!!

채택된 답변

KSSV
KSSV 2019년 1월 31일
Yes very much possible...you can read a vide frame by frame using:
vidObj = VideoReader(yourvideo);
numFrames = 0;
while hasFrame(vidObj)
F = readFrame(vidObj);
numFrames = numFrames + 1;
imagesc(F)
drawnow
end
numFrames
  댓글 수: 4
engineer
engineer 2019년 1월 31일
편집: engineer 2019년 1월 31일
Not really, it has got 101 frames which are different from each other. it proceses the first one only. do you have an example of video processing in a (for) loop frame by frame?
KSSV
KSSV 2019년 1월 31일
this code worked fine for me...

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by