obj_to_integerobj_to_integerObjToIntegerObjToIntegerobj_to_integer (算子)
名称
obj_to_integerobj_to_integerObjToIntegerObjToIntegerobj_to_integer — 将图标对象转换为“整数”。
签名
描述
obj_to_integerobj_to_integerObjToIntegerObjToIntegerObjToIntegerobj_to_integer stores NumberNumberNumberNumbernumbernumber, starting at index
IndexIndexIndexIndexindexindex, of the database keys of the input object
ObjectsObjectsObjectsObjectsobjectsobjects as integer numbers in the output parameter
SurrogateTupleSurrogateTupleSurrogateTupleSurrogateTuplesurrogateTuplesurrogate_tuple. If -1 is passed for NumberNumberNumberNumbernumbernumber all
objects beginning with IndexIndexIndexIndexindexindex are copied. This facilitates
a direct access to an arbitrary element of ObjectsObjectsObjectsObjectsobjectsobjects. In
conjunction with count_objcount_objCountObjCountObjCountObjcount_obj (returns the number of objects in
ObjectsObjectsObjectsObjectsobjectsobjects) the elements of ObjectsObjectsObjectsObjectsobjectsobjects can be processed
successively. The objects are not duplicated by
obj_to_integerobj_to_integerObjToIntegerObjToIntegerObjToIntegerobj_to_integer and thus must not be cleared by
clear_objclear_objClearObjClearObjClearObjclear_obj。
For a short description of the iconic objects that are available in HALCON
see the introduction of chapter 对象。
注意
The objects' data is not duplicated.
执行信息
- 支持计算设备上的对象。
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ObjectsObjectsObjectsObjectsobjectsobjects (输入对象) object(-array) → objectHObjectHObjectHObjectHobject
Objects for which the surrogates are to be returned.
IndexIndexIndexIndexindexindex (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Starting index of the surrogates to be returned.
默认值:
1
值范围:
1
≤
Index
Index
Index
Index
index
index
NumberNumberNumberNumbernumbernumber (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of surrogates to be returned.
默认值:
-1
限制:
Number == -1 || Number + Index <= number(Objects)
SurrogateTupleSurrogateTupleSurrogateTupleSurrogateTuplesurrogateTuplesurrogate_tuple (输出控制) pointer(-array) → HTupleSequence[int]HTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)
Tuple containing the surrogates.
示例(HDevelop)
* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)
示例(C)
/* Access the i-th element: */
Hlong i,Surrogate;
obj_to_integer(Objects,i,1,&Surrogat);
示例(HDevelop)
* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)
示例(HDevelop)
* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)
示例(HDevelop)
* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)
复杂度
Runtime complexity: O(|ObjectsObjectsObjectsObjectsobjectsobjects| + NumberNumberNumberNumbernumbernumber)
结果
obj_to_integerobj_to_integerObjToIntegerObjToIntegerObjToIntegerobj_to_integer 在所有参数正确时返回 2 ( H_MSG_TRUE )。 如果输入为空则可设置行为通过 set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。
替代
copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj,
select_objselect_objSelectObjSelectObjSelectObjselect_obj,
copy_imagecopy_imageCopyImageCopyImageCopyImagecopy_image,
gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProtogen_image_proto
另见
integer_to_objinteger_to_objIntegerToObjIntegerToObjIntegerToObjinteger_to_obj,
count_objcount_objCountObjCountObjCountObjcount_obj
模块
基础