Skip to content

count_objCountObjCountObjcount_objcount_obj🔗

Short description🔗

count_objCountObjCountObjcount_objcount_obj — Number of objects in a tuple.

Signature🔗

count_obj( object Objects, out integer Number )void CountObj( const HObject& Objects, HTuple* Number )static void HOperatorSet.CountObj( HObject objects, out HTuple number )def count_obj( objects: HObject ) -> int

Herror count_obj( const Hobject Objects, Hlong* Number )

Herror T_count_obj( const Hobject Objects, Htuple* Number )

Hlong HObject::CountObj( ) const

int HObject.CountObj( )

Description🔗

The operator count_objCountObj determines for the object parameter Objectsobjectsobjects the number of objects it contains. In this connection it should be noted that object is not the same as connection component (see connectionConnection). For example, the number of objects of one region consisting of three parts that are not connected is 1.

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

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🔗

Objectsobjectsobjects (input_object) object-array → objectHObjectHObjectHObjectHobject

Objects to be examined.

Numbernumbernumber (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Number of objects in the tuple Objectsobjectsobjects.

Complexity🔗

Runtime complexity: \(O(|\textrm{Objects}|)\).

Result🔗

count_objCountObj returns the value 2 (H_MSG_TRUE).

Combinations with other operators🔗

Combinations

See also

copy_objCopyObj, obj_to_integerObjToInteger, connectionConnection, set_systemSetSystem

Module🔗

Foundation