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