How can I read a frame from a video?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
>> M=mmreader('00097.avi');
for ii = 1:length(M)
oneFrame = read(M, ii);
end
imshow(oneFrame);xx=imread(oneFrame);
??? Error using ==> strfind
Input strings must have one row.
Error in ==> imread at 340
if (strfind(filename, '://'))
Answers (1)
Walter Roberson
on 17 Mar 2013
0 votes
imread() is used to read files, such as .jpg files, and it requires a filename as its argument. You are instead passing it the frame data array that you are getting back from the read() operation, which is already a decoded image.
and also pay attention to the way they figure out the number of frames there.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!