Montage Function Problems in MATLAB

조회 수: 5 (최근 30일)
Joydeb Saha
Joydeb Saha 2020년 6월 26일
댓글: Joydeb Saha 2020년 6월 29일
im1 = imread('denstrack_01May.png');
im11 = imresize(im1, [544 1048]);
figure
imshow(im11)
im2 = imread('01.05.19.png');
im22 = imresize(im2, [544 1048]);
figure
imshow(im22)
im3 = imread('1MayCTT.png');
im33 = imresize(im3, [544 1048]);
figure
imshow(im33)
im4 = imread('1may.png');
im44 = imresize(im4, [544 1048]);
figure
imshow(im44)
h=montage(im11,im22,im33,im44);
Why the montage is not working in this case? please help

답변 (2개)

KSSV
KSSV 2020년 6월 26일
Try
montage({im11, im22, im33, im44}) ;
If all your images are 3D, try
montage(cat(3,img1,img2,img3,img4)) ;
  댓글 수: 3
KSSV
KSSV 2020년 6월 29일
not working??? what happens wen you run it? Any error?
Joydeb Saha
Joydeb Saha 2020년 6월 29일
This is the error I received for your first code
Error in montage (line 114)
[I,cmap,mSize,indices,displayRange,parent] = parse_inputs(varargin{:});
This is the error for the second code
Error in montage (line 152)
hh = imshow(bigImage, displayRange,parentArgs{:});

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


Vishal Gaur
Vishal Gaur 2020년 6월 26일
Hi Joydeb,
Syntax of monatge function is not correct. You should modify your code as:
h = montage({im11, im22, im33, im444});
As montage function expects an cell array as input.

카테고리

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