Halcon industrial development example Calculate the distance between the product lamp bead and the outer frame of the rectangle

1 Description of the problem

Find the distance between the product lamp bead (independent circle) and the outer frame of the rectangle as shown in the figure
insert image description here

2 Key code demonstration analysis

*开运算去除小区域
connection (RegionDynThresh, ConnectedRegions)
fill_up (ConnectedRegions, RegionFillUp)
opening_circle (RegionFillUp

Guess you like

Origin blog.csdn.net/m0_51233386/article/details/130832196