IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Watershed Grey Separation 2dSee full documentation
imagewatershedGreySeparation2dImg (inIntImg,inShapeGreyscaleType,inDilateFactor,inWatershedSeparationMode)
imagewatershedGreySeparation2dImg (inIntImg,inShapeGreyscaleType,inDilateFactor,inWatershedSeparationMode,inOptWatershedProcMode)

Detailed Description

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

This algorithm, based on watershed algorithm, allows to separate shapes of an input grey image. It is an equivalent of Watershed Binary Separation 2d applied on grey scale images case.

Input grey image InIntImg is classicaly a gradient image since it will be used in place of distance map used in binary case.

Note
In the following, images are given for illustration purpose, used input image is classicaly a gradient image.

Given an input grey image InIntImg, algorithm process following steps :

Parameter InShapeGreyscaleType allows to select for searched shapes type :

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

Code Example

# opening of input images
inGreyImg = PyIPSDK.loadTiffImageFile(inputGreyImgPath)
# process watershed binary separation (split mode)
outImg = advmorpho.watershedGreySeparation2dImg(inGreyImg, PyIPSDK.eShapeGreyscaleType.eSGT_Light, 50,
PyIPSDK.eWatershedSeparationMode.eWSM_Split)

Example of C++ code :

Example informations

Header file

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

Code Example

// opening of input grey image
ImagePtr pInGreyImg = loadTiffImageFile(utImagesCommonPath / "blobs3d_483x348x31_UInt8.tif");
// process grey separation (split mode)
ImagePtr pOutImg = watershedGreySeparation2dImg(pInGreyImg, eShapeGreyscaleType::eSGT_Light, 50, eWatershedSeparationMode::eWSM_Split);