MimConvolve()函数

MimConvolve()函数

Synopsis

Perform a general convolution operation.

Format

void MimConvolve(SrcImageBufId, DestImageBufId, KernelBufId)

MIL_ID SrcImageBufId; Source image buffer identifier
MIL_ID DestImageBufId; Destination image buffer identifier
MIL_ID KernelBufId; Kernel buffer identifier
Description

This function performs a general convolution operation on the source buffer using the specified kernel, storing results in the specified destination buffer.
The SrcImageBufId parameter specifies the identifier of the data source of the operation. This parameter must be given an image buffer identifier.
The DestImageBufId parameter specifies the identifier of the destination of the results. This parameter must be given an image buffer identifier.
The KernelBufId parameter specifies the identifier of the kernel buffer. This parameter can be given a custom or predefined kernel identifier. If you use a custom kernel, you must have previously allocated it with MbufAlloc1d or MbufAlloc2d and loaded it with values, using MbufPut.

Operation flags associated with custom kernels can be modified in order to control the behavior of the convolution operation. By using MbufControlNeighborhood you can control how the operation handles the borders of an image (overscan), whether or not the absolute value of the result is taken, which division factor to apply to the result, whether or not to saturate the result, and the position of the kernel’s center.
The following is a list of predefined kernel buffer identifiers: