Problems using mmreader with struct
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to use mmreader to upload a video into MATLAB. I am trying to follow the example in the documentation, however at the line move(1:nFrames) = struct('cdata',zeros(vidHeight,vidWidth,3,'uint8'),'colormap',[]);
I get the following error:
??? The following error occurred converting from struct to mmreader: Error using ==> which Argument must contain a string.
Error in ==> VIDEO2 at 16 mov(1:nFrames) = struct('cdata', zeros(vidHeight, vidWidth, 3, 'uint8'),'colormap',[]);
Any ideas what may be wrong?
0 commentaires
Réponses (1)
Geoff Hayes
le 9 Sep 2014
Bran - you must be using an older version of MATLAB; on R2014a, if I try to run through the example at mmreader, I observe the error message MMREADER has been removed. Use VIDEOREADER instead.
Using the same example in R2013a, it works fine and the xylophone video is played. Though if I do the following, after I've run through the example and NOT cleared any variables
mov=xyloObj;
mov(1:nFrames) = ...
struct('cdata',zeros(vidHeight,vidWidth,3,'uint8'),'colormap',[]);
Warning: MMREADER will be removed in a future release. Use VIDEOREADER
instead.
> In mmreader.mmreader>mmreader.mmreader at 120
The following error occurred converting from struct to mmreader:
Argument must contain a string.
So nearly the same error message as you observed. Could it be that you accidentally set mov to an instance of the mmreader class?
Before running your VIDEO2 script, run the following command
clear mov
clear move
to clear the variable mov (and move since you reference both in your question). Now try your script again. Do you still observe the error message?
0 commentaires
Voir également
Catégories
En savoir plus sur Large Files and Big Data dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!