 | ImagingProcessingThreshold Method |
Converts the input image to a black/white image (i.e. an image that contains only
two different colors) using the specified threshold value.
Namespace:
Ranorex
Assembly:
Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntaxpublic static Bitmap Threshold(
Bitmap input,
byte threshold
)
Public Shared Function Threshold (
input As Bitmap,
threshold As Byte
) As Bitmap
Parameters
- input
- Type: System.DrawingBitmap
An image. - threshold
- Type: SystemByte
The threshold value that decides whether an output pixel
is colored black or white. If the input value is smaller than the threshold, the
output pixel is colored black, otherwise white.
Return Value
Type:
BitmapA grayscale image that contains only black and white pixels.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException | If input is null. |
| ArgumentException | If the input image is not
a grayscale image and cannot
be converted to Format24bppRgb pixel format (i.e. if
it is no color image in a 32 bit format). |
Remarks
See Also