Watershed

Watershed transform (return the watershed image and the region boundaries image).

 

function call:

[out_img1,out_img2]=vsg('Watershed',in_img1);

 

Arguments:

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

 

Description:

out_img1 – An image which has dimensions the same as the input image. This is the labelled regions image.

out_img2 – An image which has dimensions the same as the input image. This is the edges of the labelled regions, the watershed lines.

Example:

img = openimage('crown.jpg');

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

[out_img1,out_img2]=vsg('Watershed',img);

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

 

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