MimMorphic()函数

Synopsis

Morphological transformation.

Format

void MimMorphic(SrcImageBufId, DestImageBufId, StructElemBufId, Operation, NbIteration, ProcMode)

MIL_ID SrcImageBufId; Source image buffer identifier
MIL_ID DestImageBufId; Destination image buffer identifier
MIL_ID StructElemBufId; Structuring element buffer identifier
long Operation; Morphological operation to perform
long NbIteration; Number of operation iterations
long ProcMode; Processing mode

Description

This function performs one of several morphological transformations on the specified source image, using a user-defined structuring element.

The SrcImageBufId parameter specifies the identifier of the source of the operation. This parameter must be given an image buffer identifier.

The DestImageBufId parameter specifies the identifier of the destination of the resulting image. This parameter must be given an image buffer identifier.

The StructElemBufId parameter specifies the identifier of the structuring element buffer. The user-defined structuring element must have been allocated, using MbufAlloc1d or MbufAlloc2d with an M_STRUCT_ELEMENT Attribute, and loaded with structuring-element values, using MbufPut. These values can be set to M_DONT_CARE to specify that the corresponding image pixels should not be taken into account during the operation. You can set the overscan type and the center of the structuring element, using MbufControlNeighborhood.

If the source and destination are multi-band buffers then the same structuring element is applied to every band of the source buffer.

The Operation parameter specifies the operation to perform. Supported operations are:

M_ERODE Erosion
M_DILATE Dilation
M_THIN Thinning
M_THICK Thickening
M_HIT_OR_MISS Hit or miss transformation
M_MATCH Pattern matching

The NbIteration parameter specifies the number of times to iterate the operation.

The ProcMode parameter specifies the processing mode to use. This parameter can be set to the following:

M_BINARY Non-zero pixels will be treated as ones (1) during processing.
M_GRAYSCALE (default value) The source image’s gray values are used for processing and the resulting buffer will also contain gray values.

Note

This function is optimized for packed binary buffers.

Status

In-place processing is supported, but the source and destination image buffers cannot overlap (a situation that can only occur when using child buffers).

See also

MbufAlloc1d, MbufAlloc2d, MimDilate, MimErode, MimOpen, MimThin, MimClose

《MimMorphic()函数》上有3条评论

评论已关闭。