The operatorsmallest_rectangle2_xlddetermines the smallest enclosing rectangle of each input contour or polygon, i.e., the rectangle with the smallest area of all rectangles containing the contour. For this rectangle the center, the inclination, and the two radii are calculated. ...
描述:因为halcon中算子求的矩形角度有时候不是我所需要的角度,以算子smallest_rectangle2为例: 1)其获取的矩形角度范围- 90< angle <= 90,即无论通过算子gen_rectangle2生成的Region角度多大,smallest_rectangle2获取的角度都不会超出这个范围。 2)算子smallest_rectangle2输出的角度是通过计算Region长轴与X轴正方向...
对称的区域 smallest_rectangle2 smallest_rectangle2_xld: 任意方向的最小封闭矩形的中心位置、方向和两个半径 orientation_region 和...受异常点影响。 对于矩形,可以拟合矩形来计算长宽和中心点(5.9),也可以通过smallest_rectangle2或smallest_rectangle2_xld获取最小外切矩形(5.12).同样 Halcon案例之BLOB分析 概念...
算子:gen_rectangle2_contour_xld( : Rectangle : Row, Column, Phi, Length1, Length2 : ) 示例:gen_rectangle2_contour_xld (Rectangle6, 500, 500, 45, 100, 200) Rectangle6(输出对象):输出轮廓对象 500(输入控制参数1):矩形中心行坐标 500(输入控制参数2):矩形中心列坐标 45(输入控制参数3):矩形...
Rectangle6(输出对象):输出轮廓对象 500(输入控制参数1):矩形中心行坐标 500(输入控制参数2):矩形中心列坐标 45(输入控制参数3):矩形主轴的角度 100(输入控制参数4):长度的一般 200(输入控制参数5):宽度的一般 生成箭头轮廓gen_arrow_contour_xld 算子:gen_arrow_contour_xld( : Arrow : Row1, Column1, Row...
这里以smallest_rectangle2为例。 python smallest_rectangle2(Regions, Row, Column, Phi, Length1, Length2) # 计算最小外接矩形 将计算得到的外接矩形在图像中绘制出来: 使用gen_rectangle2_contour_xld算子根据外接矩形的参数生成轮廓,并使用dev_display或dev_set_color等算子将其绘制在图像上。 python gen...
测量轮廓:smallest_circle_xld,smallest_rectangle1_xld,smallest_rectangle2_xld. 示例:smallest_rectangle1_xld (ContCircle, Row19, Column19, Row26,Column26) ContCircle(输人对象):输出轮廓对象 Row19(输出控制参数):输出轮廓左上角的行坐标 Column19(输出控制参数):输出轮廓左上角的列坐标 Row26(输出控制...
如果找到的两个目标区域彼此重叠并且大于MaxOverlap,仅仅返回效果最好的一个。重叠的计算方法是基于找到的目标区域的任意方向的最小外接矩形(看smallest_rectangle2)。如果MaxOverlap=0, 找到的目标区域不能存在重叠, 如果MaxOverla p=1,所有找到的目标区域都要返回。
通过smallest_rectangle1函数,我们计算包含胶珠区域的最小矩形,为后续的精确裁切和处理提供准确的坐标信息。在图像处理过程中,我们首先需要定义胶珠的参考路径。这一步骤对于后续的图像对齐和精确裁切至关重要,因为它为我们的算法提供了胶珠位置的关键信息。通过明确胶珠的参考路径,我们可以确保处理过程的准确性和高效...