ThinImg

The input binary image is thinned N times as specified by the user.

 

function call:

[out_img1]=vsg('ThinImg',in_img1,iters);

 

Arguments:

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

iters – an integer specifying the number of iterations to run the thinning algorithm.

 

Description:

Thinning allows the generation of match-stick like figures while keeping critically connected component.

out_img1 - An image which has dimensions the same as the input image. The output image displays a thinned version of the input white objects.

 

Example:

img = openimage('A.jpg');

h=figure;image(img);

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

[out_img1]=vsg('ThinImg',out_img1,30);

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

Notes:

1. For DICOM images, the function operates on each slice separately.

2. For RGB images, the function operates on each channel separately.

Home       Functions       Back