i have 1000*1000 pixel image.how can i convert it into m*n(400*300) pixel image.

1 vue (au cours des 30 derniers jours)
ajay kumar
ajay kumar le 4 Déc 2013
Commenté : Walter Roberson le 4 Déc 2013
i have 1000*1000 pixel image.how can i convert it into m*n(400*300) pixel image.
  1 commentaire
Walter Roberson
Walter Roberson le 4 Déc 2013
When you do this, you are going from an image that has equal-length sides (a square) to an image that has a 4:3 aspect ratio. In order to do that you will have to cut out some of the image (e.g, resize to 400 x 400 and then cut 100), or else you will need to resize unequally so that what was a circle becomes an ellipse ("squished" from one side.)
There is no way to resize a square image to a 4:3 aspect ratio and keep all of the information in the same size proportions as the original.

Connectez-vous pour commenter.

Réponses (1)

Sabarinathan Vadivelu
Sabarinathan Vadivelu le 4 Déc 2013
outputImage = imresize(inputImage,[400 300]);

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by