Image Thresholding
Function
This Step filters image pixels according to the set threshold and binarizes the pixels above and below the threshold according to the set rules.
|
Binary images are images whose pixels have only two possible intensity values. Numerically, the two values are often 0 for black, and 255 for white. Image binarization is the process of converting a non-binary image to a binary image. |
Usage Scenario
This Step is a general image processing Step. It is generally used to segment pixels that meet threshold conditions on 2D images.
Parameter Description
| Parameter | Description |
|---|---|
Operation |
Description: This parameter is used to select the operation type for separating the target object from its background. Value list: THRESH_BINARY and THRESH_BINARY_INV
Default value: THRESH_BINARY Tuning recommendation: Please select the operation type according to the actual requirement. |
Low Threshold |
Description: If the low threshold is set to be lower than the high threshold, the pixels with values between the two thresholds will be set to 255, and other pixels will be set to 0. If the low threshold is set to be higher than the high threshold, the pixels with values beyond the interval set by the two thresholds will be set to 255, and other pixels will be set to 0.
|
High Threshold |
Description: See “Low Threshold.”
|
Thresholding Type |
Description: This parameter determines whether the values of pixels should be set to 255 or 0. Value list: Bright, Dark, In Range, and Out of Range. If
|
Image Filter |
Description: This parameter is used to select the filter to apply to the image. Value list: Mean filter, Gaussian filter, and Median filter
Default value: Mean filter Tuning recommendation: Please select a proper image filter method according to the actual requirement. |
Filter Kernel Size |
Description: This parameter sets the sliding window size (pixel-wise edge length) of the filter.
|
Pixel Value Offset |
Description: The offset pixel value to apply to all pixels of the image after filtering.
|
Threshold (0–255) |
Description: This parameter sets a threshold for filtering image pixels.
|
Operation |
Description: This parameter is used to select the operation type for separating the target object from its background. Value list: THRESH_BINARY, THRESH_BINARY_INV, THRESH_TRUNC, THRESH_TOZERO, THRESH_TOZERO_INV, THRESH_OTSU, and THRESH_TRIANGLE
Default value: THRESH_BINARY Tuning recommendation: THRESH_BINARY or THRESH_BINARY_INV is recommended to use. |