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.
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>).
|
Objects (input_object) |
object-array -> Hobject: HObjectArray |
| Objects to be examined. | |
|
Number (output_control) |
integer -> long * |
| Number of objects in the tuple Objects. | |
Runtime complexity: O(|Objects|).
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>).
::copy_obj, ::obj_to_integer, ::connection, ::set_system
Basic operators