Table: | For the structuring element buffer |
+ combination: | For specifying the overscan setting |
Table: | For specifying which pixel to select |
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.
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.
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. In this case, there are 5 valid neighborhood pixels; the cross mask makes the function ignore the pixels located at the four corners of the neighborhood. (summarize)Applies a cross (+) mask and sets the neighborhood size to 3x3 pixels. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
M_3X3_RECT + |
Applies no mask and sets the neighborhood size to 3x3 pixels. In this case, there are 9 valid neighborhood pixels. (summarize)Applies no mask and sets the neighborhood size to 3x3 pixels. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
M_5X5_RECT + |
Applies no mask and sets the neighborhood size to 5x5 pixels. In this case, there are 25 valid neighborhood pixels. (summarize)Applies no mask and sets the neighborhood size to 5x5 pixels. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
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. This structuring element is to be loaded with structuring-element values, using MbufPut(). The structuring element buffer dimensions are used as the neighborhood size. Values in the structuring element set to M_DONT_CARE represent neighborhood pixels not to be considered in the ranking operation. All other values in the structuring element must be set to 1, representing neighborhood pixels to be considered in the ranking operation. (summarize)Applies a mask specified by the custom structuring element, having been previously allocated with MbufAlloc...() with an M_STRUCT_ELEMENT attribute. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa |
You can add one of the following values to the above-mentioned values to specify the overscan settings to use for the operation.
For specifying the overscan setting
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_OVERSCAN_DISABLE |
Specifies to disable overscanning for this operation. You should disable overscanning to accelerate the operation for applications in which the overscan data is not important in the resulting buffer. (summarize)Specifies to disable overscanning for this operation. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
M_OVERSCAN_ENABLE |
Specifies to enable overscanning for this operation. The overscan uses pixels from the ancestor of the source buffer. If the source buffer is not a child buffer, or if the point falls outside the ancestor buffer, a mirror type overscan is used. A mirror overscan specifies that the overscan pixels will be a mirror copy of the source buffer's border pixels. This is the default value. (summarize)Specifies to enable overscanning for this operation. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
M_OVERSCAN_FAST |
Specifies that MIL will automatically select the overscan that optimizes speed, according to the specified 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_OVERSCAN_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)Specifies that MIL will automatically select the overscan that optimizes speed, according to the specified operation and the target system. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa |
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). |
||||||||||||||||||||||||||||||||||||||
0 < Value <= number
of valid neighborhood pixels |
Specifies the rank of the pixel value to select. If the number of valid pixels is less than the given rank, the number of valid pixels is used as the rank. (summarize)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. The resulting non-zero pixels will have all bits set to one. (summarize)Treats non-zero pixels as ones (1) during processing. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GRAYSCALE |
Uses the source image's gray values for processing. The resulting buffer will also contain gray values. (summarize)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. |