Filter löschen
Filter löschen

Error using frame2im Invalid movie: expected a structure

2 Ansichten (letzte 30 Tage)
Jenny Shen
Jenny Shen am 24 Jul. 2018
Bearbeitet: Stephen23 am 25 Jul. 2018
Hi all I have an avi movie. I use those code. What is wrong?
mov = VideoReader(videoname); frame = readFrame(mov); [img, ~] = frame2im(frame);
Error using frame2im Invalid movie: expected a structure
Thanks

Antworten (1)

Stephen23
Stephen23 am 25 Jul. 2018
Bearbeitet: Stephen23 am 25 Jul. 2018
As its documentation clearly states, the readframe function returns a numeric array already (i.e. an image), so you do not need frame2im at all. Remove frame2im from your code. frame2im is only required if you are using getframe (because it returns a structure).

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by