Halcon - 测量 - 轮廓到线的距离
生活随笔
收集整理的這篇文章主要介紹了
Halcon - 测量 - 轮廓到线的距离
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Result
Explanation
唯一需要注意的點就是 distance_lc 這個算子測量的是正交位置的點矩。
count_obj (UnionContours, CountObj) tuple_length (RowBegin, CountTuple) if (CountObj == CountTuple)for Index := 1 to CountObj by 1dev_display (ImageReduced)select_obj (UnionContours, ObjectSelected2, Index)* 測量實際輪廓與標準線的距離distance_lc (ObjectSelected2, RowBegin[Index-1], ColBegin[Index-1], RowEnd[Index-1], ColEnd[Index-1], DistanceMin, DistanceMax)* 顯示測量結(jié)果disp_message (WindowHandle, 'Min: ' + DistanceMin + '\nMax: ' + DistanceMax, 'window', -1, -1, 'black', 'true')* 顯示實際輪廓dev_set_color ('red')dev_display (ObjectSelected2)* 顯示標準線dev_set_color ('green')disp_line (WindowHandle, RowBegin[Index-1], ColBegin[Index-1], RowEnd[Index-1], ColEnd[Index-1])* 等待2swait_seconds (2)endfor endif轉(zhuǎn)載于:https://www.cnblogs.com/zdfffg/p/11572543.html
總結(jié)
以上是生活随笔為你收集整理的Halcon - 测量 - 轮廓到线的距离的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: gulp 项目构建 代码压缩与混淆
- 下一篇: AI 趋势