|
| static bool | oevislib_net.ComputerVision.ImageAnalysis.ImageAnalysis.IsObjectPresent (Image inImage, ShapeRegion inRoi, Optional< UCS2D > inRoiAlignment=null, Optional< float > inMinIntensity=null, Optional< float > inMaxIntensity=null, float inMinContrast=0.2f, Optional< float > inMaxContrast=null, Optional< float > outIntensity=null, Optional< float > outContrast=null, Optional< ShapeRegion > outAlignedRoi=null) |
| | Check whether an object is present inside an image, analyzing the pixel intensities inside the specified ROI.
|
| static bool | oevislib_net.ComputerVision.ImageAnalysis.ImageAnalysis.IsObjectPresent (Image inImage, ShapeRegion inRoi, Optional< UCS2D > inRoiAlignment=null, HSxModel inHSxModel=HSxModel.HSV, int inMinHue=0, int inMaxHue=255, int inMinSaturation=128, Optional< int > inMaxSaturation=null, Optional< float > inMinBrightness=null, Optional< float > inMaxBrightness=null, float inMinAmount=0.5f, float inMaxAmount=1.0f, Optional< float > outAmount=null, Optional< Region > outForeground=null, Optional< ShapeRegion > outAlignedRoi=null) |
| | Check whether the object is present inside an image, based on the amount of pixels that satisfy the color criteria.
|
| static bool | oevislib_net.ComputerVision.ImageAnalysis.ImageAnalysis.IsObjectPresent (Image inImage, ShapeRegion inRoi, Optional< UCS2D > inRoiAlignment=null, GradientMethod inGradientMethod=GradientMethod.Sobel, MagnitudeMeasure inMagnitudeMeasure=MagnitudeMeasure.Sum, int inGradientScale=1, int inMinMagnitude=15, float inMinAmount=0.2f, float inMaxAmount=1.0f, Optional< float > outAmount=null, Optional< Region > outForeground=null, Optional< ShapeRegion > outAlignedRoi=null) |
| | Check whether the object is present inside an image, analyzing the amount of edges found in the specified region.
|
| bool oevislib_net.ComputerVision.ImageAnalysis.ImageAnalysis.IsObjectPresent |
( |
Image | inImage, |
|
|
ShapeRegion | inRoi, |
|
|
Optional< UCS2D > | inRoiAlignment = null, |
|
|
HSxModel | inHSxModel = HSxModel::HSV, |
|
|
int | inMinHue = 0, |
|
|
int | inMaxHue = 255, |
|
|
int | inMinSaturation = 128, |
|
|
Optional< int > | inMaxSaturation = null, |
|
|
Optional< float > | inMinBrightness = null, |
|
|
Optional< float > | inMaxBrightness = null, |
|
|
float | inMinAmount = 0::5f, |
|
|
float | inMaxAmount = 1::0f, |
|
|
Optional< float > | outAmount = null, |
|
|
Optional< Region > | outForeground = null, |
|
|
Optional< ShapeRegion > | outAlignedRoi = null ) |
|
inlinestatic |
Check whether the object is present inside an image, based on the amount of pixels that satisfy the color criteria.
If the input image has 3 channels (RGB), the image is converted to the specified HSx model and all 3 pixels' components are compared with hue, saturation and brightness values. Otherwise, if the input consists in a grayscale image, the first (and only) channel values are compared with the brightness range.
- Parameters
-
| inImage | Input image. |
| inRoi | Where to check for the object. |
| inRoiAlignment | Region of interest alignment. |
| inHSxModel | HSx color model. |
| inMinHue | Minimum acceptable hue value. |
| inMaxHue | Maximum acceptable hue value. |
| inMinSaturation | Minimum acceptable saturation value. |
| inMaxSaturation | Maximum acceptable saturation value. If Null, the value is set to the highest value (255). |
| inMinBrightness | Minimum acceptable brightness value. If Null, the value is set to the lowest value (0). |
| inMaxBrightness | Maximum acceptable brightness value. If Null, the value is set to the highest value (255). |
| inMinAmount | Minimum acceptable fraction of pixels meeting the color criteria. |
| inMaxAmount | Maximum acceptable fraction of pixels meeting the color criteria. |
| outAmount | Fraction of pixels meeting the color criteria. |
| outForeground | Region of pixels meeting the color criteria. |
| outAlignedRoi | Aligned region of interest. |
- Returns
- True if the object is present, false otherwise.