IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Watershed Binary Separation 2dSee full documentation
imagewatershedBinarySeparation2dImg (inBinImg,inDilateFactor,inWatershedSeparationMode)
imagewatershedBinarySeparation2dImg (inBinImg,inDilateFactor,inWatershedSeparationMode,inOptWatershedProcMode)

Detailed Description

algorithm, based on watershed, allowing to separate binary 2d shapes

This algorithm, based on distance map and watershed algorithms, allows to separate shapes of an input binary image.

Given an input binary image InBinImg, algorithm process following steps :

Global output of a algorithm can be customized using parameter InWatershedSeparationMode which can take following values :

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
import PyIPSDK.IPSDKIPLBinarization as bin

Code Example

# opening of input images
inGreyImg = PyIPSDK.loadTiffImageFile(inputGreyImgPath)
# threshold of input image
inBinImg = bin.thresholdImg(inGreyImg, 75, 255)
# process watershed binary separation (split mode)
outImg = advmorpho.watershedBinarySeparation2dImg(inBinImg, 5,
PyIPSDK.eWatershedSeparationMode.eWSM_Split)

Example of C++ code :

Example informations

Header file

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

Code Example

// opening of input grey image
ImagePtr pInGreyImg = loadTiffImageFile(inputGreyImgPath);
// threshold of input image
ImagePtr pBinImg = thresholdImg(pInGreyImg, 75, 255);
// process binary separation (split mode)
ImagePtr pOutImg = watershedBinarySeparation2dImg(pBinImg, 5, eWatershedSeparationMode::eWSM_Split);