Unrecognized property 'Colormap' for class 'VideoWriter'??
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm trying to change some old code that used avifile(), to the new VideoWriter. Everything seems to work but one thing gives an error. According to the page https://www.mathworks.com/help/matlab/ref/videowriter.html , I should be able to use the a.Colormap variable to set a colormap, but my code gives this error:
Unrecognized property 'Colormap' for class 'VideoWriter'.
My code:
cmap = colormap(hsv(8));
aviobj=VideoWriter(filename)
aviobj.Quality=95
aviobj.Colormap=cmap
open(aviobj)
it never gets to the open() - it throws a error; what am I missing??
1 commentaire
Stephen23
le 22 Mai 2018
Modifié(e) : Stephen23
le 22 Mai 2018
@Michael Levin: please show the complete error message. This means all of the red text.
The documentation states that "The Colormap property only applies to objects used for writing indexed AVI files." Are you writing an indexed AVI file?
Réponses (2)
Voir également
Catégories
En savoir plus sur Red 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!