AUTOTHRESHOLD_CVIP

autothreshold_cvip() - Automatic thresholding of an image.

Contents

SYNTAX

outImage = autothreshold_cvip(inImage, limit)

Input Parameters include :

Output Parameter include :

DESCRIPTION

The function performs the automatic threshold operation of an image. The threshold value depends on the limit. The threshold value will be updated repeatedly until the error between new threshold and old threshold is equal or less than limit. Usually the limit value is the small value (typically 0 to 20.0).If the limit value is less, the threshold value is good.

REFERENCE

1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.

EXAMPLE

% Read Image

  I = imread('raphael.jpg');       %original image

% Call function

  O1 = autothreshold_cvip(I);      %default: limit = 10.0
  limit = 2.5;                        %new limit
  O2 = autothreshold_cvip(I,limit);   %user specified limit

% Display Input Image

  figure;imshow(I);title('Input Image 1');

% Display Output Image

  figure;imshow(O1,[]);title('Output Image - Default Limit');
  figure;imshow(O2,[]);title('Output Image - User Specified Limit');

CREDITS

Author: Norsang Lama, March 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website