explore_halcon.hdev(31)之p_do_razor_blades函数模块
函数:
该示例程序使用基于形状的匹配来测量工具的排列ROI,然后测量工具检查单个刀片
效果图:
函数:
1.gen_measure_rectangle2( : : Row, Column, Phi, Length1, Length2, Width, Height, Interpolation : MeasureHandle):提取垂直于矩形的直线边
参数:
Width, Height:随后处理图像的宽、高
Interpolation :使用的内插类型
MeasureHandle:测量对象句柄
2.measure_pairs(Image : : MeasureHandle, Sigma, Threshold, Transition, Select : RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, IntraDistance, InterDistance):提取垂直于矩形或环形圆弧的直边对
参数:
Sigma:平滑
Threshold:最小边缘幅度
Transition:确定边缘如何分组到边缘对的灰度值转换类型( 'positive':RowEdgeFirst和ColumnEdgeFirst是暗到亮的边, RowEdgeSecond and ColumnEdgeSecond是亮到暗的边。'negative':与 'positive'相反。'all':根据第一次检测到的边的属性定义)
Select :选择边缘对
RowEdgeFirst、ColumnEdgeFirst:第一边缘的中心行列坐标
AmplitudeFirst:第一边缘的边缘振幅
RowEdgeSecond、ColumnEdgeSecond:第二边缘的中心行列坐标
AmplitudeSecond:第二边缘的边缘振幅
IntraDistance:边缘对内边缘之间的距离
InterDistance:连续边缘对之间的距离。