how to remove padarray from image?
Afficher commentaires plus anciens
adding padarray makes the image from 256x256 image to 258x258. how to make image back to 256x256 ?
1 commentaire
By the same OP (the accepted solution uses padarray):
Réponses (2)
Jos (10584)
le 8 Fév 2016
A = magic(4)
n = 2
B = padarray(A,[n n]) % pad
A2 = B(n+1:end-n,n+1:end-n) % unpad
or directly:
A2 = A
Image Analyst
le 8 Fév 2016
0 votes
Simply don't call it. Why did you call it if you don't want what it does?
2 commentaires
kashika sharma
le 8 Fév 2016
Image Analyst
le 8 Fév 2016
Like Jos says, you can just extract the central part with indexing:
out = yourArray(2:end-1, 2:end-1);
Catégories
En savoir plus sur Image Processing and Computer Vision dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!