![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/475273/image.png)
How can increase a binary image in size by padding ?
4 次查看(过去 30 天)
显示 更早的评论
I want to pad some zeros at every side of an binary image to make it an image of larger size.
0 个评论
采纳的回答
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)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/475273/image.png)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!