IPSDK 4.1
IPSDK : Image Processing Software Development Kit
Erase
"memItemRight" valign="bottom">eraseImg (outImg) "memItemRight" valign="bottom">eraseImg (outImg,inOptEraseValue)

Detailed Description

Algorithm allowing to erase values of an image.

This algorithm allows to erase values of an image with a given value $InEraseValue$.
On output image value are given by :

\[ OutImg[i] = InEraseValue \]

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLUtility as util

Code Example

# image erasing with default 0 value
img1 = PyIPSDK.createImage(PyIPSDK.eImageBufferType.eIBT_UInt8, 510, 509)
util.eraseImg(img1)
# image erasing with custom value
img2 = PyIPSDK.createImage(img1.getGeometry())
util.eraseImg(img2, 5)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLUtility/Processor/EraseImg/EraseImg.h>

Code Example

// creation of an input image
ImageGeometryPtr pImageGeometry = geometry2d(imageBufferType, sizeX, sizeY);
boost::shared_ptr<MemoryImage> pInImg(boost::make_shared<MemoryImage>());
pInImg->init(*pImageGeometry);
// erase of image
eraseImg(pInImg);