当前位置:网站首页>Halcon's region: features of multiple regions (5)
Halcon's region: features of multiple regions (5)
2022-06-26 17:17:00 【Mr anhydrous】
One 、 summary
Some areas generate , Beginners need everyone to try , This is not just a matter of enhancing the image , And understand Halcon The process of ability . This paper introduces several applications in numerical image analysis , More useful domain operators . Please share !
This article is dedicated to the experimental verification of the attribute of the region . It is a series with the previous articles , Include :
halcon Area of : Area (Region) Contour operator on
halcon Area of : Multiple areas (Region) Generate (3)
halcon Area of : Multiple areas (Region) Generate (4)_
halcon Area of :get_region_chain and get_region_contour_
Two 、 Characteristics of the area
2.1 area_center Regional Center
- area_center: function : The area of an area ( size ) And the center .
area_center(regin, ares,Row1, Column1)
set_color(3600,'red')
read_image (Image, 'f:/images/DOTS/block.jpg')
rgb1_to_gray(Image,gray)
get_image_size(gray,width,height)
fast_threshold (gray,regin,0, 50 , 7)
area_center(regin,ares,Row1, Column1)2.2 circularity Calculate roundness
- circularity: function : Shape coefficient that affects the similarity between a region and a circle .
circularity(regin, Circularity)
Roundness range :0-1
set_color(3600,'red')
read_image (Image, 'f:/images/DOTS/many_block.jpg')
rgb1_to_gray(Image,gray)
get_image_size(gray,width,height)
fast_threshold (gray,regin,0, 50 , 7)
connection(regin, ConnectedRegions)
circularity(ConnectedRegions, Circularity)
Roundness is :0.395611、0.64085、0.949253、0.529871; It seems to be consistent from a visual point of view .
2.3. compactness Tightness
- compactness: function : The shape factor that affects the density of an area .

Tightness :3.43204、1.25161、1.10005、2.074
Tightness and roundness are similar , and , The circle has the highest compactness .
2.4. connect and_holes Number of connections and holes
function : Number of connections and interrupts .
connect_and_holes(regin, NumConnected, NumHoles)
set_color(3600,'red')
read_image (Image, 'f:/images/DOTS/block.jpg')
rgb1_to_gray(Image,gray)
get_image_size(gray,width,height)
fast_threshold (gray,regin,0, 50 , 7)
connect_and_holes(regin, NumConnected, NumHoles)Connect as 2, Holes are 2 Here is the picture .

2.5. contlength Get the contour length outside the region
function : Describe an area outline (contour) The length of .
contlength(regin,ContLength)

Note here , Let's verify ,gen_contour_region_xld and contlength(regin, ContLength) The length of the two outer contours is inconsistent :
gen_contour_region_xld (regin, Contours, 'border')
contlength(regin, ContLength)2.6. Convexity of region
convexity function : The shape coefficient that affects the convexity of a region .

result :0.539397、0.991524、0.994038、0.72976, You can see , A circle is almost as convex as a square .
2.7. diameter region
function : The maximum distance between two boundary points in an area .
diameter_region(ConnectedRegions,row1,col1,row2,col2,dim)
set_color(3600,'red')
read_image (Image, 'f:/images/DOTS/many_block.jpg')
rgb1_to_gray(Image,gray)
get_image_size(gray,width,height)
fast_threshold (gray,regin,0, 50 , 7)
connection(regin, ConnectedRegions)
diameter_region(ConnectedRegions,row1,col1,row2,col2,dim)
Maximum diameter :161.608、155.013、151.743、132.91
2.8. eccentricity Ellipse parameters
function : The shape factor from the ellipse parameter .
eccentricity(Regions : : : Anisometry, Bulkiness, StructureFactor)

obviously Anisometry Is the ratio of major and minor axes ; above A Is the actually measured pixel area in the ellipse .Bulkiness Ratio of actual area to theoretical area .StructureFactor Structural factor ,
2.9. elliptic axis Similar ellipse
function : Parameters of similar ellipses .
2.10.euler_number Euler number
function : Calculation Euler number . operator euler_number Calculate Euler number , That is, the difference between the number of connecting components and the number of holes .
such as : The hole in the figure below ( The background is empty ), It's a green number ; The connector of the foreground is four black areas ; So the Euler number is :
Number( Black connection 4 individual )- empty ( white 5 individual )=-1

边栏推荐
- What is the difference between digital collections and NFT
- SIGIR 2022 | University of Hong Kong and others proposed the application of hypergraph comparative learning in Recommendation System
- Quantitative contract system development analysis case - detailed explanation of contract quantitative system development scheme
- Decentralized NFT transaction protocol will defeat opensea
- Web3 decentralized storage ecological landscape
- Vue--vuerouter cache routing component
- Leetcode 1170. 比较字符串最小字母出现频次(可以,已解决)
- Deployment and operation of mongodb partitioned cluster
- Leetcode 1170. Frequency of occurrence of the minimum letter of the comparison string (yes, solved)
- Detailed contract quantification system development scheme and technical description of quantitative contract system development
猜你喜欢

Microservice architecture practice: user login and account switching design, order query design of the mall

The high concurrency system is easy to play, and Alibaba's new 100 million level concurrent design quick notes are really fragrant

Romance of the Three Kingdoms: responsibility chain model

The latest masterpiece of Alibaba, which took 182 days to produce 1015 pages of distributed full stack manual, is so delicious

Strength and appearance Coexist -- an exclusive interview with Liu Yu, a member of Apache pulsar PMC

Wechat app mall, review products, upload commodity pictures, and score Commodity Services

Today, I met a "migrant worker" who took out 38K from Tencent, which let me see the ceiling of the foundation

In those years, interview the abused red and black trees

Environment setup mongodb

Redis OM . Net redis object mapping framework
随机推荐
Toupper function
Ndroid development from introduction to mastery Chapter 2: view and ViewGroup
The high concurrency system is easy to play, and Alibaba's new 100 million level concurrent design quick notes are really fragrant
What does the equals method compare? Who told you
The texstudio official website cannot be opened
Turtle cartography
Teach you to learn dapr - 9 Observability
[recommendation system learning] technology stack of recommendation system
Deployment and operation of mongodb partitioned cluster
Find all primes less than or equal to Lim, store them in AA array, and return the number of primes
Romance of the Three Kingdoms: responsibility chain model
Inspirational. In one year, from Xiaobai to entering the core Department of Alibaba, his counter attack
Demonstrate to Xiaobai the case of sub database and sub table
Concurrent thread safety
Sandboxed container: container or virtual machine
防火 疏散 自救…这场安全生产暨消防培训干货满满!
链游系统开发技术方案设计丨NFT链游系统开发流程及源码
Calculate the sum of the main diagonals of the array
14《MySQL 教程》INSERT 插入数据
Viewing the task arrangement ability of monorepo tool from turborepo