Name

PadImage — appends rows and columns to an image

Calling Sequence

PaddedImage = PadImage(Image, PadValue, Left, Right, Up, Down);

Parameters

Image

2D matrix of numeric or boolean type

PadValue

gray value or (logical value in the case of a boolean image) of the padded pixels

Left

number of columns padded before the left most column

Right

number of columns padded after the right mist column

Up

number of rows added above the top row

Down

number of rows added below the bottom row

PaddedImage

matrix of the same type as Image

Description

This function pads rows and columns to an image.

Examples

Image = rand(3, 3) // generate random image

PaddedImage = PadImage(Image, 0, 1, 1, 1, 1)