EasyImage::Threshold
Binarize an image by setting pixels to two different possible values in a destination image, according to their value in a source image.
Namespace: Euresys::Open_eVision_2_10
[C++]
void Threshold(
EROIBW8* sourceImage,
EROIBW1* destinationImage,
OEV_UINT32 threshold,
float relativeThreshold
)
void Threshold(
EROIBW16* sourceImage,
EROIBW1* destinationImage,
OEV_UINT32 threshold,
float relativeThreshold
)
void Threshold(
EROIBW8* sourceImage,
EROIBW8* destinationImage,
OEV_UINT32 threshold,
OEV_UINT8 lowValue,
OEV_UINT8 highValue,
float relativeThreshold
)
void Threshold(
const EROIBW8* sourceImage,
const ERegion& region,
EROIBW8* destinationImage,
OEV_UINT32 threshold,
OEV_UINT8 lowValue,
OEV_UINT8 highValue,
float relativeThreshold
)
void Threshold(
EROIBW16* sourceImage,
EROIBW16* destinationImage
)
void Threshold(
const EROIBW16* sourceImage,
const ERegion& region,
EROIBW16* destinationImage
)
void Threshold(
EROIBW16* sourceImage,
EROIBW16* destinationImage,
OEV_UINT32 threshold
)
void Threshold(
const EROIBW16* sourceImage,
const ERegion& region,
EROIBW16* destinationImage,
OEV_UINT32 threshold
)
void Threshold(
EROIBW16* sourceImage,
EROIBW16* destinationImage,
OEV_UINT32 threshold,
EBW16 lowValue,
EBW16 highValue
)
void Threshold(
const EROIBW16* sourceImage,
const ERegion& region,
EROIBW16* destinationImage,
OEV_UINT32 threshold,
EBW16 lowValue,
EBW16 highValue
)
void Threshold(
EROIBW16* sourceImage,
EROIBW16* destinationImage,
float relativeThreshold
)
void Threshold(
const EROIBW16* sourceImage,
const ERegion& region,
EROIBW16* destinationImage,
float relativeThreshold
)
void Threshold(
EROIBW16* sourceImage,
EROIBW16* destinationImage,
float relativeThreshold,
EBW16 lowValue,
EBW16 highValue
)
void Threshold(
const EROIBW16* sourceImage,
const ERegion& region,
EROIBW16* destinationImage,
float relativeThreshold,
EBW16 lowValue,
EBW16 highValue
)
void Threshold(
EROIC24* sourceImage,
EROIBW8* destinationImage,
EC24 minimum,
EC24 maximum
)
void Threshold(
const EROIC24* sourceImage,
const ERegion& region,
EROIBW8* destinationImage,
EC24 minimum,
EC24 maximum
)
void Threshold(
EROIC24* sourceImage,
EROIBW8* destinationImage,
EC24 minimum,
EC24 maximum,
EColorLookup* colorLookupTable,
EBW8 rejectValue,
EBW8 acceptValue
)
void Threshold(
const EROIC24* sourceImage,
const ERegion& region,
EROIBW8* destinationImage,
EC24 minimum,
EC24 maximum,
EColorLookup* colorLookupTable,
EBW8 rejectValue,
EBW8 acceptValue
)
void Threshold(
EROIC24* sourceImage,
EROIBW8* destinationImage,
EC24 minimum,
EC24 maximum,
EColorLookup* colorLookupTable
)
void Threshold(
const EROIC24* sourceImage,
const ERegion& region,
EROIBW8* destinationImage,
EC24 minimum,
EC24 maximum,
EColorLookup* colorLookupTable
)
Parameters
sourceImage
Pointer to the source image/ROI.
destinationImage
Pointer to the destination image/ROI.
threshold
The value to compare each pixel to
relativeThreshold
Fraction of the image pixels that will be set below the threshold. Only used when the threshold value is EThresholdMode_Relative (by default,
lowValue
Value for pixels below the threshold (by default,
highValue
Value for pixels above the threshold (by default, it is set to
region
Pointer to a region to apply the function only on a particular region in the image.
minimum
Three lower thresholds combined in a single color value.
maximum
Three upper thresholds combined in a single color value.
colorLookupTable
Pointer to the color lookup table to be applied before thresholding, if any.
rejectValue
Value for pixels falling outside the range (by default,
acceptValue
Value for pixels falling inside the range (by default,
Remarks
When the source image is gray-level, the pixel values are measured against a threshold. All pixels below this threshold will yield a low value in the destination image, and all pixels above or on the threshold will yield a high value.
When the destination image is binary (BW1 pixel type), then the values are set to
When the destination image is gray-level (BW8 or BW16), then the values are set to
When the source image is gray-level, several modes are available: absolute (the threshold value is given), relative (the threshold value is computed to obtain a desired fraction of the image pixels), or automatic (using three different criteria). In the function overloads where this mode cannot be specified, it is assumed to be absolute.
If the source image is color, all pixels whose components are comprised in a range of values (minimum to maximum) will be set to a constant value (white by default), while other pixels will be set to another constant value (black by default). In this case, if a color lookup is specified, it is applied on the fly to the color image before thresholding.
The simpler color image overload does not support the use of an on-the-fly color lookup table nor
EasyImage.Threshold
Binarize an image by setting pixels to two different possible values in a destination image, according to their value in a source image.
Namespace: Euresys.Open_eVision_2_10
[C#]
void Threshold(
Euresys.Open_eVision_2_10.EROIBW8 sourceImage,
Euresys.Open_eVision_2_10.EROIBW1 destinationImage,
uint threshold,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.EROIBW1 destinationImage,
uint threshold,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW8 sourceImage,
Euresys.Open_eVision_2_10.EROIBW8 destinationImage,
uint threshold,
byte lowValue,
byte highValue,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW8 sourceImage,
Euresys.Open_eVision_2_10.ERegion region,
Euresys.Open_eVision_2_10.EROIBW8 destinationImage,
uint threshold,
byte lowValue,
byte highValue,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.ERegion region,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage,
uint threshold
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.ERegion region,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage,
uint threshold
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage,
uint threshold,
Euresys.Open_eVision_2_10.EBW16 lowValue,
Euresys.Open_eVision_2_10.EBW16 highValue
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.ERegion region,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage,
uint threshold,
Euresys.Open_eVision_2_10.EBW16 lowValue,
Euresys.Open_eVision_2_10.EBW16 highValue
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.ERegion region,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage,
float relativeThreshold,
Euresys.Open_eVision_2_10.EBW16 lowValue,
Euresys.Open_eVision_2_10.EBW16 highValue
)
void Threshold(
Euresys.Open_eVision_2_10.EROIBW16 sourceImage,
Euresys.Open_eVision_2_10.ERegion region,
Euresys.Open_eVision_2_10.EROIBW16 destinationImage,
float relativeThreshold,
Euresys.Open_eVision_2_10.EBW16 lowValue,
Euresys.Open_eVision_2_10.EBW16 highValue
)
void Threshold(
Euresys.Open_eVision_2_10.EROIC24 sourceImage,
Euresys.Open_eVision_2_10.EROIBW8 destinationImage,
Euresys.Open_eVision_2_10.EC24 minimum,
Euresys.Open_eVision_2_10.EC24 maximum
)
void Threshold(
Euresys.Open_eVision_2_10.EROIC24 sourceImage,
Euresys.Open_eVision_2_10.ERegion region,
Euresys.Open_eVision_2_10.EROIBW8 destinationImage,
Euresys.Open_eVision_2_10.EC24 minimum,
Euresys.Open_eVision_2_10.EC24 maximum
)
void Threshold(
Euresys.Open_eVision_2_10.EROIC24 sourceImage,
Euresys.Open_eVision_2_10.EROIBW8 destinationImage,
Euresys.Open_eVision_2_10.EC24 minimum,
Euresys.Open_eVision_2_10.EC24 maximum,
Euresys.Open_eVision_2_10.EColorLookup colorLookupTable,
Euresys.Open_eVision_2_10.EBW8 rejectValue,
Euresys.Open_eVision_2_10.EBW8 acceptValue
)
void Threshold(
Euresys.Open_eVision_2_10.EROIC24 sourceImage,
Euresys.Open_eVision_2_10.ERegion region,
Euresys.Open_eVision_2_10.EROIBW8 destinationImage,
Euresys.Open_eVision_2_10.EC24 minimum,
Euresys.Open_eVision_2_10.EC24 maximum,
Euresys.Open_eVision_2_10.EColorLookup colorLookupTable,
Euresys.Open_eVision_2_10.EBW8 rejectValue,
Euresys.Open_eVision_2_10.EBW8 acceptValue
)
void Threshold(
Euresys.Open_eVision_2_10.EROIC24 sourceImage,
Euresys.Open_eVision_2_10.EROIBW8 destinationImage,
Euresys.Open_eVision_2_10.EC24 minimum,
Euresys.Open_eVision_2_10.EC24 maximum,
Euresys.Open_eVision_2_10.EColorLookup colorLookupTable
)
void Threshold(
Euresys.Open_eVision_2_10.EROIC24 sourceImage,
Euresys.Open_eVision_2_10.ERegion region,
Euresys.Open_eVision_2_10.EROIBW8 destinationImage,
Euresys.Open_eVision_2_10.EC24 minimum,
Euresys.Open_eVision_2_10.EC24 maximum,
Euresys.Open_eVision_2_10.EColorLookup colorLookupTable
)
Parameters
sourceImage
Pointer to the source image/ROI.
destinationImage
Pointer to the destination image/ROI.
threshold
The value to compare each pixel to
relativeThreshold
Fraction of the image pixels that will be set below the threshold. Only used when the threshold value is Relative (by default,
lowValue
Value for pixels below the threshold (by default,
highValue
Value for pixels above the threshold (by default, it is set to
region
Pointer to a region to apply the function only on a particular region in the image.
minimum
Three lower thresholds combined in a single color value.
maximum
Three upper thresholds combined in a single color value.
colorLookupTable
Pointer to the color lookup table to be applied before thresholding, if any.
rejectValue
Value for pixels falling outside the range (by default,
acceptValue
Value for pixels falling inside the range (by default,
Remarks
When the source image is gray-level, the pixel values are measured against a threshold. All pixels below this threshold will yield a low value in the destination image, and all pixels above or on the threshold will yield a high value.
When the destination image is binary (BW1 pixel type), then the values are set to
When the destination image is gray-level (BW8 or BW16), then the values are set to
When the source image is gray-level, several modes are available: absolute (the threshold value is given), relative (the threshold value is computed to obtain a desired fraction of the image pixels), or automatic (using three different criteria). In the function overloads where this mode cannot be specified, it is assumed to be absolute.
If the source image is color, all pixels whose components are comprised in a range of values (minimum to maximum) will be set to a constant value (white by default), while other pixels will be set to another constant value (black by default). In this case, if a color lookup is specified, it is applied on the fly to the color image before thresholding.
The simpler color image overload does not support the use of an on-the-fly color lookup table nor
See also in the Code Snippets