GSCapThresh

Sets all pixels of the input image which are less than the specified threshold to black.

 

function call:

[out_img1]=vsg('GSCapThresh',in_img1,num1);

 

Arguments:

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

num1 – an integer or double specifying the threshold for the greyscale cap threshold function.

 

Description:

out_img1 – An image which has dimensions the same as the input image. The output pixel values are the input pixel values if they are larger than num1, otherwise they are black.

 

Example:

img=openimage('crown.jpg');

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

[out_img1]=vsg('GSCapThresh',img,100);

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

 

Notes:

1. For DICOM images, the function operates on all slices separately.

2. For RGB images, the function operates on all colour planes separately.

Home       Functions    Back