IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Dilate Local Extrema 3dSee full documentation
imagedilateLocalMaxima3dImg (inImg3d,inDilateFactor)
imagedilateLocalMinima3dImg (inImg3d,inDilateFactor)

Detailed Description

algorithm allowing to extract dilated local extrema 3d from an image

This algorithm allows, given an input image InImg3d, a dilation factor InDilateFactor and a searched extrema type defined by InLocalExtremumType parameter, to compute a binary ouput image OutBinImg where all set pixels are part of a dilated local extrema.

Note
This algorithm is an extension of Local Extrema 3d algorithm allowing to dilate (and in some case merge) local extrema. Using this algorithm with a value of InDilateFactor set to 0 is equivalent of using Local Extrema 3d algorithm.
Dilation factor InDilateFactor is a grey scale factor (not a geometric factor) since local extrema are dilated with a distance based on grey scale difference.

Output image is computed has follow (local maxima case) :

\[ OutBinImg[i] = \left\{ \begin{matrix} 1 & if & InImg3d[i] >= InImg3d[E_i] - InDilateFactor \\ 0 & otherwise \end{matrix} \right. \]

where pixel with index $E_i$ is :

This is illustrated in case of a 1d signal :

dilateLocalExtremaGraph.png

Examples of dilated local maxima extraction are illustrated in 2d case : see Dilate Local Extrema 2d.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# dilate local maxima 3d computation
outImg = advmorpho.dilateLocalMaxima3dImg(inImg, 5)

Example of C++ code :

Example informations

Header file

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

Code Example

// opening of input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// mark local maxima in input image
ImagePtr pOutMaxImg = dilateLocalMaxima3dImg(pInImg, 5);
// mark local minima in input image
ImagePtr pOutMinImg = dilateLocalMinima3dImg(pInImg, 5);