outImg,offset,factor = | smartParaboloidShadingCorrection2dImg (inImg,whiteImgParaboloidModel,outputRange) |
offset,factor = | smartParaboloidShadingCorrection2dImg (inImg,whiteImgParaboloidModel,outputRange,outImg) |
outImg,offset,factor = | smartParaboloidShadingCorrection2dImg (inImg,blackImg,whiteImgParaboloidModel,outputRange) |
offset,factor = | smartParaboloidShadingCorrection2dImg (inImg,blackImg,whiteImgParaboloidModel,outputRange,outImg) |
corrects an input image for shading, using an analytic paraboloid model for the white image, and normalize output image so that it fits an expected dynamic range
Given:
- an input image

- the analytic equation of a paraboloid for the white image
- an optional black image,
, whose dimensions and data types are identical to input image dimensions and data types,
- a dynamic range expected for output image
the algorithm computes
and
described in Shading correction (white image represented as a paraboloid), so that output image resulting from shading correction fits in the dynamic range specified by the user.
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLIntensityTransform as itrans
import PyIPSDK.IPSDKIPLFiltering as filter
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outputRange = PyIPSDK.createRange(1, 254)
paraboloidWhite, bResRead = PyIPSDK.readFromXmlFile(whiteParaboloidPath)
outImg, offset, factor = itrans.smartParaboloidShadingCorrection2dImg(inImg, paraboloidWhite, outputRange)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLIntensityTransform/Processor/SmartParaboloidShadingCorrection2dImg/SmartParaboloidShadingCorrection2dImg.h>
Code Example
readFromXmlFile(whitePath, *pParaboloid);
ImagePtr pBlackImg;
RangePtr pRange(boost::make_shared<Range>());
pRange->setValue<Range::Min>(5);
pRange->setValue<Range::Max>(250);
SmartShadingCorrectionResult sscRes = smartParaboloidShadingCorrection2dImg(pInImg, pBlackImg, pParaboloid, pRange);
ImagePtr pAutoOutImg = sscRes._pOutImg;
ipReal64 offset = sscRes._offset;
ipReal64 factor = sscRes._factor;