Halcon快速入门笔记12

*元组初始化 Tuple

Test:=[]

Test:=[1,2,3,4,5,6]

Test:=gen_tuple_const(3, 123)

*元组赋值

Test[1]:=456

*元组拼接

Test:=[Test,Test]

tuple_concat (Test, Test, Concat)

*元组取模

length:=|Concat|

tuple_length (Concat, Length)

*索引取值

value:=Concat[10]

tuple_select (Concat, 10, Selected)

value2:=subset(Concat, 10)

*元组截取

array:=Concat[1:2]

tuple_select_range (Concat, 1, 2, Selected1)

*移除某个元素

test1:=remove(Concat, 1)

tuple_remove (Concat, 1, Reduced)

*获取某个元素的位置

test2:=find(Concat, 123)

tuple_find_first (Concat, 123, Index)

*异常捕获

dev_set_check (‘give_error’)

try

read_image (Image, ‘printer_chip/printer_ch=ip_01’)

catch (Exception)

 stop()

endtry

posted @   视觉人机器视觉  阅读(20)  评论(0编辑  收藏  举报  
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示