IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Assign a new label value to the pixels determined by the input binary image. More...

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::addMarkerImg (const image::ImageConstPtr &pInLabelImg, const image::ImageConstPtr &pInBinImg, const ipUInt32 labelValue)
 wrapper function for Assign a new label value to the pixels determined by the input binary image More...
 
IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::addMarkerImg (const image::ImageConstPtr &pInLabelImg, const image::ImageConstPtr &pInBinImg, const ipUInt32 labelValue, const image::ImagePtr &pOutLabelImg)
 wrapper function for Assign a new label value to the pixels determined by the input binary image More...
 

Detailed Description

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) :

addMarkerImg.png

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InLabelImg [Input] label image for processing operation X
ipsdk::imaproc::attr::InBinImg [Input] binary image for processing operation X
ipsdk::imaproc::attr::InLabelValue [Input] Label value in an image X
ipsdk::imaproc::attr::OutLabelImg [Output] label image for processing operation ipsdk::imaproc::duplicateInOut (_pOutLabelImg, _pInLabelImg)

Global Rule description

Global rule description for algorithm :
imaproc::matchSize (_pInLabelImg,_pInBinImg,_pOutLabelImg)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho

Code Example

# add marker 2d image computation
outImg = morpho.addMarkerImg(imLabel, imBinary, labelValue)

Example of C++ code :

Example informations

Associated library

IPSDKIPLBasicMorphology

Header file

Code Example

// Sample with a generated output image
// ------------------------------------
// compute addition of input images
ImagePtr pAutoOutImg = addMarkerImg(pLabelImg, pBinaryImg, newLabelValue);
// Sample with a provided output image
// -----------------------------------
// create output image
ImageGeometryPtr pOutputImageGeometry = geometry2d(eImageBufferType::eIBT_Label16, sizeX, sizeY);
boost::shared_ptr<MemoryImage> pOutImg(boost::make_shared<MemoryImage>());
pOutImg->init(*pOutputImageGeometry);
// compute addition of input images
addMarkerImg(pLabelImg, pBinaryImg, newLabelValue, pOutImg);
See also
AddMarkerImgLvl1
AddMarkerImgLvl2
AddMarkerImgLvl3

Function Documentation

◆ addMarkerImg() [1/2]

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::addMarkerImg ( const image::ImageConstPtr pInLabelImg,
const image::ImageConstPtr pInBinImg,
const ipUInt32  labelValue 
)

wrapper function for Assign a new label value to the pixels determined by the input binary image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ addMarkerImg() [2/2]

IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::addMarkerImg ( const image::ImageConstPtr pInLabelImg,
const image::ImageConstPtr pInBinImg,
const ipUInt32  labelValue,
const image::ImagePtr pOutLabelImg 
)

wrapper function for Assign a new label value to the pixels determined by the input binary image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure