| Customize Help
| Save Settings

MimWaveletTransform



Function Map
Synopsis
Perform a wavelet transformation.
Syntax
void MimWaveletTransform(
MIL_ID WaveletContextImId, //in
MIL_ID SrcImageBufOrWaveletResultImId, //in
MIL_ID DstImageBufOrWaveletResultImId, //in
MIL_INT64 TransformType, //in
MIL_INT Level, //in
MIL_INT64 ControlFlag //in
)
Description

This function performs a forward or reverse wavelet transformation using the specified source buffer and places the results in the specified destination buffer. The source and destination can be an image or wavelet result.

This function supports in-place processing; you can specify the identifier of the same buffer for the source and the destination.

Wavelets refer to mathematical algorithms that process data in both the space and frequency domain, offering a compromise between each. By using wavelets, MimWaveletTransform() results can therefore represent space and frequency. This makes MimWaveletTransform() especially effective at filtering images. It is typically useful for signal coding, signal denoising, data compression, and pattern recognition.

To specify wavelet controls that can affect MimWaveletTransform() results, use MimControl(). To perform drawing operations with this function's results, use MimDraw().

To retrieve information about a specific wavelet result, use MimGetResultSingle(). A specific wavelet result refers to a transformed rendition of the source, based on either a wavelet coefficient (diagonal, horizontal, or vertical) at a specific level, or on an approximation of the wavelet transformation. For general types of wavelet results, such as the actual number of transformation levels used, call MimGetResult().

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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
WaveletContextImId

Specifies the identifier of a wavelet image processing context. The context must have been allocated using MimAlloc() with M_WAVELET_TRANSFORM_CONTEXT or M_WAVELET_TRANSFORM_CUSTOM_CONTEXT.

The context indicates the filter and mode that this function uses to perform its transformation. 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 transformation 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 transformation. 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.

If the source is an image buffer, the destination must be a wavelet result buffer. If the source is wavelet result buffer, the destination can be an image or 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 in which to write the result of the wavelet transformation. 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 a wavelet result buffer. If the destination is a wavelet result buffer, the source can be an image or 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.

TransformType

Specifies the type of wavelet transformation to perform.

Set this parameter to one of the following:

function map For specifying the wavelet transformation type
Click to summarizeValue Description
Click to summarize M_FORWARD

Specifies a forward wavelet transformation. This decomposes the source according to the number of levels established. The source can be an image or result. The destination must be a result.

(summarize)
Click to summarize M_REVERSE

Specifies a reverse wavelet transformation. This recomposes the source according to the number of levels established. The source must be a result. The destination can be an image or a result.

(summarize)
Level

Specifies the number of transformation levels with which to calculate results. Results are written in the specified destination buffer. The level applies to either an M_FORWARD or M_REVERSE transformation.

Set this parameter to one of the following:

function map For specifying the transformation level
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies a level of 0. Only supported when using M_REVERSE and the destination is an image. In any other case, M_DEFAULT (or 0) causes an error.

(summarize)
Click to summarize Value >= 0

Specifies the transformation level. Values depend on the transformation, the source, and the destination.

With M_FORWARD, the source can be an image or result; the destination must be a result. In all cases, the level must be greater than 0 and less than or equal to the maximum level. If the source is a result, the level must also be greater than the level in the source. If the specified level exceeds the maximum level, MIL uses the maximum level instead. MIL establishes the maximum level to be the point at which transformations at subsequent levels do not provide relevant data. This depends on the source and the wavelet image processing context.

With M_REVERSE, the source must be a result; the destination can be a result or an image. If the destination is a result, the level must be greater than 0 and less than the level in the source. If the specified level exceeds the level in the source (maximum level), MIL uses the level in the source instead. If the destination is an image, the level must be 0 (or M_DEFAULT). Setting the level to 0 (or M_DEFAULT) when the destination is a result causes an error.

To determine the level in the source result, use it with MimGetResult() and M_NUMBER_OF_LEVELS. To determine the level in the destination result, use it with M_NUMBER_OF_LEVELS.

(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 PROC FORWARD REVERSE DEFAULT FORWARD REVERSE