简体   繁体   English

如何通过将原始图像放在matlab的中间来填充不同大小的图像并使它们具有相同的大小?

[英]how to pad images of different sizes and making them of same size by putting the original image in the middle in matlab?

I have images of different sizes. 我有不同尺寸的图像。 I want to specify the width and the height. 我想指定宽度和高度。 All the images should be padded with black pixels putting the actual image in the middle. 所有图像均应填充黑色像素,以将实际图像置于中间。

Thanks a lot 非常感谢

您可以使用padarray指定要在图像边缘周围添加多少个黑色像素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM