How can i use imshow to read matrix??

조회 수: 3 (최근 30일)
Dart Min
Dart Min 2019년 12월 2일
답변: JESUS DAVID ARIZA ROYETH 2019년 12월 2일
Hey guys. I have a 5x5 matrix and this matrix concludes 25 different image(jpg).All images are 64x64.
For explain A(1,1)=image1.jpg A(1,2)=image2.jpg...... A(5,5)=image25.jpg.
But when i want to use imshow(A) this error comes: imshow: IM must be an image or the FILENAME of an image
I must use imshow becaouse this is my hmwork.
What did i wrong? Help me please.

답변 (1개)

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019년 12월 2일
solution:
A=reshape(split(num2str(1:25,'image%i.jpg ')),5,5)';
figure
imshow(cell2mat(cellfun(@imread,A,'uni',false)))

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by