Effacer les filtres
Effacer les filtres

How to compare size of to image?

3 vues (au cours des 30 derniers jours)
Femi Joy
Femi Joy le 23 Jan 2013
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.

Réponses (1)

Walter Roberson
Walter Roberson le 23 Jan 2013
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 commentaires
Image Analyst
Image Analyst le 23 Jan 2013
Modifié(e) : Image Analyst le 23 Jan 2013
or simply newB = imresize(B, size(A)); if A is a monochrome image.
Walter Roberson
Walter Roberson le 23 Jan 2013
Not if A is an RGB image: size(A) would have 3 elements instead of 2 in that case.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by