当前位置:网站首页>Halcon knowledge: contour operator on region (2)
Halcon knowledge: contour operator on region (2)
2022-06-24 03:38:00 【Mr anhydrous】
One 、 summary
Regions and contours are always used interchangeably in calculations , therefore , Know the good outline , Can better solve regional problems . This article introduces three examples of obtaining outer contour .
Two 、 Convex envelope
2.1 . get_region_convex operator
function : Look up the raised surface as the outline (contour).
read_image (Image, 'f:/images/DOTS/block.jpg')
rgb1_to_gray(Image,gray)
get_image_size(gray,width,height)
* gen_rectangle1(rect,0,0,height,width)
fast_threshold (gray,regin,0, 50 , 7)
get_region_convex(regin, row, col)
gen_image_const(BlkImage,'byte',width,height)
for I:=0 to |row|-1 by 1
tmpRow :=row[I]
tmpCol :=col[I]
set_grayval(BlkImage, tmpRow, tmpCol, 228)
endfor
dev_display(BlkImage)
disp_polygon(3600, row, col)Original picture :

Highlight :

The figure connecting the salient points is :

2.2 How to generate contour regions from hash points

- gen_region_polygon( : Region : Rows, Columns : )
By hashing point coordinates , Generate a region , This area is the contour bar area . Through this area , Sub pixel contour lines can be generated . Such as ( The red linear area above ).
- gen_contour_nurbs_xld
gen_contour_nurbs_xld Generate approximation NURBS curve ( Non uniform rational B Splines ) Of XLD outline . NURBS A curve is defined by its degree 、 Control polygon ( Through rows and columns )、 Weight vectors and node vectors specify .( The green linear area above ).
The degree of the curve determines the degree of differentiability of the curve . The curve lies on its control polygon (Rows,Cols) In the convex hull of . The weight in the weight determines that the curve is controlled by each control point ( That's ok 、 Column ) The degree of attraction . If you choose “ Automatically ”, A weight vector with the same weight for all control points will be generated . Knots A vector describes the domain of a curve . Usually , This parameter can be set to “ Automatically ”.
Generated Contour The accuracy of depends on two parameters MaxDistance and MaxError. MaxDistance Limit two subsequent Contour The maximum distance between points . Generated Contour And the reality NURBS The maximum distance between curves is limited to MaxError. By default , The approximation must satisfy these two constraints , But you can set one of these parameters to “ Omit ”. Select the MaxError and MaxDistance The lower the , The better the approximation of the curve . Please note that , All contour points are exactly on the curve ( Except for inaccurate values ).
边栏推荐
- 元气森林推“有矿”,农夫山泉们跟着“卷”?
- What is the difference between server leasing and hosting?
- Chapter 5: key led demo case of PS bare metal and FreeRTOS case development
- Record a programming contest
- halcon知识:区域(Region)上的轮廓算子(2)
- 老弹出explorer.exe遇到问题已停止工作,怎么办?
- An example of SPM manual binding execution plan
- NLP task summary introduction and understanding
- Grpc: how to add API log interceptors / Middleware?
- Understanding Devops from the perspective of decision makers
猜你喜欢

ModStartCMS 主题入门开发教程

元气森林推“有矿”,农夫山泉们跟着“卷”?

QT creator tips

ModStartCMS 企业内容建站系统(支持 Laravel9)v4.2.0

Community pycharm installation visual database

Sorting out of key vulnerabilities identified by CMS in the peripheral management of red team (I)
Thank you for your recognition! One thank-you note after another

Modstartcms enterprise content site building system (supporting laravel9) v4.2.0

老弹出explorer.exe遇到问题已停止工作,怎么办?

Get to know MySQL database
随机推荐
[competition experience sharing] design of intelligent guide rod
TRTC audio quality problem
What is the impact on the server rental or server hosting price?
What is fortress resource authorization? What is barrier machine?
hprofStringCache
Ar 3D map technology
What is the edge calculator force? What about the edge calculator?
RI Geng series: write a simple shell script, but it seems to have technical content
How to build glasses website what are the functions of glasses website construction
内存泄漏之KOOM
LeetCode 1047. Delete all adjacent duplicates in the string
How the new operator works
take the crown! Tencent security won the 2021 national network security week outstanding innovation achievement award
What is elastic scaling in cloud computing? What are the main applications of elastic scaling in cloud computing?
What is edge computing? What are the characteristics of the Internet platform edge calculator?
A Tencent interview question
Case analysis | interpret the truth that multi branch enterprises choose sd-wan network reconstruction in combination with real cases
Actual combat | how to use micro build low code to realize tolerance application
web渗透测试----5、暴力破解漏洞--(7)MYSQL密码破解
Pits encountered in refactoring code (1)