Algorithm allowing to bound image values to a given range algorithm.
Given an input image
and an input range for output image
, output image values are given by :
Here is an example of image bound applied to a 8-bits grey level image with
:
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLArithmetic as arithm
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = arithm.boundImg(inImg, PyIPSDK.createRange(75, 150))
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLArithmetic/Processor/BoundImg/BoundImg.h>
Code Example
RangePtr pRange(boost::make_shared<Range>());
pRange->setValue<Range::Min>(75);
pRange->setValue<Range::Max>(150);
ImagePtr pOutImg = boundImg(pInImg, pRange);