How can increase a binary image in size by padding ?

17 ビュー (過去 30 日間)
Zara Khan
Zara Khan 2020 年 12 月 31 日
コメント済み: Ameer Hamza 2020 年 12 月 31 日
I want to pad some zeros at every side of an binary image to make it an image of larger size.

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 12 月 31 日
編集済み: Ameer Hamza 2020 年 12 月 31 日
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 件のコメント
Zara Khan
Zara Khan 2020 年 12 月 31 日
Thank you so much !
Ameer Hamza
Ameer Hamza 2020 年 12 月 31 日
I am glad to be of help!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by