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_6
[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(
EROIBW16* sourceImage,
EROIBW16* destinationImage
)
void Threshold(
EROIBW16* sourceImage,
EROIBW16* destinationImage,
OEV_UINT32 threshold
)
void Threshold(
EROIBW16* sourceImage,
EROIBW16* destinationImage,
OEV_UINT32 threshold,
EBW16 lowValue,
EBW16 highValue
)
void Threshold(
EROIBW16* sourceImage,
EROIBW16* destinationImage,
float relativeThreshold
)
void Threshold(
EROIBW16* sourceImage,
EROIBW16* destinationImage,
float relativeThreshold,
EBW16 lowValue,
EBW16 highValue
)
void Threshold(
EROIC24* sourceImage,
EROIBW8* destinationImage,
EC24 minimum,
EC24 maximum
)
void Threshold(
EROIC24* sourceImage,
EROIBW8* destinationImage,
EC24 minimum,
EC24 maximum,
EColorLookup* colorLookupTable,
EBW8 rejectValue,
EBW8 acceptValue
)
void Threshold(
EROIC24* sourceImage,
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
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
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_6
[C#]
void Threshold(
Euresys.Open_eVision_2_6.EROIBW8 sourceImage,
Euresys.Open_eVision_2_6.EROIBW1 destinationImage,
uint threshold,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_6.EROIBW16 sourceImage,
Euresys.Open_eVision_2_6.EROIBW1 destinationImage,
uint threshold,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_6.EROIBW8 sourceImage,
Euresys.Open_eVision_2_6.EROIBW8 destinationImage,
uint threshold,
byte lowValue,
byte highValue,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_6.EROIBW16 sourceImage,
Euresys.Open_eVision_2_6.EROIBW16 destinationImage
)
void Threshold(
Euresys.Open_eVision_2_6.EROIBW16 sourceImage,
Euresys.Open_eVision_2_6.EROIBW16 destinationImage,
uint threshold
)
void Threshold(
Euresys.Open_eVision_2_6.EROIBW16 sourceImage,
Euresys.Open_eVision_2_6.EROIBW16 destinationImage,
uint threshold,
Euresys.Open_eVision_2_6.EBW16 lowValue,
Euresys.Open_eVision_2_6.EBW16 highValue
)
void Threshold(
Euresys.Open_eVision_2_6.EROIBW16 sourceImage,
Euresys.Open_eVision_2_6.EROIBW16 destinationImage,
float relativeThreshold
)
void Threshold(
Euresys.Open_eVision_2_6.EROIBW16 sourceImage,
Euresys.Open_eVision_2_6.EROIBW16 destinationImage,
float relativeThreshold,
Euresys.Open_eVision_2_6.EBW16 lowValue,
Euresys.Open_eVision_2_6.EBW16 highValue
)
void Threshold(
Euresys.Open_eVision_2_6.EROIC24 sourceImage,
Euresys.Open_eVision_2_6.EROIBW8 destinationImage,
Euresys.Open_eVision_2_6.EC24 minimum,
Euresys.Open_eVision_2_6.EC24 maximum
)
void Threshold(
Euresys.Open_eVision_2_6.EROIC24 sourceImage,
Euresys.Open_eVision_2_6.EROIBW8 destinationImage,
Euresys.Open_eVision_2_6.EC24 minimum,
Euresys.Open_eVision_2_6.EC24 maximum,
Euresys.Open_eVision_2_6.EColorLookup colorLookupTable,
Euresys.Open_eVision_2_6.EBW8 rejectValue,
Euresys.Open_eVision_2_6.EBW8 acceptValue
)
void Threshold(
Euresys.Open_eVision_2_6.EROIC24 sourceImage,
Euresys.Open_eVision_2_6.EROIBW8 destinationImage,
Euresys.Open_eVision_2_6.EC24 minimum,
Euresys.Open_eVision_2_6.EC24 maximum,
Euresys.Open_eVision_2_6.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
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
See also in the Code Snippets