Create a mask for blocking out border pixels where convolution with a filter is not valid (since the convolution extends beyond the border of the image).
Create a mask for blocking out border pixels where convolution with a filter is not valid (since the convolution extends beyond the border of the image).
Note that the size of the border equals half the filter size rounded down.
Shape of the image to be masked.
Size of filter that implies the valid region of a convolution.
Field with 1's in the center, 0's around border.
Compute the number of invalid border pixels for an input image if convolved with a filter.
Compute the number of invalid border pixels for an input image if convolved with a filter.
Shape of input image.
Size of filter to be convolved with input image.
Number of border points in the output of the convolution.
Compute the number of valid pixels for an input image if convolved with a filter.
Compute the number of valid pixels for an input image if convolved with a filter.
Shape of input image.
Size of filter to be convolved with input image.
Number of valid points in the output of the convolution.
Creates a mask for an image with 1's in the center of the "valid" region (for convolution or cross correlation) and 0's around the border.