oevislib_net  0.14.3.0
Loading...
Searching...
No Matches
Thresholding

Functions

Image oevislib_net.Image.Threshold (Optional< float > inMinValue=null, Optional< float > inMaxValue=null, Optional< Region > inRoi=null)
 Binarizes the image using a threshold range.
Image oevislib_net.Image.Threshold (Image inReferenceImage, Optional< float > inMinRelativeValue, Optional< float > inMaxRelativeValue, Optional< Region > inRoi)
 Binarizes the image using a threshold range, based on another reference image.
Image oevislib_net.Image.Threshold (DynamicThresholdMethod inDynamicThresholdMethod, KernelShape inKernel, int inRadiusX, Optional< int > inRadiusY, Optional< float > inMinRelativeValue, Optional< float > inMaxRelativeValue, Optional< Region > inRoi, Optional< Region > inSourceRoi)
 Binarizes the image using a threshold range, relative to the value in its local neighborhood.
Image oevislib_net.Image.Threshold (HSxModel inHSxModel, int inMinHue, int inMaxHue, Optional< int > inMinSaturation, Optional< int > inMaxSaturation, Optional< int > inMinBrightness, Optional< int > inMaxBrightness, Optional< Region > inRoi)
 Binarizes the image using a threshold range, after converting it to the selected HSx color space.
Image oevislib_net.Image.Threshold (Optional< int > inMinRed, Optional< int > inMaxRed, Optional< int > inMinGreen, Optional< int > inMaxGreen, Optional< int > inMinBlue, Optional< int > inMaxBlue, Optional< int > inMinAlpha, Optional< int > inMaxAlpha, Optional< Region > inRoi)
 Binarizes the image using a threshold range, one for every RGB(A) channel.
Image oevislib_net.Image.Threshold (Pixel inRgbPixel, float inChromaAmount, float inMaxDifference, Optional< Region > inRoi=null)
 Binarizes the image based on the distance from a specific pixel color.
Image oevislib_net.Image.HysteresisThreshold (Optional< float > inMinValue, Optional< float > inMaxValue, float inHysteresis, Optional< Region > inRoi)
 Binarizes the image using a threshold range and hysteresis (using a lower threshold for neighboring pixels).
float oevislib_net.Image.FindBestThresholdValue (ThresholdSelectionMethod inSelectionMethod, Optional< Region > inRoi, Optional< Array< float > > outBackgroundPixelsFraction, Optional< Array< float > > outForegroundPixelsFraction)
 Finds the best threshold value based on the image pixels distribution.
Region oevislib_net.Image.ThresholdToRegion (Optional< float > inMinValue=null, Optional< float > inMaxValue=null, Optional< Region > inRoi=null)
 Thresholds the image and converts it into a Region.
Region oevislib_net.Image.ThresholdToRegion (Image inReferenceImage, Optional< float > inMinRelativeValue, Optional< float > inMaxRelativeValue, Optional< Region > inRoi)
 Thresholds the image, relatively to another one, and converts it into a region.
Array< Regionoevislib_net.Image.ThresholdToRegions (Image inReferenceImage, float inBrightThreshold, float inDarkThreshold, Optional< Region > inRoi)
 Thresholds an image using two relative thresholds to separate foreground and background regions.
Region oevislib_net.Image.ThresholdToRegion (int inRadiusX, Optional< int > inRadiusY, Optional< float > inMinRelativeValue, Optional< float > inMaxRelativeValue, Optional< Region > inRoi, Optional< Region > inSourceRoi)
 Thresholds the image, based on the average pixel in its local neighborhood, and converts it to region.
Region oevislib_net.Image.ThresholdToRegion (HSxModel inHSxModel, int inMinHue, int inMaxHue, Optional< int > inMinSaturation, Optional< int > inMaxSaturation, Optional< int > inMinBrightness, Optional< int > inMaxBrightness, Optional< Region > inRoi)
 Threshold the image, after converting it in the selected HSx color space, and converts it to region.
Region oevislib_net.Image.ThresholdToRegion (Optional< int > inMinRed, Optional< int > inMaxRed, Optional< int > inMinGreen, Optional< int > inMaxGreen, Optional< int > inMinBlue, Optional< int > inMaxBlue, Optional< int > inMinAlpha, Optional< int > inMaxAlpha, Optional< Region > inRoi)
 Thresholds the image, separately for every RGB(A) channel, and converts it to region.
Region oevislib_net.Image.ThresholdToRegion (Pixel inRgbPixel, float inChromaAmount, float inMaxDifference, Optional< Region > inRoi)
 Thresholds the image, based on a pixel color, and converts it to region.

Detailed Description

Function Documentation

◆ FindBestThresholdValue()

float oevislib_net.Image.FindBestThresholdValue ( ThresholdSelectionMethod inSelectionMethod,
Optional< Region > inRoi,
Optional< Array< float > > outBackgroundPixelsFraction,
Optional< Array< float > > outForegroundPixelsFraction )
inline

Finds the best threshold value based on the image pixels distribution.

Parameters
inSelectionMethodMethod used to select the best threshold.
inRoiRegion of interest.
outBackgroundPixelsFractionFraction of pixels darker than the chosen value (for every case).
outForegroundPixelsFractionFraction of pixels brighter than the chosen value (for every case).
Returns
Best threshold value.

◆ HysteresisThreshold()

Image oevislib_net.Image.HysteresisThreshold ( Optional< float > inMinValue,
Optional< float > inMaxValue,
float inHysteresis,
Optional< Region > inRoi )
inline

Binarizes the image using a threshold range and hysteresis (using a lower threshold for neighboring pixels).

Parameters
inMinValueMinimum value of the range (or the minimum value for the image's pixel type, if not defined).
inMaxValueMaximum value of the range (or the maximum value for the image's pixel type, if not defined).
inHysteresisHow much the threshold criteria is lowered for neighboring pixels. Range: [0, +inf).
inRoiRegion of interest.
Returns
Monochromatic image.

◆ Threshold() [1/6]

Image oevislib_net.Image.Threshold ( DynamicThresholdMethod inDynamicThresholdMethod,
KernelShape inKernel,
int inRadiusX,
Optional< int > inRadiusY,
Optional< float > inMinRelativeValue,
Optional< float > inMaxRelativeValue,
Optional< Region > inRoi,
Optional< Region > inSourceRoi )
inline

Binarizes the image using a threshold range, relative to the value in its local neighborhood.

Transforms each pixel value to the maximum or minimum value based on the value computed in its local neighborhood. The minimum and maximum values depend on the image pixel type.

Parameters
inDynamicThresholdMethodHow the local threshold value is calculated (mean, median or middle value).
inKernelKernel shape.
inRadiusXKernel's radius on X axis. Range: [0, +inf).
inRadiusYKernel's radius on Y axis. Range: [0, +inf).
inMinRelativeValueMinimum relative value of the range (or 0, if not defined).
inMaxRelativeValueMaximum relative value of the range (or the maximum value for the image's pixel type, if not defined).
inRoiRegion of interest.
inSourceRoiRegion of pixels considered during neighboring operations.
Returns
Monochromatic image.

◆ Threshold() [2/6]

Image oevislib_net.Image.Threshold ( HSxModel inHSxModel,
int inMinHue,
int inMaxHue,
Optional< int > inMinSaturation,
Optional< int > inMaxSaturation,
Optional< int > inMinBrightness,
Optional< int > inMaxBrightness,
Optional< Region > inRoi )
inline

Binarizes the image using a threshold range, after converting it to the selected HSx color space.

Transforms each pixel value to the maximum value (foreground) if it's in its channel range, otherwise sets it to the minimum value (background).

Parameters
inHSxModelHSx color model.
inMinHueMinimum Hue value of the range. Range: [0, 255].
inMaxHueMaximum Hue value of the range. Range: [0, 255].
inMinSaturationMinimum saturation of the range. Range: [0, 255].
inMaxSaturationMaximum saturation of the range. Range: [0, 255].
inMinBrightnessMinimum brightness of the range (V, L or I channel). Range: [0, 255].
inMaxBrightnessMaximum brightness of the range (V, L or I channel). Range: [0, 255].
inRoiRegion of interest.
Returns
Monochromatic image.

◆ Threshold() [3/6]

Image oevislib_net.Image.Threshold ( Image inReferenceImage,
Optional< float > inMinRelativeValue,
Optional< float > inMaxRelativeValue,
Optional< Region > inRoi )
inline

Binarizes the image using a threshold range, based on another reference image.

Transforms each pixel value to the maximum value (foreground) if it's in the range [inReferenceImage(x, y) + inMinValue, inReferenceImage(x, y) + inMaxValue], otherwise sets it to the minimum value (background). The minimum and maximum values depend on the image pixel type.

Parameters
inReferenceImageReference image.
inMinRelativeValueMinimum relative value of the range (or 0, if not defined).
inMaxRelativeValueMaximum relative value of the range (or the maximum value for the image's pixel type, if not defined).
inRoiRegion of interest.
Returns
Monochromatic image.

◆ Threshold() [4/6]

Image oevislib_net.Image.Threshold ( Optional< float > inMinValue = null,
Optional< float > inMaxValue = null,
Optional< Region > inRoi = null )
inline

Binarizes the image using a threshold range.

Transforms each pixel value to the maximum value (foreground) if it's in the range [inMinValue, inMaxValue], otherwise sets it to the minimum value (background). The minimum and maximum values depend on the image pixel type.

Parameters
inMinValueMinimum value of the range (or the minimum value for the image's pixel type, if not defined).
inMaxValueMaximum value of the range (or the maximum value for the image's pixel type, if not defined).
inRoiRegion of interest.
Returns
Monochromatic image.

◆ Threshold() [5/6]

Image oevislib_net.Image.Threshold ( Optional< int > inMinRed,
Optional< int > inMaxRed,
Optional< int > inMinGreen,
Optional< int > inMaxGreen,
Optional< int > inMinBlue,
Optional< int > inMaxBlue,
Optional< int > inMinAlpha,
Optional< int > inMaxAlpha,
Optional< Region > inRoi )
inline

Binarizes the image using a threshold range, one for every RGB(A) channel.

Transforms each pixel component to the maximum value (foreground) if it's in the range specified, otherwise sets it to the minimum value (background).

Parameters
inMinRedMinimum value for the first channel, usually Red. Range: [0, 255].
inMaxRedMaximum value for the first channel, usually Red. Range: [0, 255].
inMinGreenMinimum value for the second channel, usually Green. Range: [0, 255].
inMaxGreenMaximum value for the second channel, usually Green. Range: [0, 255].
inMinBlueMinimum value for the third channel, usually Blue. Range: [0, 255].
inMaxBlueMaximum value for the third channel, usually Blue. Range: [0, 255].
inMinAlphaMinimum value for the fourth channel, usually the Alpha channel. Range: [0, 255].
inMaxAlphaMaximum value for the fourth channel, usually the Alpha channel. Range: [0, 255].
inRoiRegion of interest.
Returns
Monochromatic image.

◆ Threshold() [6/6]

Image oevislib_net.Image.Threshold ( Pixel inRgbPixel,
float inChromaAmount,
float inMaxDifference,
Optional< Region > inRoi = null )
inline

Binarizes the image based on the distance from a specific pixel color.

Transforms each pixel component to the maximum value (foreground) if it's not too distant from the given color, otherwise sets it to the minimum value (background).

Parameters
inRgbPixelColor to compare the image to.
inChromaAmountProportion of chromatic information used. Range: [0, 1].
inMaxDifferenceMaximum difference between every image pixel and the given RGB pixel. Range: [0, +inf).
inRoiRegion of interest.
Returns
Monochromatic image.

◆ ThresholdToRegion() [1/6]

Region oevislib_net.Image.ThresholdToRegion ( HSxModel inHSxModel,
int inMinHue,
int inMaxHue,
Optional< int > inMinSaturation,
Optional< int > inMaxSaturation,
Optional< int > inMinBrightness,
Optional< int > inMaxBrightness,
Optional< Region > inRoi )
inline

Threshold the image, after converting it in the selected HSx color space, and converts it to region.

Parameters
inHSxModelHSx color model.
inMinHueMinimum Hue value of the range. Range: [0, 255].
inMaxHueMaximum Hue value of the range. Range: [0, 255].
inMinSaturationMinimum saturation of the range. Range: [0, 255].
inMaxSaturationMaximum saturation of the range. Range: [0, 255].
inMinBrightnessMinimum brightness of the range (V, L or I channel). Range: [0, 255].
inMaxBrightnessMaximum brightness of the range (V, L or I channel). Range: [0, 255].
inRoiRegion of interest.
Returns
Output region.

◆ ThresholdToRegion() [2/6]

Region oevislib_net.Image.ThresholdToRegion ( Image inReferenceImage,
Optional< float > inMinRelativeValue,
Optional< float > inMaxRelativeValue,
Optional< Region > inRoi )
inline

Thresholds the image, relatively to another one, and converts it into a region.

Parameters
inReferenceImageReference image.
inMinRelativeValueMinimum relative value of the range (or 0, if not defined).
inMaxRelativeValueMaximum relative value of the range (or the maximum value for the image's pixel type, if not defined).
inRoiRegion of interest.
Returns
Output region.

◆ ThresholdToRegion() [3/6]

Region oevislib_net.Image.ThresholdToRegion ( int inRadiusX,
Optional< int > inRadiusY,
Optional< float > inMinRelativeValue,
Optional< float > inMaxRelativeValue,
Optional< Region > inRoi,
Optional< Region > inSourceRoi )
inline

Thresholds the image, based on the average pixel in its local neighborhood, and converts it to region.

Parameters
inRadiusXKernel's radius on X axis for averaging operation. Range: [0, +inf).
inRadiusYKernel's radius on Y axis for averaging operation. Range: [0, +inf).
inMinRelativeValueMinimum relative value of the range (or 0, if not defined).
inMaxRelativeValueMaximum relative value of the range (or the maximum value for the image's pixel type, if not defined).
inRoiRegion of interest.
inSourceRoiRegion of pixels considered during neighboring operations.
Returns
Output region.

◆ ThresholdToRegion() [4/6]

Region oevislib_net.Image.ThresholdToRegion ( Optional< float > inMinValue = null,
Optional< float > inMaxValue = null,
Optional< Region > inRoi = null )
inline

Thresholds the image and converts it into a Region.

Parameters
inMinValueMinimum value of the range (or the minimum value for the image's pixel type, if not defined).
inMaxValueMaximum value of the range (or the maximum value for the image's pixel type, if not defined).
inRoiRegion of interest.
Returns
Output region.

◆ ThresholdToRegion() [5/6]

Region oevislib_net.Image.ThresholdToRegion ( Optional< int > inMinRed,
Optional< int > inMaxRed,
Optional< int > inMinGreen,
Optional< int > inMaxGreen,
Optional< int > inMinBlue,
Optional< int > inMaxBlue,
Optional< int > inMinAlpha,
Optional< int > inMaxAlpha,
Optional< Region > inRoi )
inline

Thresholds the image, separately for every RGB(A) channel, and converts it to region.

Parameters
inMinRedMinimum value for the first channel, usually Red. Range: [0, 255].
inMaxRedMaximum value for the first channel, usually Red. Range: [0, 255].
inMinGreenMinimum value for the second channel, usually Green. Range: [0, 255].
inMaxGreenMaximum value for the second channel, usually Green. Range: [0, 255].
inMinBlueMinimum value for the third channel, usually Blue. Range: [0, 255].
inMaxBlueMaximum value for the third channel, usually Blue. Range: [0, 255].
inMinAlphaMinimum value for the fourth channel, usually the Alpha channel. Range: [0, 255].
inMaxAlphaMaximum value for the fourth channel, usually the Alpha channel. Range: [0, 255].
inRoiRegion of interest.
Returns
Output region.

◆ ThresholdToRegion() [6/6]

Region oevislib_net.Image.ThresholdToRegion ( Pixel inRgbPixel,
float inChromaAmount,
float inMaxDifference,
Optional< Region > inRoi )
inline

Thresholds the image, based on a pixel color, and converts it to region.

Parameters
inRgbPixelColor to compare the image to.
inChromaAmountProportion of chromatic information used. Range: [0, 1].
inMaxDifferenceMaximum difference between every image pixel and the given RGB pixel. Range: [0, +inf).
inRoiRegion of interest.
Returns
Monochromatic image.

◆ ThresholdToRegions()

Array< Region > oevislib_net.Image.ThresholdToRegions ( Image inReferenceImage,
float inBrightThreshold,
float inDarkThreshold,
Optional< Region > inRoi )
inline

Thresholds an image using two relative thresholds to separate foreground and background regions.

Parameters
inReferenceImageAnother image subtracted from the current one before thresholding.
inBrightThresholdMinimum relative value for a bright pixel.
inDarkThresholdMaximum relative value for a dark pixel.
inRoiRegion of interest.
Returns
Foreground and background regions.