P. 1
Machine Vision Toolbox for MATLABr3

Machine Vision Toolbox for MATLABr3

|Views: 570|Likes:
Published by betogetherbeurself

More info:

Published by: betogetherbeurself on Apr 20, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/16/2013

pdf

text

original

Pad an image with constants

out=ipad(im,sides,n)isapaddedversionoftheimageimwithablockofNaNvalues
n pixels wide on the sides of im as specified by sides which is a string containing one
or more of the characters:

‘t’ top
‘b’ bottom
‘l’ left
‘r’ right
out = ipad(im, sides, n, v) as above but pads with pixels of value v.

Machine Vision Toolbox for MATLAB R

127

Copyright c Peter Corke 2011

CHAPTER2. FUNCTIONSANDCLASSES

Examples

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)

Notes

• Not a tablet computer.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->