Herror ::count_obj (
    Hobject Objects,
    long *Number
)

Number of objects in a tuple.

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


Attention

In Prolog and Lisp the length of the list is not necessarily identical with the number of objects. This is the case when object keys are contained which were created in the compact mode (keys from compact and normal mode can be used as a mixture). See in this connection ::set_system('compact_object',<true/false>).


Parameters

Objects (input_object)
object-array -> Hobject: HObjectArray
Objects to be examined.

Number (output_control)
integer -> long *
Number of objects in the tuple Objects.


Complexity

Runtime complexity: O(|Objects|).


Result

If the surrogates are correct, i.e. all objects are present in the HALCON operator data base, the operator ::count_obj returns the value H_MSG_TRUE. The behavior in case of empty input (no input objects available) is set via the operator ::set_system('no_object_result',<Result>).


See also

::copy_obj, ::obj_to_integer, ::connection, ::set_system


Module

Basic operators



Copyright © 1996-2002 MVTec Software GmbH