MaskImg

An image whose border is masked by a user specified amount.

 

function call:

[out_img1]=vsg('MaskImg',in_img1,thickness);

 

Arguments:

in_img1 input image, 3 channel RGB, 1 channel greyscale or binary image, or DICOM image.

thickness – an integer value specify the thickness of the black border.

 

Description:

[out_img1]=vsg('MaskImg',in_img1,thickness) – out_img1 is an image which is the same as the input image, except the output image has a frame of pixels at its edge, which are set to black (0). The thickness of this edge is specified as an argument.

 

Example:

img1 = openimage('baboon.jpg');

h=figure;image(uint8(img1));set(h,'Name','Input image');

[out_img1]=vsg('MaskImg',img1,5);

h=figure; image(uint8(out_img1));set(h,'Name','Mask image');

Notes:

For DICOM images, a mask is placed on each slice.
Home       Functions       Back