image = | greyMaxReconstruction2dImg (inImg,inGreyMarkImg) |
image = | greyMinReconstruction2dImg (inImg,inGreyMarkImg) |
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
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
inGreyMarkImg = arithm.addScalarImg(inImg, -5)
inGreyMarkImg = util.convertImg(inGreyMarkImg, inImg.getBufferType())
outImg = advmorpho.greyMaxReconstruction2dImg(inImg, inGreyMarkImg)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/GreyReconstruction2dImg/GreyReconstruction2dImg.h>
Code Example
pInGreyMarkImg =
convertImg(pInGreyMarkImg, pInImg->getBufferType());
ImagePtr pOutMaxImg = greyMaxReconstruction2dImg(pInImg, pInGreyMarkImg);
ImagePtr pOutMinImg = greyMinReconstruction2dImg(pInGreyMarkImg, pInImg);