当前位置:网站首页>Halcon knowledge: segment_ contours_ XLD operator
Halcon knowledge: segment_ contours_ XLD operator
2022-07-07 01:57:00 【Mr anhydrous】
One 、 Case description
Boundary extraction : Previous edge extraction was based on foreground passing thresold Extract the region , Then propose from the area XLD, however , If the area cannot be raised, it will be difficult to do . This example tells you , There is no need for binary extraction , You can also take out the edge ,edges_sub_pix It can be done .
This case mainly presents a kind of diagram with unclear contrast , Extract the circle 、 The ellipse 、 Examples of straight lines .
In use Halcon In the process of image processing , The contour must be segmented , Divide the contour into straight segments 、 round ( Or arc )、 Different segments of elliptical arc , The most commonly used operator for contour segmentation is segment_contours_xld.
Two 、 Operator introduction
segment_contours_xld——Segment XLD contours into line segments and circular or elliptic arcs( Will a XLD The contour is divided into straight line segments 、 round ( arc )、 Elliptical arc .)
MaxLineDist1 For the first time to use Ramer Algorithm ( That is, use straight line segments to approach the contour step by step ) At the time of the MaxLineDist, After approaching completion , Then use arc or elliptical arc to fit the adjacent segment , If the distance from the fitting arc to the contour is less than the distance from the approximation line segment to the contour , Replace the approximation line segment with an arc , This process iterates uniformly until all line segments are fitted .
3、 ... and 、 Examples of contour segmentation :
read_image (Image, 'pumpe')
edges_sub_pix (Image, Edges, 'canny', 1.5, 15, 40)
segment_contours_xld (Edges, ContoursSplit, 'lines_circles', 5, 4, 2)
count_obj (ContoursSplit, Number)
gen_empty_obj (Lines)
gen_empty_obj (Circles)
for I := 1 to Number by 1
select_obj(ContoursSplit, Contour, I)
get_contour_global_attrib_xld (Contour, 'cont_approx', Type)
if (Type == -1)
concat_obj (Lines, Contour, Lines)
else
concat_obj (Circles, Contour, Circles)
endif
endfor
fit_line_contour_xld (Lines, 'tukey', -1, 0, 5, 2, RowBegin, ColBegin, RowEnd, ColEnd, Nr, Nc, Dist)
fit_circle_contour_xld (Circles, 'atukey', -1, 2, 0, 3, 2, Row, Column, Radius, StartPhi, EndPhi, PointOrder)
边栏推荐
- First experience of JSON learning - the third-party jar package realizes bean, list and map to create JSON format
- The GPG keys listed for the "MySQL 8.0 community server" repository are already ins
- Use nodejs to determine which projects are packaged + released
- 盒子拉伸拉扯(左右模式)
- 微服务架构介绍
- STM32F4---通用定时器更新中断
- Shortcut keys commonly used in idea
- According to the analysis of the Internet industry in 2022, how to choose a suitable position?
- ROS learning (25) rviz plugin
- centos8安裝mysql報錯:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
猜你喜欢
[unique] what is the [chain storage structure]?
Shell script quickly counts the number of lines of project code
Comparison of picture beds of free white whoring
Make DIY welding smoke extractor with lighting
Analyze "C language" [advanced] paid knowledge [i]
Batch delete data in SQL - set in entity
Appium基础 — Appium Inspector定位工具(一)
百度飞将BMN时序动作定位框架 | 数据准备与训练指南 (下)
Cat recycling bin
Livox激光雷达硬件时间同步---PPS方法
随机推荐
Ds-5/rvds4.0 variable initialization error
开发中对集合里面的数据根据属性进行合并数量时犯的错误
【唯一】的“万字配图“ | 讲透【链式存储结构】是什么?
JS ES5也可以創建常量?
Command injection of cisp-pte
Analyze "C language" [advanced] paid knowledge [i]
制作带照明的DIY焊接排烟器
Date processing tool class dateutils (tool class 1)
JS es5 peut également créer des constantes?
The GPG keys listed for the "MySQL 8.0 community server" repository are already ins
Telnet,SSH1,SSH2,Telnet/SSL,Rlogin,Serial,TAPI,RAW
js如何快速创建一个长度为 n 的数组
Analyze "C language" [advanced] paid knowledge [End]
Ros Learning (23) Action Communication Mechanism
centos8安装mysql报错:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
Drag to change order
ROS learning (23) action communication mechanism
2022/0524/bookstrap
When grep looks for a process, it ignores the grep process itself
ZOJ problem set – 2563 long dominoes [e.g. pressure DP]