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
本文来自博客园,作者:{视觉人机器视觉},转载请注明原文链接:https://www.cnblogs.com/visionman/p/17405213.html
                    
                
                
            
        
浙公网安备 33010602011771号