How to compare size of to image?

I'm a fresher to MATLAB. i m looking for how to compare size of two images, if no then how to make the images to the same size.

답변 (1개)

Walter Roberson
Walter Roberson 2013년 1월 23일

0 개 추천

size() applied to the variable will tell you the dimensions in each direction.
If you have the Image Processing toolbox then imresize() can resize images. For example,
newB = imresize(B, [size(A,1), size(A,2)])

댓글 수: 2

Image Analyst
Image Analyst 2013년 1월 23일
편집: Image Analyst 2013년 1월 23일
or simply newB = imresize(B, size(A)); if A is a monochrome image.
Walter Roberson
Walter Roberson 2013년 1월 23일
Not if A is an RGB image: size(A) would have 3 elements instead of 2 in that case.

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

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

질문:

2013년 1월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by