IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Grey Reconstruction 2dSee full documentation
imagegreyMaxReconstruction2dImg (inImg,inGreyMarkImg)
imagegreyMinReconstruction2dImg (inImg,inGreyMarkImg)

Detailed Description

grey reconstruction of an image 2d

This algorithm is an equivalent of Binary Reconstruction 2d applied on grey scale images case.

Grey scale values of input marker image InGreyMarkImg3d are locally dilated with respect to input image InImg3d local extrema.

Extrema search type is controlled by InLocalExtremumType parameter.

The behavior of this algorithm is illustrated in case of a 1d signal by the following figures :

Note
this algorithm is mainly used during processing of Dilate Local Extrema 2d algorithm.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
import PyIPSDK.IPSDKIPLArithmetic as arithm
import PyIPSDK.IPSDKIPLUtility as util

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# creation of a marker image
inGreyMarkImg = arithm.addScalarImg(inImg, -5)
inGreyMarkImg = util.convertImg(inGreyMarkImg, inImg.getBufferType())
# maxima grey reconstruction 2d computation
outImg = advmorpho.greyMaxReconstruction2dImg(inImg, inGreyMarkImg)

Example of C++ code :

Example informations

Header file

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

Code Example

// opening of input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// creation of a marker image
ImagePtr pInGreyMarkImg = addScalarImg(pInImg, -5);
pInGreyMarkImg = convertImg(pInGreyMarkImg, pInImg->getBufferType());
// process maxima grey reconstruction
ImagePtr pOutMaxImg = greyMaxReconstruction2dImg(pInImg, pInGreyMarkImg);
// process minima grey reconstruction
ImagePtr pOutMinImg = greyMinReconstruction2dImg(pInGreyMarkImg, pInImg);