1.一维矩形测量的五个算子
gen_measure_rectangle2( : : Row, Column, Phi, Length1, Length2, Width, Height, Interpolation : MeasureHandle)
注意:Phi的方向就是寻找边缘的方向
gen_measure_arc( : : CenterRow, CenterCol, Radius, AngleStart, AngleExtent, AnnulusRadius, Width, Height, Interpolation : MeasureHandle)
measure_pairs(Image : : MeasureHandle, Sigma, Threshold, Transition, Select : RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, IntraDistance, InterDistance)
measure_pairs(图像::测量句柄:Sigma:最小幅度:极性:选择方式:Row_第一条边:Col_第一条边:幅度_第一条边:Row_第二条边:Col_第二条边:幅度_第二条边:边对距离:相邻边之间的距离)
Sigma:高斯平滑算法的Sigma值,值越大,边缘越少
Transition: 'all', 'all_strongest', 'negative', 'negative_strongest', 'positive', 'positive_strongest' ------>>>>>>可以理解对像素值求一阶倒数,一阶导数为负说明:negative,一阶导数为正说明:positive
Select :'all', 'first', 'last'
measure_pos(Image : : MeasureHandle, Sigma, Threshold, Transition, Select : RowEdge, ColumnEdge, Amplitude, Distance)
measure_pos与measure_pairs的区别:pairs带边缘对,pos不带边缘对
RowEdge, ColumnEdge, Amplitude, Distance:边缘的行坐标、列坐标、灰度振幅、相邻边缘之间距离
close_measure( : : MeasureHandle : )
2.普通标定
将一张图像的像素数转化为毫米数得到比例关系,必须确保相机光轴垂直于产品图像平面。
3.边缘对测量注意
边缘对的距离是两个相邻边缘对中心的距离,而是中间相邻的那两个单个边缘的距离
4.边缘幅度
边缘幅度为灰度之的倒数值。有正负之分,为正是由暗到亮,为负是由亮到暗。
5.拟合步骤
采图像,预处理,提取边缘,联合或分割,拟合
边缘知识分析参考“边缘提取(像素精度)”
拟合知识分析参考“边缘提取(亚像素精度)”和“几何测量”
6.边缘
一阶:sobel,roberts,prewitt
二阶:laplacian
其他:canny
针对图像提取边缘:edges_image
针对区域提取边缘:boundary
amp:幅度 dir:方向 fit--:拟合主要有四种情况(拟合圆,拟合直线,拟合椭圆,拟合矩形)
sigma:
关闭边缘:close_edges close_edgeslength
clip_contours_xld(Contours : ClippedContours : Row1, Column1, Row2, Column2 : )?
clip_region_rel(Region : RegionClipped : Top, Bottom, Left, Right : )?
7.轮廓联合
union_adjacent_contours_xld:联合临近的
union_cocircular_contours_xld:联合共圆的
union_collinear_contours_ext_xld:联合共线的
8.提取边缘的两个算子
edges_sub_pix(Image : Edges : Filter, Alpha, Low, High : ) Filter为“canny”时,Alpha越大,平滑越厉害,越小,平滑越不厉害,其余参数情况相反 Low, High:边缘阈值,小于Low或大于High,不是边缘;介于两者之间,8邻域判断
threshold_sub_pix(Image : Border : Threshold : ) Threshold 越高,对边缘锐利的要求越高