필터 지우기
필터 지우기

how to show multiple images in the same picture with the name of each image without using subplots?

조회 수: 23 (최근 30일)
dear all ,
I have a function that, according to the user's specifications, creates, reads the desired image created (saving it in a variable) and then deletes it (to avoid clogging the folder) after creating all the desired images I want the function to be output let me see the printed images and respective name associated with the image, I tried to use subplots but the images are too small and not seen well, montage, I do not know how to match the name - image because before doing montage you have to check which images exist or less than possible images. thanks
  댓글 수: 2
Jan
Jan 2018년 8월 9일
What is the problem with using subplot? The size of the images shown by subplot is limited by the size of the monitor. So how can we help you? What does "match the names" mean?
federica pasquali
federica pasquali 2018년 8월 9일
"match the names" means that I want a figure that contains image - image's name for each image in the picture. i hope to use something different from subplot because the images are too small , i prefer to use montage function but i don't know i can use montage to show image and image's name like i do with subplot like :
subplot(5,3,1),imshow(image),title('image's name')

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2018년 8월 9일
Use montage(), then text().
  댓글 수: 2
federica pasquali
federica pasquali 2018년 8월 9일
i'm trying to do this :
image1 = imread(imageGenrated)
delete(image1) % i have to delete every single image
...
image13 = imread(imageGenerated)
CellImages = {image1....image13}
montage(cellImages,'Size',[4 4])
but gives me this error : Error using images.internal.getImageFromFile The specified filename is not a string. and how i can put text() in ? because i want that : image1 with name1 .. image13 with name13 thanks
Image Analyst
Image Analyst 2018년 8월 9일
It should work fine if you just don't delete the very things you want to display! Not sure what gave you that idea. It works fine for me. Here is my code:
img = imread('peppers.png'); % Read in one image.
% Make cell array of 13 images (all the same for this demo).
cellImages = {img, img, img, img, img, img, img, img, img, img, img, img, img};
% Show all the image.
montage(cellImages, 'Size', [4 4])

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jan
Jan 2018년 8월 10일
There are a lot of tools in the FileExchange, which provide a modified subplot to use more space in the figure.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by