MIL_ID DeadPixelContextImId, | //in |
MIL_ID SrcImageBufId, | //in |
MIL_ID DstImageBufId, | //in |
MIL_INT64 ControlFlag | //in |
This function corrects dead pixels in the specified source image and places the resulting image in the destination image buffer. Dead pixels are replaced with an average of their non-dead pixel neighbors. Other pixels are copied from the source image buffer into the destination image buffer.
Before using this function, you must add the list of the coordinates of the dead pixels to the context, using MimPut() and two arrays (one for the X-coordinates and one for the Y-coordinates). Alternatively, you can add an image identifying the locations of the dead pixels to the context, using MimControl() with M_DEAD_PIXELS; this image acts as a dead pixel mask. In the dead pixel mask image, all non-zero pixels are considered dead pixels.
Specify the interpolation mode using MimControl() with M_INTERPOLATION_MODE. By default, the interpolation mode is M_AVERAGE.
The source and destination image buffers must be as large as (or larger than) the dead pixel mask, or equal to or larger than the largest specified coordinates of the dead pixels.
Once the dead pixel correction image processing context is configured, preprocess the context by calling MimDeadPixelCorrection() with M_PREPROCESS. If the preprocess operation was not done explicitly (using M_PREPROCESS), it will be done when MimDeadPixelCorrection() is first called. When preprocessed 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 the dead pixels image processing context. The context must have been allocated using MimAlloc() with M_DEAD_PIXEL_CONTEXT. In addition, the dead pixel image processing context must be already configured with the location of the dead pixels.
Specifies the identifier of the source image buffer. The buffer must be a single-band image buffer.
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.
If performing a preprocess operation on the image processing context, set this parameter to the identifier of a typical source image buffer. Otherwise, to exclude this buffer from preprocessing, set this parameter to M_NULL.
Specifies the identifier of the destination image buffer. The buffer must be a single-band image buffer.
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.
If performing a preprocess operation on the image processing context, set this parameter to the identifier of a typical destination image buffer. Otherwise, to exclude this buffer from preprocessing, set this parameter to M_NULL.
Specifies the control flag. This parameter must be set to one of the following:
For preprocessing the dead pixel image
processing context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Corrects the dead pixels present in the source image. |
||||||||||||||||||||||||||||||||||||||
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. |