필터 지우기
필터 지우기

Why Matlab reads video frame slowly?

조회 수: 12 (최근 30일)
Eren
Eren 2016년 11월 24일
댓글: Eren 2016년 11월 24일
I try to read frames from video using the following code.
The original video play so fast, but when I try to read using Matlab, it plays so slow.
Is there any problem with Matlab? (I attached video with this question)
vidObj = VideoReader('unimore.avi');
for i=1:vidObj.NumberOfFrames
v = read(vidObj,i);
imshow(v)
end
Please kindly help, thanks.

채택된 답변

Walter Roberson
Walter Roberson 2016년 11월 24일
Each imshow is expensive. It is more efficient to use imshow once, record the handle it returns, and update the CData property of the handle at each step. Or use one of the video player to update, such as vision.videoPlayer
https://www.mathworks.com/help/vision/ref/vision.videoplayer-class.html
  댓글 수: 1
Eren
Eren 2016년 11월 24일
thanks sir. It works :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by