| MIL 10 Reference
| Customize Help
| Save Settings

MimWaveletDenoise



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Perform a wavelet denoising.
Syntax
void MimWaveletDenoise(
MIL_ID WaveletContextImId, //in
MIL_ID SrcImageBufOrWaveletResultImId, //in
MIL_ID DstImageBufOrWaveletResultImId, //in
MIL_INT Level, //in
MIL_ID DenoisingType, //in
MIL_INT64 ControlFlag //in
)
Description

This function performs a denoising on the specified source buffer using a wavelet shrinkage process and places the results in the specified destination buffer. The source and destination can either both be an image or a wavelet result.

This function supports in-place processing; you can specify the identifier of the same buffer for the source and the destination. To specify wavelet controls that can affect this function's results, use MimControl().

To specify wavelet controls that can affect this function's results, use MimControl(). If the destination of this function is a result, you can perform drawing operations with them, using MimDraw().

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
WaveletContextImId

Specifies the identifier of a wavelet image processing context, when performing a wavelet denoising of an image. The context must have been allocated using MimAlloc() with either M_WAVELET_TRANSFORM_CONTEXT or M_WAVELET_TRANSFORM_CUSTOM_CONTEXT. When performing a wavelet denoising of a result, this information is not required; set this parameter to M_NULL.

If you specify a wavelet context, it indicates the filter and mode that this function uses to perform the wavelet denoising. For an M_WAVELET_TRANSFORM_CONTEXT context type, you can set a predefined type of wavelet filter, using MimControl() with M_WAVELET_TYPE. The default is a Haar wavelet filter type. For an M_WAVELET_TRANSFORM_CUSTOM_CONTEXT context type, you must specify custom wavelet filters, using MimWaveletSetFilter(). For either type of context, the default mode is dyadic. To change this (for example, to specify undecimated), use the M_TRANSFORMATION_MODE control.

To inquire about the information in a wavelet image processing context, call MimInquire(). For example, you can retrieve the identifier of the internal buffer containing the wavelet filter values (M_FILTER_..._ID).

SrcImageBufOrWaveletResultImId

Specifies the identifier of the source with which to perform the wavelet denoising. The identifier must be for an image buffer or a wavelet image processing result buffer. The image buffer can be of any type. The wavelet result buffer must have been allocated on the required system using MimAllocResult() with M_WAVELET_TRANSFORM_RESULT. It must hold MimWaveletTransform() results. To retrieve information about wavelet transformation results, use MimGetResult() and MimGetResultSingle().

If the source is an image buffer, the destination must be an image buffer of the same type. If the source is a wavelet result buffer, the destination must be a wavelet result buffer.

If you specify an image buffer, there must not be a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

DstImageBufOrWaveletResultImId

Specifies the identifier of the destination with which to perform the wavelet denoising. The identifier must be for an image buffer or a wavelet image processing result buffer. The image buffer can be of any type. The wavelet result buffer must have been allocated on the required system using MimAllocResult() with M_WAVELET_TRANSFORM_RESULT.

If the destination is an image buffer, the source must be an image buffer of the same type. If the destination is a wavelet result buffer, the source must be a wavelet result buffer.

If you specify an image buffer, there must not be a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

Level

Specifies the transformation level at which to perform the denoising.

Set this parameter to one of the following:

function map For specifying the transformation level
CollapseValue Description
Collapse M_DEFAULT

Specifies that the level information is not required. Only valid when the source is a result. Denoising is performed at the transformation level indicated in the result.

(summarize)
Collapse 0 < Value <= MaxLevel

Specifies the level. Only valid when the source is an image. This function decomposes the image according to the specified number of levels, performs the denoising, and recomposes the image using the same number of levels.

MIL establishes the maximum level to be the point at which denoising at subsequent levels does not provide relevant data. The maximum level depends on the source image and the wavelet image processing context. If the specified level exceeds the maximum level, MIL uses the maximum level.

(summarize)
DenoisingType

Specifies the type of wavelet process with which to perform the denoising.

Set this parameter to one of the following:

function map For specifying the wavelet shrinkage process
CollapseValue Description
Collapse M_BAYES_SHRINK

Specifies predefined BayesShrink denoising techniques. Typically effective for minimizing Gaussian noise.

(summarize)
Collapse M_NEIGH_SHRINK

Specifies predefined NeighShrink denoising techniques. Typically effective when noise is difficult to characterize. Denoising mimics the general behavior of wavelet coefficients by taking neighborhood statistics and dismissing outliers. M_NEIGH_SHRINK is often faster than the other predefined denoising techniques, though results can be less precise.

(summarize)
Collapse M_SURE_SHRINK

Specifies predefined SureShrink denoising techniques. Typically effective for minimizing Mean Square Errors (MSE).

(summarize)
ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
WAVELET TRANSFORM CONTEXT WAVELET TRANSFORM CUSTOM CONTEXT PROC NONE PROC NONE DEFAULT BAYES SHRINK NEIGH SHRINK SURE SHRINK WAVELET TRANSFORM CONTEXT WAVELET TRANSFORM CUSTOM CONTEXT