halcon-circularity区域的圆度

 

 

在HDevelop中

read_image (Image, 'D:/bb/tu/5.jpg')
rgb1_to_gray(Image,Image1)
threshold (Image1, Region,[75] , [90])

circularity (Region, Circularity)
*区域的圆度
*参数1:区域或区域集
*参数2:返回圆度(0-1)

 

 


在QtCreator中

  HObject  ho_Image, ho_Image1, ho_Region;
  HTuple  hv_Circularity;
  ReadImage(&ho_Image, "D:/bb/tu/5.jpg");
  Rgb1ToGray(ho_Image, &ho_Image1);
  Threshold(ho_Image1, &ho_Region, 75, 90);

  Circularity(ho_Region, &hv_Circularity);
  //区域的圆度
  //参数1:区域或区域集
  //参数2:返回圆度(0-1)

 

 

 

 

 

 

 

 

 

posted @ 2022-03-10 20:06  天子骄龙  阅读(560)  评论(0)    收藏  举报