HALCON Reference Manual 10.0.2
Table of Contents / Inspection / OCV ClassesClassesClasses | | | Operators

do_ocv_simpledo_ocv_simpledo_ocv_simpleDoOcvSimpleDoOcvSimple (Operator)

Name

do_ocv_simpledo_ocv_simpledo_ocv_simpleDoOcvSimpleDoOcvSimple — Verification of a pattern using an OCV tool.

Signature

do_ocv_simple(Pattern : : OCVHandle, PatternName, AdaptPos, AdaptSize, AdaptAngle, AdaptGray, Threshold : Quality)

Herror do_ocv_simple(const Hobject Pattern, const Hlong OCVHandle, const char* PatternName, const char* AdaptPos, const char* AdaptSize, const char* AdaptAngle, const char* AdaptGray, double Threshold, double* Quality)

Herror T_do_ocv_simple(const Hobject Pattern, const Htuple OCVHandle, const Htuple PatternName, const Htuple AdaptPos, const Htuple AdaptSize, const Htuple AdaptAngle, const Htuple AdaptGray, const Htuple Threshold, Htuple* Quality)

Herror do_ocv_simple(Hobject Pattern, const HTuple& OCVHandle, const HTuple& PatternName, const HTuple& AdaptPos, const HTuple& AdaptSize, const HTuple& AdaptAngle, const HTuple& AdaptGray, const HTuple& Threshold, double* Quality)

Herror do_ocv_simple(Hobject Pattern, const HTuple& OCVHandle, const HTuple& PatternName, const HTuple& AdaptPos, const HTuple& AdaptSize, const HTuple& AdaptAngle, const HTuple& AdaptGray, const HTuple& Threshold, HTuple* Quality)

double HImage::DoOcvSimple(const HOCV& OCVHandle, const HTuple& PatternName, const HTuple& AdaptPos, const HTuple& AdaptSize, const HTuple& AdaptAngle, const HTuple& AdaptGray, const HTuple& Threshold) const

HTuple HImageArray::DoOcvSimple(const HOCV& OCVHandle, const HTuple& PatternName, const HTuple& AdaptPos, const HTuple& AdaptSize, const HTuple& AdaptAngle, const HTuple& AdaptGray, const HTuple& Threshold) const

HTuple HOCV::DoOcvSimple(const HImageArray& Pattern, const HTuple& PatternName, const HTuple& AdaptPos, const HTuple& AdaptSize, const HTuple& AdaptAngle, const HTuple& AdaptGray, const HTuple& Threshold) const

void HOperatorSetX.DoOcvSimple(
[in] IHUntypedObjectX* Pattern, [in] VARIANT OCVHandle, [in] VARIANT PatternName, [in] VARIANT AdaptPos, [in] VARIANT AdaptSize, [in] VARIANT AdaptAngle, [in] VARIANT AdaptGray, [in] VARIANT Threshold, [out] VARIANT* Quality)

VARIANT HImageX.DoOcvSimple(
[in] IHOCVX* OCVHandle, [in] VARIANT PatternName, [in] BSTR AdaptPos, [in] BSTR AdaptSize, [in] BSTR AdaptAngle, [in] BSTR AdaptGray, [in] double Threshold)

VARIANT HOCVX.DoOcvSimple(
[in] IHImageX* Pattern, [in] VARIANT PatternName, [in] BSTR AdaptPos, [in] BSTR AdaptSize, [in] BSTR AdaptAngle, [in] BSTR AdaptGray, [in] double Threshold)

static void HOperatorSet.DoOcvSimple(HObject pattern, HTuple OCVHandle, HTuple patternName, HTuple adaptPos, HTuple adaptSize, HTuple adaptAngle, HTuple adaptGray, HTuple threshold, out HTuple quality)

HTuple HImage.DoOcvSimple(HOCV OCVHandle, HTuple patternName, string adaptPos, string adaptSize, string adaptAngle, string adaptGray, double threshold)

double HImage.DoOcvSimple(HOCV OCVHandle, string patternName, string adaptPos, string adaptSize, string adaptAngle, string adaptGray, double threshold)

HTuple HOCV.DoOcvSimple(HImage pattern, HTuple patternName, string adaptPos, string adaptSize, string adaptAngle, string adaptGray, double threshold)

double HOCV.DoOcvSimple(HImage pattern, string patternName, string adaptPos, string adaptSize, string adaptAngle, string adaptGray, double threshold)

Description

do_ocv_simpledo_ocv_simpledo_ocv_simpleDoOcvSimpleDoOcvSimple evaluates the pattern in (PatternPatternPatternPatternpattern). Before the evaluation the good-pattern has to be trained by using the operator traind_ocv_projtraind_ocv_projtraind_ocv_projTraindOcvProjTraindOcvProj. Both patterns should have roughly the same (relative) extent and shape. To specify which of the trained patterns is used as reference its name is specified in PatternNamePatternNamePatternNamePatternNamepatternName. The next four parameters influence the automatic adaption: AdaptPosAdaptPosAdaptPosAdaptPosadaptPos and AdaptSizeAdaptSizeAdaptSizeAdaptSizeadaptSize refer to the geometry of the pattern. AdaptPosAdaptPosAdaptPosAdaptPosadaptPos specifies whether a shift of the position will be adapted automatically. AdaptSizeAdaptSizeAdaptSizeAdaptSizeadaptSize is used to adapt to changes in the size of the pattern. AdaptAngleAdaptAngleAdaptAngleAdaptAngleadaptAngle is not implemented. The parameter AdaptGrayAdaptGrayAdaptGrayAdaptGrayadaptGray controls the adaption to changes of the grayvalues. This comprises additive and multiplicative changes of the intensity.

The parameter ThresholdThresholdThresholdThresholdthreshold specifies the minimum difference of the gray values to be treated as an error. In this case the percentage of wrong pixels is returned. If the value is below 0 the sum of all errors normalized with respect to the size is returned.

The result of the operator is the QualityQualityQualityQualityquality of the pattern with a value between 0 and 1. The value 1 corresponds to a pattern with no faults. The value 0 corresponds to a very big fault.

Parallelization

Parameters

PatternPatternPatternPatternpattern (input_object)  image(-array) objectHImageHImageHImageXHobject (byte)

Characters to be verified.

OCVHandleOCVHandleOCVHandleOCVHandleOCVHandle (input_control)  ocv HOCV, HTupleHOCV, HTupleHOCVX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Handle of the OCV tool.

PatternNamePatternNamePatternNamePatternNamepatternName (input_control)  string(-array) HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Name of the character.

Default value: 'a' "a" "a" "a" "a"

AdaptPosAdaptPosAdaptPosAdaptPosadaptPos (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Adaption to vertical and horizontal translation.

Default value: 'true' "true" "true" "true" "true"

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false"

AdaptSizeAdaptSizeAdaptSizeAdaptSizeadaptSize (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Adaption to vertical and horizontal scaling of the size.

Default value: 'true' "true" "true" "true" "true"

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false"

AdaptAngleAdaptAngleAdaptAngleAdaptAngleadaptAngle (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Adaption to changes of the orientation (not implemented).

Default value: 'false' "false" "false" "false" "false"

List of values: 'false'"false""false""false""false"

AdaptGrayAdaptGrayAdaptGrayAdaptGrayadaptGray (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Adaption to additive and scaling gray value changes.

Default value: 'true' "true" "true" "true" "true"

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false"

ThresholdThresholdThresholdThresholdthreshold (input_control)  number HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Minimum difference between objects.

Default value: 10

Suggested values: -1.0, 0.0, 1.0, 5.0, 10.0, 15.0, 20.0, 30.0, 40.0, 50.0, 60.0, 80.0, 100.0, 150.0

QualityQualityQualityQualityquality (output_control)  real(-array) HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Evaluation of the character.

Typical range of values: 0.0 ≤ Quality Quality Quality Quality quality ≤ 1.0

Result

do_ocv_simpledo_ocv_simpledo_ocv_simpleDoOcvSimpleDoOcvSimple returns 2 (H_MSG_TRUE), if the handle and the characters are correct. Otherwise, an exception is raised.

Possible Predecessors

traind_ocr_class_boxtraind_ocr_class_boxtraind_ocr_class_boxTraindOcrClassBoxTraindOcrClassBox, trainf_ocr_class_boxtrainf_ocr_class_boxtrainf_ocr_class_boxTrainfOcrClassBoxTrainfOcrClassBox, read_ocvread_ocvread_ocvReadOcvReadOcv, thresholdthresholdthresholdThresholdThreshold, connectionconnectionconnectionConnectionConnection, select_shapeselect_shapeselect_shapeSelectShapeSelectShape

Possible Successors

close_ocvclose_ocvclose_ocvCloseOcvCloseOcv

See also

create_ocv_projcreate_ocv_projcreate_ocv_projCreateOcvProjCreateOcvProj

Module

OCR/OCV


Table of Contents / Inspection / OCV ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH