ImLab Scilab Function
Last update :
imotsu - threshold computing using OTSU method
Calling Sequence
-
[threshold,discriminant] = imotsu(image_data,thresh_nb[,mask])
Parameters
-
image_data
: image pixel values
-
thresh_nb
: number of thresh that have to be computed (1 or 2)
-
mask
: matrix returned by an ImLab function or user-defined matrix having the same size than image_data, allows to compute the output value only for the area which is selected. If mask is defined, the output value is computed only for values of image_data corresponding to non zero value in mask
-
threshold
: computed threshold
-
discriminant
: separability coefficient corresponding to 'threshold'
Description
This function computes the threshold maximising between class variance of an image using OTSU method.
HOW TO THRESH AN IMAGE :
image_data(image_data<threshold)=0;
image_data(image_data>=threshold)=1;