How to solve Error "Error using strfind Conversion to double from VideoReader is not possible."?
이전 댓글 표시
I'm trying to read RGB frames from a video to do some work on them and compile a new video. here's my code:
videoObj = VideoReader('test_vid.mp4');
vid_mat = zeros(950,1690,3,200);
for frame=1:200
img = imread(videoObj,frame);
end
댓글 수: 3
This makes no sense:
imread(videoObj,frame)
According to the imread documentation its first input is a filename. A videoReader object is not a filename.
If you want the frames of a video, why not simply follow the examples in the VideoReader documentation?
v = VideoReader('xylophone.mp4');
while hasFrame(v)
video = readFrame(v);
end
noam Y
2017년 8월 17일
@noam Y: do not learn how to use MATLAB from what random people give you (academics can write bad code too). The best place to learn MATLAB code is from the MATLAB documentation:
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!