Change dimensions of 2d data
Afficher commentaires plus anciens
I have a 2d matrix of size 3281*3164 with pixel size 0.009 , I want to convert it to size 2987*2880 with pixel size 0.01. Can anyone help?
Réponses (1)
Mohammad Sami
le 3 Juin 2020
You can use the imresize function to scale the image up or down.
a = rand(3281,3164);
b = imresize(a,0.91024);
3 commentaires
Avinash Nunna
le 3 Juin 2020
darova
le 13 Juin 2020
maybe interp2?
Mohammad Sami
le 15 Juin 2020
Modifié(e) : Mohammad Sami
le 15 Juin 2020
Im resize support both scale factor and absolute size.
a = rand(3281,3164);
b = imresize(a,[2987 2880]);
Catégories
En savoir plus sur Read, Write, and Modify Image dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!