<< imerode Morphological Operations imgradient >>

IPCV >> Morphological Operations > imfill

imfill

Filling holes for objects in a binary image

Syntax

imout = imfill(imin)

Parameters

imin :

A binary image

imout :

The output with the holes filled.

Description

This function used to fill the holes in a binary image for better object detection purpose.

Examples

S = imread(fullpath(getIPCVpath() + "/images/" + 'coins_gray.jpg'));
subplot(131);imshow(S);
Sbin = im2bw(~S,0.5);
subplot(132);imshow(Sbin);
Sfill = imfill(Sbin);
subplot(133);imshow(Sfill);

See also

Authors


Report an issue
<< imerode Morphological Operations imgradient >>