DualThresh

Dual threshold operation. All pixels between the upper and lower thresholds are marked in WHITE.

 

function call:

[out_img1]=vsg('DualThresh',in_img1,low_th,high_th);

 

Arguments:

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

low_th – an integer or double specifying the lower threshold for the dual threshold function.

high_th – an integer or double specifying the higher threshold for the dual threshold function.

 

Description:

Values less than the user defined integer value lower and greater than the defined integer value upper are set to BLACK. Otherwise the pixel is set WHITE.

out_img1 – An image which has dimensions the same as the input image. The output pixel values are white if the input pixel values lie between the upper and lower threshold, and black otherwise.

 

Example:

img = openimage('crown.jpg');

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

[out_img1]=vsg('DualThresh',img, 105, 184);

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

 

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