image = | addMarkerImg (inLabelImg,inBinImg,labelValue) |
Assign a new label value to the pixels determined by the input binary image.
This algorithm allows to add a new connected component to the input label image. This new connected component is described by the pixels set to true in the input binary image. The value of the label is provided by the user with the third parameter.
The figure below illustrates an example with the input label (top left) and binary images (bottom left) and the output label image (right) :
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho
Code Example
outImg = morpho.addMarkerImg(imLabel, imBinary, labelValue)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLBasicMorphology/Processor/AddMarkerImg/AddMarkerImg.h>
Code Example
ImagePtr pAutoOutImg = addMarkerImg(pLabelImg, pBinaryImg, newLabelValue);
boost::shared_ptr<MemoryImage> pOutImg(boost::make_shared<MemoryImage>());
pOutImg->init(*pOutputImageGeometry);
addMarkerImg(pLabelImg, pBinaryImg, newLabelValue, pOutImg);