MATLAB: How can i use zero-padding in an image

convconvolutionimage processingImage Processing Toolboxpadarrayzero padding

Hello ,
I have an image(512×512) and i want to do zero-padding in order to covolute it with a filter .
The problem here is that i dont know how to do that ,meaning that i dont know where the zeros should be (around the image or next to it) and furthermore the size of the zero-padding.
Any help would be valuable.

Best Answer

There is a built-in function for that. It's called padarray().
Related Question