How can increase a binary image in size by padding ?

16 vues (au cours des 30 derniers jours)
Zara Khan
Zara Khan le 31 Déc 2020
Commenté : Ameer Hamza le 31 Déc 2020
I want to pad some zeros at every side of an binary image to make it an image of larger size.

Réponse acceptée

Ameer Hamza
Ameer Hamza le 31 Déc 2020
Modifié(e) : Ameer Hamza le 31 Déc 2020
For example
im = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/475268/img.png');
pad_size = 20;
im_new = padarray(im, [pad_size pad_size]);
imshow(im_new)
  2 commentaires
Zara Khan
Zara Khan le 31 Déc 2020
Thank you so much !
Ameer Hamza
Ameer Hamza le 31 Déc 2020
I am glad to be of help!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by