CImage:PolyFitSub
The PolyFitSub method fits a 2-D polynomial of intensity versus position and subtracts it from the image.
bResult = CImage:PolyFitSub( 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 subtracted from every image pixel as a function of position.
After subtracting the polynomial, the signal level can drop below the minimum allowed for some integer data types such as "byte" or "ushort". To avoid this problem, Mira automatically promotes the data type during the processing. If you want more numerical significance in the result for an integer type image, you can use SetDatatype before calling this method to change the image to a float or double type.
The following script fragment loads an image from file sPath and subtracts a 3 x 2 term polynomial from it. Since no CRect is specified, the entire image is fit:
|
-- create a new CImage |
|
-- load the image |
|
-- perform the operation on image I |
|
|
|
|