Write images from matrices in a cell array? Error?!
1 view (last 30 days)
Show older comments
Hi,
I have a cell in which several 320*320*3 matrices a stored. I would like to convert these matrices into images or even more preferably into a movie. I tried imwrite:
>> cleaned_img{1,k}=imwrite(cleaned{1,k},'jpg')
With the error:
Error using imwrite. Too many output arguments.
What am I doing wrong?
Another question:
Is there a way to view the matrices in the 1*360 cell with the imshow command in a way that I can skip from one image to the other without having to type imshow(cleaned{1,1}) to imshow(cleaned{1,360})? I would like to use imshow or another tool just like for example irfanview, just for the image data stored in the matrices.
Thank you!
0 Comments
Answers (4)
Wayne King
on 5 Oct 2012
imwrite does not output any arguments. If you want to make a video, why are you needing to use imwrite? See the help for VideoWriter
0 Comments
Image Analyst
on 5 Oct 2012
imwrite does not return ANY value. So you can't do that.
By the way, you didn't give it a filename, unless cleaned{1,k} was the name, in which case you didn't give it a numerical image array. Plus, like Wayne said, imwrite is no way to write videos.
0 Comments
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!