image = | dilateLocalMaxima3dImg (inImg3d,inDilateFactor) |
image = | dilateLocalMinima3dImg (inImg3d,inDilateFactor) |
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) :
where pixel with index
is :
- connected to pixel with index
in output image
- greater than or equal to all other values (local maxima) in the connected component associated to the pixel with index
.
This is illustrated in case of a 1d signal :
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
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = advmorpho.dilateLocalMaxima3dImg(inImg, 5)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/DilateLocalExtrema3dImg/DilateLocalExtrema3dImg.h>
Code Example
ImagePtr pOutMaxImg = dilateLocalMaxima3dImg(pInImg, 5);
ImagePtr pOutMinImg = dilateLocalMinima3dImg(pInImg, 5);