IPSDK 4.1
IPSDK : Image Processing Software Development Kit
Remove Border 2d
imageremoveBorder2dImg (inBinLabImg)

Detailed Description

removal of connected components in contact with image borders in binary or label 2d images

This algorithm allows to remove connected components in contact with at least an image border in an input binary or label image InBinLabImg with respect to a given neighborhood 2d policy (see 2d neighborhood models).

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

Here is an example of border removal on a binary image 2d :

removeBorder2dImg.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 border removal on input image
outImg = advmorpho.removeBorder2dImg(inBinImg)

Example of C++ code :

Example informations

Header file

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

Code Example

// opening input image
ImagePtr pInBinImg = loadTiffImageFile(inputImgPath);
// compute border removal on input image
ImagePtr pOutImg = removeBorder2dImg(pInBinImg);