How to display images from a cell array?
Mostrar comentarios más antiguos
I have 5 images in a cell array 'imageshares' and I want to display them individually.
figure
image(imageshares{i}));
I used the above code and obviously this didn't work. How do I display the images?
4 comentarios
fiona rozario
el 31 de Mayo de 2017
Editada: fiona rozario
el 31 de Mayo de 2017
Matthew Eicholtz
el 31 de Mayo de 2017
It would be helpful to see more of your code so we can properly diagnose the problem.
fiona rozario
el 1 de Jun. de 2017
Respuestas (2)
Star Strider
el 31 de Mayo de 2017
The subscript error is puzzling if ‘i=1:N’. One option is to change the loop counter variable to ‘k’ instead, since a few versions back, ‘i’ could default to the imaginary operator.
The imshow function could be a preferable option (with the index variable change):
figure
imshow(imageshares{k})
This is a guess on my part. If I guessed wrong, I will delete this Answer.
1 comentario
fiona rozario
el 1 de Jun. de 2017
Image Analyst
el 1 de Jun. de 2017
image is a built in function. Thus, this makes no sense:
imageshares=mat2cell(image, rowgroups, size(image,2));
and I don't know what you're doing with all that "shares" stuff. You read in one image, which has 3 color channels, so exactly what 5 images are you expecting to see?
Categorías
Más información sobre Image Filtering en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!