当前位置:网站首页>【Halcon视觉】数组
【Halcon视觉】数组
2022-07-26 10:16:00 【文布斯】
Halcon中的数组,与C语言类似。
(1)变量类型:int,double,string等类型。
(2)变量长度:如果长度为1,则可以作为正常变量使用,第一个索引值为0,最大的索引值为变量长度减1。
(3)赋值符号:一个冒号加一个等号 “ := ” 。
*1.数组定义和赋值
*定义空数组
Tuple:=[]
*指定数据定义数组
Tuple1:=[1,2,3,4,5,6,7,8]
Tuple2:=['A','B','C','D']
*通过数组下标更改指定位置的元素值。
Tuple1[2]:=9
*求数组个数
Number:=|Tuple1|
*合并数组
Union:=[Tuple1,Tuple2]
*提取数组中指定下标的元素
T:=Tuple1[2]
*2.数组字符串运算
*字符串合并
A1:='你'+'好'
*取字符串长度
Length:=strlen(A1)
*3.三角函数运算和数值函数运算
*弧度转角度
Degree:=deg(1.36)
*角度转弧度
Radian:=rad(90)
*求最小值
val_min:=min(Tuple1)
*求最大值
val_max:=max(Tuple1)

边栏推荐
- 【有奖提问】向图灵奖得主、贝叶斯网络之父 Judea Pearl 提问啦
- 数据库的复习--3.SQL语言
- Uniapp error 7 < Map >: marker ID should be a number
- SQL优化的魅力!从 30248s 到 0.001s
- 服务发现原理分析与源码解读
- The use of MySQL in nodejs
- Study notes of the third week of sophomore year
- Some descriptions of DS V2 push down in spark
- Wechat applet learning notes 2
- Wechat applet development
猜你喜欢

Learning about tensorflow (II)

点赞,《新程序员》电子书限时免费领啦!

Learning about opencv (1)

30分钟彻底弄懂 synchronized 锁升级过程

数通基础-Telnet远程管理设备

Principle analysis and source code interpretation of service discovery

30 minutes to thoroughly understand the synchronized lock upgrade process

protobuf的基本用法

Learning about opencv (4)

About automatic operation on Web pages
随机推荐
WARNING: [pool www] server reached pm. max_ children setting (5), consider raising it
Employee information management system based on Web
Meeting OA project (III) -- my meeting (meeting seating and submission for approval)
Tableviewcell highly adaptive
MySQL 5.7.25 source code installation record
About automatic operation on Web pages
服务器内存故障预测居然可以这样做!
Opencv image processing
Netease cloud UI imitation -- & gt; sidebar
Basic usage of protobuf
Rowselection emptying in a-table
Wu Enda linear regression of machine learning
Wechat applet learning notes 1
Beginner of flask framework-04-flask blueprint and code separation
IEEE conference upload font problem
Okaleido生态核心权益OKA,尽在聚变Mining模式
RecyclerView最后一条显示不全或显示部分的问题解决
Learning about tensorflow (I)
输入整数后输入整行字符串的解决方法
Getting started with SQL - combined tables