CImage:PolyFitDiv
The PolyFitDiv method fits a 2-D polynomial of intensity versus position and divides it into the image.
bResult = CImage:PolyFitDiv( 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 divided into every pixel as a function of position.
When applying this method to integer data types, the resulting image will have very low signal to noise ratio because all the mathematical significance will be truncated to values near 1. To avoid this problem, Mira automatically promotes the data type to float or double as part of the processing.
The following script fragment loads an image from file sPath and divides a 3 x 2 term polynomial into it. A dark defect exists in the region (300:350, 200:300). This is omitted from the fit by specifying the region to a CRect R:
|
-- create a new CImage |
|
-- load the image |
|
-- omit a dark defect from the fit |
|
-- perform the operation on image I |
|
|
|
|
|
|