Effacer les filtres
Effacer les filtres

how to resize images

2 vues (au cours des 30 derniers jours)
Naomi Penelope
Naomi Penelope le 31 Août 2021
Modifié(e) : Matt J le 31 Août 2021
Resize image B to 1) RB1, so that max(size(RB1)) = 96, and 2) RB2, so that min(size(RB2)) = 96. You need calculate scaling factors (practice imresize, imshow). Output resized images RB1 and RB2.
What does this mean. how can i resize an image without number of rows and colums? how can i make the min and max 96?

Réponses (1)

Matt J
Matt J le 31 Août 2021
Modifié(e) : Matt J le 31 Août 2021
The question is poorly phrased. It doesn't mention whether you're supposed to keep the aspect ratio the same. Assuming you are, then you can do thinks like,
A=rand([110,200]); %some random image
B=imresize(A,96/max(size(A)));
size(B)
ans = 1×2
53 96

Catégories

En savoir plus sur Read, Write, and Modify Image 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