IM2BW(1)

NAME
im2bw - convert images to binary by thresholding

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

PARAMETERS

Img M x N x 3 truecolor image or M x N grayscale intensity image.

index and map
    M x N indexed image and its M x 3 colormap.

level
    the threshold level, between 0 to 1.

maxvalue
    the maximum value to assume Img can take. (Optional, defaults to 255.)

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

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

AUTHORS
Ricardo Fabbri <rfabbri@if.sc.usp.br>

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

    http://cyvision.if.sc.usp.br/~rfabbri/sip/

SEE ALSO
im2gray