MIL_ID FlatFieldContextImId, | //in |
MIL_ID SrcImageBufId, | //in |
MIL_ID DstImageBufId, | //in |
MIL_INT64 ControlFlag | //in |
This function applies a per-pixel gain and offset correction to the source image and writes the results in the destination image. This process removes artifacts from grabbed images, such as electrical bias, thermal agitation, and sensitivity variations.
The following equation defines the relationship between the source and destination pixel values.
Before using this function, you must configure the specified image processing context with the gain to apply, and the electrical bias, thermal agitation, and CCD sensitivity to remove, using MimControl(); otherwise, an error is reported. You can specify each of these on a per-pixel level using an image or on a global level using a constant.
Once the flat-field correction image processing context is configured, preprocess the context by calling MimFlatField() with M_PREPROCESS. If the preprocess operation is not done explicitly (using M_PREPROCESS), it will be done when MimFlatField() is first called. When preprocessing explicitly, the source and destination image buffers can be set to M_NULL. If, however, the source or destination image buffer is provided, it will be used in the preprocess operation, to better optimize future calls.
Specifies the identifier of a flat-field image processing context, previously allocated using MimAlloc() with M_FLAT_FIELD_CONTEXT.
Specifies the identifier of the source image buffer. The buffer must be either an 8- or 16-bit unsigned image buffer.
When preprocessing a flat-field image processing context, set this parameter to the identifier of a typical source image buffer. Otherwise, to exclude the buffer from preprocessing, set this parameter to M_NULL.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
Specifies the identifier of the destination image buffer. The buffer must be either an 8- or 16-bit unsigned image buffer.
When preprocessing a flat-field image processing context, set this parameter to the identifier of a typical destination image buffer. Otherwise, to exclude the destination image buffer from preprocessing, set this parameter to M_NULL.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
Specifies the operation to perform. This parameter must be set to one of the following values.
For specifying the operation to
perform.
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Performs the flat-field correction operation. |
||||||||||||||||||||||||||||||||||||||
M_PREPROCESS |
Preprocesses the specified image processing context. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |