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

조회 수: 1 (최근 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 CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by