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

2 ビュー (過去 30 日間)
Mochammad Fariz
Mochammad Fariz 2020 年 2 月 22 日
コメント済み: Mochammad Fariz 2020 年 2 月 22 日
im working with color based image retrieval..i have array cell containing list filename..how can i display them in gui using for loop??

採用された回答

Walter Roberson
Walter Roberson 2020 年 2 月 22 日
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 件のコメント
Image Analyst
Image Analyst 2020 年 2 月 22 日
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 2020 年 2 月 22 日
thanks Image Analyst

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by