CN116030120A - Method for identifying and correcting hexagons - Google Patents
Method for identifying and correcting hexagons Download PDFInfo
- Publication number
- CN116030120A CN116030120A CN202211100987.5A CN202211100987A CN116030120A CN 116030120 A CN116030120 A CN 116030120A CN 202211100987 A CN202211100987 A CN 202211100987A CN 116030120 A CN116030120 A CN 116030120A
- Authority
- CN
- China
- Prior art keywords
- image
- line segment
- iou
- point
- hexagonal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 89
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000002035 prolonged effect Effects 0.000 claims description 6
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 230000001788 irregular Effects 0.000 abstract description 10
- 230000007547 defect Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 38
- 230000002950 deficient Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
The invention provides a method for identifying and correcting hexagons, which comprises the following steps: the first step: and (3) primarily identifying the hexagonal image, and in the second step: correcting six vertexes of the hexagon, and the third step: and acquiring the centroid of the hexagonal image, and correcting the centroid of the hexagonal image. The method can accurately identify the noisy points or irregular hexagons on the edges of the pattern, can correct six vertexes of the hexagonal image, can further acquire the centroid of the hexagonal image based on the six vertexes of the corrected hexagonal image, corrects the centroid of the hexagonal image, greatly improves the accuracy and precision, overcomes the defect that the noisy points or irregular hexagons on the edges of the pattern cannot be identified in the prior art, and has important research significance and use value.
Description
Technical Field
The invention relates to the technical field of graphic image processing, in particular to a method for identifying and correcting hexagons.
Background
The existing hexagonal shape center recognition method is as follows:
(1) The hexagonal centroid is identified based on the graphical circumscribed circle.
(2) The hexagonal centroid is identified based on the graphic inscribed circle.
(3) The hexagonal centroid is identified based on fitting the regular hexagon.
Namely, the existing technical schemes mainly have three kinds: (1) a circumscribed circle based method; (2) inscribed circle-based methods; (3) The method based on regular polygon fitting is specifically introduced as follows:
(1) A circumscribed circle based method.
Based on the image processing open source package OpenCV, a circumscribed circle recognition function can be invoked to recognize a circumscribed circle of a graph shown in fig. 1. After the circumscribed circle is identified, the function returns the center coordinates of the circumscribed circle, and the center coordinates are considered to be the centroid of the graph to be identified.
(2) An inscribed circle-based method.
Based on the image processing open source package OpenCV, an inscribed circle of the inscribed circle recognition function recognition graph can be called. After the inscribed circle is identified, the function returns the center coordinates of the inscribed circle, and the center coordinates are considered to be the centroid of the graph to be identified.
(3) A method based on regular polygon fitting.
Based on the open source package OpenCV for image processing, a regular polygon fitting function can be called to perform regular hexagon fitting on the graph. After the regular hexagon is fitted, the center of the regular hexagon can be obtained, and the center coordinate is considered to be the centroid of the pattern to be identified.
The method can find the center of the hexagon, namely the center of the regular hexagon, for the regular hexagon with pure background and regular shape. However, for the technical fields of image recognition and graphic image processing, the recognized hexagons are often not regular hexagons, and due to the reasons of impure background, errors caused by an image recognition algorithm, errors caused by low image resolution, and the like, a plurality of noise points appear on the boundaries of the recognized hexagons, and the existing hexagon recognition method is caused by the existence of the noise points: the accuracy is very low, and the found centroid of the hexagon has very large deviation from the ideal centroid of the hexagon.
Moreover, the prior art has a great disadvantage, for example, when a hexagon is photographed, if a corner is blocked, the photographed picture is a hexagon with a missing corner and a defective hexagon, and the above three existing methods recognize the image, but find that the recognized result is wrong due to the missing corner. Therefore, a method capable of accurately recognizing a hexagonal image having noise points or defects at the edges of the pattern is needed.
It should be noted that the foregoing description of the background art is only for the purpose of providing a clear and complete description of the technical solution of the present invention and is presented for the convenience of understanding by those skilled in the art. The above-described solutions cannot be considered to be known to those skilled in the art merely because they are set forth in the background section of the invention.
Disclosure of Invention
The invention aims to provide a method for identifying and correcting a hexagon, which can accurately identify noisy points or irregular hexagons on the edge of a pattern, can correct six vertexes of a hexagonal image, can further acquire the centroid of the hexagonal image based on the corrected six vertexes of the hexagonal image, and can correct the centroid of the hexagonal image, thereby greatly improving the accuracy and precision, solving the defect that the noisy points or irregular hexagons on the edge of the pattern cannot be identified in the prior art, and having important research significance and use value.
In order to achieve the above purpose, the present invention provides the following technical solutions:
the invention provides a method for identifying and correcting hexagons, which comprises the following steps:
the first step: initially identifying a hexagonal image, comprising:
Binarizing the hexagonal image to obtain an image A;
performing image graying treatment on the image A to obtain an image C;
acquiring a contour image D of the image C;
acquiring a minimum circumscribed rectangle of the hexagonal image based on the contour image D;
obtaining an empirical value r describing the size of the hexagonal image according to the size of the minimum circumscribed rectangle;
r=max{w,h}
r is an empirical value, w is the length of the smallest circumscribed rectangle of the hexagonal image, h is the width of the smallest circumscribed rectangle of the hexagonal image, and r is the length of the longer side of the middle length and the width of the smallest circumscribed rectangle of the hexagonal image;
backing up the image A to obtain an image B;
performing open operation on the image B to obtain an image E;
performing image graying treatment on the image E to obtain an image F;
acquiring a contour image G of the image F;
acquiring a first minimum circumscribed triangle B of a hexagonal image based on the contour image G 1 B 2 B 3 The minimum circumscribed triangle B 1 B 2 B 3 Is defined by three vertices B 1 、B 2 、B 3 The coordinates are (x) 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 );
Based on the empirical value r, the first minimum circumscribed triangle B 1 B 2 B 3 Respectively drawing a circle on two sides of the frame, and obtaining an integral image H comprising two circular images and an image F, wherein the center coordinates of the two circles are respectively
Acquiring a contour image I of the integral image H;
acquiring a second minimum circumscribed triangle B based on the contour image I 4 B 5 B 6 ;
Acquiring the first minimum external triangle B 1 B 2 B 3 And a second minimum circumscribed triangle B 4 B 5 B 6 Is greater than six intersection points A of 1 、A 2 、A 3 、A 4 、A 5 、A 6 According to the six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Filling the regions in the six intersection points by coordinates of (a) to obtain six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Corresponding sides are used for obtaining a hexagonal image J, and the hexagonal image J is marked as a hexagon A 1 A 2 A 3 A 4 A 5 A 6 ;
And a second step of: for hexagon A 1 A 2 A 3 A 4 A 5 A 6 Is corrected for six vertices of (a), comprising:
for the six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Sequencing;
let the value of the point with the pixel value of 255 in the image B be 1, and the obtained image be denoted as image B', and the hexagon A 1 A 2 A 3 A 4 A 5 A 6 The value of the point with the middle pixel value of 255 is 1, the obtained image is marked as an image J ', and the image B ' and the image J ' are overlapped to obtain a sum image K, wherein K=B ' +J ';
respectively obtain hexagons A 1 A 2 A 3 A 4 A 5 A 6 Respectively at A in 1 、A 2 、A 3 、A 4 、A 5 、A 6 Six triangles which are obtuse angles: a is that 1 A 6 A 2 、A 2 A 1 A 3 、A 3 A 2 A 4 、A 4 A 5 A 3 、A 5 A 6 A 4 、A 6 A 1 A 5 Six intersection ratios inside the six triangles are calculated separately:
wherein ioui represents the intersection ratio of the inside of a triangle with the point Ai as an obtuse angle; ni represents the number of pixels belonging to the image B' in the triangle with Ai as the obtuse angle; ni represents the number of pixels inside the triangle taking Ai as an obtuse angle; i=1, 2,3,4,5,6;
According to six cross ratio iou 1 、iou 2 、iou 3 、iou 4 、iou 5 、iou 6 Respectively for six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Scoring to obtain six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Is used for the scoring condition of the (a),
A 1 score A of (2) 1iou= iou 1 ;
A 2 Score A of (2) 2iou= iou 2 ;
A 3 Score A of (2) 3iou= iou 3 ;
A 4 Score A of (2) 4iou= iou 4 ;
A 5 Score A of (2) 5iou= iou 5 ;
A 6 Score A of (2) 6iou= iou 6 ;
Pair A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Score A of (2) 1iou 、A2iou、A 3iou 、A 4iou 、A5iou、A 6iou Sorting, correcting the points with low scores by the points with high scores to obtain corrected six vertexes of M respectively 1 、M 2 、M 3 、M 4 、M 5 、M 6 According to the six intersection points M 1 、M 2 、M 3 、M 4 、M 5 、M 6 Filling the regions in the six intersection points by the coordinates of (a) to obtain six intersection points M 1 、M 2 、M 3 、M 4 、M 5 、M 6 Corresponding sides, obtaining corrected hexagonal image M, and marking the hexagonal image M as hexagon M 1 M 2 M 3 M 4 M 5 M 6 ;
And a third step of: acquiring the centroid of the hexagonal image, correcting the centroid of the hexagonal image, including:
three sets of opposite sides of the hexagonal image M are respectively acquired: line segment M 1 M 2 And line segment M 4 M 5 Line segment M 2 M 3 And line segment M 5 M 6 Line segment M 3 M 4 And line segment M 6 M 1 ;
Three inscribed quadrilaterals of the hexagonal image M are respectively acquired, and are respectively: quadrilateral M 1 M 2 M 4 M 5 Quadrangle M 2 M 3 M 5 M 6 Quadrangle M 3 M 4 M 6 M 1 ;
In addition, the value of the point with the pixel value of 255 in the hexagonal image M is 1, the obtained image is marked as an image J ', and the image B ' and the image J ' are overlapped to obtain a sum image K ', K ' =B ' +J ';
in the sum image K ', the intersection ratio iou value of the region belonging to the image B ' region and the image J ' region inside the three inscribed quadrangle regions is calculated respectively, and the calculation formula of the intersection ratio of the three inscribed quadrangles is as follows:
nj represents the number of pixels belonging to the image B' in the interior of the inscribed quadrangle; nj represents the number of pixel points in the inscribed quadrangle, j=7, 8,9, and quadrangle M 1 M 2 M 4 M 5 Is of the cross-over ratio iou a Quadrangle M 2 M 3 M 5 M 6 Is of the cross-over ratio iou b And quadrilateral M 3 M 4 M 6 M 1 Is of the cross-over ratio iou c ;
Respectively obtaining the centroids of three inscribed quadrilaterals: quadrilateral M 1 M 2 M 4 M 5 Quadrangle M 2 M 3 M 5 M 6 And quadrilateral M 3 M 4 M 6 M 1 Respectively M as centroid of (C) a 、M b 、M c Quadrangle M 1 M 2 M 4 M 5 Is a line segment M 1 M 4 And line segment M 2 M 5 Quadrangle M 2 M 3 M 5 M 6 Is a line segment M 2 M 5 And line segment M 3 M 6 Quadrangle M 3 M 4 M 6 M 1 Is a line segment M 3 M 6 And line segment M 4 M 1 The method comprises the steps of carrying out a first treatment on the surface of the Line segment M 1 M 4 And line segment M 2 M 5 The intersection point of (2) is M a Line segment M 2 M 5 And line segment M 3 M 6 The intersection point of (2) is M b Line segment M 3 M 6 And line segment M 4 M 1 The intersection point of (2) is M c ;
Line segment M 1 M 4 The linear equation is: a, a 1 x+b 1 y+c 1 =0;
Line segment M 2 M 5 The linear equation is: a, a 2 x+b 2 y+c 2 =0;
Line segment M 3 M 6 The linear equation is: a, a 3 x+b 3 y+c 3 =0
obtaining three centroids M a 、M b 、M c Mid-point M of (2) s Midpoint M s Coordinates (x) s ,y s ) Is that
Judging iou respectively a 、iou b 、iou c A magnitude equal to a first threshold;
if, iou a 、iou b 、iou c Are all larger than the first threshold, the centroid of the hexagonal image M is M a 、M b 、M c Mid-point M of (2) s ;
If, iou a And iou b Are all greater than a first threshold, iou c Less than or equal toAt a first threshold, the centroid of the hexagonal image M is M a And M b Mid-point M of (2) ab Or, iou a And iou c Are all greater than a second threshold, iou b Less than or equal to the first threshold, the centroid of the hexagonal image M is M a And M c Mid-point M of (2) ac Or, iou c And iou b Are all greater than a first threshold, iou a Less than or equal to the first threshold, the centroid of the hexagonal image M is M c And M b Mid-point M of (2) cb
If, iou a Greater than a first threshold, iou b And iou c Are all smaller than or equal to the first threshold value, the centroid of the hexagonal image M is M a The method comprises the steps of carrying out a first treatment on the surface of the Or, iou b Greater than a first threshold, iou c And iou a Are all smaller than or equal to the first threshold value, the centroid of the hexagonal image M is M b The method comprises the steps of carrying out a first treatment on the surface of the Or, iou c Greater than a first threshold, iou b And iou a Are all smaller than or equal to the first threshold value, the centroid of the hexagonal image M is M c ;
If, iou a 、iou b 、iou c All smaller than the first threshold, then for iou a 、iou b 、iou c The centroid of the hexagonal image M is the point corresponding to the intersection ratio with the largest value.
Alternatively, the process may be carried out in a single-stage,
pair A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Score A of (2) 1iou 、A2iou、A 3iou 、A 4iou 、A5iou、A 6iou Sorting, correcting the points with low score by the points with high score to obtain corrected pointsThe six vertexes are M respectively 1 、M 2 、M 3 、M 4 、M 5 、M 6 Comprising:
acquisition of hexagons A 1 A 2 A 3 A 4 A 5 A 6 Centroid A of (C) 0 ;
If A 1iou 、A2iou、A 3iou 、A 4iou 、A5iou、A 6iou Are all greater than the second threshold, A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Without correction, M 1 、M 2 、M 4 、M 5 、M 6 The coordinates of (A) and A 1 、A 2 、A 4 、A 5 、A 6 Is the same as the coordinates of (a);
if A 3iou Minimum, and A 3iou Less than a second threshold, A 1iou 、A 2iou 、A 4iou 、A5iou、A 6iou All are greater than or equal to the second threshold, the point to be corrected is unique, A is used 1 、A 2 、A 4 、A 5 、A 6 Pair A 3 Correction is performed by A 4 Line segment A is made as starting point 1 A 6 Parallel rays of (1), denoted A 2 Line segment A is made as starting point 5 A 6 Is a parallel ray of the two rays, and the intersection point of the two rays is a point of A 3 Corrected M 3 ;M 1 、M 2 、M 4 、M 5 、M 6 The coordinates of (A) and A 1 、A 2 、A 4 、A 5 、A 6 Is the same as the coordinates of (a);
if A 2iou= A 3iou And A is 2iou 、A 3iou Minimum, A 2iou 、A 3iou Less than a second threshold, A 1iou 、A 4iou 、A5iou、A 6iou All are greater than or equal to the second threshold, the point to be corrected is A 2 And A 3 ,A 2 And A 3 Adjacent, with A 1 、A 4 、A 5 、A 6 Pair A 2 And A 3 Correction is carried out, passing point A 4 Line segment A 1 A 6 Parallel ray L1 of (A), connection A 6 And A is a 0 And is prolonged, compared with the parallel ray L1, is marked as a point A 3 Corrected M 3 The method comprises the steps of carrying out a first treatment on the surface of the Crosses A 1 Line segment A 4 A 5 Parallel ray L2 of (A), connection A 5 And A is a 0 And is prolonged, compared with the parallel ray L2, is marked as a point corresponding to A 2 Corrected M 2 Then, M 1 、M 4 、M 5 、M 6 The coordinates of (A) and A 1 、A 4 、A 5 、A 6 Is the same as the coordinates of (a);
if A 2iou= A 4iou And A is 2iou 、A 4iou Minimum, A 2iou 、A 4iou Less than a second threshold, A 1iou 、A 3iou 、A5iou、A 6iou All are greater than or equal to the second threshold, the point to be corrected is A 2 And A 4 ,A 2 And A 4 Spaced apart by a point, with A 1 、A 3 、A 5 、A 6 Pair A 2 And A 4 Correction is carried out, passing point A 3 Line segment A 3 M 4 Line segment A 3 M 4 Parallel to A 1 A 6 Line segment A 3 M 4 Length of (A) and A 1 A 6 Equal in length, M 4 To pair A 4 Corrected points; point of passage A 3 Line segment A 3 M 2 Line segment A 3 M 2 Parallel to line segment A 5 A 6 Line segment A 3 M 2 Length of (A) and A 5 A 6 Equal in length, M 2 To pair A 2 Corrected points; then M 1 、M 3 、M 5 、M 6 The coordinates of (A) and A 1 、A 3 、A 5 、A 6 Is the same as the coordinates of (a);
if a1io=a 4iou And A is 1iou 、A 4iou Minimum, A 1iou 、A 4iou Less than a second threshold, A 2iou 、A 3iou 、A5iou、A 6iou All are greater than or equal to the second threshold, the point to be corrected is A 1 And A 4 ,A 1 And A 4 Spaced two points apart, A 1 And A 4 For the opposite vertex, use A 2 、A 3 、A 5 、A 6 Pair A 1 And A 4 Correcting to calculate segment A 3 M 2 Slope K of (2) 23 And line segment A 5 A 6 Slope K of (2) 56 Corrected point M 1 Sum point M 4 The slope of the line segment is K 14 =(K 23 +K 56 ) 2, according to the slope of K 14 And A is a 0 The coordinates of (a) to obtain a line segment equation L4, line segment A 0 A 2 Length a, segment A 0 A 3 Length b, segment A 0 A 1 Length c, segment A 0 A 4 The length of (c) is d, the average value is m,at point M 1 And M 4 Line segment A is intercepted on the line segment 0 M 1 And A 0 M 4 Line segment A 0 M and A 0 M 4 The lengths of the two are m; point M 1 Sum point M 4 To pair A 1 And A 4 Corrected point, then, M 2 、M 3 、M 5 、M 6 The coordinates of (A) and A 2 、A 3 、A 5 、A 6 Is the same.
Alternatively, obtain hexagon A 1 A 2 A 3 A 4 A 5 A 6 Centroid A of (C) 0 Comprising the following steps:
respectively obtaining the hexagons A 1 A 2 A 3 A 4 A 5 A 6 Is arranged on the opposite side of the three groups: line segment A 1 A 2 And line segment A 4 A 5 Line segment A 2 A 3 And line segment A 5 A 6 Line segment A 3 A 4 And line segment A 6 A 1 ;
Respectively obtaining the hexagons A 1 A 2 A 3 A 4 A 5 A 6 Three inscribed quadrilaterals of (a), respectively: quadrilateral A 1 A 2 A 4 A 5 Quadrilateral A 2 A 3 A 5 A 6 Quadrilateral A 3 A 4 A 6 A 1 ;
Respectively obtaining the centroids of three inscribed quadrilaterals: quadrilateral A 1 A 2 A 4 A 5 Quadrilateral A 2 A 3 A 5 A 6 Quadrilateral A 3 A 4 A 6 A 1 Respectively has the centroid A a 、A b 、A c Quadrilateral A 1 A 2 A 4 A 5 Is a line segment A 1 A 4 And line segment A 2 A 5 Quadrilateral A 2 A 3 A 5 A 6 Is a line segment A 2 A 5 And line segment A 3 A 6 Quadrilateral A 3 A 4 A 6 A 1 Is a line segment A 3 A 6 And line segment A 4 A 1 The method comprises the steps of carrying out a first treatment on the surface of the Line segment A 4 A 1 And line segment A 2 A 5 The intersection point of (A) is A a Line segment A 2 A 5 And line segment A 3 A 6 The intersection point of (A) is A b Line segment A 3 A 6 And line segment A 4 A 1 The intersection point of (A) is A c ;
Line segment A 1 A 4 The linear equation is: a, a 4 x+b 4 y+c 4 =0;
Line segment A 2 A 5 The linear equation is: a, a 5 x+b 5 y+c 5 =0;
Line segment A 3 A 6 The linear equation is: a, a 6 x+b 6 y+c 6 =0
obtaining three centroids A a 、A b 、A c Is the midpoint N of (2) s Midpoint N s Coordinates (x) n ,y n ) Is that
Optionally, the smallest bounding rectangle used for acquiring the hexagonal image based on the contour image D is: and calling a minAreRect () function method in an opencv image processing library, and inputting the outline of the outline image D to obtain the minimum circumscribed rectangle of the hexagonal image.
Optionally, a first minimum circumtriangle of the hexagonal image is obtained by calling a minimum circumtriangle function in the OpenCV library based on the contour image G.
Optionally, a second minimum triangle is obtained by calling a minimum triangle function in an OpenCV library based on the contour image I.
Optionally, the first threshold is 0.97.
Optionally, for the six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 A counter-clockwise ordering is performed.
The method for identifying and correcting the hexagons can accurately identify noisy points or irregular hexagons on the edges of the patterns, can correct six vertexes of a hexagonal image, can further acquire the centroid of the hexagonal image based on the six vertexes of the corrected hexagonal image, corrects the centroid of the hexagonal image, greatly improves the accuracy and precision, overcomes the defect that the noisy points or irregular hexagons on the edges of the patterns cannot be identified in the prior art, and has important research significance and use value.
Preferably, the method is used for acquiring the first minimum circumscribed triangle of the hexagonal image based on the contour image, drawing a circle on two sides of the first minimum circumscribed triangle based on the empirical value, acquiring the second minimum circumscribed triangle based on the whole contour image, and filling the area in six intersection points of the two minimum circumscribed triangles to obtain the hexagonal image.
Preferably, the present invention obtains six triangles within the hexagon, each at an obtuse angle of the six vertices: six intersection ratios inside the six triangles are calculated respectively: according to six cross ratio iou 1 、iou 2 、iou 3 、iou 4 、iou 5 、iou 6 Scoring the six intersection points respectively, obtaining scoring conditions of the six intersection points respectively, correcting points with low scores by points with high scores to obtain corrected six intersection points, and filling areas in the six intersection points to obtain corrected hexagonal images; the method and the device increase the correction step of the hexagonal image and increase the identification accuracy of the hexagonal image.
Preferably, the method acquires the centroid of the hexagonal image, corrects the centroid of the hexagonal image, and comprises the following steps: three inscribed quadrilaterals of the hexagonal image are respectively acquired, and are respectively: quadrilateral M 1 M 2 M 4 M 5 Quadrangle M 2 M 3 M 5 M 6 Quadrangle M 3 M 4 M 6 M 1 The method comprises the steps of carrying out a first treatment on the surface of the Respectively calculating the intersection ratio iou values in the three inscribed quadrilateral areas to respectively obtain the centroids M of the three inscribed quadrilaterals a 、M b 、M c By separately judging iou a 、iou b 、iou c And judging the centroid position with the magnitude of the first threshold.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of identifying and correcting hexagons with noise interference at the edges according to an embodiment of the present invention;
FIG. 2 is a flow chart of a centroid acquiring method of a hexagonal image M according to an embodiment of the present invention;
FIG. 3 is a flow chart of a corrected hexagonal image M based on six triangle internal cross ratios in accordance with an embodiment of the present invention;
FIG. 4 is a flow chart of obtaining hexagonal vertices based on two circumscribed triangles in accordance with an embodiment of the present invention;
FIG. 5 is a flow chart of a numbering ordering of six vertices of an identified hexagon according to an embodiment of the present invention;
FIG. 6 is a flow chart of a hexagonal centroid and three iou values recalibration of six vertices according to an embodiment of the present invention;
FIG. 7 is a detailed flow chart of three iou values and three centroid correction hexagons in accordance with an embodiment of the present invention;
FIG. 8 is a diagram of a binarized profile image D according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a minimum bounding rectangle of a hexagonal image acquired based on contour image D in accordance with an embodiment of the present invention;
FIG. 10 is a first minimum circumscribing triangle B of a hexagonal image based on a contour image G according to an embodiment of the present invention 1 B 2 B 3 A schematic diagram;
FIG. 11 is a graph showing the first minimum triangle B based on the empirical value r in accordance with the embodiment of the present invention 1 B 2 B 3 Drawing a circular schematic diagram on two sides of the frame respectively;
FIG. 12 is a diagram of an embodiment of the present invention for obtaining a second minimum circumtriangle B based on a contour image I 4 B 5 B 6 A schematic diagram;
FIG. 13 is a diagram illustrating an exemplary embodiment of the present invention for obtaining a first minimum triangle B 1 B 2 B 3 And a second minimum circumscribed triangle B 4 B 5 B 6 Is greater than six intersection points A of 1 、A 2 、A 3 、A 4 、A 5 、A 6 A schematic diagram;
FIG. 14 shows the determination of six intersection points A according to the embodiment of the present invention 1 、A 2 、A 3 、A 4 、A 5 、A 6 Obtaining a hexagonal image J schematic diagram by the corresponding sides;
FIG. 15 is a hexagon A according to an embodiment of the present invention 1 A 2 A 3 A 4 A 5 A 6 A schematic diagram;
FIG. 16 is an inscribed quadrangle M for respectively acquiring hexagonal images M according to the embodiment of the present invention 1 M 2 M 4 M 5 A schematic diagram;
FIG. 17 is an inscribed quadrangle M for respectively acquiring hexagonal images M according to an embodiment of the present invention 2 M 3 M 5 M 6 A schematic diagram;
FIG. 18 is an inscribed quadrangle M for respectively acquiring hexagonal images M according to an embodiment of the present invention 3 M 4 M 6 M 1 A schematic diagram;
FIG. 19 is a hexagonal M of an embodiment of the invention 1 M 2 M 3 M 4 M 5 M 6 Inscribed quadrangle M of (2) 1 M 2 M 4 M 5 The interior belongs to a hexagonal area schematic diagram;
FIG. 20 is a hexagonal quadrilateral M of an embodiment of the invention 2 M 3 M 5 M 6 The interior belongs to a hexagonal area schematic diagram;
FIG. 21 is a hexagonal quadrilateral M of an embodiment of the invention 3 M 4 M 6 M 1 The interior belongs to a hexagonal area schematic diagram;
FIG. 22 is a diagram of an embodiment of the present invention for obtaining an inscribed quadrilateral M 1 M 2 M 4 M 5 Centroid M of (C) a A schematic diagram;
FIG. 23 is a diagram of an embodiment of the present invention for obtaining an inscribed quadrilateral M 2 M 3 M 5 M 6 Centroid M of (C) b A schematic diagram;
FIG. 24 is a diagram of an embodiment of the present invention for obtaining an inscribed quadrilateral M 3 M 4 M 6 M 1 Centroid M of (C) c A schematic diagram;
FIG. 25 is a diagram of an embodiment of the present invention for obtaining an inscribed quadrilateral M 3 M 4 M 6 M 1 Is a centroid diagram of three of (a);
FIG. 26 is a diagram of an embodiment of the present invention for obtaining a hexagon A 1 A 2 A 3 A 4 A 5 A 6 Angle A of the inside 4 Triangle A with obtuse angle 4 A 5 A 3 Internal cross ratio calculation represents a schematic diagram:
FIG. 27 is a diagram of an embodiment of the present invention for obtaining a hexagon A 1 A 2 A 3 A 4 A 5 A 6 Angle A of the inside 5 Triangle A with obtuse angle 4 A 5 A 6 Internal cross ratio calculation represents a schematic diagram:
FIG. 28 is a diagram of an embodiment of the present invention for obtaining a hexagon A 1 A 2 A 3 A 4 A 5 A 6 Angle A of the inside 6 Triangle A with obtuse angle 1 A 5 A 6 Internal cross ratio calculation represents a schematic diagram:
FIG. 29 is a diagram of embodiment A of the present invention 3iou Minimum, and A 3iou Less than a second threshold, A 1iou 、A 2iou 、A 4iou 、A 5iou、 A 6iou All are larger than or equal to the second threshold, the point to be corrected is unique, and A is used 1 、A 2 、A 4 、A 5 、A 6 Pair A 3 Schematic diagram for performing correction;
FIG. 30 is a diagram of embodiment A of the present invention 2iou =A 3iou And A is 2iou 、A 3iou Minimum, A 2iou 、A 3iou Less than a second threshold, A 1iou 、A 4iou 、A 5iou 、A 6iou Are all greater than or equal to a second threshold, with A 1 、A 4 、A 5 、A 6 Pair A 2 And A 3 Schematic diagram for performing correction;
FIG. 31 is a diagram of an embodiment of the present invention, A 2iou =A 4iou And A is 2iou 、A 4iou Minimum, A 2iou 、A 4iou Less than a second threshold, A 1iou 、A 3iou 、A 5iou 、A 6iou Are all greater than or equal to a second threshold, with A 1 、A 3 、A 5 、A 6 Pair A 2 And A 4 Schematic diagram for performing correction;
FIG. 32 is a diagram of embodiment A of the present invention 1iou =A 4iou And A is 1iou 、A 4iou Minimum, A 1iou 、A 4iou Less than a second threshold, A 2iou 、A 3iou 、A 5iou 、A 6iou Are all greater than or equal to a second threshold, with A 2 、A 3 、A 5 、A 6 Pair A 1 And A 4 Schematic diagram of the correction.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, based on the examples herein, which are within the scope of the invention as defined by the claims, will be within the scope of the invention as defined by the claims.
There are many existing methods for identifying hexagons and their centroids: (1) identifying a hexagonal centroid based on the graphical circumscribed circle. (2) identifying a hexagonal centroid based on the graphic inscribed circle. (3) identifying a hexagonal centroid based on fitting the regular hexagon. However, the method can better find the centroid of the hexagon, namely the center of the regular hexagon, for the regular hexagon with pure background and regular shape. However, for the technical fields of image recognition and graphic image processing, the recognized hexagons are often not regular hexagons, and due to the reasons of impure background, errors caused by an image recognition algorithm, errors caused by low image resolution, and the like, a plurality of noise points appear on the boundaries of the recognized hexagons, and the existing hexagon recognition method is caused by the existence of the noise points: the accuracy is very low, and the found centroid of the hexagon has very large deviation from the ideal centroid of the hexagon. Moreover, the prior art has a great disadvantage, for example, when a hexagon is photographed, if a corner is blocked, the photographed picture is a hexagon with a missing corner and a defective hexagon, and the above three existing methods recognize the image, but find that the recognized result is wrong due to the missing corner. Therefore, a method capable of accurately recognizing a hexagonal image having noise points or defects at the edges of the pattern is needed.
The invention provides a method for identifying and correcting hexagons, as shown in fig. 1-32, comprising the steps of: the first step: and (3) primarily identifying the hexagonal image, and in the second step: correcting six vertexes of the hexagon, and the third step: and acquiring the centroid of the hexagonal image, and correcting the centroid of the hexagonal image. The specific contents are as follows:
the first step: initially identifying a hexagonal image, comprising:
binarizing the hexagonal image to obtain an image A;
carrying out image graying treatment on the image A to obtain an image C;
acquiring a contour image D of the image C;
acquiring a minimum circumscribed rectangle of the hexagonal image based on the contour image D;
obtaining an empirical value r describing the size of the hexagonal image according to the size of the minimum circumscribed rectangle;
r=max{w,h}
r is an empirical value, w is the length of the smallest circumscribed rectangle of the hexagonal image, h is the width of the smallest circumscribed rectangle of the hexagonal image, and r is the length of the longer side of the middle length and the width of the smallest circumscribed rectangle of the hexagonal image;
backing up the image A to obtain an image B;
performing open operation on the image B to obtain an image E;
carrying out image graying treatment on the image E to obtain an image F;
acquiring a contour image G of the image F;
Acquiring a first minimum circumscribed triangle B of a hexagonal image based on a contour image G 1 B 2 B 3 Minimum external triangle B 1 B 2 B 3 Is defined by three vertices B 1 、B 2 、B 3 The coordinates are (x) 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 );
Based on empirical value r, the first minimum circumscribed triangle B 1 B 2 B 3 Respectively drawing a circle on two sides of the frame, and obtaining an integral image H comprising two circular images and the image F, wherein the center coordinates of the two circles are respectively as follows
Acquiring a contour image I of the integral image H;
acquiring a second minimum external triangle B based on the contour image I 4 B 5 B 6 ;
Acquiring a first minimum external triangle B 1 B 2 B 3 And a second minimum circumscribed triangle B 4 B 5 B 6 Is greater than six intersection points A of 1 、A 2 、A 3 、A 4 、A 5 、A 6 According to six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Filling the region in the six intersection points by the coordinates of (a) to obtain six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Corresponding sides are used for obtaining a hexagonal image J, and the hexagonal image J is marked as a hexagon A 1 A 2 A 3 A 4 A 5 A 6 ;
And a second step of: for hexagon A 1 A 2 A 3 A 4 A 5 A 6 Correction is performed for six vertices of (1) packageThe method comprises the following steps:
for six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Sequencing;
let the value of the point with pixel value 255 in image B be 1, the resulting image be designated as image B', and the other hexagon A 1 A 2 A 3 A 4 A 5 A 6 The value of the point with the middle pixel value of 255 is 1, the obtained image is marked as an image J ', and the image B ' and the image J ' are overlapped to obtain a sum image K, wherein K=B ' +J ';
respectively obtain hexagons A 1 A 2 A 3 A 4 A 5 A 6 Respectively at A in 1 、A 2 、A 3 、A 4 、A 5 、A 6 Six triangles which are obtuse angles: a is that 1 A 6 A 2 、A 2 A 1 A 3 、A 3 A 2 A 4 、A 4 A 5 A 3 、A 5 A 6 A 4 、A 6 A 1 A 5 Six intersection ratios inside the six triangles are calculated separately:
wherein ioui represents the intersection ratio of the inside of a triangle with the point Ai as an obtuse angle; ni represents the number of pixels belonging to the image B' in the triangle with Ai as the obtuse angle; ni represents the number of pixels inside the triangle taking Ai as an obtuse angle; i=1, 2,3,4,5,6;
according to six cross ratio iou 1 、iou 2 、iou 3 、iou 4 、iou 5 、iou 6 Respectively for six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Scoring to obtain six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Is used for the scoring condition of the (a),
A 1 score A of (2) 1iou= iou 1 ;
A 2 Score A of (2) 2iou= iou 2 ;
A 3 Score A of (2) 3iou= iou 3 ;
A 4 Score A of (2) 4iou= iou 4 ;
A 5 Score A of (2) 5iou= iou 5 ;
A 6 Score A of (2) 6iou= iou 6 ;
Pair A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Score A of (2) 1iou 、A2iou、A 3iou 、A 4iou 、A5iou、A 6iou Sorting, correcting the points with low scores by the points with high scores to obtain corrected six vertexes of M respectively 1 、M 2 、M 3 、M 4 、M 5 、M 6 According to six crossing points M 1 、M 2 、M 3 、M 4 、M 5 、M 6 Filling the region in the six intersection points by the coordinates of (2) to obtain six intersection points M 1 、M 2 、M 3 、M 4 、M 5 、M 6 Corresponding sides, obtaining corrected hexagonal image M, and marking the hexagonal image M as hexagon M 1 M 2 M 3 M 4 M 5 M 6 ;
And a third step of: acquiring the centroid of the hexagonal image, correcting the centroid of the hexagonal image, including:
three sets of opposite sides of the hexagonal image M are respectively acquired: line segment M 1 M 2 And line segment M 4 M 5 Line segment M 2 M 3 And line segment M 5 M 6 Line segment M 3 M 4 And line segment M 6 M 1 ;
Three inscribed quadrilaterals of the hexagonal image M are respectively acquired, respectively: quadrilateral M 1 M 2 M 4 M 5 Quadrangle M 2 M 3 M 5 M 6 Quadrangle M 3 M 4 M 6 M 1 ;
In addition, the value of the point with the pixel value of 255 in the hexagonal image M is 1, the obtained image is marked as an image J ', and the image B ' and the image J ' are overlapped to obtain a sum image K ', K ' =B ' +J ';
in the sum image K ', the intersection ratio iou value of the region belonging to the image B ' region and the image J ' region inside the three inscribed quadrangle regions is calculated respectively, and the calculation formula of the intersection ratio of the three inscribed quadrangles is as follows:
nj represents the number of pixels belonging to the image B' in the interior of the inscribed quadrangle; nj represents the number of pixel points in the inscribed quadrangle, j=7, 8,9, and quadrangle M 1 M 2 M 4 M 5 Is of the cross-over ratio iou a Quadrangle M 2 M 3 M 5 M 6 Is of the cross-over ratio iou b And quadrilateral M 3 M 4 M 6 M 1 Is of the cross-over ratio iou c ;
Respectively obtaining the centroids of three inscribed quadrilaterals: quadrilateral M 1 M 2 M 4 M 5 Quadrangle M 2 M 3 M 5 M 6 And quadrilateral M 3 M 4 M 6 M 1 Respectively M as centroid of (C) a 、M b 、M c Quadrangle M 1 M 2 M 4 M 5 Is a line segment M 1 M 4 And line segment M 2 M 5 Quadrangle M 2 M 3 M 5 M 6 Is a line segment M 2 M 5 And line segment M 3 M 6 Quadrangle M 3 M 4 M 6 M 1 Is a line segment M 3 M 6 And line segment M 4 M 1 The method comprises the steps of carrying out a first treatment on the surface of the Line segment M 1 M 4 And line segment M 2 M 5 The intersection point of (2) is M a Line segment M 2 M 5 And line segment M 3 M 6 The intersection point of (2) is M b Line segment M 3 M 6 And line segment M 4 M 1 The intersection point of (2) is M c ;
Line segment M 1 M 4 The linear equation is: a, a 1 x+b 1 y+c 1 =0;
Line segment M 2 M 5 The linear equation is: a, a 2 x+b 2 y+c 2 =0;
Line segment M 3 M 6 The linear equation is: a, a 3 x+b 3 y+c 3 =0
obtaining three centroids M a 、M b 、M c Mid-point M of (2) s Midpoint M s Coordinates (x) s ,y s ) Is that
Judging iou respectively a 、iou b 、iou c A magnitude equal to a first threshold;
if, iou a 、iou b 、iou c Are all larger than the first threshold, the centroid of the hexagonal image M is M a 、M b 、M c Mid-point M of (2) s ;
If, iou a And iou b Are all greater than a first threshold, iou c Less than or equal to the first threshold, the centroid of the hexagonal image M is M a And M b Mid-point M of (2) ab Or, iou a And iou c Are all greater than a second threshold, iou b Less than or equal to the first threshold, the centroid of the hexagonal image M is M a And M c Mid-point M of (2) ac Or, iou c And iou b Are all greater than a first threshold, iou a Less than or equal to the first threshold, the centroid of the hexagonal image M is M c And M b Mid-point M of (2) cb
If, iou a Greater than a first threshold, iou b And iou c Are all smaller than or equal to the first threshold value, the centroid of the hexagonal image M is M a The method comprises the steps of carrying out a first treatment on the surface of the Or, iou b Greater than a first threshold, iou c And iou a Are all smaller than or equal to the first threshold value, the centroid of the hexagonal image M is M b The method comprises the steps of carrying out a first treatment on the surface of the Or, iou c Greater than a first threshold, iou b And iou a Are all smaller than or equal to the first threshold value, the centroid of the hexagonal image M is M c ;
If, iou a 、iou b 、iou c All smaller than the first threshold, then for iou a 、iou b 、iou c The centroid of the hexagonal image M is the point corresponding to the intersection ratio with the largest value.
The method for identifying and correcting the hexagons provided by the specific embodiment of the invention can accurately identify the noisy points or irregular hexagons on the edges of the pattern, can correct the six vertexes of the hexagonal image, can further acquire the centroid of the hexagonal image based on the corrected six vertexes of the hexagonal image, and can correct the centroid of the hexagonal image, thereby greatly improving the accuracy and precision, solving the defect that the noisy points or irregular hexagons on the edges of the pattern cannot be identified in the prior art, and having important research significance and use value.
In the embodiment of the invention, a first minimum circumscribed triangle of the hexagonal image is obtained based on the contour image, a circle is respectively drawn on two sides of the first minimum circumscribed triangle based on the empirical value, a second minimum circumscribed triangle is obtained based on the whole contour image, and the hexagonal image can be obtained by filling the areas in six intersection points of the two minimum circumscribed triangles.
It should be noted that, in the specific embodiment of the present invention, six triangles with six vertices as obtuse angles in the hexagon are obtained respectively: six intersection ratios inside the six triangles are calculated respectively: according to six cross ratio iou 1 、iou 2 、iou 3 、iou 4 、iou 5 、iou 6 Scoring the six intersection points respectively, obtaining scoring conditions of the six intersection points respectively, correcting points with low scores by points with high scores to obtain corrected six intersection points, and filling areas in the six intersection points to obtain corrected hexagonal images; the method and the device increase the correction step of the hexagonal image and increase the identification accuracy of the hexagonal image.
In an embodiment of the present invention, for A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Score A of (2) 1iou 、A 2iou 、A 3iou 、A 4iou 、A 5iou 、A 6iou Sorting, correcting the points with low scores by the points with high scores to obtain corrected six vertexes of M respectively 1 、M 2 、M 3 、M 4 、M 5 、M 6 Comprising:
acquisition of hexagons A 1 A 2 A 3 A 4 A 5 A 6 Centroid A of (C) 0 ;
If A 1iou 、A 2iou 、A 3iou 、A 4iou 、A 5iou 、A 6iou Are all greater than the second threshold, A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Without correction, M 1 、M 2 、M 4 、M 5 、M 6 The coordinates of (A) and A 1 、A 2 、A 4 、A 5 、A 6 Is the same as the coordinates of (a);
if A 3iou Minimum, and A 3iou Less than a second threshold, A 1iou 、A 2iou 、A 4iou 、A 5iou 、A 6iou All are greater than or equal to the second threshold, the point to be corrected is unique, A is used 1 、A 2 、A 4 、A 5 、A 6 Pair A 3 Correction is performed by A 4 Line segment A is made as starting point 1 A 6 Parallel rays of (1), denoted A 2 Line segment A is made as starting point 5 A 6 Is a parallel ray of (2)The intersection point of the two rays is the point of intersection A 3 Corrected M 3 ;M 1 、M 2 、M 4 、M 5 、M 6 The coordinates of (A) and A 1 、A 2 、A 4 、A 5 、A 6 Is the same as the coordinates of (a);
if A 2iou= A 3iou And A is 2iou 、A 3iou Minimum, A 2iou 、A 3iou Less than a second threshold, A 1iou 、、A 4iou 、A 5iou 、A 6iou All are greater than or equal to the second threshold, the point to be corrected is A 2 And A 3 ,A 2 And A 3 Adjacent, with A 1 、A 4 、A 5 、A 6 Pair A 2 And A 3 Correction is carried out, passing point A 4 Line segment A 1 A 6 Parallel ray L1 of (A), connection A 6 And A is a 0 And is prolonged, compared with the parallel ray L1, is marked as a point A 3 Corrected M 3 The method comprises the steps of carrying out a first treatment on the surface of the Crosses A 1 Line segment A 4 A 5 Parallel ray L2 of (A), connection A 5 And A is a 0 And is prolonged, compared with the parallel ray L2, is marked as a point corresponding to A 2 Corrected M 2 Then, M 1 、M 4 、M 5 、M 6 The coordinates of (A) and A 1 、A 4 、A 5 、A 6 Is the same as the coordinates of (a);
if A 2iou= A 4iou And A is 2iou 、A 4iou Minimum, A 2iou 、A 4iou Less than a second threshold, A 1iou 、A 3iou 、A 5iou、 A 6iou All are greater than or equal to the second threshold, the point to be corrected is A 2 And A 4 ,A 2 And A 4 Spaced apart by a point, with A 1 、A 3 、A 5 、A 6 Pair A 2 And A 4 Correction is carried out, passing point A 3 Line segment A 3 M 4 Line segment A 3 M 4 Parallel to A 1 A 6 Line segment A 3 M 4 Length of (A) and A 1 A 6 Is equal in length to each other and,M 4 to pair A 4 Corrected points; point of passage A 3 Line segment A 3 M 2 Line segment A 3 M 2 Parallel to line segment A 5 A 6 Line segment A 3 M 2 Length of (A) and A 5 A 6 Equal in length, M 2 To pair A 2 Corrected points; then M 1 、M 3 、M 5 、M 6 The coordinates of (A) and A 1 、A 3 、A 5 、A 6 Is the same as the coordinates of (a);
If A 1iou= A 4iou And A is 1iou 、A 4iou Minimum, A 1iou 、A 4iou Less than a second threshold, A 2iou 、、A 3iou 、A 5iou 、A 6iou All are greater than or equal to the second threshold, the point to be corrected is A 1 And A 4 ,A 1 And A 4 Spaced two points apart, A 1 And A 4 For the opposite vertex, use A 2 、A 3 、A 5 、A 6 Pair A 1 And A 4 Correcting to calculate segment A 3 M 2 Slope K of (2) 23 And line segment A 5 A 6 Slope K of (2) 56 Corrected point M 1 Sum point M 4 The slope of the line segment is K 14 =(K 23 +K 56 ) 2, according to the slope of K 14 And A is a 0 The coordinates of (a) to obtain a line segment equation L4, line segment A 0 A 2 Length a, segment A 0 A 3 Length b, segment A 0 A 1 Length c, segment A 0 A 4 The length of (c) is d, the average value is m,at point M 1 And M 4 Line segment A is intercepted on the line segment 0 M 1 And A 0 M 4 Line segment A 0 M and A 0 M 4 The lengths of the two are m; point M 1 Sum point M 4 To pair A 1 And A 4 Corrected point, then, M 2 、M 3 、M 5 、M 6 Coordinate sum of (2)A 2 、A 3 、A 5 、A 6 Is the same. In a specific embodiment of the present invention, a centroid of a hexagonal image is obtained, and a process for correcting the centroid of the hexagonal image includes: three inscribed quadrilaterals of the hexagonal image are respectively acquired, and are respectively: quadrilateral M 1 M 2 M 4 M 5 Quadrangle M 2 M 3 M 5 M 6 Quadrangle M 3 M 4 M 6 M 1 The method comprises the steps of carrying out a first treatment on the surface of the Respectively calculating the intersection ratio iou values in the three inscribed quadrilateral areas to respectively obtain the centroids M of the three inscribed quadrilaterals a 、M b 、M c By separately judging iou a 、iou b 、iou c And judging the centroid position with the magnitude of the first threshold. The method is higher in accuracy and more accurate in identification of hexagons.
In a specific embodiment of the present invention, a hexagon A is obtained 1 A 2 A 3 A 4 A 5 A 6 Centroid A of (C) 0 Comprising the following steps:
respectively obtain hexagons A 1 A 2 A 3 A 4 A 5 A 6 Is arranged on the opposite side of the three groups: line segment A 1 A 2 And line segment A 4 A 5 Line segment A 2 A 3 And line segment A 5 A 6 Line segment A 3 A 4 And line segment A 6 A 1 ;
Respectively obtain hexagons A 1 A 2 A 3 A 4 A 5 A 6 Three inscribed quadrilaterals of (a), respectively: quadrilateral A 1 A 2 A 4 A 5 Quadrilateral A 2 A 3 A 5 A 6 Quadrilateral A 3 A 4 A 6 A 1 ;
Respectively obtaining the centroids of three inscribed quadrilaterals: quadrilateral A 1 A 2 A 4 A 5 Quadrilateral A 2 A 3 A 5 A 6 Quadrilateral A 3 A 4 A 6 A 1 Respectively has the centroid A a 、A b 、A c Quadrilateral A 1 A 2 A 4 A 5 Is a line segment A 1 A 4 And line segment A 2 A 5 Quadrilateral A 2 A 3 A 5 A 6 Is a line segment A 2 A 5 And line segment A 3 A 6 Quadrilateral A 3 A 4 A 6 A 1 Is a line segment A 3 A 6 And line segment A 4 A 1 The method comprises the steps of carrying out a first treatment on the surface of the Line segment A 4 A 1 And line segment A 2 A 5 The intersection point of (A) is A a Line segment A 2 A 5 And line segment A 3 A 6 The intersection point of (A) is A b Line segment A 3 A 6 And line segment A 4 A 1 The intersection point of (A) is A c ;
Line segment A 1 A 4 The linear equation is: a, a 4 x+b 4 y+c 4 =0;
Line segment A 2 A 5 The linear equation is: a, a 5 x+b 5 y+c 5 =0;
Line segment A 3 A 6 The linear equation is: a, a 6 x+b 6 y+c 6 =0
A c coordinates (x) f ,y f ) The method comprises the following steps:obtaining three centroids A a 、A b 、A c Is the midpoint N of (2) s Midpoint N s Coordinates (x) n ,y n ) Is that
That is, the centroid range of the hexagon is locked by the midpoint positions of the three inscribed quadrilaterals, and the centroid coordinates of the polygon are obtained by the average value of the midpoint coordinates of the three inscribed quadrilaterals. The method is used for positioning the hexagons in the image processing field, the identified hexagons are irregular due to the problems of image quality, algorithm precision and the like in the image processing field, and the existing circumscribed circle-based method, inscribed circle method, regular polygon fitting method and the like can be used for further positioning the hexagonal centroid, but the identification rate of the methods is acceptable for the regular hexagons, but the methods are difficult to give a reasonable centroid for the irregular hexagons, so that the specific embodiment of the invention can accurately identify the hexagons and correct the hexagons, and the accuracy is greatly improved.
In a specific embodiment of the present invention, the minimum bounding rectangle for obtaining the hexagonal image based on the contour image D is: and calling a minAreRect () function method in an opencv image processing library, and inputting the outline of the outline image D to obtain the minimum circumscribed rectangle of the hexagonal image.
In an embodiment of the present invention, a first minimum triangle circumscribed by the hexagonal image is obtained by calling a minimum triangle circumscribed function in the OpenCV library based on the contour image G.
In an embodiment of the present invention, the second minimum triangle is obtained by calling the minimum triangle function in the OpenCV library based on the profile image I.
In the embodiment of the invention, for six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 A counter-clockwise ordering is performed.
For six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 The method is not limited to the counterclockwise ordering, but can be counterclockwise ordering, and the method is within the protection scope of the invention.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (8)
1. A method of identifying and correcting hexagons, comprising the steps of:
the first step: initially identifying a hexagonal image, comprising:
binarizing the hexagonal image to obtain an image A;
performing image graying treatment on the image A to obtain an image C;
acquiring a contour image D of the image C;
acquiring a minimum circumscribed rectangle of the hexagonal image based on the contour image D;
obtaining an empirical value r describing the size of the hexagonal image according to the size of the minimum circumscribed rectangle;
r=max{w,h}
r is an empirical value, w is the length of the smallest circumscribed rectangle of the hexagonal image, h is the width of the smallest circumscribed rectangle of the hexagonal image, and r is the length of the longer side of the middle length and the width of the smallest circumscribed rectangle of the hexagonal image;
backing up the image A to obtain an image B;
performing open operation on the image B to obtain an image E;
performing image graying treatment on the image E to obtain an image F;
acquiring a contour image G of the image F;
acquiring a first minimum circumscribed triangle B of a hexagonal image based on the contour image G 1 B 2 B 3 The minimum circumscribed triangle B 1 B 2 B 3 Is defined by three vertices B 1 、B 2 、B 3 The coordinates are (x) 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 );
Based on the empirical value r, the first minimum circumscribed triangle B 1 B 2 B 3 Respectively drawing a circle on two sides of the frame, and obtaining an integral image H comprising two circular images and an image F, wherein the center coordinates of the two circles are respectively
Acquiring a contour image I of the integral image H;
acquiring a second minimum circumscribed triangle B based on the contour image I 4 B 5 B 6 ;
Acquiring the first minimum external triangle B 1 B 2 B 3 And a second minimum circumscribed triangle B 4 B 5 B 6 Is greater than six intersection points A of 1 、A 2 、A 3 、A 4 、A 5 、A 6 According to the six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Filling the regions in the six intersection points by coordinates of (a) to obtain six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Corresponding sides are used for obtaining a hexagonal image J, and the hexagonal image J is marked as a hexagon A 1 A 2 A 3 A 4 A 5 A 6 ;
And a second step of: for hexagon A 1 A 2 A 3 A 4 A 5 A 6 Is corrected for six vertices of (a), comprising:
for the six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Sequencing;
let the value of the point with the pixel value of 255 in the image B be 1, and the obtained image be denoted as image B', and the hexagon A 1 A 2 A 3 A 4 A 5 A 6 The value of the point with the middle pixel value of 255 is 1, the obtained image is marked as an image J ', and the image B ' and the image J ' are overlapped to obtain a sum image K, wherein K=B ' +J ';
respectively obtain hexagons A 1 A 2 A 3 A 4 A 5 A 6 Respectively at A in 1 、A 2 、A 3 、A 4 、A 5 、A 6 Six triangles which are obtuse angles: a is that 1 A 6 A 2 、A 2 A 1 A 3 、A 3 A 2 A 4 、A 4 A 5 A 3 、A 5 A 6 A 4 、A 6 A 1 A 5 Six intersection ratios inside the six triangles are calculated separately:
Wherein ioui represents the intersection ratio of the inside of a triangle with the point Ai as an obtuse angle; ni represents the number of pixels belonging to the image B' in the triangle with Ai as the obtuse angle; ni represents the number of pixels inside the triangle taking Ai as an obtuse angle; i=1, 2,3,4,5,6;
according to six cross ratio iou 1 、iou 2 、iou 3 、iou 4 、iou 5 、iou 6 Respectively for six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Scoring to obtain six intersection points A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Is used for the scoring condition of the (a),
A 1 score A of (2) 1iou =iou 1 ;
A 2 Score A of (2) 2iou =iou 2 ;
A 3 Score A of (2) 3iou =iou 3 ;
A 4 Score A of (2) 4iou =iou 4 ;
A 5 Score A of (2) 5iou =iou 5 ;
A 6 Score A of (2) 6iou =iou 6 ;
Pair A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Score A of (2) 1iou 、A 2iou 、A 3iou 、A 4iou 、A 5iou 、A 6iou Sorting, correcting the points with low scores by the points with high scores to obtain corrected six vertexes of M respectively 1 、M 2 、M 3 、M 4 、M 5 、M 6 According to the six intersection points M 1 、M 2 、M 3 、M 4 、M 5 、M 6 The coordinates of (2) advance the region within six intersection pointsColumn filling to obtain the six intersection points M 1 、M 2 、M 3 、M 4 、M 5 、M 6 Corresponding sides, obtaining corrected hexagonal image M, and marking the hexagonal image M as hexagon M 1 M 2 M 3 M 4 M 5 M 6 ;
And a third step of: acquiring the centroid of the hexagonal image M, correcting the centroid of the hexagonal image M, including:
three sets of opposite sides of the hexagonal image M are respectively acquired: line segment M 1 M 2 And line segment M 4 M 5 Line segment M 2 M 3 And line segment M 5 M 6 Line segment M 3 M 4 And line segment M 6 M 1 ;
Three inscribed quadrilaterals of the hexagonal image M are respectively acquired, and are respectively: quadrilateral M 1 M 2 M 4 M 5 Quadrangle M 2 M 3 M 5 M 6 Quadrangle M 3 M 4 M 6 M 1 ;
In addition, the value of the point with the pixel value of 255 in the hexagonal image M is 1, the obtained image is marked as an image J ', and the image B ' and the image J ' are overlapped to obtain a sum image K ', K ' =B ' +J ';
in the sum image K ', the intersection ratio iou value of the region belonging to the image B ' region and the image J ' region inside the three inscribed quadrangle regions is calculated respectively, and the calculation formula of the intersection ratio of the three inscribed quadrangles is as follows:
nj represents the number of pixels belonging to the image B' in the interior of the inscribed quadrangle; nj represents the number of pixel points in the inscribed quadrangle, j=7, 8,9, and quadrangle M 1 M 2 M 4 M 5 Is of the cross-over ratio iou a Quadrangle M 2 M 3 M 5 M 6 Is of the cross-over ratio iou b And quadrilateral M 3 M 4 M 6 M 1 Is of the cross-over ratio iou c ;
Respectively obtaining the centroids of three inscribed quadrilaterals: quadrilateral M 1 M 2 M 4 M 5 Quadrangle M 2 M 3 M 5 M 6 And quadrilateral M 3 M 4 M 6 M 1 Respectively M as centroid of (C) a 、M b 、M c Quadrangle M 1 M 2 M 4 M 5 Is a line segment M 1 M 4 And line segment M 2 M 5 Quadrangle M 2 M 3 M 5 M 6 Is a line segment M 2 M 5 And line segment M 3 M 6 Quadrangle M 3 M 4 M 6 M 1 Is a line segment M 3 M 6 And line segment M 4 M 1 The method comprises the steps of carrying out a first treatment on the surface of the Line segment M 1 M 4 And line segment M 2 M 5 The intersection point of (2) is M a Line segment M 2 M 5 And line segment M 3 M 6 The intersection point of (2) is M b Line segment M 3 M 6 And line segment M 4 M 1 The intersection point of (2) is M c ;
Line segment M 1 M 4 The linear equation is: a, a 1 x+b 1 y+c 1 =0;
Line segment M 2 M 5 The linear equation is: a, a 2 x+b 2 y+c 2 =0;
Line segment M 3 M 6 The linear equation is: a, a 3 x+b 3 y+c 3 =0
obtaining three centroids M a 、M b 、M c Mid-point M of (2) s Midpoint M s Coordinates (x) s ,y s ) Is that
Judging iou respectively a 、iou b 、iou c A magnitude equal to a first threshold;
if, iou a 、iou b 、iou c Are all larger than the first threshold, the centroid of the hexagonal image M is M a 、M b 、M c Mid-point M of (2) s ;
If, iou a And iou b Are all greater than a first threshold, iou c Less than or equal to the first threshold, the centroid of the hexagonal image M is M a And M b Is the midpoint of (2)Or, iou a And iou c Are all greater than a second threshold, iou b Less than or equal to the first threshold, the centroid of the hexagonal image M is M a And M c Is>Or, iou c And iou b Are all greater than a first thresholdValue, iou a Less than or equal to the first threshold, the centroid of the hexagonal image M is M c And M b Is the midpoint of (2)
If, iou a Greater than a first threshold, iou b And iou c Are all smaller than or equal to the first threshold value, the centroid of the hexagonal image M is M a The method comprises the steps of carrying out a first treatment on the surface of the Or, iou b Greater than a first threshold, iou c And iou a Are all smaller than or equal to the first threshold value, the centroid of the hexagonal image M is M b The method comprises the steps of carrying out a first treatment on the surface of the Or, iou c Greater than a first threshold, iou b And iou a Are all smaller than or equal to the first threshold value, the centroid of the hexagonal image M is M c ;
If, iou a 、iou b 、iou c All smaller than the first threshold, then for iou a 、iou b 、iou c The centroid of the hexagonal image M is the point corresponding to the intersection ratio with the largest value.
2. The method of identifying and correcting hexagons as claimed in claim 1, wherein,
pair A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Score A of (2) 1iou 、A 2iou 、A 3iou 、A 4iou 、A 5iou 、A 6iou Sorting, correcting the points with low scores by the points with high scores to obtain corrected six vertexes of M respectively 1 、M 2 、M 3 、M 4 、M 5 、M 6 Comprising:
acquisition of hexagons A 1 A 2 A 3 A 4 A 5 A 6 Centroid A of (C) 0 ;
If A 1iou 、A 2iou 、A 3iou 、A 4iou 、A 5iou 、A 6iou Are all greater than the second threshold, A 1 、A 2 、A 3 、A 4 、A 5 、A 6 Without correction, M 1 、M 2 、M 4 、M 5 、M 6 The coordinates of (A) and A 1 、A 2 、A 4 、A 5 、A 6 Is the same as the coordinates of (a);
if A 3iou Minimum, and A 3iou Less than a second threshold, A 1iou 、A 2iou 、A 4iou 、A 5iou 、A 6iou All are greater than or equal to the second threshold, the point to be corrected is unique, A is used 1 、A 2 、A 4 、A 5 、A 6 Pair A 3 Correction is performed by A 4 Line segment A is made as starting point 1 A 6 Parallel rays of (1), denoted A 2 Line segment A is made as starting point 5 A 6 Is a parallel ray of the two rays, and the intersection point of the two rays is a point of A 3 Corrected M 3 ;M 1 、M 2 、M 4 、M 5 、M 6 The coordinates of (A) and A 1 、A 2 、A 4 、A 5 、A 6 Is the same as the coordinates of (a);
if A 2iou =A 3iou And A is 2iou 、A 3iou Minimum, A 2iou 、A 3iou Less than a second threshold, A 1iou 、、A 4iou 、A 5iou 、A 6iou All are greater than or equal to the second threshold, the point to be corrected is A 2 And A 3 ,A 2 And A 3 Adjacent, with A 1 、A 4 、A 5 、A 6 Pair A 2 And A 3 Correction is carried out, passing point A 4 Line segment A 1 A 6 Parallel ray L1 of (A), connection A 6 And A is a 0 And is prolonged, compared with the parallel ray L1, is marked as a point A 3 Corrected M 3 The method comprises the steps of carrying out a first treatment on the surface of the Crosses A 1 Line segment A 4 A 5 Parallel ray L2 of (A), connection A 5 And A is a 0 And is prolonged, compared with the parallel ray L2, is marked as a point corresponding to A 2 Corrected M 2 Then, M 1 、M 4 、M 5 、M 6 The coordinates of (A) and A 1 、A 4 、A 5 、A 6 Is the same as the coordinates of (a);
if A 2iou =A 4iou And A is 2iou 、A 4iou Minimum, A 2iou 、A 4iou Less than a second threshold, A 1iou 、A 3iou 、A 5iou 、A 6iou All are greater than or equal to the second threshold, the point to be corrected is A 2 And A 4 ,A 2 And A 4 Spaced apart by a point, with A 1 、A 3 、A 5 、A 6 Pair A 2 And A 4 Correction is carried out, passing point A 3 Line segment A 3 M 4 Line segment A 3 M 4 Parallel to A 1 A 6 Line segment A 3 M 4 Length of (A) and A 1 A 6 Equal in length, M 4 To pair A 4 Corrected points; point of passage A 3 Line segment A 3 M 2 Line segment A 3 M 2 Parallel to line segment A 5 A 6 Line segment A 3 M 2 Length of (A) and A 5 A 6 Equal in length, M 2 To pair A 2 Corrected points; then M 1 、M 3 、M 5 、M 6 The coordinates of (A) and A 1 、A 3 、A 5 、A 6 Is the same as the coordinates of (a);
if A 1iou =A 4iou And A is 1iou 、A 4iou Minimum, A 1iou 、A 4iou Less than a second threshold, A 2iou 、A 3iou 、A 5iou 、A 6iou All are greater than or equal to the second threshold, the point to be corrected is A 1 And A 4 ,A 1 And A 4 Spaced two points apart, A 1 And A 4 For the opposite vertex, use A 2 、A 3 、A 5 、A 6 Pair A 1 And A 4 Correcting to calculate segment A 3 M 2 Slope K of (2) 23 And line segment A 5 A 6 Slope K of (2) 56 Corrected point M 1 Sum point M 4 The slope of the line segment is K 14 =(K 23 +K 56 ) 2, according to the slope of K 14 And A is a 0 The coordinates of (a) to obtain a line segment equation L4, line segment A 0 A 2 Length a, segment A 0 A 3 Length b, segment A 0 A 1 Length c, segment A 0 A 4 The length of (c) is d, the average value is m,at point M 1 And M 4 Line segment A is intercepted on the line segment 0 M 1 And A 0 M 4 Line segment A 0 M and A 0 M 4 The lengths of the two are m; point M 1 Sum point M 4 To pair A 1 And A 4 Corrected point, then, M 2 、M 3 、M 5 、M 6 The coordinates of (A) and A 2 、A 3 、A 5 、A 6 Is the same.
3. The method of identifying and correcting a hexagon according to claim 2, wherein a hexagon a is obtained 1 A 2 A 3 A 4 A 5 A 6 Centroid A of (C) 0 Comprising the following steps:
respectively obtaining the hexagons A 1 A 2 A 3 A 4 A 5 A 6 Is arranged on the opposite side of the three groups: line segment A 1 A 2 And line segment A 4 A 5 Line segment A 2 A 3 And line segment A 5 A 6 Line segment A 3 A 4 And line segment A 6 A 1 ;
Respectively obtaining the hexagons A 1 A 2 A 3 A 4 A 5 A 6 Three inscribed quadrilaterals of (a), respectively: quadrilateral A 1 A 2 A 4 A 5 Quadrilateral A 2 A 3 A 5 A 6 Quadrilateral A 3 A 4 A 6 A 1 ;
Respectively obtaining the centroids of three inscribed quadrilaterals: quadrilateral A 1 A 2 A 4 A 5 Quadrilateral A 2 A 3 A 5 A 6 Quadrilateral A 3 A 4 A 6 A 1 Respectively has the centroid A a 、A b 、A c Quadrilateral A 1 A 2 A 4 A 5 Is a line segment A 1 A 4 And line segment A 2 A 5 Quadrilateral A 2 A 3 A 5 A 6 Is a line segment A 2 A 5 And line segment A 3 A 6 Quadrilateral A 3 A 4 A 6 A 1 Is a line segment A 3 A 6 And line segment A 4 A 1 The method comprises the steps of carrying out a first treatment on the surface of the Line segment A 4 A 1 And line segment A 2 A 5 The intersection point of (A) is A a Line segment A 2 A 5 And line segment A 3 A 6 The intersection point of (A) is A b Line segment A 3 A 6 And line segment A 4 A 1 The intersection point of (A) is A c ;
Line segment A 1 A 4 The linear equation is: a, a 4 x+b 4 y+c 4 =0;
Line segment A 2 A 5 The linear equation is: a, a 5 x+b 5 y+c 5 =0;
Line segment A 3 A 6 The linear equation is: a, a 6 x+b 6 y+c 6 =0
4. A method of identifying and correcting a hexagon according to claim 3, wherein the minimum bounding rectangle used to obtain a hexagonal image based on the profile image D is: and calling a minAreRect () function method in an opencv image processing library, and inputting the outline of the outline image D to obtain the minimum circumscribed rectangle of the hexagonal image.
5. The method of claim 5, wherein retrieving a minimum circumtriangle function in an OpenCV library based on the profile image G obtains a first minimum circumtriangle of a hexagonal image.
6. The method of claim 5, wherein the retrieving a minimum circumtriangle function in an OpenCV library based on the profile image I obtains a second minimum circumtriangle.
7. The method of identifying and correcting hexagons of claim 1, wherein the first threshold is 0.97.
8. The method of identifying and correcting hexagons as in claim 7, wherein for the six intersection points a 1 、A 2 、A 3 、A 4 、A 5 、A 6 A counter-clockwise ordering is performed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211100987.5A CN116030120B (en) | 2022-09-09 | 2022-09-09 | Method for identifying and correcting hexagons |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211100987.5A CN116030120B (en) | 2022-09-09 | 2022-09-09 | Method for identifying and correcting hexagons |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116030120A true CN116030120A (en) | 2023-04-28 |
CN116030120B CN116030120B (en) | 2023-11-24 |
Family
ID=86076486
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211100987.5A Active CN116030120B (en) | 2022-09-09 | 2022-09-09 | Method for identifying and correcting hexagons |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116030120B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102622626A (en) * | 2011-12-26 | 2012-08-01 | 华南理工大学 | Two-dimension code and method for recognizing same |
CN103810481A (en) * | 2014-03-12 | 2014-05-21 | 中国矿业大学(北京) | Plane graphic object feature information extraction and recognition method |
US20160314563A1 (en) * | 2013-12-25 | 2016-10-27 | Grg Banking Equipment Co., Ltd. | Method for correcting fragmentary or deformed quadrangular image |
CN110309687A (en) * | 2019-07-05 | 2019-10-08 | 华中科技大学 | A kind of bearing calibration of image in 2 D code and means for correcting |
CN113221775A (en) * | 2021-05-19 | 2021-08-06 | 哈尔滨工程大学 | Single-stage arbitrary quadrilateral regression frame large length-width ratio target remote sensing image detection algorithm |
CN113989308A (en) * | 2021-11-04 | 2022-01-28 | 浙江大学 | Polygonal target segmentation method based on Hough transform and template matching |
CN114418869A (en) * | 2021-12-22 | 2022-04-29 | 华南理工大学 | Method, system, device and medium for geometric correction of document image |
CN114820620A (en) * | 2022-06-29 | 2022-07-29 | 中冶建筑研究总院(深圳)有限公司 | Bolt loosening defect detection method, system and device |
CN114820621A (en) * | 2022-06-29 | 2022-07-29 | 中冶建筑研究总院(深圳)有限公司 | Bolt loss defect detection method, system and device |
-
2022
- 2022-09-09 CN CN202211100987.5A patent/CN116030120B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102622626A (en) * | 2011-12-26 | 2012-08-01 | 华南理工大学 | Two-dimension code and method for recognizing same |
US20160314563A1 (en) * | 2013-12-25 | 2016-10-27 | Grg Banking Equipment Co., Ltd. | Method for correcting fragmentary or deformed quadrangular image |
CN103810481A (en) * | 2014-03-12 | 2014-05-21 | 中国矿业大学(北京) | Plane graphic object feature information extraction and recognition method |
CN110309687A (en) * | 2019-07-05 | 2019-10-08 | 华中科技大学 | A kind of bearing calibration of image in 2 D code and means for correcting |
CN113221775A (en) * | 2021-05-19 | 2021-08-06 | 哈尔滨工程大学 | Single-stage arbitrary quadrilateral regression frame large length-width ratio target remote sensing image detection algorithm |
CN113989308A (en) * | 2021-11-04 | 2022-01-28 | 浙江大学 | Polygonal target segmentation method based on Hough transform and template matching |
CN114418869A (en) * | 2021-12-22 | 2022-04-29 | 华南理工大学 | Method, system, device and medium for geometric correction of document image |
CN114820620A (en) * | 2022-06-29 | 2022-07-29 | 中冶建筑研究总院(深圳)有限公司 | Bolt loosening defect detection method, system and device |
CN114820621A (en) * | 2022-06-29 | 2022-07-29 | 中冶建筑研究总院(深圳)有限公司 | Bolt loss defect detection method, system and device |
Non-Patent Citations (3)
Title |
---|
JACOBSEN D W, ET AL.: "Parallel algorithms for planar and spherical Delaunay construction with an application to centroidal Voronoi tessellations", 《GEOSCIENTIFIC MODEL DEVELOPMENT》, vol. 6, no. 4, pages 1353 - 1365 * |
周伟 等: "基于改进Harris角点检测的芯片图像快速校正", 《电子测量与仪器学报》, vol. 34, no. 10, pages 74 - 81 * |
孙树立 等: "一种基于单元几何变形的网格修匀方法", 《计算力学学报》, vol. 33, no. 04, pages 478 - 484 * |
Also Published As
Publication number | Publication date |
---|---|
CN116030120B (en) | 2023-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111243032B (en) | Full-automatic detection method for checkerboard corner points | |
CN110047109B (en) | Camera calibration plate based on self-identification mark and identification detection method thereof | |
CN110992326B (en) | QFN chip pin image rapid inclination correction method | |
CN106446894B (en) | A method of based on outline identification ball-type target object location | |
CN109977907B (en) | Expense reimbursement method and system based on bill recognition | |
CN116958125B (en) | Electronic contest host power supply element defect visual detection method based on image processing | |
CN112767497A (en) | High-robustness calibration device based on circular calibration plate and positioning method | |
CN114998571B (en) | Image processing and color detection method based on fixed-size markers | |
CN114792104A (en) | Method for identifying and decoding ring-shaped coding points | |
CN116030120B (en) | Method for identifying and correcting hexagons | |
CN114612490B (en) | Scenedesmus cell statistical method based on microscope image | |
CN113591507B (en) | Robust two-dimensional code DataMatrix positioning method and system | |
CN106204542B (en) | Visual identity method and system | |
CN117611589B (en) | Tablet personal computer quality detection method and system | |
CN113876346A (en) | Iterative correction method for oblique image | |
CN111667429B (en) | Target positioning correction method for inspection robot | |
CN112200822A (en) | Table reconstruction method and device, computer equipment and storage medium | |
CN111754461A (en) | Method and device for positioning image character area of semiconductor chip | |
CN105701833A (en) | Computer automatic detection method of gastrointestinal capsule endoscope video hookworm image | |
CN115018735A (en) | Fracture width identification method and system for correcting two-dimensional code image based on Hough transform | |
CN115376131A (en) | Design and identification method of dot-shaped coding mark | |
CN111192314B (en) | Method and system for determining inner and outer contour ratio of finger in GDV energy image | |
CN115731312B (en) | Annular coding mark point extraction and identification method based on multi-feature relaxation constraint | |
CN112733843A (en) | Visual identification method of BGA (ball grid array) | |
CN102789574B (en) | Based on the fingerprint image Geometry rectification algorithm of triangular prism optical sensor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |