image = | addImgImg (inImg1,inImg2) |
addition of 2 images
On output image values are given by:
Input and output images must have same size.
Here is an example of an addition operation applied to two 8-bits grey level images:
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLArithmetic as arithm
Code Example
inGeometry = PyIPSDK.geometry2d(PyIPSDK.eImageBufferType.eIBT_UInt8, 510, 509)
inImg1 = PyIPSDK.loadRawImageFile(inputImg1Path, inGeometry)
inImg2 = PyIPSDK.loadRawImageFile(inputImg2Path, inGeometry)
outImg = arithm.addImgImg(inImg1, inImg2)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLArithmetic/Processor/AddImgImg/AddImgImg.h>
Code Example
ImagePtr pAutoOutImg = addImgImg(pInImg1, pInImg2);
boost::shared_ptr<MemoryImage> pOutImg(boost::make_shared<MemoryImage>());
pOutImg->init(*pOutputImageGeometry);
addImgImg(pInImg1, pInImg2, pOutImg);