ClassesClassesClassesClasses | | | | Operators

compare_objcompare_objCompareObjcompare_objCompareObjCompareObj (Operator)

Name

compare_objcompare_objCompareObjcompare_objCompareObjCompareObj — Compare iconic objects regarding equality.

Signature

compare_obj(Objects1, Objects2 : : Epsilon : IsEqual)

Herror compare_obj(const Hobject Objects1, const Hobject Objects2, double Epsilon, Hlong* IsEqual)

Herror T_compare_obj(const Hobject Objects1, const Hobject Objects2, const Htuple Epsilon, Htuple* IsEqual)

Herror compare_obj(Hobject Objects1, Hobject Objects2, const HTuple& Epsilon, Hlong* IsEqual)

void CompareObj(const HObject& Objects1, const HObject& Objects2, const HTuple& Epsilon, HTuple* IsEqual)

Hlong HObject::CompareObj(const HObject& Objects2, const HTuple& Epsilon) const

Hlong HObject::CompareObj(const HObject& Objects2, double Epsilon) const

Hlong HImage::CompareObj(const HImage& Objects2, const HTuple& Epsilon) const

Hlong HImage::CompareObj(const HImage& Objects2, double Epsilon) const

Hlong HRegion::CompareObj(const HRegion& Objects2, const HTuple& Epsilon) const

Hlong HRegion::CompareObj(const HRegion& Objects2, double Epsilon) const

Hlong HXLD::CompareObj(const HXLD& Objects2, const HTuple& Epsilon) const

Hlong HXLD::CompareObj(const HXLD& Objects2, double Epsilon) const

Hlong HXLDCont::CompareObj(const HXLDCont& Objects2, const HTuple& Epsilon) const

Hlong HXLDCont::CompareObj(const HXLDCont& Objects2, double Epsilon) const

Hlong HXLDPoly::CompareObj(const HXLDPoly& Objects2, const HTuple& Epsilon) const

Hlong HXLDPoly::CompareObj(const HXLDPoly& Objects2, double Epsilon) const

Hlong HXLDPara::CompareObj(const HXLDPara& Objects2, const HTuple& Epsilon) const

Hlong HXLDPara::CompareObj(const HXLDPara& Objects2, double Epsilon) const

Hlong HXLDModPara::CompareObj(const HXLDModPara& Objects2, const HTuple& Epsilon) const

Hlong HXLDModPara::CompareObj(const HXLDModPara& Objects2, double Epsilon) const

Hlong HXLDExtPara::CompareObj(const HXLDExtPara& Objects2, const HTuple& Epsilon) const

Hlong HXLDExtPara::CompareObj(const HXLDExtPara& Objects2, double Epsilon) const

void HOperatorSetX.CompareObj(
[in] IHUntypedObjectX* Objects1, [in] IHUntypedObjectX* Objects2, [in] VARIANT Epsilon, [out] VARIANT* IsEqual)

Hlong HImageX.CompareObj(
[in] IHImageX* Objects2, [in] VARIANT Epsilon)

Hlong HRegionX.CompareObj(
[in] IHRegionX* Objects2, [in] VARIANT Epsilon)

Hlong HUntypedObjectX.CompareObj(
[in] IHUntypedObjectX* Objects2, [in] VARIANT Epsilon)

Hlong HXLDContX.CompareObj(
[in] IHXLDContX* Objects2, [in] VARIANT Epsilon)

Hlong HXLDPolyX.CompareObj(
[in] IHXLDPolyX* Objects2, [in] VARIANT Epsilon)

Hlong HXLDParaX.CompareObj(
[in] IHXLDParaX* Objects2, [in] VARIANT Epsilon)

Hlong HXLDModParaX.CompareObj(
[in] IHXLDModParaX* Objects2, [in] VARIANT Epsilon)

Hlong HXLDExtParaX.CompareObj(
[in] IHXLDExtParaX* Objects2, [in] VARIANT Epsilon)

static void HOperatorSet.CompareObj(HObject objects1, HObject objects2, HTuple epsilon, out HTuple isEqual)

int HObject.CompareObj(HObject objects2, HTuple epsilon)

int HObject.CompareObj(HObject objects2, double epsilon)

int HImage.CompareObj(HImage objects2, HTuple epsilon)

int HImage.CompareObj(HImage objects2, double epsilon)

int HRegion.CompareObj(HRegion objects2, HTuple epsilon)

int HRegion.CompareObj(HRegion objects2, double epsilon)

int HXLD.CompareObj(HXLD objects2, HTuple epsilon)

int HXLD.CompareObj(HXLD objects2, double epsilon)

int HXLDCont.CompareObj(HXLDCont objects2, HTuple epsilon)

int HXLDCont.CompareObj(HXLDCont objects2, double epsilon)

int HXLDPoly.CompareObj(HXLDPoly objects2, HTuple epsilon)

int HXLDPoly.CompareObj(HXLDPoly objects2, double epsilon)

int HXLDPara.CompareObj(HXLDPara objects2, HTuple epsilon)

int HXLDPara.CompareObj(HXLDPara objects2, double epsilon)

int HXLDModPara.CompareObj(HXLDModPara objects2, HTuple epsilon)

int HXLDModPara.CompareObj(HXLDModPara objects2, double epsilon)

int HXLDExtPara.CompareObj(HXLDExtPara objects2, HTuple epsilon)

int HXLDExtPara.CompareObj(HXLDExtPara objects2, double epsilon)

Description

The operator compare_objcompare_objCompareObjcompare_objCompareObjCompareObj compares iconic objects regarding equality. The iconic objects are passed in the two input parameters Objects1Objects1Objects1Objects1Objects1objects1 and Objects2Objects2Objects2Objects2Objects2objects2 in form of (possibly mixed) tuples of images, regions, or XLDs. The n-th object in Objects1Objects1Objects1Objects1Objects1objects1 is compared to the n-th object in Objects2Objects2Objects2Objects2Objects2objects2 (for all n). If the two passed object tuples have the same length and if all objects are equal, the parameter IsEqualIsEqualIsEqualIsEqualIsEqualisEqual is set to 1, otherwise to 0.

For a short description of the iconic objects that are available in HALCON see the introduction of chapter Object.

Depending on the type of the input objects, different conditions must be met for the equality of two objects. In the following, the conditions for each possible iconic object are listed:

Images:

For all channels, the gray values of the respective pixels must not differ by more than EpsilonEpsilonEpsilonEpsilonEpsilonepsilon. Note that images are only compared within their domain (ROI) and they are only equal if they have the same domain (ROI).

Regions:

The regions must be equal. The parameter EpsilonEpsilonEpsilonEpsilonEpsilonepsilon has no effect for the comparison of regions.

XLD contours:

XLD contours must have the same number of points and attributes. The point coordinates and the attribute values must not differ by more than EpsilonEpsilonEpsilonEpsilonEpsilonepsilon.

XLD polygons:

XLD polygons must have the same number of line segments. The length and the orientation of these segments as well as the coordinates of the control points must not differ by more than EpsilonEpsilonEpsilonEpsilonEpsilonepsilon.

XLD parallels and extended XLD parallels:

XLD parallels must have an identical index of the start and end line segment of the parallels of the first polygon (P1) and the second polygon (P2) as well as identical pointers to the underlying contours.

Modified XLD parallels:

For modified XLD parallels, the same conditions apply as for XLD parallels and extended XLD parallels. Furthermore, the distances between the line segments of the parallel polygons must be identical.

Note that compare_objcompare_objCompareObjcompare_objCompareObjCompareObj compares all objects regarding their actual content. In contrast test_equal_objtest_equal_objTestEqualObjtest_equal_objTestEqualObjTestEqualObj compares only regions regarding their actual content while for all other objects their location in memory is compared.

Parallelization

Parameters

Objects1Objects1Objects1Objects1Objects1objects1 (input_object)  object(-array) objectHObjectHObjectHObjectHObjectXHobject

Reference objects.

Objects2Objects2Objects2Objects2Objects2objects2 (input_object)  object(-array) objectHObjectHObjectHObjectHObjectXHobject

Test objects.

EpsilonEpsilonEpsilonEpsilonEpsilonepsilon (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Maximum allowed difference between two gray values or coordinates etc.

Default value: 0.0

Suggested values: 0.0, 1.e-5

IsEqualIsEqualIsEqualIsEqualIsEqualisEqual (output_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Boolean result value.

Result

The operator compare_objcompare_objCompareObjcompare_objCompareObjCompareObj returns the value 2 (H_MSG_TRUE) if the parameters are correct. The behavior in case of empty input (no input objects available) is set via the operator set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If the number of objects differs an exception is raised.

See also

test_equal_objtest_equal_objTestEqualObjtest_equal_objTestEqualObjTestEqualObj, test_equal_regiontest_equal_regionTestEqualRegiontest_equal_regionTestEqualRegionTestEqualRegion

Module

Foundation


ClassesClassesClassesClasses | | | | Operators