Pad an image with constants
out = ipad(im, sides, n) is a padded version of the image im with a block of NaN values n pixels wide on the sides of im as specified by sides.
out = ipad(im, sides, n, v) as above but pads with pixels of value v.
sides is a string containing one or more of the characters:
| 't' | top |
| 'b' | bottom |
| 'l' | left |
| 'r' | right |
Add a band of zero pixels 20 pixels high across the top of the image:
ipad(im, 't', 20, 0)
Add a band of white pixels 10 pixels wide on all sides of the image:
ipad(im, 'tblr', 10, 255)
Machine Vision Toolbox for MATLAB © 1990-2014 Peter Corke.