<< hiseq Image_Processing_Tool_3 linkage >>

Image_Processing_Tool_3 >> Image_Processing_Tool_3 > iterthresh

iterthresh

Computes thresholds iteratively for image binarization

Calling Sequence

thr = iterthresh(x)

Parameters

x

A matrix representing the gray scale image.

thr

A scalar value representing the threshold value for biarizing the gray scale image.

Description

It computes a threshold value for binarizing a gray scale image. The gray scale image matrix is taken as input and the threshold appropriate for binarization is given as output. First an arbitrary value is chosen as threshold value. This threshold value is iteratively modified until it remains unchanged.

Examples

x=imread('lena.png');
x=rgb2gray(x);
x=double(x);
th=iterthresh(x); // computing threshold iteratively
y=x>=th;  // Binarization
imshow(y,[]) // Displaying binarized image y

See Also

Authors

<< hiseq Image_Processing_Tool_3 linkage >>