How can i display image from array element of cell??

1 Ansicht (letzte 30 Tage)
Mochammad Fariz
Mochammad Fariz am 22 Feb. 2020
Kommentiert: Mochammad Fariz am 22 Feb. 2020
im working with color based image retrieval..i have array cell containing list filename..how can i display them in gui using for loop??

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 22 Feb. 2020
for k=1:numel(fileNm)
This = fileNm{k} ;
if isempty(This) ; continue ; end
imshow(This) ;
pause(3);
end
This assumes that you only want to display the image and that you do not mind if the window keeps changing size. If you want to process the image you would need an imread() step.
  3 Kommentare
Image Analyst
Image Analyst am 22 Feb. 2020
After imshow(), try title() with the filename
for k = 1 : numel(fileNm)
thisFileName = fileNm{k};
if ~isfile(thisFileName) ; continue ; end
imshow(thisFileName);
caption = sprintf('File %d of %d : "%s"', k, numel(fileNm), thisFileName)
title(caption, 'FontSize', 18);
drawnow;
end
Mochammad Fariz
Mochammad Fariz am 22 Feb. 2020
thanks Image Analyst

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing and Computer Vision finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by