Pad (augment) a matrix for application of image processing algorithms.
Pads the input image A with xpad(1) elements from left, xpad(2), elements from right, ypad(1) elements from above and ypad(2) elements from below. Values of padding elements are determined from the optional arguments padding and const. padding is one of
- ‘"zeros"’
- pad with zeros (default)
- ‘"ones"’
- pad with ones
- ‘"constant"’
- pad with a value obtained from the optional fifth argument const
- ‘"symmetric"’
- pad with values obtained from A so that the padded image mirrors A starting from edges of A
- ‘"reflect"’
- same as symmetric, but the edge rows and columns are not used in the padding
- ‘"replicate"’
- pad with values obtained from A so that the padded image repeates itself in two dimensions