Halcon快速入门笔记10

*图像,gen生成,get获取
read_image (Image1, ‘chip_01’)
gen_rectangle1 (Rectangle, 20, 30, 100, 200)
gen_rectangle2_contour_xld (Rectangle1, 200, 200, 0, 100.5, 20.5)
get_image_size (Image1, Width, Height)
*不同的数据类型
str:=‘wo’
num:=11
num2:=200
val:=1.1
array:=[7,7,8,8,1]
dev_get_window (WindowHandle)
*运算
if(num<20)
stop ()
else
stop ()
endif
if(num>1 and num2<3)
stop ()
else
stop ()
endif
if(num>1 or num2<3)
stop ()
else
stop ()
endif

if(not(num>123 or num2<300))
stop ()
else
stop ()
endif

*控制流

for Index := 1 to 5 by 1
num:=num+1
endfor

while (num>100)

num:=num-1

endwhile

switch (num)
case 1:
break
case 100:
stop ()
endswitch
for Index1 := 1 to 5 by 1
continue
endfor

posted @   视觉人机器视觉  阅读(15)  评论(0编辑  收藏  举报  
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端
点击右上角即可分享
微信分享提示