| image = | removeSmallHoles2dImg (inBinImg,minShapeSize) |
| image = | removeBigHoles2dImg (inBinImg,minShapeSize) |
Removes small or big holes in a binary 2d image.
This algorithm allows to remove small or big holes in a 2D binary image.
removeSmallHoles2dImg removes small holes with a number of pixels lower than InMinShapeSize.
removeBigHoles2dImg removes small holes with a number of pixels higher than InMinShapeSize.
Here is an example of small and big holes removals:
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
Code Example
inBinImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImgSmall = advmorpho.removeSmallHoles2dImg(inBinImg, 120)
outImgBig = advmorpho.removeBigHoles2dImg(inBinImg, 120)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/RemoveHoles2dImg/RemoveHoles2dImg.h>
Code Example
ImagePtr pOutImgSmall = removeSmallHoles2dImg(pInBinImg, 120);
ImagePtr pOutImgBig = removeBigHoles2dImg(pInBinImg, 120);