IPSDK 0.2
IPSDK : Image Processing Software Development Kit
imagefillHole2dImg (inBinImg)

Detailed Description

holes filling in a binary 2d image

This algorithm allows to fill holes inside connected components in an input binary image InBinImg with respect to a given neighborhood 2d policy (see 2d neighborhood models).

Two versions of this algorithm are implemented which can be selected using attribute InOptOptimizationPolicy which associated to enumerate ipsdk::imaproc::attr::eProcessingOptimizationPolicy :

Here is an example of hole filling algorithm on an image 2d :

fillHole2dImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input image
inBinImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# compute hole filling on input image
outImg = advmorpho.fillHole2dImg(inBinImg)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/FillHole2dImg/FillHole2dImg.h>

Code Example

// opening input image
ImagePtr pInBinImg = loadTiffImageFile(inputImgPath);
// compute hole filling on input image
ImagePtr pOutImg = fillHole2dImg(pInBinImg);