Operator Reference

count_objcount_objCountObjCountObjcount_obj (Operator)

count_objcount_objCountObjCountObjcount_obj — Number of objects in a tuple.

Signature

count_obj(Objects : : : Number)

Herror count_obj(const Hobject Objects, Hlong* Number)

Herror T_count_obj(const Hobject Objects, Htuple* Number)

void CountObj(const HObject& Objects, HTuple* Number)

Hlong HObject::CountObj() const

static void HOperatorSet.CountObj(HObject objects, out HTuple number)

int HObject.CountObj()

def count_obj(objects: HObject) -> int

Description

The operator count_objcount_objCountObjCountObjcount_obj determines for the object parameter ObjectsObjectsObjectsobjectsobjects the number of objects it contains. In this connection it should be noted that object is not the same as connection component (see connectionconnectionConnectionConnectionconnection). 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

  • 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

ObjectsObjectsObjectsobjectsobjects (input_object)  object-array objectHObjectHObjectHObjectHobject

Objects to be examined.

NumberNumberNumbernumbernumber (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of objects in the tuple ObjectsObjectsObjectsobjectsobjects.

Complexity

Runtime complexity: O(|ObjectsObjectsObjectsobjectsobjects|).

Result

count_objcount_objCountObjCountObjcount_obj returns the value 2 ( H_MSG_TRUE) .

See also

copy_objcopy_objCopyObjCopyObjcopy_obj, obj_to_integerobj_to_integerObjToIntegerObjToIntegerobj_to_integer, connectionconnectionConnectionConnectionconnection, set_systemset_systemSetSystemSetSystemset_system

Module

Foundation