You are here: Start » AVL.NET » AVL.ThresholdImage_RGB(AvlNet.Image, AvlNet.Region, int?, int?, int?, int?, int?, int?, float, AvlNet.Image)
AVL.ThresholdImage_RGB(AvlNet.Image, AvlNet.Region, int?, int?, int?, int?, int?, int?, float, AvlNet.Image)
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void ThresholdImage_RGB( AvlNet.Image inRgbImage, AvlNet.Region inRoi, int? inMinRed, int? inMaxRed, int? inMinGreen, int? inMaxGreen, int? inMinBlue, int? inMaxBlue, float inFuzziness, out AvlNet.Image outMonoImage )
Parameters
- inRgbImage
- Type: AvlNet.Image
- inRoi
- Type: AvlNet.Region
- inMinRed
- Type: System.Nullable<System.Int32>
- inMaxRed
- Type: System.Nullable<System.Int32>
- inMinGreen
- Type: System.Nullable<System.Int32>
- inMaxGreen
- Type: System.Nullable<System.Int32>
- inMinBlue
- Type: System.Nullable<System.Int32>
- inMaxBlue
- Type: System.Nullable<System.Int32>
- inFuzziness
- Type: System.Single
- outMonoImage
- Type: AvlNet.Image
Description
The operation transforms each pixel of three-channel inRgbImage to the maximum or minimum level thus creating binary image. The input image is considered to be encoded using RGB color representation.
- Pixels meeting all of the following conditions are transformed to the maximum level:
- Intensity of the "red" channel is in range (inMinRed, inMaxRed).
- Intensity of the "green" channel is in range (inMinGreen, inMaxGreen).
- Intensity of the "blue" channel is in range (inMinBlue, inMaxBlue).
- Other pixels are transformed to the maximum level.
If any of the parameters inMinRed, inMinGreen, inMinBlue is not set, it is assumed to be -infinity. If any of the parameters inMaxRed, inMaxGreen, inMaxBlue is not set, it is assumed to be infinity.
Parameter inFuzziness (set to 0 by default) allows to perform fuzzy thresholding which linearly interpolates those pixel values that differ by at most inFuzziness from the border channel intensities; thus creating smooth transition between minimum and maximum values in the resulting image.
Examples
![]() |
![]() |
ThresholdImage_RGB performed on the sample image with inMinRed = 120.0, inMaxGreen = 100.0, inMaxBlue = 100.0, inFuzziness = 0.0.
![]() |
![]() |
ThresholdImage_RGB performed on the sample image with inMinRed = 120.0, inMaxGreen = 100.0, inMaxBlue = 100.0, inFuzziness = 10.0.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Hardware acceleration settings may be manipulated with Settings class.
Errors
| Error type | Description |
|---|---|
| DomainError | Not a 3-channel and 8-bit image in ThresholdImage_RGB. |



