SIP Toolbox

im2bw - Convert images to binary by thresholding

Calling Sequence

BW = im2bw(Img, level [, maxvalue])
BW = im2bw(Index, map, level [, maxvalue])

Input Parameters

Output Parameters

Description

Function im2bw converts RGB images, indexed images and grayscale intensity images to binary, by thresholding.

Examples

       initial_dir = PWD;
       chdir (SIPDIR + 'images');
       [Img,map] = imread('indian.bmp');
       xbasc()
       imshow(Img, map);
       bw = im2bw(Img, map,0.5);
       imshow(bw,2);
       bw = im2bw(Img, map,0.2);
       imshow(bw,2);
       chdir(initial_dir);
   

Authors

Ricardo Fabbri <ricardofabbri (AT) users DOT sf DOT net>

Availability

The latest version of the Scilab Image Processing toolbox can be found at

http://siptoolbox.sourceforge.net

See Also

im2gray,