Cannot find an exact (case-sensitive) match for 'getFrame' ?
이전 댓글 표시
I use matlab R2018b and Iwant to display a video in axes using app designer this is my code:
function importervideoButtonPushed(app, event)
% to import some thing
[a, b]= uigetfile({'*.*'});
vid = VideoReader([b a]);
while hasFrame(vid)
imshow(getFrame(vid), 'Parent', app.UIAxes1);
end
end
but when I push on the button the following error is written
what should I do ?
댓글 수: 8
Walter Roberson
2019년 7월 26일
Try
vid = VideoReader(fullfile(b,a);
uigetfile is not certain to put a trailing directory delimiter on the directory returned, so you might have been constructing a path to a file that did not exist.
LEKHCHINE Somia
2019년 7월 27일
Walter Roberson
2019년 7월 27일
What is the content of line 25 of app1.mlapp ?
LEKHCHINE Somia
2019년 7월 27일
LEKHCHINE Somia
2019년 7월 27일
편집: LEKHCHINE Somia
2019년 7월 27일
Walter Roberson
2019년 7월 27일
The line
vid = VideoReader(fullfile(b,a);
is missing a )
Walter Roberson
2019년 7월 27일
Remember to put in a drawnow() after the imshow()
Also, imshow() is a fairly expensive operation. It is better (faster) to create a image() object and set the the CData property of the object.
LEKHCHINE Somia
2019년 7월 27일
채택된 답변
추가 답변 (1개)
LEKHCHINE Somia
2019년 7월 27일
0 개 추천
댓글 수: 1
Walter Roberson
2019년 7월 27일
I guess you could do that, but it should not be needed, not unless you want to access the last frame of the video after the video is played.
카테고리
도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!