image = | localMaxima3dImg (inImg3d) |
image = | localMinima3dImg (inImg3d) |
algorithm allowing to extract local extremum 3d from an image
This algorithm allows, given an input image InImg3d and a searched extrema type defined by InLocalExtremumType parameter, to compute a binary ouput image OutBinImg where all set pixels are local extrema.
This means that if a pixel is set in output image, all neighbor value respect one of following condition :
- neighbor value is lower in case of maxima search (or greater in case of minima search)
- neighbor value is equal and neighbor is also a extrema (plateau case with neighbor pixel set in output image)
This is illustrated in case of a 1d signal :
An example of local maxima extraction is illustrated in 2d case : see Local Extrema 2d.
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = advmorpho.localMaxima3dImg(inImg)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/LocalExtrema3dImg/LocalExtrema3dImg.h>
Code Example
ImagePtr pOutMaxImg = localMaxima3dImg(pInImg);
ImagePtr pOutMinImg = localMinima3dImg(pInImg);