Azzera filtri
Azzera filtri

How to change the image resolution?

43 visualizzazioni (ultimi 30 giorni)
peyush
peyush il 16 Lug 2015
Commentato: peyush il 19 Lug 2015
For example: I have an image whose resolution is 46x67 and I want to change it to 35x45...How should I do that?...any help is highly appreciated
  2 Commenti
B.k Sumedha
B.k Sumedha il 17 Lug 2015
You can use the imresize function.
peyush
peyush il 18 Lug 2015
thanks

Accedi per commentare.

Risposta accettata

Image Analyst
Image Analyst il 18 Lug 2015
You can either crop it
croppedImage = imresize(originalImage, [35, 45]);
or you can use indexing if the original image is larger:
croppedImage = originalImage(topRow:topRow+34, leftColumn:leftColumn+44);
You can make topRow and leftColumn whatever you want, such as 1.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by