IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Check multiphased 2d neighourhoodSee full documentation
imagecheckMultiphasedNeighourhood2dImg (inLabelImg,nbLabels,bIgnoreForeground)

Detailed Description

Set the intensity to 1 if the number of neighbours with higher values are greater than the specified input value.

Given an input label image, the algorithm computes a binary image in which pixels are set to 1 if the label image counts at least InNbLabels different labels in its 3x3 neighbourhood.

It is possible to process only background pixels by setting the InIgnoreForeground flag to true.

Here is an example of an result for InNbLabels = 3 (the selected pixels are displayed in green):

checkMultiphasedNeighourhood2dImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# boundary 3d image computation
outImg = morpho.checkMultiphasedNeighourhood2dImg(inImg, 3, True)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLBasicMorphology/Processor/CheckMultiphasedNeighourhood2dImg/CheckMultiphasedNeighourhood2dImg.h>

Code Example

// opening input image
ImagePtr pInLabelImg = loadTiffImageFile(inputImgPath);
// compute boundary on input image
ImagePtr pOutImg = checkMultiphasedNeighourhood2dImg(pInLabelImg, 3, bIgnoreForeground);