Click here to show toolbars of the Web Online Help System: show toolbars
 

Filters
Filter values by
Buffer type
  • Array buffer
  • Image buffer
    • Common to all
    • Compressed attribute specific
  • Kernel buffer
  • LUT buffer
  • Structuring element buffer
| Customize Help
| Save Settings

MbufControl



Function Map
Synopsis
Control a specified data buffer setting.
Syntax
void MbufControl(
MIL_ID BufId, //in
MIL_INT64 ControlType, //in
MIL_DOUBLE ControlValue //in
)
Description

This function allows you to control a specified data buffer setting.

Note that when using a C compiler (not a C++ or other compiler) in 64-bit mode, MbufControl() internally calls the MIL_INT64 version of this function (MbufControlInt64()). If you need to pass floating-point values, call the MIL_INT64 version of this function (MbufControlDouble()).
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
BufId

Specifies the identifier of the buffer to control.

ControlType

Specifies the buffer setting to control.

See the Parameter associations section for possible values that can be specified.

ControlValue

Specifies the value needed for the setting.

See the Parameter associations section for possible values that can be specified.

The following ControlType and corresponding ControlValue parameter settings are used to control general buffer settings.

function map For specifying general buffer settings
Click to summarize
ControlType
Description MIL system-specific
tooltip (‡)
ControlValue
Click to summarize M_ASSOCIATED_LUT

Sets whether to associate or disassociate a LUT buffer with the specified image buffer. The image buffer must be a 1-band 8-bit or 16-bit buffer. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Specifies to remove the association between the LUT buffer and the image buffer.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize MIL LUT buffer identifier

Specifies the MIL identifier of the LUT buffer to associate with the image buffer. If and when the image buffer is selected to a display, the required changes occur to produce the display effect of the LUT, unless the display is also associated with a LUT (MdispLut()). If associated with a LUT buffer, the image buffer cannot be selected to a display whose view mode is set to M_AUTO_SCALE or M_MULTI_BYTES.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DC_ALLOC
[This is only applicable to Windows]

Allocates a device context (DC) for drawing. Determine the DC handle (HDC) using MbufInquire() with the M_DC_HANDLE inquire type. When using this control type, the buffer should be internally stored in M_GDI format, and cannot be a child buffer. No MIL operation can be done between a device context allocation and free, therefore you should use the device context for a short period of time.

(summarize)
b c d e g h l m n o s
Click to summarize M_DEFAULT

Implements the default behavior.

b c d e g h l m n o s
Click to summarize M_DC_FREE
[This is only applicable to Windows]

Frees a device context (DC).

(summarize)
b c d e g h l m n o s
Click to summarize M_DEFAULT

Implements the default behavior.

b c d e g h l m n o s
Click to summarize M_LOCK +

Locks the specified buffer to allow a memory pointer to obtain a valid buffer address. The address is valid while the buffer is locked, but becomes invalid after it is unlocked. The calling thread will be blocked if the buffer is already locked by a different thread.

To unlock the specified buffer, use M_UNLOCK.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Implements the default behavior.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_MAP

Maps or unmaps the buffer to the memory address space of the process. Note that, to use this control, the buffer must be allocated with the M_MAPPABLE attribute.

(summarize)
a b c e f g h i j k l m n o p q r s t u
Click to summarize M_DISABLE

Unmaps the buffer from the address space of the process. This sets the buffer's Host address to M_NULL.

This is the default value.

(summarize)
a b c e f g h i j k l m n o p q r s t u
Click to summarize M_ENABLE

Maps the buffer to the address space of the process. This associates the buffer with a logical Host address.

(summarize)
a b c e f g h i j k l m n o p q r s t u
Click to summarize M_MAX

Sets the expected maximum pixel value of the buffer. This information is used to optimize certain processing operations on the buffer and the display of the buffer. Note that this information is not validated against the content of the buffer.

M_MIN and M_MAX should specify the expected range of pixel values in the buffer. Values larger than the maximum value or smaller than the minimum value can result in unpredictable effects, potentially even resulting in an unstable application. Pixel values between M_MIN and M_MAX are remapped linearly to values between the minimum and maximum possible display values. With processing, the values of the buffer could be truncated producing undesirable effects.

Note that these two values are static and not updated automatically. For example, if you set M_MAX to 50, and during computation you multiplied the buffer by 2, M_MAX would still be 50 and not 100.

Note that M_MIN and M_MAX cannot be used with child buffers; this information is obtained directly from the parent buffer. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize Value

Specifies the expected maximum pixel value within the range of the buffer type. For example, for an 8-bit unsigned buffer, set this value to a value between 0 and 255, inclusive.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_MIN

Sets the expected minimum pixel value possible in the buffer. This information is used to optimize certain processing operations on the buffer and the display of the buffer. Note that this information is not validated against the content of the buffer.

M_MIN and M_MAX should specify the expected range of pixel values in the buffer. Values larger than the maximum value or smaller than the minimum value can result in unpredictable effects, potentially even resulting in an unstable application. Pixel values between M_MIN and M_MAX are remapped linearly to values between the minimum and maximum possible display values. With processing, the values of the buffer could be truncated producing undesirable effects.

Note that these two values are static and not updated automatically. For example, if you set M_MAX to 50, and during computation you multiplied the buffer by 2, M_MAX would still be 50 and not 100.

Note that M_MIN and M_MAX cannot be used with child buffers; this information is obtained directly from the parent buffer. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize Value

Specifies the expected minimum pixel value within the range of the buffer type. For example, for an 8-bit unsigned buffer, set this value to a value between 0 and 255, inclusive.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_MODIFICATION_HOOK

Sets whether to run the user-defined functions hooked to the buffer's modification event upon the event. These user-defined functions are initially hooked to the buffer modification event using MbufHookFunction(). INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DISABLE

Specifies that the user-defined functions should not be called.

Note that the modification counter of the image buffer will still be incremented. To inquire the count, use MbufInquire() with M_MODIFICATION_COUNT.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_ENABLE

Specifies that the user-defined functions should be called.

This is the default value.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_MODIFIED

Signals MIL that the buffer content was modified without using MIL. This control must be used to ensure that MIL updates its internal information on the buffer. For example, if a display buffer was modified outside MIL, the display will not be updated until you use this control. Note, if only a certain region of the buffer was modified, it is more efficient to specify an appropriate child buffer as BufId.

If a specific area of the buffer was modified without using MIL, it is faster to use MbufControlArea() with the control type to signal MIL to update the content of the specified area of the buffer.

M_MODIFIED increments the buffer's modification counter. You can inquire about the counter's current value using MbufInquire() with M_MODIFICATION_COUNT.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Implements the default behavior.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_RESOLUTION_X

Sets the X resolution of the image buffer in pixels per inch (PPI). INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Specifies an X resolution of 72 PPI.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize Value > 0.0

Specifies the X resolution in PPI.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_RESOLUTION_Y

Sets the Y resolution of the image buffer in pixels per inch (PPI). INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Specifies a Y resolution of 72 PPI.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize Value > 0.0

Specifies the Y resolution in PPI.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_UNLOCK

Unlocks the specified buffer.

The buffer must have been previously locked with M_LOCK.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Implements the default behavior.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_XPIXMAP_ALLOC
[This is only applicable to Linux]

Allocates a device context for drawing. Determine the device context handle using MbufInquire() with the M_XPIXMAP_HANDLE inquire type. When using this control type, the buffer should be internally stored in M_LINUX_MXIMAGE format. No MIL operation can be done between a device context allocation and free, therefore you should use the device context for a short period of time.

(summarize)
b c d e g h j k l m n o p q r s
Click to summarize M_DEFAULT

Implements the default behavior.

b c d e g h j k l m n o p q r s
Click to summarize M_XPIXMAP_FREE
[This is only applicable to Linux]

Frees a pixmap.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Implements the default behavior.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_YCBCR_RANGE

Specifies whether the YUV buffer's pixel values are YCbCr encoded, which limits the range of the buffer's pixel values. The Y-band's pixel values are limited between 16 and 235. The Cb- and Cr-bands are limited to pixel values between 16 and 240.

Note that calling M_YCBCR_RANGE on an RGB buffer will generate an error. The buffer must be of an uncompressed packed YUV16 type. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DISABLE

Specifies not to YCbCr encode the YUV buffer's pixel values.

This is the default value.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_YCBCR_HD

Specifies to encode the YUV buffer's pixel values using the high-definition YCbCr standard.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_YCBCR_SD

Specifies to encode the YUV buffer's pixel values using the standard-definition YCbCr standard.

a b c d e f g h i j k l m n o p q r s t u
Combination values for M_LOCK.

You can add one of the following values to the above-mentioned value to set which processor can access the locked buffer.

function map For M_LOCK (Processor access privileges)
Click to summarize
Combination value
Description
Click to summarize M_GPU_ACCESS

Locks the buffer and gives access to the GPU processor.

Click to summarize M_HOST_ACCESS

Locks the buffer and gives access to the Host processor.

This is the default value.

(summarize)
Combination values for M_LOCK.

You can add one or more of the following values to the above-mentioned value to set the buffer's read and write permission.

function map For M_LOCK (Read and write permission)
Click to summarize
Combination value
Description
Click to summarize M_READ

Locks the buffer to be read only.

Click to summarize M_READ+M_WRITE

Locks the buffer to be read and write.

This is the default value.

(summarize)
Click to summarize M_WRITE

Locks the buffer to be write only.

For buffers with an M_IMAGE + M_COMPRESS attribute, ControlType and ControlValue can also be set to one of the values below.

Note that, if the buffer contains any data, setting one of these control types automatically deletes the data. This is because, for MIL to decompress the buffer's data, it must know the control values that were used in the compression. If you change one of these controls, MIL will be unable to decompress the data and the data is therefore irrelevant. Note that the control type M_TARGET_SIZE is the only control type that can be changed without affecting the data. For more information, see Chapter 29: JPEG and JPEG2000 compression.

function map For M_IMAGE + M_COMPRESS image buffers
Click to summarize
ControlType
Description
ControlValue
Click to summarize M_DECOMPOSITION_LEVEL +

Sets the number of iterations (decomposition levels) the discrete wavelet transform is applied to the image. This control type is only supported with JPEG2000 buffers (both lossy and losseless).

The number of decomposition levels is applied to all bands by default. INQ

(summarize)
Click to summarize Value >= 0

Specifies the number of iterations (decomposition levels). Only integer values are accepted.

(summarize)
Click to summarize M_HUFFMAN_AC

Associates an AC Huffman table to the buffer. This control type is only supported with JPEG lossy buffers. INQ

(summarize)
Click to summarize MIL M_ARRAY buffer identifier

Specifies the identifier of the array buffer containing the table. If the buffer is 3-band, the same table is applied to all bands.

(summarize)
Click to summarize M_HUFFMAN_AC_CHROMINANCE

Associates an AC Huffman table to the U and V bands (chrominance) of the buffer. This control type is only supported with JPEG lossy buffers in YUV format. INQ

(summarize)
Click to summarize MIL M_ARRAY buffer identifier

Specifies the identifier of the array buffer containing the table.

Click to summarize M_HUFFMAN_AC_LUMINANCE

Associates an AC Huffman table to the Y band (luminance) of the buffer. This control type is only supported with JPEG lossy buffers in YUV format. INQ

(summarize)
Click to summarize MIL M_ARRAY buffer identifier

Specifies the identifier of the array buffer containing the table.

Click to summarize M_HUFFMAN_DC

Associates a DC Huffman table to the buffer. This control type is only supported with JPEG buffers (both lossy and lossless). INQ

(summarize)
Click to summarize MIL M_ARRAY buffer identifier

Specifies the identifier of the array buffer containing the table. If the buffer is 3-band, the same table is applied to all bands.

(summarize)
Click to summarize M_HUFFMAN_DC_CHROMINANCE

Associates a DC Huffman table to the U and V bands (chrominance) of the buffer. This control type is only supported with JPEG lossy buffers in YUV format. INQ

(summarize)
Click to summarize MIL M_ARRAY buffer identifier

Specifies the identifier of the array buffer containing the table.

Click to summarize M_HUFFMAN_DC_LUMINANCE

Associates a DC Huffman table to the Y band (luminance) of the buffer. This control type is only supported with JPEG lossy buffers in YUV format. INQ

(summarize)
Click to summarize MIL M_ARRAY buffer identifier

Specifies the identifier of the array buffer containing the table.

Click to summarize M_PREDICTOR

Sets the type of predictor. This control type is only supported with JPEG lossless buffers. If the buffer is 3-band, the same predictor is applied to all bands. INQ

(summarize)
Click to summarize 0

Specifies predictor #0 (no prediction).

Click to summarize 1

Specifies predictor #1 (the "pixel-to-the-left" predictor).

This is the default value.

(summarize)
Click to summarize 2

Specifies predictor #2 (the "pixel-above" predictor).

Click to summarize M_Q_FACTOR +

Sets the quantization factor. This control type is only supported with lossy buffers.

For JPEG lossy buffers, the Q factor is always applied to all bands.

For JPEG2000 lossy buffers, the Q factor is applied to all bands by default. To change this default behavior, see the combination values below. INQ

(summarize)
Click to summarize 1 <= Value <= 99

Specifies the quantization factor. Only integer values are accepted. The higher the factor, the more the compression, but the lower the image quality.

The default value is 50.

(summarize)
Click to summarize M_Q_FACTOR_CHROMINANCE

Sets the chrominance quantization factor. This control type is only supported with JPEG or JPEG2000 lossy buffers in YUV format. INQ

(summarize)
Click to summarize 1 <= Value <= 99

Specifies the factor. Only integer values are accepted. The higher the factor, the more the compression, but the lower the image quality.

The factor is applied to the U and V bands (chrominance).

The default value is 50.

(summarize)
Click to summarize M_Q_FACTOR_LUMINANCE

Sets the luminance quantization factor. This control type is only supported with JPEG or JPEG2000 lossy buffers in YUV format. INQ

(summarize)
Click to summarize 1 <= Value <= 99

Specifies the factor. Only integer values are accepted. The higher the factor, the more the compression, but the lower the image quality.

The factor is applied only to the Y band (luminance).

The default value is 50.

(summarize)
Click to summarize M_QUANTIZATION +

Associates a quantization table to the buffer. This control type is only supported with lossy buffers.

For JPEG lossy buffers, this table is associated with all bands.

For JPEG2000 lossy buffers, this table is associated with all bands by default.

Note that setting this control type will reset the M_Q_... control types to their default value (50). If you set the M_Q_FACTOR control type after specifying a custom table with the M_QUANTIZATION control type, the custom table will be scaled accordingly. INQ

(summarize)
Click to summarize MIL M_ARRAY buffer identifier

Specifies the identifier of the array buffer containing the table.

Click to summarize M_QUANTIZATION_CHROMINANCE

Associates a quantization table to the U and V bands (chrominance) of the buffer. This control type is only supported with JPEG or JPEG2000 lossy buffers in YUV format.

Note that setting this control type will reset the M_Q_FACTOR_CHROMINANCE control type to its default value (50). If you set a M_Q_... control type after specifying a custom table with the M_QUANTIZATION_CHROMINANCE control type, the custom table will be scaled accordingly. INQ

(summarize)
Click to summarize MIL M_ARRAY buffer identifier

Specifies the identifier of the array buffer containing the table.

Click to summarize M_QUANTIZATION_LUMINANCE

Associates a quantization table to the Y band (luminance) of the buffer. This control type is only supported with JPEG or JPEG2000 lossy buffers in YUV format.

Note that setting this control type will reset the M_Q_FACTOR_LUMINANCE control type to its default value (50). If you set a M_Q_... control type after specifying a custom table with the M_QUANTIZATION_LUMINANCE control type, the custom table will be scaled accordingly. INQ

(summarize)
Click to summarize MIL M_ARRAY buffer identifier

Specifies the identifier of the array buffer containing the table.

Click to summarize M_RESTART_INTERVAL

Sets the number of rows or 8x8 blocks between restart markers in a compressed image. INQ

(summarize)
Click to summarize Value >= 0

Specifies after how many rows (for JPEG lossless buffers) or 8x8 blocks (for JPEG lossy buffers) of data to place restart markers. Only integer values are accepted. The default value is 8 for JPEG lossy buffers and 2 for JPEG lossless buffers.

(summarize)
Click to summarize M_TARGET_SIZE

Sets the size of the buffer into which the source image is compressed. This control type is only supported with JPEG2000 lossy buffers.

To ensure that the compressed data fits into the specified buffer size, less-significant data is discarded. INQ

(summarize)
Click to summarize Value > 0

Specifies the size, in bytes. Only integer values are accepted.

(summarize)

You can add one of the following values to the above-mentioned values to specify the color bands to affect.

When dealing with M_Q_FACTOR and M_QUANTIZATION, the following values are only supported with JPEG2000 lossy buffers.

function map For specifying the color bands to affect
Click to summarize
Combination value
Description
Click to summarize M_ALL_BANDS
[For essential MIL-Lite information, see remarks ]

Applies the specified control value to all bands of the buffer.

This is the default value.

(summarize)
Click to summarize M_BLUE
[For essential MIL-Lite information, see remarks ]

Applies the specified control value to the blue band only (for RGB buffers).

Click to summarize M_GREEN
[For essential MIL-Lite information, see remarks ]

Applies the specified control value to the green band only (for RGB buffers).

Click to summarize M_RED
[For essential MIL-Lite information, see remarks ]

Applies the specified control value to the red band only (for RGB buffers).

Click to summarize M_U
[For essential MIL-Lite information, see remarks ]

Applies the specified control value to the U band only (for YUV buffers).

Click to summarize M_V
[For essential MIL-Lite information, see remarks ]

Applies the specified control value to the V band only (for YUV buffers).

Click to summarize M_Y
[For essential MIL-Lite information, see remarks ]

Applies the specified control value to the Y band only (for YUV buffers).

The following ControlType and corresponding ControlValue parameter settings can be specified for an M_KERNEL or an M_STRUCT_ELEMENT data buffer.

The following ControlType values change the setting of a neighborhood operation for the specified kernel buffer or structuring element buffer. The ControlType values establish how to perform a neighborhood operation when using the specified kernel buffer or structuring element buffer. Neighborhood operations that do not use a kernel buffer or structuring element buffer typically use the default values.

function map For controlling general neighborhood operation settings of an M_KERNEL or an M_STRUCT_ELEMENT data buffer
Click to summarize
ControlType
Description MIL system-specific
tooltip (‡)
ControlValue
Click to summarize M_DEFAULT

Sets all neighborhood operation control types to their default value.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_NULL

Implements the default behavior.

This is the default value.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_ABSOLUTE_VALUE

Sets whether to take the absolute value of the results. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Same as M_DISABLE.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DISABLE

Specifies not to take the absolute value of the result.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_ENABLE

Specifies to take the absolute value of the result.

Note that for a structuring element buffer, you cannot take the absolute value of a result.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_OFFSET_CENTER_X

Sets the X-coordinate of the center pixel of the kernel or structuring element.

M_OFFSET_CENTER_X is ignored if M_FILTER_MODE is set to M_RECURSIVE. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Specifies the X-coordinate of the top-left pixel of the central elements.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize 0 <= Value < SizeX

Specifies the value of the X-coordinate.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_OFFSET_CENTER_Y

Sets the Y-coordinate of the center of the kernel or structuring element.

M_OFFSET_CENTER_Y is ignored if M_FILTER_MODE is set to M_RECURSIVE. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Specifies the Y-coordinate of the top-left pixel of the central elements.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize 0 <= Value < SizeY

Specifies the value of the Y-coordinate.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_OVERSCAN

Sets the type of overscan used to handle the border pixels of a source image.

M_OVERSCAN is ignored if M_FILTER_MODE is set to M_RECURSIVE. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Specifies that MIL automatically selects the type of overscan to optimize speed and logic according to the specified operation and the target system.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DISABLE

Specifies that no overscan will be used, unless processing the border pixels is faster than ignoring them; in the latter case, MIL automatically selects the overscan to optimize speed according to the specified operation and the target system.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_FAST

Specifies that MIL automatically selects the overscan to optimize speed according to the specified neighborhood operation and the target system. The overscan could be hardware-specific thereby having a different behavior than the other supported overscan modes.

Note that when using M_FAST, the destination pixels in the overscan area are undefined. The pixels can therefore contain different values from one function call to the next, even if the function's parameter values are the same.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_MIRROR

Specifies a type of overscan that processes the border pixels of a source image using overscan pixel values that mirror the source buffer pixel values. That is, the overscan pixel values will be a mirror copy of the source buffer's borders. For example:

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_REPLACE

Specifies a type of overscan that processes the border pixels of a source image using overscan pixel values set to the overscan replacement value (M_OVERSCAN_REPLACE_VALUE).

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_TRANSPARENT

Specifies a type of overscan that processes the border pixels of a source image using transparent overscan pixel values. That is, the overscan pixel values will be those of the ancestor buffer. If they are not available, a mirror type overscan is used instead.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
MIL system specific

Points falling outside the source image are undefined.

d l m
Click to summarize M_OVERSCAN_REPLACE_VALUE

Sets a replacement value for the overscan pixel values.

Note that to use this control type, M_OVERSCAN must be set to M_REPLACE. In addition, M_OVERSCAN_REPLACE_VALUE is ignored if M_FILTER_MODE is set to M_RECURSIVE. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Specifies the default value; the default value is 0.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_REPLACE_MAX

Specifies that the overscan neighborhood pixel values will be set to the maximum value of the source buffer.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_REPLACE_MIN

Specifies that the overscan neighborhood pixel values will be set to the minimum value of the source buffer.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize Value

Specifies the value of the overscan neighborhood pixels.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_SATURATION

Sets whether to saturate the results. INQ

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DEFAULT

Same as M_DISABLE.

a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_DISABLE

Specifies not to saturate results, except when MIL can take advantage of optimization routines to accelerate the processing. In the latter case, results will be saturated and processing will be done in hardware.

When it is not possible to run hardware processing optimization routines, results that overflow the buffer are undefined.

(summarize)
a b c d e f g h i j k l m n o p q r s t u
Click to summarize M_ENABLE

Specifies to saturate results. A result that overflows or underflows will be set to the maximum or minimum value (respectively) that can be represented in the destination buffer.

If the saturation, normalization, and absolute value settings are specified for a kernel buffer, the saturation is performed after the normalization factor and the absolute value operations have been applied.

(summarize)
a b c d e f g h i j k l m n o p q r s t u

The following ControlType and corresponding ControlValue parameter settings can be specified for an M_KERNEL data buffer. These settings establish how to perform a neighborhood operation when using the specified kernel buffer. Neighborhood operations that do not use a kernel buffer typically use the default values; the default normalization factor is the exception. For predefined filters, the normalization factor is automatically set to use the full data range of the destination buffer without overflows, and the result is given in the number of bits of the destination buffer. To specify a different normalization factor, define a custom filter and set the required normalization factor, using the M_NORMALIZATION_FACTOR operation control type.

function map For the neighborhood operation settings of M_KERNEL data buffers
Click to summarize
ControlType
Description
ControlValue
Click to summarize M_FILTER_MODE

Sets the mode in which to apply the filter. Use M_FILTER_TYPE to set the type of the filter. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_KERNEL.

Click to summarize M_KERNEL

Specifies the use of a non-recursive implementation of the filter. In this mode, a kernel is used to perform the neighborhood operation. The kernel size is specified when allocating the kernel buffer using MbufAlloc1d() or MbufAlloc2d(), although the kernel size can be constrained by the available hardware resources. When using an IIR filter in this mode, the filtering is done using a kernel approximation (FIR) of the recursive filter.

When using an IIR filter, this mode is not as efficient as M_RECURSIVE for large kernels.

(summarize)
Click to summarize M_RECURSIVE

Specifies the use of a recursive implementation of an Infinite Impulse Response (IIR) filter, when applicable. If this mode actually used a kernel, the kernel size would be theoretically infinite.

M_RECURSIVE is not supported if M_FILTER_TYPE is set to M_USER_DEFINED.

(summarize)
Click to summarize M_FILTER_OPERATION

Sets the type of neighborhood operation to perform using the selected filter.

M_FILTER_OPERATION is ignored if M_FILTER_TYPE is set to M_USER_DEFINED. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_SMOOTH.

Click to summarize M_EDGE_DETECT

Computes the gradient of the image using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_EDGE_DETECT_SQR

Computes the square of the gradient of the image using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_FIRST_DERIVATIVE_X

Computes the first derivative of the image with respect to X using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_FIRST_DERIVATIVE_Y

Computes the first derivative of the image with respect to Y using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_HORIZ_EDGE

Computes the absolute value of the vertical derivative of the image using the Shen-Castan or Canny-Deriche filter; you can use this filter to detect the horizontal edges.

Click to summarize M_LAPLACIAN_EDGE

Computes the Laplacian values of the image using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_SECOND_DERIVATIVE_X

Computes the second derivative of the image with respect to X using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_SECOND_DERIVATIVE_XY

Computes the second derivative of the image with respect to X and Y using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_SECOND_DERIVATIVE_Y

Computes the second derivative of the image with respect to Y using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_SHARPEN

Performs a sharpening operation on the image using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_SMOOTH

Performs a smoothing operation on the image using the Shen-Castan or Canny-Deriche filter.

Click to summarize M_VERT_EDGE

Computes the absolute value of the horizontal derivative of the image using the Shen-Castan or Canny-Deriche filter; you can use this filter to detect the vertical edges.

Click to summarize M_FILTER_SMOOTHNESS

Sets the degree of smoothness (strength of denoising) applied by the filter during the neighborhood operation.

M_FILTER_SMOOTHNESS is ignored if M_FILTER_TYPE is set to M_USER_DEFINED. INQ

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 50.0.

Click to summarize 0 <= Value <= 100

Specifies the smoothness value.

A value of 100 results in a strong noise reduction effect, while a value of 0 has almost no noise reduction effect.

(summarize)
Click to summarize M_FILTER_TYPE

Sets the type of filter used to perform the neighborhood operation. The type of filter determines the distribution of the neighborhoods' influence.

For IIR filter types, the content of the kernel buffer is ignored even if M_FILTER_MODE is set to M_KERNEL. M_FILTER_OPERATION and M_FILTER_SMOOTHNESS determine the filter values. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_USER_DEFINED.

Click to summarize M_DERICHE

Specifies a Canny-Deriche Infinite Support filter. This is an exponential weighting function, of the general form:

This is an IIR filter.

For the Canny-Deriche filter, the neighborhoods' influence decreases much slower as the distance from the central pixel increases, compared to the Shen-Castan filter (see M_SHEN control value).

Use M_FILTER_MODE, M_FILTER_OPERATION, and M_FILTER_SMOOTHNESS to set the mode of the filter, the type of operation to perform using the filter, and the degree of smoothness (strength of denoising) applied to the images by the filter, respectively.

(summarize)
Click to summarize M_SHEN

Specifies a Shen-Castan Infinite Support Exponential filter. This is an exponential weighting function, of the general form:

This is an IIR filter.

For the Shen-Castan filter, the neighborhoods' influence decreases much faster as the distance from the central pixel increases, compared to the Canny-Deriche filter (see M_DERICHE control value).

Use M_FILTER_MODE, M_FILTER_OPERATION, and M_FILTER_SMOOTHNESS to set the mode of the filter, the type of operation to perform using the filter, and the degree of smoothness (strength of denoising) applied to the images by the filter, respectively.

(summarize)
Click to summarize M_USER_DEFINED

Specifies a user-defined filter. This is an FIR filter.

M_USER_DEFINED is not supported if M_FILTER_MODE is set to M_RECURSIVE.

(summarize)
Click to summarize M_NORMALIZATION_FACTOR

Sets the normalization factor to apply to the result.

Note that for a structuring element buffer, you cannot specify a normalization factor. INQ

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 1.

Click to summarize Value > 0

Specifies the normalization factor.

If the factor produces an overflow in the destination, saturation might occur, depending on the M_SATURATION control type.

(summarize)
Remark
  • [MIL-Lite]
    Note that during development and at runtime, compression support, particularly for an M_IMAGE + M_COMPRESS buffer type, requires the presence of a MIL license that grants access to the compression/decompression package. This access is only granted by default with the development license dongle for the full version of MIL. In other cases, you must purchase access to this package separately.
Type specific versions of the function when using a C compiler under 64-bit
void MbufControlDouble (MIL_ID BufId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
Parameters

BufId

See BufId of the main function for a description.

ControlType

See ControlType of the main function for a description.

ControlValue

See ControlValue of the main function for a description.

void MbufControlInt64 (MIL_ID BufId, MIL_INT64 ControlType, MIL_INT64 ControlValue)
Parameters

BufId

See BufId of the main function for a description.

ControlType

See ControlType of the main function for a description.

ControlValue

See ControlValue of the main function for a description.

Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
ASSOCIATED LUT DEFAULT DC ALLOC DEFAULT DC FREE DEFAULT LOCK DEFAULT MAP DISABLE ENABLE MAX MIN MODIFICATION HOOK DISABLE ENABLE MODIFIED DEFAULT RESOLUTION X DEFAULT RESOLUTION Y DEFAULT UNLOCK DEFAULT XPIXMAP ALLOC DEFAULT XPIXMAP FREE DEFAULT YCBCR RANGE DISABLE YCBCR HD YCBCR SD GPU ACCESS HOST ACCESS READ READM WRITE WRITE DECOMPOSITION LEVEL HUFFMAN AC ARRAY buffer identifier HUFFMAN AC CHROMINANCE ARRAY buffer identifier HUFFMAN AC LUMINANCE ARRAY buffer identifier HUFFMAN DC ARRAY buffer identifier HUFFMAN DC CHROMINANCE ARRAY buffer identifier HUFFMAN DC LUMINANCE ARRAY buffer identifier PREDICTOR Q FACTOR Q FACTOR CHROMINANCE Q FACTOR LUMINANCE QUANTIZATION ARRAY buffer identifier QUANTIZATION CHROMINANCE ARRAY buffer identifier QUANTIZATION LUMINANCE ARRAY buffer identifier RESTART INTERVAL TARGET SIZE ALL BANDS BLUE GREEN RED U V Y DEFAULT NULL ABSOLUTE VALUE DEFAULT DISABLE ENABLE OFFSET CENTER X DEFAULT OFFSET CENTER Y DEFAULT OVERSCAN DEFAULT DISABLE FAST MIRROR REPLACE TRANSPARENT OVERSCAN REPLACE VALUE DEFAULT REPLACE MAX REPLACE MIN SATURATION DEFAULT DISABLE ENABLE FILTER MODE DEFAULT KERNEL RECURSIVE FILTER OPERATION DEFAULT EDGE DETECT EDGE DETECT SQR FIRST DERIVATIVE X FIRST DERIVATIVE Y HORIZ EDGE LAPLACIAN EDGE SECOND DERIVATIVE X SECOND DERIVATIVE XY SECOND DERIVATIVE Y SHARPEN SMOOTH VERT EDGE FILTER SMOOTHNESS DEFAULT FILTER TYPE DEFAULT DERICHE SHEN USER DEFINED NORMALIZATION FACTOR DEFAULT COMPRESS