Skip to content

test_equal_objTestEqualObjTestEqualObjtest_equal_objtest_equal_objπŸ”—

Short descriptionπŸ”—

test_equal_objTestEqualObjTestEqualObjtest_equal_objtest_equal_obj β€” Compare image objects regarding equality.

SignatureπŸ”—

test_equal_obj( object Objects1, object Objects2, out integer IsEqual )void TestEqualObj( const HObject& Objects1, const HObject& Objects2, HTuple* IsEqual )static void HOperatorSet.TestEqualObj( HObject objects1, HObject objects2, out HTuple isEqual )def test_equal_obj( objects_1: HObject, objects_2: HObject ) -> int

Herror test_equal_obj( const Hobject Objects1, const Hobject Objects2, Hlong* IsEqual )

Herror T_test_equal_obj( const Hobject Objects1, const Hobject Objects2, Htuple* IsEqual )

Hlong HObject::TestEqualObj( const HObject& Objects2 ) const

Hlong HImage::TestEqualObj( const HImage& Objects2 ) const

Hlong HRegion::TestEqualObj( const HRegion& Objects2 ) const

Hlong HXLD::TestEqualObj( const HXLD& Objects2 ) const

Hlong HXLDCont::TestEqualObj( const HXLDCont& Objects2 ) const

Hlong HXLDPoly::TestEqualObj( const HXLDPoly& Objects2 ) const

Hlong HXLDPara::TestEqualObj( const HXLDPara& Objects2 ) const

Hlong HXLDModPara::TestEqualObj( const HXLDModPara& Objects2 ) const

Hlong HXLDExtPara::TestEqualObj( const HXLDExtPara& Objects2 ) const

int HObject.TestEqualObj( HObject objects2 )

int HImage.TestEqualObj( HImage objects2 )

int HRegion.TestEqualObj( HRegion objects2 )

int HXLD.TestEqualObj( HXLD objects2 )

int HXLDCont.TestEqualObj( HXLDCont objects2 )

int HXLDPoly.TestEqualObj( HXLDPoly objects2 )

int HXLDPara.TestEqualObj( HXLDPara objects2 )

int HXLDModPara.TestEqualObj( HXLDModPara objects2 )

int HXLDExtPara.TestEqualObj( HXLDExtPara objects2 )

DescriptionπŸ”—

The operator test_equal_objTestEqualObj compares the regions and gray value components of all objects of the two input parameters. The n-th object in Objects1objects1objects_1 is compared to the n-th object in Objects2objects2objects_2 (for all n). If all corresponding regions are equal and the number of regions is also identical the parameter IsEqualisEqualis_equal is set to TRUE, otherwise FALSE.

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

AttentionπŸ”—

Image matrices and XLDs are not compared regarding their contents. Thus, two images or XLDs, respectively, are β€œequal” if they are located at the same place in the storage. By contrast, regions that are not located at the same place in the storage are compared regarding their actual contents. If the input parameters are empty and the behavior was set via the operator set_system(::'no_object_result','true':), the parameter IsEqualisEqualis_equal is set to TRUE, since all input (= empty set) is equal.

Execution informationπŸ”—

Execution information
  • Supports objects on compute devices.

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

Objects1objects1objects_1 (input_object) object-array β†’ objectHObjectHObjectHObjectHobject

Test objects.

Objects2objects2objects_2 (input_object) object-array β†’ objectHObjectHObjectHObjectHobject

Comparative objects.

IsEqualisEqualis_equal (output_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Boolean result value.

ComplexityπŸ”—

If \(F\) is the area of a region the runtime complexity is \(O(1)\) or \(O(\sqrt{F})\) if the result is TRUE and \(O(\sqrt{F})\) if the result is FALSE.

ResultπŸ”—

The operator test_equal_objTestEqualObj 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>:). If the number of objects differs an exception is raised. Else test_equal_objTestEqualObj returns 2 (H_MSG_TRUE)

Combinations with other operatorsπŸ”—

Combinations

See also

compare_objCompareObj, test_equal_regionTestEqualRegion

ModuleπŸ”—

Foundation