IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Local Extrema 2dSee full documentation
imagelocalMaxima2dImg (inImg)
imagelocalMinima2dImg (inImg)

Detailed Description

algorithm allowing to extract local extrema 2d from an image

This algorithm allows, given an input image InImg 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 :

This is illustrated in case of a 1d signal :

localExtremaGraph.png

Here is an example of a local maxima extraction applied to an unsigned char input image :

localExtrema2dImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# local maxima 2d computation
outImg = advmorpho.localMaxima2dImg(inImg)

Example of C++ code :

Example informations

Header file

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

Code Example

// opening of input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// mark local maxima in input image
ImagePtr pOutMaxImg = localMaxima2dImg(pInImg);
// mark local minima in input image
ImagePtr pOutMinImg = localMinima2dImg(pInImg);