MIL_ID SrcImageBufId, | //in |
MIL_ID DstImageBufId, | //in |
MIL_ID StructElemBufId, | //in |
MIL_INT Rank, | //in |
MIL_INT64 ProcMode | //in |
This function performs a rank filter operation on the specified source buffer. It replaces each pixel with the pixel in its neighborhood whose value is the specified rankth value relative to others. It uses the specified structuring element as a mask. This mask determines the neighborhood size and which pixels in the neighborhood to ignore.
Specifies the identifier of the data source of the operation. This parameter must be given an image buffer identifier.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
The source image buffer must be unsigned monochrome 8- or 16-bit.
Specifies the identifier of the destination of the resulting image. This parameter must be given an image buffer identifier.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
The destination image buffer must be unsigned monochrome 8- or 16-bit.
Specifies the identifier of the structuring element buffer to use as a mask. You can either define a custom structuring element as a mask or use a predefined mask buffer.
For the structuring element
buffer
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
M_3X3_CROSS + |
Applies a cross (+) mask and sets the neighborhood size to 3x3 pixels. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_3X3_RECT + |
Applies no mask and sets the neighborhood size to 3x3 pixels. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_5X5_RECT + |
Applies no mask and sets the neighborhood size to 5x5 pixels. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL structuring element buffer identifier + |
Applies a mask specified by the custom structuring element, having been previously allocated with MbufAlloc...() with an M_STRUCT_ELEMENT attribute. (more details...) |
† | a | b | c | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s |
You can add one of the following values to the above-mentioned values to specify that overscanning is temporarily disabled.
For temporarily disabling
overscanning
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
M_OVERSCAN_DISABLE |
Disables overscanning temporarily. (more details...) |
† | a | b | c | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | |||||||||||||||||||
M_OVERSCAN_FAST |
Specifies that MIL will automatically select the overscan that optimizes speed, according to the specified operation and the target system. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s |
Specifies which of the pixel values to select after valid neighborhood values are sorted in increasing order; valid neighborhood pixel values are those that are not masked-out.
For specifying which pixel to
select
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_MEDIAN |
Specifies that MimRank() performs a median filter (that is, each pixel is replaced with the median neighborhood value). |
||||||||||||||||||||||||||||||||||||||
1 <= Value <= number
of valid neighborhood pixels |
Specifies the rank of the pixel value to select. (more details...) |
Specifies the processing mode to use. This parameter can be set to one of the following:
For specifying the processing mode to
use
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_BINARY |
Treats non-zero pixels as ones (1) during processing. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GRAYSCALE |
Uses the source image's gray values for processing. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |