CImage:PolyFitImage
The PolyFitImage method fits a 2-D polynomial of intensity versus position and evaluates it in the image. Thee evaluated fit replaces all pixels of the original image.
bResult = CImage:PolyFitImage( ct, rt, bConserve=true, CRect=nil ) |
This method fits a polynomial to the image intensity as a function of (x,y) position. The polynomial is then evaluated at each pixel location and inserted into the image. The result is a very smooth image. Unless the input image has very high dynamic range or is in a floating point data type, the output image can have serious Mach banding. If the image is not a color form, Mira avoids this problem by automatically promoting the image data type as part of the processing.
The following script fragment loads an image from file sPath and fits a 7 x 4 term polynomial. The evaluated polynomial is replaced into the image. Since no CRect is specified, the entire image is fit:
|
-- create a new CImage |
|
-- load the image |
|
-- perform the operation on image I |
|
|
|
|