ClassesClasses | | Operators

count_objcount_objCountObjCountObj (Operator)

Name

count_objcount_objCountObjCountObj — 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()

Description

The operator count_objcount_objCountObjCountObjCountObj 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

Parameters

ObjectsObjectsObjectsObjectsobjects (input_object)  object-array objectHObjectHObjectHobject

Objects to be examined.

NumberNumberNumberNumbernumber (output_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of objects in the tuple ObjectsObjectsObjectsObjectsobjects.

Complexity

Runtime complexity: O(|ObjectsObjectsObjectsObjectsobjects|).

Result

count_objcount_objCountObjCountObjCountObj returns the value 2 (H_MSG_TRUE).

See also

copy_objcopy_objCopyObjCopyObjCopyObj, obj_to_integerobj_to_integerObjToIntegerObjToIntegerObjToInteger, connectionconnectionConnectionConnectionConnection, set_systemset_systemSetSystemSetSystemSetSystem

Module

Foundation


ClassesClasses | | Operators