Skip to content

test_equal_regionTestEqualRegionTestEqualRegiontest_equal_regiontest_equal_region🔗

Short description🔗

test_equal_regionTestEqualRegionTestEqualRegiontest_equal_regiontest_equal_region — Test whether the regions of two objects are identical.

Signature🔗

test_equal_region( region Regions1, region Regions2, out integer IsEqual )void TestEqualRegion( const HObject& Regions1, const HObject& Regions2, HTuple* IsEqual )static void HOperatorSet.TestEqualRegion( HObject regions1, HObject regions2, out HTuple isEqual )def test_equal_region( regions_1: HObject, regions_2: HObject ) -> int

Herror test_equal_region( const Hobject Regions1, const Hobject Regions2, Hlong* IsEqual )

Herror T_test_equal_region( const Hobject Regions1, const Hobject Regions2, Htuple* IsEqual )

Hlong HRegion::TestEqualRegion( const HRegion& Regions2 ) const

int HRegion.TestEqualRegion( HRegion regions2 )

Description🔗

The operator test_equal_regionTestEqualRegion compares the regions of the two input parameters. The n-th element in Regions1regions1regions_1 is compared to the n-th object in Regions2regions2regions_2 (for all n). If all regions are equal and the number of regions is identical the operator 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.

Execution information🔗

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

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

  • Processed without parallelization.

Parameters🔗

Regions1regions1regions_1 (input_object) region(-array) → objectHObjectHRegionHObjectHobject

Test regions.

Regions2regions2regions_2 (input_object) region(-array) → objectHObjectHRegionHObjectHobject

Comparative regions.

Number of elements: Regions1 == Regions2

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, \(O(\sqrt{F})\) if the result is FALSE.

Result🔗

The operator test_equal_regionTestEqualRegion 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_regionTestEqualRegion returns the value 2 (H_MSG_TRUE)

Combinations with other operators🔗

Combinations

Alternatives

intersectionIntersection, complementComplement, area_centerAreaCenter

See also

test_equal_objTestEqualObj

Module🔗

Foundation