Convex polygon parameter calculation method for pose monitoring and wire weaving monitoring

By combining cameras and computer systems with Matlab functions to identify and calculate the number of sides, side length, and area of ​​convex polygons, the problem of inaccurate parameter measurement in tunneling machine pose and metal rubber preparation was solved, achieving high-precision and automated monitoring.

CN116304486BActive Publication Date: 2026-02-27XIAN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310064368.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-06
Publication Date
2026-02-27
Estimated Expiration
2043-02-06

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify and calculate the number of sides, side length, and area of ​​convex polygonal shapes used in coal mine tunneling machine posture monitoring. Furthermore, the measurement accuracy of the side length and area of ​​the mesh structure during the metal rubber preparation process is not high, affecting monitoring accuracy and efficiency.

Method used

The monitoring object is captured by a digital camera and computer system. The image is converted into a black and white image using Matlab functions. The boundary detection algorithm is used to identify the boundary points of the convex polygon and calculate its number of sides, side length and area. The accurate parameter calculation is achieved by combining the pixel coordinate system and object coordinate system transformation.

Benefits of technology

This improved the accuracy of tunneling machine position monitoring and the automation level of wire braiding monitoring, ensuring accurate measurement of mesh structure parameters during the metal rubber preparation process and enhancing monitoring accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116304486B_ABST
    Figure CN116304486B_ABST
Patent Text Reader

Abstract

The application discloses a measurement system and a calculation method for the number of edges, the length of edges, the perimeter and the area of a convex polygon in a pose monitoring and metal wire weaving monitoring process of a coal mine tunneling machine, and the measurement system is mainly composed of a digital camera and a computer. An object coordinate system O-XYZ is established on a plane where a to-be-measured object is located, a camera coordinate system O1-X1Y1Z1 is established with a photographic center as an origin, a pixel coordinate system o0-uv and an image coordinate system o1-xy are established on a digital image. The light and the background of a to-be-monitored object are adjusted, and the angle of the camera in the measurement system is adjusted. The to-be-researched target is shot by using the digital camera, the corresponding digital image is obtained by the computer through USB, calculation analysis is carried out, and the number of edges, the length of edges, the perimeter and the area of the researched convex polygon are obtained. The application has the advantages of being beneficial to automatic monitoring, relatively simple calculation algorithm and principle, and high calculation precision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the fields of coal mine tunneling machine and metal rubber preparation, and particularly relates to a measurement system and a calculation method for the number of edges, the length of edges, the perimeter and the area of a convex polygonal graph in the process of pose monitoring of a coal mine tunneling machine and metal wire weaving monitoring. BACKGROUND

[0002] In order to improve the cutting accuracy of an intelligent tunneling machine, the position and pose thereof need to be monitored. A positioning mark located in a tunnel is a reference for measuring the position and pose of the tunneling machine, and the positioning mark is composed of light-emitting elements with different shapes in the same plane and determined relative positions. The contour of each light-emitting element in the positioning mark is a convex polygon. In the monitoring process, first, a camera with a photographic support located on the tunneling machine is used to shoot the positioning mark, and the digital image formed contains a convex polygonal graph corresponding to each light-emitting element; then, the digital image is transmitted to a computer, and the computer is used to calculate the number of edges of the convex polygon in the digital image, and the length, perimeter and area of the convex polygon in the object coordinate system. The calculated number of edges, length, perimeter and area values are substituted into the pose measurement algorithm, which can be used for pose monitoring of the tunneling machine. The number of edges of each light-emitting element with a convex polygonal contour in the positioning mark is different, and by calculating the number of edges, the convex polygon in the digital image can be one-to-one corresponding to the light-emitting element in the positioning mark.

[0003] Metal rubber belongs to a high-damping metal material, and in the preparation process, metal wires are first woven into a mesh structure with a convex polygonal shape and a size meeting the requirements. In order to make the metal rubber have specific mechanical properties, the key dimensions (such as the number of edges, the length of edges, the perimeter and the area) of the mesh in the mesh structure must be strictly controlled. However, due to the fluctuation of the tension force of the metal wires in the weaving process and other reasons, the length, perimeter and area of the mesh in the woven mesh structure will change, affecting the mechanical properties of the metal rubber; therefore, the key dimensions (such as the number of edges, the length of edges, the perimeter and the area) of the woven mesh in the metal rubber preparation process must be monitored. In order to improve the preparation efficiency of the metal rubber, a camera with a photographic support is used to shoot the mesh structure, and the digital image formed contains a convex polygonal graph corresponding to the mesh, and by using a computer for analysis, the number of edges, the length of edges, the perimeter and the area of the woven mesh can be obtained, so as to realize the monitoring of the weaving process.

[0004] Therefore, accurately calculating the number of edges of a convex polygonal graph, and the length, perimeter and area of the convex polygonal graph in the object coordinate system is a key technology for pose monitoring of a coal mine tunneling machine and automatic weaving monitoring of metal wires.

[0005] In the current pose monitoring process of a heading machine, when the number of light emitting elements in a positioning mark is large, and the outlines and the number of edges of each light emitting element are close, the number of edges of each convex polygonal pattern cannot be accurately identified, thus the convex polygonal pattern in the image cannot be accurately corresponded to the light emitting element in the positioning mark, the length, the perimeter and the area of each convex polygonal pattern calculated cannot be accurately corresponded to the parameters of the light emitting element, and the measurement of the position and the pose of the heading machine is affected.

[0006] In the current metal rubber preparation process, the key parameters of the woven grid are usually measured manually, which has the disadvantages of low measurement accuracy and low efficiency, and only the length of the grid can be measured, the perimeter of the grid cannot be directly measured, and the area of the grid cannot be measured. SUMMARY

[0007] The purpose of the present application is to provide a convex polygon parameter calculation method for pose monitoring and metal wire weaving monitoring, which has the advantages of facilitating the automatic monitoring of the position and pose of the heading machine and the metal wire weaving process, the calculation algorithm and principle are relatively simple, and the calculation accuracy is high.

[0008] The technical solution of the present application is a convex polygon parameter calculation method for pose monitoring and metal wire weaving monitoring, characterized by comprising the following steps:

[0009] Step 1) using a digital camera to shoot the object to be monitored in the monitoring system; the monitoring system is composed of a digital camera located on a camera support and a computer, an object coordinate system O-XYZ is established on the plane where the object to be monitored is located, and the coordinates of the camera center in the object coordinate system are (X O ,Y O ,Z O ); a camera coordinate system O1-X1Y1Z1 is established with the camera center as the origin, wherein the O1Z1 axis coincides with the principal point light ray of the camera, and the positive direction is from the photograph to the camera center; both the object coordinate system and the camera coordinate system are right-handed coordinate systems; a pixel coordinate system o0-uv and an image coordinate system o1-xy are established on the photograph; wherein the o0u axis, the o1x axis and the O1X1 axis, and the o0v axis, the o1y axis and the O1Y1 axis are parallel and have the same positive direction; before shooting, the light and the background of the object to be monitored are adjusted, the angle of the camera in the measurement system is adjusted to an appropriate value according to the positional relationship between the camera and the object to be monitored, so that the object to be monitored is located in the shooting domain of the camera; then, the camera is used to shoot the object to be monitored, and the computer obtains the corresponding digital image through USB;

[0010] The monitoring object includes a positioning mark in a heading machine pose monitoring system and metal wires woven into a net structure in a metal wire weaving monitoring system;

[0011] When the monitoring object is a positioning mark in a roadheader pose monitoring system, the positioning mark is located in a roadway and is composed of light-emitting elements of different shapes located in the same plane, and the profile of the light-emitting elements is a convex polygon; in the monitoring process, when the camera captures the positioning mark, a convex polygon pattern corresponding to each light-emitting element in the positioning mark is formed in the digital image;

[0012] When the monitoring object is a metal wire woven into a mesh structure in a metal wire weaving monitoring system, the mesh structure woven by the metal wire has a convex polygon shape, and when the camera captures the metal wire mesh, a convex polygon pattern corresponding to the metal wire mesh is formed in the digital image;

[0013] Step 2) convert the image in the computer into a black and white image using the im2bw function of Matlab;

[0014] Step 3) obtain the convex polygon pattern studied in the black and white image and the pixel coordinates p k (u k ,v k ) of each point p k on the boundary thereof using the bwboundaries function of Matlab;

[0015] Step 4) obtain the total number M of points on the boundary of the convex polygon pattern studied in the pixel coordinate system;

[0016] Step 5) a counter m is used to mark the points on the boundary of the convex polygon pattern studied, and a counter n is used to mark the edges and vertices of the convex polygon pattern studied, and m is first set to 1 and n is set to 1;

[0017] Step 6) take two adjacent points p1 and p2 on the boundary of the convex polygon pattern studied, and set them to be located on the first edge of the convex polygon pattern, and obtain the equation of the straight line p1p2 in the pixel coordinate system;

[0018] Step 7) let m = m + 1;

[0019] Step 8) determine whether m + 1 is greater than M?

[0020] Step 9) yes: go to step 15);

[0021] Step 10) no: sequentially select another point p m+1 adjacent to point p m , draw a perpendicular line from point p m+1 to the straight line p m-1 p m , and point q m+1 is the foot of the perpendicular;

[0022] Step 11) determine whether point p m+1 , q m+1In the pixel coordinate system, the absolute value of the difference between the corresponding x-coordinate and the corresponding y-coordinate, i.e., |u m+1 -u qm+1 |and|v m+1 -v qm+1 Are all values ​​less than 1?

[0023] Step 12) is: point p m+1 With p m p m-1 Collinear, return to step 7);

[0024] Step 13) No: Click p m+1 With p m and p m-1 If they are not collinear, let n = n + 1;

[0025] Step 14) The pixel coordinates of the nth (n≥2) vertex of the convex polygon studied are P. n (U n V n ) = p m (u m ,v m ), return to step 7);

[0026] Step 15) From point p1 to line p m-1 p m Draw a perpendicular line, with point q1 as the foot of the perpendicular; pass through point p. m Draw a perpendicular line to line p1p2, and point q m For the foot to hang down;

[0027] Step 16) Determine the absolute value of the difference between the corresponding x-coordinate and y-coordinate of points p1 and q1 in the pixel coordinate system, that is, |u1-u q1 |and|v1-v q1 Are all values ​​less than 1?

[0028] Step 17) is: Points p1 and p m-1 p m Collinear;

[0029] Step 18) Determine point p m q m In the pixel coordinate system, the absolute value of the difference between the corresponding x-coordinate and the corresponding y-coordinate, i.e., |u m -u qm |and|v m -v qm Are all values ​​less than 1?

[0030] Step 19) is: point p m Collinear with p1 and p2;

[0031] Step 20) The convex polygonal figure under study has n-1 edges and n-1 vertices, the pixel coordinates of vertex P1 is P1(U1, V1) = P n (U n ,V n ) and the rest of the vertices are P2, P3... P n-1 ;

[0032] Step 21) No: point p m is not collinear with points p1, p2;

[0033] Step 22) The convex polygonal figure under study has n edges and n vertices, the pixel coordinates of vertex P1 is P1(U1, V1) = p1(u1, v1), and the rest of the vertices are P2, P3... P n ;

[0034] Step 23) When step 17) is No, point p1 is not collinear with p m-1 , p m ;

[0035] Step 24) Determine whether the absolute values of the differences between the corresponding horizontal coordinates and the corresponding vertical coordinates of points p m , q m in the pixel coordinate system, i.e., |u m -u qm | and |v m -v qm | are both less than 1?

[0036] Step 25) Yes: point p m is collinear with p1, p2;

[0037] Step 26) The convex polygonal figure under study has n edges and n vertices, the pixel coordinates of vertex P1 is P1(U1, V1) = p m (u m ,v m ) and the rest of the vertices are P2, P3... P n ;

[0038] Step 27) No: point p m is not collinear with points p1, p2;

[0039] Step 28) The convex polygonal figure under study has n+1 edges and n+1 vertices, the pixel coordinates of vertex P1 is P1(U1, V1) = p1(u1, v1), the pixel coordinates of vertex P n+1 is P n+1 (U n+1 ,V n+1 ) = p m (u m ,v m ) and the rest of the vertices are P2, P3... Pn ;

[0040] Step 29) converting the pixel coordinates of each vertex in step 20), step 22), step 26) and step 28) into object coordinates respectively when the number of edges of the convex polygon figure under study is n-1, n and n+1;

[0041] Step 30) calculating the distance between adjacent vertices of the convex polygon figure under study in the object coordinate system to obtain the length of each edge;

[0042] Step 31) calculating the area of a triangle composed of adjacent vertices of the convex polygon figure under study and an inner point in the object coordinate system;

[0043] Step 32) accumulating the length of each edge in step 30) to obtain the perimeter of the convex polygon figure under study;

[0044] Step 33) accumulating the area of each triangle in step 31) to obtain the area of the convex polygon figure under study.

[0045] Further, the method for identifying the nth (n≥2) vertex of the convex polygon figure under study mainly comprises the steps 10), 11), 13) and 14), wherein the step 10) is specifically: sequentially selecting another point p m adjacent to point p m+1 , drawing a perpendicular line from point p m+1 to straight line p m-1 p m , and point q m+1 is the foot of the perpendicular; the coordinates of points p m-1 , p m in the pixel coordinate system are p m-1 (u m-1 , v m-1 ), p m (u m , v m ) respectively; when u m-1 ≠ u m and v m-1 ≠ v m , the equation of straight line p m-1 p m in the pixel coordinate system is

[0046] v = k m-1m u + b (1)

[0047] wherein, b = v m - k m-1m u m ;

[0048] straight line p m-1 pm The equation of the perpendicular line in the pixel coordinate system is:

[0049]

[0050] In the formula,

[0051] From equations (1) and (2), we can see that the foot of the perpendicular is q. m+1 coordinates q in the pixel coordinate system m+1 (u qm+1 ,v qm+1 )satisfy

[0052]

[0053]

[0054] When u m-1 =u m When, the straight line p m-1 p m Parallel to the o0-v axis in the pixel coordinate system; passing through point p m+1 Towards line p m-1 p m Draw a perpendicular line, with the foot of the perpendicular at coordinate q in the pixel coordinate system. m+1 (u qm+1 ,v qm+1 )satisfy

[0055] u qm+1 =u m (5)

[0056] v qm+1 =v m+1 (6)

[0057] When v m-1 =v m When, the straight line p m-1 p m Parallel to the o0-u axis in the pixel coordinate system; passing through point p m+1 Towards line p m-1 p m Draw a perpendicular line, with the foot of the perpendicular at coordinate q in the pixel coordinate system. m+1 (u qm+1 ,v qm+1 )satisfy

[0058] u qm+1 =u m+1 (7)

[0059] v qm+1 =v m (8)

[0060] In step 11), in the pixel coordinate system, point p m+1 corresponds to the foot q m+1 The absolute value of the difference between the corresponding abscissa and ordinate represents the distance of the two points along the pixel coordinate axis, i.e., o0-u axis and o0-v axis. If the distance along both directions is 0, then point p m+1 corresponds to the foot q m+1 coincides; however, due to numerical calculation errors, even if the two points coincide in the geometric sense, the calculated distance value may not be 0 when calculating the coordinates and distances by computer. Since the abscissa and ordinate of each point in the pixel coordinate system are integers, the distance of the two points along at least one coordinate axis direction is not less than 1 if the two points do not coincide. When the distance of the two points along both coordinate axis directions is less than 1, the two points coincide.

[0061] |u qm+1 -u m+1 |<1 (9)

[0062] |v qm+1 -v m+1 |<1 (10)

[0063] When both (9) and (10) are satisfied, point p m+1 corresponds to the foot q m+1 Since the foot q m+1 is on the straight line p m-1 p m , point p m+1 is collinear with p m and p m-1 , and then returns to step 7);

[0064] Step 13) is specifically: no, point p m+1 is not collinear with p m and p m-1 , and n = n + 1; if both (9) and (10) are not satisfied, it indicates that the distance of point p m+1 from the foot q m+1 along the corresponding coordinate axis direction is greater than 1, and point p m+1 does not coincide with the foot q m+1 Since the foot q m+1 is on the straight line p m-1 p m , point p m+1 is not collinear with p m and p m-1 , and then n = n + 1 is executed;

[0065] Step 14) is specifically: the pixel coordinates of the n-th (n≥2) vertex of the convex polygon are P n (U n , Vn ) = p m (u m ,v m ), return to step 7); when point p m+1 With p m p m-1 Point P is not collinear. m For line p m-1 p m With line p m p m+1 The intersection point of the two polygons, and the first endpoint of the nth side of the convex polygon, has pixel coordinates P. n (U n V n ) = p m (u m ,v m Then return to step 7).

[0066] Further, the method for determining the number of sides of the convex polygon figure under study includes steps 20), 22), 26), and 28), wherein step 20) specifically involves: the convex polygon figure having n-1 vertices and n-1 sides, and the pixel coordinates of vertex P1 being P1(U1,V1) = P n (U n V n The remaining vertices are P2, P3…P n-1 In step 17), points p1 and p m-1 p m Collinearity means that lines p1p2 and p... m-1 p m There is a common point p1; similarly, in step 19), point p m If p1 and p2 are collinear, it means that the lines p1p2 and p are collinear. m-1 p m There is a common point p m When steps 17) and 19) are satisfied simultaneously, the lines p1p2 and p... m-1 p m There are two distinct common points p1 and p2 m These two lines must coincide; the first side of the convex polygon under study lies on line p1p2, and its nth side lies on line p... m-1 p m Above, when the lines p1p2 and p m-1 p m When they coincide, the first side of the convex polygon coincides with its nth side, so the convex polygon has n-1 sides and n-1 vertices. n Let P1 be the first vertex of the convex polygon, and its pixel coordinates be P1(U1,V1)=P n (Un ,V n ), the rest of the vertices are P2, P3...P n-1 ;

[0067] The step 22) is specifically: no: the convex polygon figure has n vertices and n edges, the pixel coordinates of the vertex P1 is P1(U1, V1)=p1(u1, v1), the rest of the vertices are P2, P3...P n ; in the step 17), the points p1 and p m-1 , p m are collinear, which means that the straight line p1p2 and p m-1 p m have the common point p1; in the step 21), the point p m is not collinear with p1 and p2, which means that the point p m is not the common point of the straight line p1p2 and p m-1 p m ; when the step 17) and the step 21) are satisfied simultaneously, the straight line p1p2 and p m-1 p m have only one common point p1; the first edge of the convex polygon figure researched is on the straight line p1p2, and the n-th edge is on the straight line p m-1 p m ; when the straight line p1p2 and p m-1 p m have only one common point p1, the point p1 is the intersection point of the first edge and the n-th edge of the convex polygon figure; therefore, the convex polygon figure has n edges and n vertices, the pixel coordinates of the vertex P1 is P1(U1, V1)=p1(u1, v1), and the rest of the vertices are P2, P3...P n ;

[0068] The step 26) is specifically: the convex polygon figure researched has n edges and n vertices, the pixel coordinates of the vertex P1 is P1(U1, V1)=p m (u m ,v m ), and the rest of the vertices are P2, P3...P n ; in the step 23), the point p1 is not collinear with p m-1 , p m , which means that the point p1 is not the common point of the straight line p1p2 and p m-1 p m ; in the step 25), the point p m is collinear with p1 and p2, which means that the straight line p1p2 and p m- 1p m have one common point p m ; when the step 23) and the step 25) are satisfied simultaneously, the straight line p1p2 and p m-1 pm There is only one common point p m The first side of the convex polygon studied lies on line p1p2, and its nth side lies on line p... m-1 p m Above, when the lines p1p2 and p m-1 p m There is only one common point p m At time, point p m Let P1 be the intersection of the first side and the nth side of the convex polygon. Therefore, the convex polygon has n sides and n vertices, and the pixel coordinates of vertex P1 are P1(U1,V1) = p m (u m ,v m The remaining vertices are P2, P3…P n ;

[0069] Step 28) specifically involves: a convex polygon shape having n+1 vertices and n+1 edges, where the pixel coordinates of vertex P1 are P1(U1,V1)=p1(u1,v1), and vertex P... n+1 The pixel coordinates are P n+1 (U n+1 V n+1 ) = p m (u m ,v m The remaining vertices are P2, P3…P n In step 23), points p1 and p m-1 p m Non-collinear means that point p1 is not on the line p1p2. m-1 p m The common points; similarly, in step 27), point p m Point P is not collinear with p1 and p2, indicating that point P is not collinear with either p1 or p2. m It is not a straight line between p1p2 and p m-1 p m The common point; when steps 23) and 27) are satisfied simultaneously, the lines p1p2 and p m-1 p m No common points; the first side of the convex polygon under study lies on line p1p2, and its nth side lies on line p... m-1 p m Above, when the lines p1p2 and p m-1 p m When there are no common points, the first and nth sides of a convex polygon do not intersect; points p1 and p2... m Let P1 be the first vertex of the convex polygon and P2 be the (n+1)th vertex. n+1 Point p1 and point p mThe line segment between them is the (n+1)th side of the convex polygon, so the convex polygon has n+1 sides and n+1 vertices. The pixel coordinates of vertex P1 are P1(U1,V1)=p1(u1,v1). n+1 The pixel coordinates are P n+1 (U n+1 V n+1 ) = p m (u m ,v m The remaining vertices are P2, P3…P n .

[0070] Further, step 29) specifically involves: when the number of sides of the convex polygon is n-1, n, and n+1, converting the pixel coordinates of each vertex in steps 20), 22), 26, and 28) into object coordinates respectively; and obtaining the P values ​​of each vertex of the convex polygon in the pixel coordinate system according to the coordinate transformation relationship. J (U J V J The coordinates P in the image coordinate system J (x J ,y J )for

[0071] x J =dx(U J -u0) (11)

[0072] y J =dy(V J -v0) (12)

[0073] In the formula, dx and dy are the lengths of a unit pixel along the o0-u and o0-v directions, respectively, and u0 and v0 are the coordinates of the origin of the image coordinate system in the pixel coordinate system.

[0074] Since light travels in a straight line, the vertex P of the convex polygon in the object coordinate system... J (X J ,Y J Z J ), camera center O1, and vertex P J (X J ,Y J Z J Image point P in the image coordinate system J (x J ,y J () lie on the same straight line, and their coordinates satisfy

[0075]

[0076]

[0077] where x o1 , y o1 are the coordinates of the image principal point in the image coordinate system, and f is the principal distance of the camera,

[0078]

[0079] b1 = cos ω sin κ, b2 = cos ω cos κ, b3 = -sin ω,

[0080]

[0081] ω and κ are the angles of rotation of the camera around the O1Y1, O1X1 and O1Z1 axes;

[0082] The OX and OY axes of the object coordinate system O-XYZ are located in the plane of the monitored convex polygonal figure, so Z J = 0; the coordinates of the vertex P J (X J , Y J , Z J ) of the convex polygonal figure in the O-XY coordinate system are obtained from equations (13) and (14)

[0083]

[0084]

[0085] where A1 = a1f + a3(x J - x o1 ), A2 = a2f + a3(y J - y o1 ), B1 = b1f + b3(x J - x o1 ),

[0086] B2 = b2f + b3(y J - y o1 ), C1 = A1X O + B1Y O + (c1f + c3(x J - x o1 ))Z O ,

[0087] C2 = A2X O + B2Y O + (c2f + c3(y J - y o1 ))Z O ,

[0088] Therefore, the coordinates of the vertices of the convex polygon in the object coordinate system are P J (X J , Y J , 0).

[0089] Further, the step 30) is specifically: calculating the distance between adjacent vertices of the convex polygon in the object coordinate system to obtain the length of each side of the convex polygon; in the object coordinate system, the length of the side between the vertex P J (X J , Y J , 0) and the vertex P J+1 (X J+1 , Y J+1 , 0) is

[0090]

[0091] wherein J = 1, 2, … K-1, and the value of K is n-1, n or n+1;

[0092] In the object coordinate system, the length of the side between the vertex P K and the end point P is

[0093]

[0094] Further, the step 31) is specifically: calculating the area of a triangle composed of adjacent vertices of the convex polygon and an inner point P C of the convex polygon in the object coordinate system; the coordinates of the point P C (X C , Y C , 0) are

[0095]

[0096]

[0097] In the object coordinate system, the distance between the point P C and each vertex P J is

[0098]

[0099] wherein J = 1, 2, … K;

[0100] Connecting the point P C with each vertex of the convex polygon divides the convex polygon into K triangles; according to the cosine theorem, the angle of the side P J P J+1 (J = 1, 2, …, K-1) in each triangle is

[0101]

[0102] Delta P C P J P J+1 The area of

[0103]

[0104] Delta P C P1P K Among them, the side P1P K The angle opposite is

[0105]

[0106] Delta P C P1P K The area of

[0107]

[0108] Further, the method for calculating the perimeter and area of the convex polygon figure comprises the steps 32) and 33), wherein the step 32) is specifically: the lengths of the edges obtained in the step 30) are accumulated to obtain the perimeter of the convex polygon figure; it can be known from the formulas (17) and (18) that the perimeter of the convex polygon figure is

[0109]

[0110] The step 33) is specifically: the areas of the triangles obtained in the step 31) are accumulated to obtain the area of the convex polygon figure; it can be known from the formulas (23) and (25) that the area of the convex polygon figure is

[0111]

[0112] The present application has the following beneficial effects

[0113] In the pose monitoring and metal wire weaving monitoring process, the present application can accurately calculate the edge number, edge length, perimeter and area of the convex polygon figure in the monitoring object, which is beneficial to improve the monitoring accuracy of the position and attitude of the heading machine, and is beneficial to improve the automatic degree of the metal wire mesh weaving monitoring in the metal rubber preparation process, and the monitoring accuracy of the edge number, edge length, perimeter and area of the metal wire mesh. BRIEF DESCRIPTION OF DRAWINGS

[0114] Figure 1 It is the principle diagram of the monitoring system of the present application.

[0115] Figure 2 It is the technical roadmap of the algorithm of the present application.

[0116] Figure 3-1is a schematic diagram of the principle of a convex polygonal figure with n-1 vertices and n-1 edges to be studied.

[0117] Figure 3-2 is a schematic diagram of the principle of a convex polygonal figure with n vertices and n edges to be studied, the coordinates of vertex 1 in the pixel coordinate system are P1(U1, V1) = p1(u1, v1).

[0118] Figure 3-3 is a schematic diagram of the principle of a convex polygonal figure with n vertices and n edges to be studied, the coordinates of vertex 1 in the pixel coordinate system are P1(U1, V1) = p m (u m ,v m ).

[0119] Figure 3-4 is a schematic diagram of the principle of a convex polygonal figure with n+1 vertices and n+1 edges to be studied.

[0120] Figure 3-5 is a schematic diagram of the principle of dividing a convex polygonal figure into K triangles for calculating the area thereof. DETAILED DESCRIPTION

[0121] As shown in Figure 1 , Figure 2 , the convex polygonal parameter calculation method for pose monitoring and wire weaving monitoring provided in the embodiment comprises the following steps:

[0122] Step 1) A digital video camera is used to shoot the object to be monitored in a monitoring system; the monitoring system is composed of a digital video camera located on a shooting support and a computer, an object coordinate system O-XYZ is established on the plane where the object to be monitored is located, the coordinates of the shooting center of the camera in the object coordinate system are (X O ,Y O ,Z O ); a camera coordinate system O1-X1Y1Z1 is established with the shooting center of the camera as the origin, wherein the O1Z1 axis coincides with the principal point light ray of the camera, and the positive direction points from the photograph to the shooting center; both the object coordinate system and the camera coordinate system are right-handed coordinate systems; a pixel coordinate system o0-uv and an image coordinate system o1-xy are established on the photograph; wherein the o0u axis, the o1x axis and the O1X1 axis, and the o0v axis, the o1y axis and the O1Y1 axis are parallel and have the same positive direction; before shooting, the light and the background of the object to be monitored are adjusted, the angle of the camera in the measurement system is adjusted to an appropriate value according to the positional relationship between the camera and the object to be monitored, so that the object to be monitored is located in the shooting domain of the camera; then, the camera is used to shoot the object to be monitored, and the computer obtains the corresponding digital image through USB;

[0123] The monitoring object includes a positioning mark in a pose monitoring system of a tunneling machine and a wire woven into a mesh structure in a wire weaving monitoring system.

[0124] When the monitoring object is the positioning mark in the pose monitoring system of the tunneling machine, the positioning mark is located in a roadway and is composed of light-emitting elements with different shapes in the same plane. The profile of the light-emitting elements is a convex polygon. In the monitoring process, when the camera captures the positioning mark, a convex polygon pattern corresponding to each light-emitting element in the positioning mark is formed in the digital image.

[0125] When the monitoring object is the wire woven into a mesh structure in the wire weaving monitoring system, the mesh structure woven by the wire has a convex polygon shape. When the camera captures the wire mesh, a convex polygon pattern corresponding to the wire mesh is formed in the digital image.

[0126] Step 2) convert the image in the computer into a black-and-white image by using the function im2bw of Matlab;

[0127] Step 3) obtain the convex polygon pattern studied in the black-and-white image and the pixel coordinates p k (u k ,v k ) of the point p m on the boundary of the convex polygon pattern by using the function bwboundaries of Matlab; k k k k

[0128] Step 4) obtain the total number M of the points on the boundary of the convex polygon pattern studied in the black-and-white image in the pixel coordinate system;

[0129] Step 5) a counter m is used to mark the points on the boundary of the convex polygon pattern studied, and a counter n is used to mark the edges and vertices of the convex polygon pattern studied. First, set m = 1 and n = 1;

[0130] Step 6) take two adjacent points p1 and p2 on the boundary of the convex polygon pattern studied, and set them to be the first edge of the convex polygon pattern studied. Obtain the equation of the straight line p1p2 in the pixel coordinate system;

[0131] Step 7) set m = m + 1;

[0132] Step 8) judge whether m + 1 is greater than M?

[0133] Step 9) yes: go to step 15);

[0134] Step 10) no: sequentially select another point p m+1 adjacent to the point p m , draw a perpendicular line from the point p m+1 to the straight line p m-1 p m , and the foot point q m+1 is obtained.

[0135] Step 11) Determine point p m+1 q m+1 In the pixel coordinate system, the absolute value of the difference between the corresponding x-coordinate and the corresponding y-coordinate, i.e., |u m+1 -u qm+1 |and|v m+1 -v qm+1 Are all values ​​less than 1?

[0136] Step 12) is: point p m+1 With p m p m-1 Collinear, return to step 7);

[0137] Step 13) No: Click p m+1 With p m and p m-1 If they are not collinear, let n = n + 1;

[0138] Step 14) The pixel coordinates of the nth (n≥2) vertex of the convex polygon studied are P. n (U n V n ) = p m (u m ,v m ), return to step 7);

[0139] Step 15) From point p1 to line p m-1 p m Draw a perpendicular line, with point q1 as the foot of the perpendicular; pass through point p. m Draw a perpendicular line to line p1p2, and point q m For the foot to hang down;

[0140] Step 16) Determine the absolute value of the difference between the corresponding x-coordinate and y-coordinate of points p1 and q1 in the pixel coordinate system, that is, |u1-u q1 |and|v1-v q1 Are all values ​​less than 1?

[0141] Step 17) is: Points p1 and p m-1 p m Collinear;

[0142] Step 18) Determine point p m q m In the pixel coordinate system, the absolute value of the difference between the corresponding x-coordinate and the corresponding y-coordinate, i.e., |u m -u qm |and|v m -v qm Are all values ​​less than 1?

[0143] Step 19) is: point pm is collinear with p1 and p2;

[0144] Step 20) The convex polygonal figure under study has n-1 edges and n-1 vertices, the pixel coordinates of vertex P1 is P1(U1, V1) = P n (U n ,V n ), and the remaining vertices are P2, P3... P n-1 ;

[0145] Step 21) No: point p m is not collinear with p1 and p2;

[0146] Step 22) The convex polygonal figure under study has n edges and n vertices, the pixel coordinates of vertex P1 is P1(U1, V1) = p1(u1, v1), and the remaining vertices are P2, P3... P n ;

[0147] Step 23) When step 17) is No, point p1 is not collinear with p m-1 , p m ;

[0148] Step 24) Is the absolute value of the difference between the corresponding horizontal coordinates and the corresponding vertical coordinates of points p m , q m in the pixel coordinate system, i.e., |u m -u qm | and |v m -v qm | both less than 1?

[0149] Step 25) Yes: point p m is collinear with p1 and p2;

[0150] Step 26) The polygonal figure under study has n edges and n vertices, the pixel coordinates of vertex P1 is P1(U1, V1) = p m (u m ,v m ), and the remaining vertices are P2, P3... P n ;

[0151] Step 27) No: point p m is not collinear with points p1 and p2;

[0152] Step 28) The convex polygonal figure under study has n+1 edges and n+1 vertices, the pixel coordinates of vertex P1 is P1(U1, V1) = p1(u1, v1), and the pixel coordinates of vertex P n+1 is P n+1 (U n+1 ,V n+1 ) = p m (um v m ), the rest of the vertices are P2, P3... P n ;

[0153] Step 29) when the number of edges of the convex polygon figure under study is n-1, n and n+1, respectively, the pixel coordinates of each vertex in steps 20), 22), 26) and 28) are converted into object coordinates;

[0154] Step 30) the distance between adjacent vertices of the convex polygon figure under study is calculated in the object coordinate system, and the length of each edge of the convex polygon under study is obtained;

[0155] Step 31) the area of the triangle composed of adjacent vertices of the convex polygon figure under study and an internal point is calculated in the object coordinate system;

[0156] Step 32) the length of each edge in step 30) is accumulated to obtain the perimeter of the convex polygon figure under study;

[0157] Step 33) the area of each triangle in step 31) is accumulated to obtain the area of the convex polygon figure under study;

[0158] The method for identifying the nth (n≥2) vertex of the convex polygon figure under study mainly comprises steps 10), 11), 13) and 14).

[0159] The step 10) is specifically: sequentially selecting another point p m adjacent to the point p m+1 , drawing a perpendicular line from the point p m+1 to the straight line p m-1 p m , and the foot point q m+1 is obtained; the coordinates of the points p m-1 , p m in the pixel coordinate system are p m-1 (u m-1 , v m-1 ), p m (u m , v m ) respectively; when u m-1 ≠ u m and v m-1 ≠ v m , the equation of the straight line p m-1 p m in the pixel coordinate system is

[0160] v = k m-1m u + b (1)

[0161] In the formula, b = v m -km-1m u m ;

[0162] straight line p m-1 p m The equation of the perpendicular line in the pixel coordinate system is:

[0163]

[0164] In the formula,

[0165] From equations (1) and (2), we can see that the foot of the perpendicular is q. m+1 coordinates q in the pixel coordinate system m+1 (u qm+1 ,v qm+1 )satisfy

[0166]

[0167]

[0168] When u m-1 =u m When, the straight line p m-1 p m Parallel to the o0-v axis in the pixel coordinate system; passing through point p m+1 Towards line p m-1 p m Draw a perpendicular line, with the foot of the perpendicular at coordinate q in the pixel coordinate system. m+1 (u qm+1 ,v qm+1 )satisfy

[0169] u qm+1 =u m (5)

[0170] v qm+1 =v m+1 (6)

[0171] When v m-1 =v m When, the straight line p m-1 p m Parallel to the o0-u axis in the pixel coordinate system; passing through point p m+1 Towards line p m-1 p m Draw a perpendicular line, with the foot of the perpendicular at coordinate q in the pixel coordinate system. m+1 (u qm+1 ,v qm+1 )satisfy

[0172] u qm+1 =u m+1 (7)

[0173] vqm+1 = v m (8).

[0174] In step 11), in the pixel coordinate system, the point p m+1 and the foot q m+1 The absolute value of the difference between the corresponding horizontal coordinates and the corresponding vertical coordinates respectively represents the distance of the two points along the pixel coordinate axis, i.e., the o0-u axis and the o0-v axis. If the distance along both directions is 0, the point p m+1 coincides with the foot q m+1 ; However, due to numerical calculation errors when calculating coordinates and distances by computer, even if the two points coincide in the geometric sense, the calculated distance may not be 0; Since the horizontal coordinates and vertical coordinates of each point in the pixel coordinate system are integers, the distance between the two points that do not coincide along at least one coordinate axis direction is not less than 1; When the distance of the two points in both coordinate axis directions is less than 1, the two points coincide;

[0175] |u qm+1 -u m+1 | < 1 (9)

[0176] |v qm+1 -v m+1 | < 1 (10)

[0177] When both (9) and (10) are satisfied, the point p m+1 coincides with the foot q m+1 ; Since the foot q m+1 is on the straight line p m-1 p m , the point p m+1 is collinear with p m and p m-1 , and then returns to step 7).

[0178] The step 13) is specifically: No: The point p m+1 is not collinear with p m and p m-1 , n = n + 1; If both (9) and (10) cannot be satisfied, it indicates that the distance of the point p m+1 from the foot q m+1 along the corresponding coordinate axis direction is greater than 1, and the point p m+1 does not coincide with the foot q m+1 ; Since the foot q m+1 is on the straight line p m-1 p m , the point p m+1 is not collinear with p m and p m-1 , and then n = n + 1 is executed.

[0179] Step 14) specifically involves: the pixel coordinates of the nth (n≥2) vertex of the convex polygon are P. n (U n V n ) = p m (u m ,v m ), return to step 7); when point p m+1 With p m p m-1 Point P is not collinear. m For line p m-1 p m With line p m p m+1 The intersection point of the two polygons, and the first endpoint of the nth side of the convex polygon, has pixel coordinates P. n (U n V n ) = p m (u m ,v m Then return to step 7).

[0180] The method for determining the number of sides of the convex polygon under study mainly includes steps 20), 22), 26), and 28.

[0181] like Figure 3-1 As shown, step 20) specifically involves: a convex polygon shape having n-1 vertices and n-1 edges, where the pixel coordinates of vertex P1 are P1(U1,V1) = P n (U n V n The remaining vertices are P2, P3…P n-1 In step 17), points p1 and p m-1 p m Collinearity means that lines p1p2 and p... m-1 p m There is a common point p1; similarly, in step 19), point p m If p1 and p2 are collinear, it means that the lines p1p2 and p are collinear. m-1 p m There is a common point p m When steps 17) and 19) are satisfied simultaneously, the lines p1p2 and p... m-1 p m There are two distinct common points p1 and p2 m These two lines must coincide; the first side of the convex polygon under study lies on line p1p2, and its nth side lies on line p... m-1 p m Above, when the lines p1p2 and p m-1 p mWhen they coincide, the first side of the convex polygon coincides with its nth side, so the convex polygon has n-1 sides and n-1 vertices. n Let P1 be the first vertex of the convex polygon, and its pixel coordinates be P1(U1,V1)=P n (U n V n The remaining vertices are P2, P3…P n-1 .

[0182] like Figure 3-2 As shown, step 22) specifically means: No: The convex polygon has n vertices and n edges, the pixel coordinates of vertex P1 are P1(U1,V1)=p1(u1,v1), and the remaining vertices are P2, P3…P n In step 17), points p1 and p m-1 p m Collinearity means that lines p1p2 and p... m-1 p m There is a common point p1; in step 21), point p m Point P is not collinear with p1 and p2, indicating that point P is not collinear with either p1 or p2. m It is not a straight line between p1p2 and p m-1 p m The common point; when steps 17) and 21) are satisfied simultaneously, the lines p1p2 and p m-1 p m There is only one common point p1; the first side of the convex polygon under study lies on the line p1p2, and its nth side lies on the line p1p2. m-1 p m Above, when the lines p1p2 and p m-1 p m When there is only one common point p1, point p1 is the intersection of the first edge and the nth edge of the convex polygon; therefore, the convex polygon has n edges and n vertices, the pixel coordinates of vertex P1 are P1(U1,V1)=p1(u1,v1), and the remaining vertices are P2, P3…P… n .

[0183] like Figure 3-3 As shown, step 26) specifically involves: the convex polygon figure under study has n sides and n vertices, and the pixel coordinates of vertex P1 are P1(U1,V1) = p m (u m ,v m The remaining vertices are P2, P3…P n In step 23), points p1 and p m-1 p m Non-collinear means that point p1 is not on the line p1p2. m-1 p mThe common point; in step 25), point p m If p1 and p2 are collinear, it means that the lines p1p2 and p are collinear. m-1 p m There is a common point p m When steps 23) and 25) are satisfied simultaneously, the lines p1p2 and p... m-1 p m There is only one common point p m The first side of the convex polygon studied lies on line p1p2, and its nth side lies on line p... m-1 p m Above, when the lines p1p2 and p m-1 p m There is only one common point p m At time, point p m Let P1 be the intersection of the first side and the nth side of the convex polygon. Therefore, the convex polygon has n sides and n vertices, and the pixel coordinates of vertex P1 are P1(U1,V1) = p m (u m ,v m The remaining vertices are P2, P3…P n .

[0184] like Figure 3-4 As shown, step 28) specifically involves: a convex polygon shape having n+1 vertices and n+1 edges, where the pixel coordinates of vertex P1 are P1(U1,V1)=p1(u1,v1), and vertex P... n+1 The pixel coordinates are P n+1 (U n+1 V n+1 ) = p m (u m ,v m The remaining vertices are P2, P3…P n In step 23), points p1 and p m-1 p m Non-collinear means that point p1 is not on the line p1p2. m-1 p m The common points; similarly, in step 27), point p m Point P is not collinear with p1 and p2, indicating that point P is not collinear with either p1 or p2. m It is not a straight line between p1p2 and p m-1 p m The common point; when steps 23) and 27) are satisfied simultaneously, the lines p1p2 and p m-1 p m No common points; the first side of the convex polygon under study lies on line p1p2, and its nth side lies on line p... m-1 p mTherefore, the first edge and the nth edge of the convex polygon do not intersect; the point p1 and the point p m are the first vertex P1 and the (n+1)th vertex P n+1 of the convex polygon, respectively; the line segment between the point p1 and the point p m is the (n+1)th edge of the convex polygon; therefore, the convex polygon has n+1 edges and n+1 vertices; the pixel coordinates of the vertex P1 are P1(U1, V1) = p1(u1, v1); the pixel coordinates of the vertex P n+1 are P n+1 (U n+1 ,V n+1 ) = p m (u m ,v m ); and the remaining vertices are P2, P3,..., P n .

[0185] The step 29) is specifically: when the number of edges of the convex polygon is n-1, n and n+1, the pixel coordinates of the vertices in the steps 20), 22), 26) and 28) are converted into object coordinates, respectively; according to the coordinate transformation relationship, the coordinates P J (x J ,y J ) of the vertices P J (U J ,V J ) of the convex polygon in the image coordinate system are obtained.

[0186] x J = dx(U J -u0) (11)

[0187] y J = dy(V J -v0) (12)

[0188] In the formulas, dx and dy are the lengths of a unit pixel along the o0-u direction and the o0-v direction, respectively; u0 and v0 are the coordinates of the origin of the image coordinate system in the pixel coordinate system.

[0189] Light propagates along a straight line; therefore, the vertex P J (X J ,Y J ,Z J ) of the convex polygon, the camera center O1 and the vertex P J (X J ,Y J ,Z J ) in the object coordinate system have the image points P J (x J ,y J) are located on the same straight line, and the coordinates thereof satisfy

[0190]

[0191]

[0192] wherein x o1 , y o1 are coordinates of the image principal point in the image coordinate system, and f is the principal distance of the camera,

[0193]

[0194] b1 = cos ω sin κ, b2 = cos ω cos κ, b3 = -sin ω,

[0195]

[0196] ω and κ are angles of rotation of the camera about the O1Y1 axis, the O1X1 axis and the O1Z1 axis;

[0197] The OX axis and the OY axis of the object coordinate system O-XYZ are located in the plane of the monitored convex polygonal figure, so that Z J = 0; the coordinates of the vertex P J (X J , Y J , Z J ) of the convex polygonal figure in the O-XY coordinate system are obtained from equations (13) and (14)

[0198]

[0199]

[0200] wherein A1 = a1f + a3(x J -x o1 ), A2 = a2f + a3(y J -y o1 ), B1 = b1f + b3(x J -x o1 ),

[0201] B2 = b2f + b3(y J -y o1 ), C1 = A1X O +B1Y O +(c1f + c3(x J -x o1 ))Z O ,

[0202] C2 = A2X O+B2Y O +(c2f+c3(y J -y o1 ))Z O .

[0203] Therefore, the coordinates of the vertices of the convex polygon in the object coordinate system are P J (X J ,Y J ,0).

[0204] The step 30) is specifically: calculating the distance between adjacent vertices of the convex polygon in the object coordinate system to obtain the length of each side of the convex polygon; in the object coordinate system, the length of the side between vertex P J (X J ,Y J ,0) and vertex P J+1 (X J+1 ,Y J+1 ,0) is

[0205]

[0206] wherein, J = 1, 2, … K-1, and the value of K is n-1, n or n+1;

[0207] In the object coordinate system, the length of the side between vertex P1 and vertex P K is

[0208]

[0209] As shown in Figure 3-5 , the step 31) is specifically: calculating the area of the triangle composed of adjacent vertices of the convex polygon and an inner point P C of the convex polygon in the object coordinate system; the coordinates of the point P C (X C ,Y C ,0) are

[0210]

[0211]

[0212] In the object coordinate system, the distance between the point P C and each vertex P J is

[0213]

[0214] wherein, J = 1, 2, … K;

[0215] The point P CThe convex polygon is divided into K triangles by its vertices; according to the law of cosines, P in each triangle... J P J+1 The angle opposite side (J = 1, 2, ..., K-1) is

[0216]

[0217] ΔP C P J P J+1 The area is

[0218]

[0219] ΔP C P1P K In the middle, edge P1P K The opposite angle is

[0220]

[0221] ΔP C P1P K The area is

[0222]

[0223] Step 32) specifically involves: summing the lengths of each side obtained in step 30) to obtain the perimeter of the convex polygon; from equations (17) and (18), the perimeter of the figure is...

[0224]

[0225] Step 33) specifically involves: summing the areas of each triangle obtained in step 31) to obtain the area of ​​the convex polygon; from equations (23) and (25), the area of ​​the polygon is...

[0226]

[0227] The numerical examples show that the algorithm used in this invention can achieve high accuracy in calculating the parameters of convex polygons. Table 1 shows the calculated results for the number of sides, area, and perimeter of the convex polygons, while Table 2 shows the calculated analysis of the lengths of each side.

[0228] Table 1 shows the calculation results for the number of sides, area, and perimeter of convex polygons.

[0229]

[0230] Table 2 shows the calculation results for the side lengths of convex polygons.

[0231]

Claims

1. Convex polygon parameter calculation method for pose monitoring and wire weaving monitoring, characterized by: The method comprises the following steps: Step 1) taking the object to be monitored in a monitoring system by using a digital camera; the monitoring system is composed of a digital camera on a shooting support and a computer, and an object coordinate system O-XYZ is established on the plane where the object to be monitored is located, and the coordinate of the shooting center of the camera in the object coordinate system is (X O ,Y O ,Z O ); a camera coordinate system O1-X1Y1Z1 is established with the shooting center of the camera as the origin, wherein the O1Z1 axis coincides with the principal point ray of the camera, and the positive direction points from the photo to the shooting center; both the object coordinate system and the camera coordinate system are right-handed coordinate systems; a pixel coordinate system o0-uv and an image coordinate system o1-xy are established on the photo; wherein the o0u axis, the o1x axis and the O1X1 axis are parallel respectively, and the o0v axis, the o1y axis and the O1Y1 axis are parallel respectively, and the positive directions are the same; before shooting, the light and the background of the object to be monitored are adjusted, and according to the positional relationship between the camera and the object to be monitored, the angle of the camera in the measuring system is adjusted to an appropriate value, so that the object to be monitored is located in the shooting domain of the camera; then, the object to be monitored is shot by using the camera, and the computer obtains the corresponding digital image through USB; The monitoring object comprises a positioning mark in a roadheader pose monitoring system and a wire woven into a mesh structure in a wire weaving monitoring system; When the monitoring object is the positioning mark in the roadheader pose monitoring system, the positioning mark is located in a roadway and comprises light-emitting elements with different shapes in the same plane, and the profile of the light-emitting elements is a convex polygon; in the monitoring process, a convex polygon corresponding to each light-emitting element in the positioning mark is formed in a digital image when a camera captures the positioning mark; When the monitoring object is the wire woven into a mesh structure in the wire weaving monitoring system, the mesh structure woven by the wire has a convex polygon shape, and a convex polygon corresponding to the wire mesh is formed in a digital image when a camera captures the wire mesh; Step 2) The image in the computer is converted into a black-and-white image by using the function im2bw of Matlab; Step 3) Get the convex polygon figure studied in the black and white image and the pixel coordinates p of each point p on the boundary of the figure using the function bwboundaries of Matlab k k (u k ,v k )​ Step 4) The total number M of points on the boundary of the convex polygon studied in the black-and-white image is obtained in the pixel coordinate system; Step 5) A counter m is used to mark the points on the boundary of the convex polygon studied, and a counter n is used to mark the edges and vertices of the convex polygon studied; firstly, m = 1 and n = 1; Step 6) Two adjacent points p1 and p2 on the boundary of the convex polygon studied are taken, and it is assumed that the two points are located on the first edge of the convex polygon; the equation of the straight line p1p2 in the pixel coordinate system is obtained; Step 7) m = m + 1; Step 8) It is judged whether m + 1 is greater than M; Step 9) Step 15) is entered; Step 10) No: sequentially select a point p m Another point p adjacent m+1 , passing through point p m+1 To the straight line p m-1 p m Make a perpendicular line, point q m+1 As the foot; Step 11) judging the point p m+1 , q m+1 In the pixel coordinate system, whether the absolute values of the difference between the corresponding horizontal coordinates and the corresponding vertical coordinates, i.e. |u m+1 -u qm+1 | and |v m+1 -v qm+1 | are both less than 1; Step 12) is: point p m+1 with p m , p m-1 collinear, return to step 7); Step 13) No: point p m+1 with p m , p m-1 not collinear, let n = n + 1; Step 14) the pixel coordinates of the nth vertex of the convex polygon pattern under study are P n (U n ,V n ) = p m (u m ,v m ), return to step 7), where n > 2; Step 15) pass the point pi to the straight line p m-1 p m Make a perpendicular line, and the foot point qi; pass the point pi to the straight line p m Make a perpendicular line, and the foot point qi; pass the point pi to the straight line p m Make a perpendicular line, and the foot point qi; pass the point pi to the straight line p Step 16) judging whether the absolute values of the difference between the corresponding horizontal coordinates and the corresponding vertical coordinates of the points p1, q1 in the pixel coordinate system, i.e. |u1-u q1 | and |v1-v q1 | are both less than 1; Step 17) is: point p1 is collinear with p m-1 , p m ; Step 18) judging the point p m , q m In the pixel coordinate system, whether the absolute values of the difference between the corresponding horizontal coordinates and the corresponding vertical coordinates, i.e. |u m -u qm | and |v m -v qm | are both less than 1; Step 19) is: point p m is collinear with pi, p2; Step 20) The convex polygonal figure under study has n-1 sides and n-1 vertices, the pixel coordinates of vertex P1 being P1(U1, V1) = P n (U n ,V n ), the remaining vertices being P2, P3... P n-1 ; Step 21) No: point p m Not collinear with points pi, p2; Step 22) The convex polygonal pattern under study has n sides and n vertices, the pixel coordinates of vertex P1 are P1(U1, V1) = p1(u1, v1), and the pixel coordinates of the remaining vertices are P2, P3,..., Pn. n ; Step 23) If step 17) is not true, then points p1 and p... m-1 p m Not collinear; Step 24) judging the point p m , q m In the pixel coordinate system, whether the absolute values of the difference between the corresponding horizontal coordinates and the corresponding vertical coordinates, i.e. |u m - u qm | and |v m - v qm | are both less than 1; Step 25) is: point p m is collinear with pi, p2; Step 26) The convex polygonal figure under study has n sides and n vertices, the pixel coordinates of vertex P1 being P1(U1, V1) = p m (u m ,v m ), the remaining vertices being P2, P3... P n ; Step 27) No: point p m Not collinear with points pi, p2; Step 28) The convex polygon studied has n+1 sides and n+1 vertices. The pixel coordinates of vertex P1 are P1(U1,V1)=p1(u1,v1). n+1 The pixel coordinates are P n+1 (U n+1 V n+1 ) = p m (u m ,v m The remaining vertices are P2, P3…P n ; Step 29) When the number of edges of the convex polygon studied is n-1, n and n+1, the pixel coordinates of the vertices in steps 20), 22), 26) and 28) are converted into object coordinates respectively; Step 30) The distance between adjacent vertices of the convex polygon studied is calculated in the object coordinate system, and the length of the edge is obtained; Step 31) The area of a triangle composed of adjacent vertices and an inner point of the convex polygon studied is calculated in the object coordinate system; Step 32) The lengths of the edges obtained in step 30) are accumulated, and the perimeter of the convex polygon studied is obtained; Step 33) The areas of the triangles obtained in step 31) are accumulated, and the area of the convex polygon studied is obtained.

2. The convex polygon parameter calculation method for pose monitoring and wire weaving monitoring according to claim 1, characterized in that The method for identifying the nth vertex of the convex polygon figure under study, wherein n≥2, comprises the steps 10), 11), 13) and 14), wherein the step 10) is specifically: sequentially selecting a point p m Another adjacent point p m+1 , passing through the point p m+1 A perpendicular line is drawn to the straight line p m-1 p m The foot point q m+1 is the foot; the points p m-1 , p m The coordinates in the pixel coordinate system are respectively p m-1 (u m-1 , v m-1 ), p m (u m , v m ), when u m-1 ≠u m and v m-1 ≠v m The equation of the straight line p m-1 p m in the pixel coordinate system is v = k m-1m u + b (1) wherein b = v m -k m-1m u m ; The straight line p m-1 p m The equation of the perpendicular line to p in the pixel coordinate system is In the formulae, From (1) and (2), the foot q m+1 The coordinates q m+1 (u qm+1 ,v qm+1 ) in the pixel coordinate system satisfy When u m-1 =u m When, the straight line p m-1 p m Parallel to the o0-v axis in the pixel coordinate system; passing through point p m+1 Towards line p m-1 p m Draw a perpendicular line, with the foot of the perpendicular at coordinate q in the pixel coordinate system. m+1 (u qm+1 ,v qm+1 )satisfy u qm+1 = u m (5) v qm+1 = v m+1 (6) When v m-1 = v m , the straight line p m-1 p m is parallel to the o0-u axis in the pixel coordinate system; a perpendicular is drawn from the point p m+1 to the straight line p m-1 p m , and the foot of the perpendicular is at the point q m+1 (u qm+1 ,v qm+1 ) in the pixel coordinate system, which satisfies u qm+1 = u m+1 (7) v qm+1 = v m (8) In step 11), in the pixel coordinate system, point p m+1 corresponding to the foot q m+1 The absolute value of the difference between the corresponding horizontal coordinates and the corresponding vertical coordinates respectively represents the distance of the two points along the pixel coordinate axes, i.e., the o0-u axis and the o0-v axis. If the distance along both directions is 0, then the point p m+1 corresponding to the foot q m+1 coincides; however, due to numerical calculation errors when calculating the coordinates and distances by using a computer, even if the two points coincide in the geometric sense, the calculated distance value may not be 0; since the horizontal coordinates and the vertical coordinates of each point in the pixel coordinate system are integers, the distance of the two points that do not coincide along at least one coordinate axis direction is not less than 1; when the distance of the two points along both coordinate axis directions is less than 1, the two points coincide; |u qm+1 -u m+1 |<1 (9)|v qm+1 -v m+1 |<1 (10) When both (9) and (10) are satisfied, point p m+1 coincides with the foot q m+1 Again, because the foot q m+1 is on the straight line p m-1 p m Therefore, point p m+1 is collinear with p m , p m-1 and the process returns to step 7). The step 13) is specifically: no: point p m+1 is not collinear with p m , p m-1 , n=n+1; if (9) and (10) cannot be satisfied simultaneously, it indicates that point p m+1 is not collinear with the foot q m+1 , the distance along the corresponding coordinate axis direction is greater than 1, point p m+1 is not collinear with the foot q m+1 , and because the foot q m+1 is on the straight line p m-1 p m , so point p m+1 is not collinear with p m , p m-1 , and then n=n+1 is run; The step 14) is specifically: the pixel coordinate of the n-th vertex of the convex polygon figure is P n (U n ,V n ) = p m (u m ,v m ), and returning to step 7), wherein n≥2; when the point p m+1 is not collinear with p m , p m-1 , the point p m is the intersection of the straight line p m-1 p m and the straight line p m p m+1 , and is the first end point of the n-th edge of the convex polygon figure, the pixel coordinate of which is P n (U n ,V n ) = p m (u m ,v m ), and then returning to step 7).

3. The convex polygon parameter calculation method for pose monitoring and wire weaving monitoring according to claim 2, characterized in that The method for determining the number of edges of the convex polygon figure comprises the steps 20, 22, 26 and 28, wherein the step 20 is specifically that the convex polygon figure has n-1 vertices and n-1 edges, the pixel coordinates of the vertex P1 are P1(U1, V1)=P n (U n ,V n ), and the remaining vertices are P2, P3...P n-1 ; in the step 17, the points p1, p m-1 and p m are collinear, which indicates that the straight lines p1p2 and p m-1 p m have the common point p1; similarly, in the step 19, the points p m , p1 and p2 are collinear, which indicates that the straight lines p1p2 and p m-1 p m have the common point p m ; when the steps 17 and 19 are satisfied simultaneously, the straight lines p1p2 and p m-1 p m have two different common points p1 and p m , and the two straight lines must coincide; the first edge of the convex polygon figure is on the straight line p1p2, and the nth edge is on the straight line p m-1 p m ; when the straight lines p1p2 and p m-1 p m coincide, the first edge of the convex polygon figure coincides with the nth edge, so the convex polygon figure has n-1 edges and n-1 vertices, P n is the first vertex P1 of the convex polygon, the pixel coordinates of P1 are P1(U1, V1)=P n (U n ,V n ), and the remaining vertices are P2, P3...P n-1 ; The step 22) is specifically, no: convex polygon figure has n vertices and n edges, the pixel coordinates of vertex P1 is P1(U1, V1) = p1(u1, v1), the rest of the vertices are P2, P3…P n ; in the step 17), the points p1 and p m-1 , p m are collinear, indicating that the straight line p1p2 and p m-1 p m have a common point p1; in the step 21), the point p m is not collinear with p1, p2, indicating that the point p m is not the common point of the straight line p1p2 and p m-1 p m ; when the step 17) and the step 21) are satisfied at the same time, the straight line p1p2 and p m-1 p m only have one common point p1; the first edge of the convex polygon figure under study is on the straight line p1p2, and the n-th edge is on the straight line p m-1 p m ; when the straight line p1p2 and p m-1 p m only have one common point p1, the point p1 is the intersection of the first edge and the n-th edge of the convex polygon figure; therefore, the convex polygon figure has n edges and n vertices, the pixel coordinates of vertex P1 is P1(U1, V1) = p1(u1, v1), and the rest of the vertices are P2, P3…P n ; The step 26) is specifically: the convex polygon figure researched has n edges and n vertices, the pixel coordinates of the vertex P1 is P1(U1, V1) = p m (u m ,v m ), and the rest vertices are P2, P3... P n ; in the step 23), the points p1, p m-1 , and p m are not collinear, which indicates that the point p1 is not the common point of the straight lines p1p2 and p m-1 p m ; in the step 25), the points p m and p1, p2 are collinear, which indicates that the straight lines p1p2 and p m-1 p m have a common point p m ; when the step 23) and the step 25) are satisfied simultaneously, the straight lines p1p2 and p m-1 p m have only one common point p m ; the first edge of the convex polygon figure researched is on the straight line p1p2, and the n-th edge is on the straight line p m-1 p m ; when the straight lines p1p2 and p m- 1p m have only one common point p m , the point p m is the intersection point of the first edge and the n-th edge of the convex polygon figure; therefore, the convex polygon figure has n edges and n vertices, the pixel coordinates of the vertex P1 is P1(U1, V1) = p m (u m ,v m ), and the rest vertices are P2, P3... P n ; The step 28) is specifically: the convex polygonal pattern has n+1 vertices and n+1 edges, the pixel coordinates of the vertex P1 is P1(U1, V1) = p1(u1, v1), the pixel coordinates of the vertex P n+1 is P n+1 (U n+1 ,V n+1 ) = p m (u m ,v m ), and the rest of the vertices are P2, P3…P n . In the step 23), the points p1, p m-1 , and p m are not collinear, which indicates that the point p1 is not the common point of the straight lines p1p2 and p m-1 p m . Similarly, in the step 27), the points p m , p1, and p2 are not collinear, which indicates that the point p m is not the common point of the straight lines p1p2 and p m-1 p m . When the steps 23) and 27) are both satisfied, the straight lines p1p2 and p m-1 p m have no common point. The first edge of the convex polygonal pattern is on the straight line p1p2, and the n-th edge is on the straight line p m-1 p m . When the straight lines p1p2 and p m-1 p m have no common point, the first edge and the n-th edge of the convex polygonal pattern have no intersection point. The points p1 and p m are the first vertex P1 and the n+1-th vertex P n+1 of the convex polygonal pattern respectively, and the line segment between the point p1 and the point p m is the n+1-th edge of the convex polygonal pattern. Therefore, the convex polygonal pattern has n+1 edges and n+1 vertices, the pixel coordinates of the vertex P1 is P1(U1, V1) = p1(u1, v1), the pixel coordinates of the vertex P n+1 is P n+1 (U n+1 ,V n+1 ) = p m (u m ,v m ), and the rest of the vertices are P2, P3…P n .

4. The convex polygon parameter calculation method for pose monitoring and wire weaving monitoring according to claim 3, characterized in that: The step 29) is specifically: when the number of edges of the convex polygon figure is n-1, n and n+1, the pixel coordinates of each vertex in the steps 20), 22), 26 and 28) are converted into object coordinates respectively; according to the coordinate transformation relationship, the coordinates P J (U J ,V J ) of each vertex of the convex polygon figure in the pixel coordinate system are obtained J (x J ,y J ) x J = dx(U J - u0) (11) y J = dy(V J -v0) (12) In the formula, dx and dy are the lengths of unit pixels in the o0-u direction and the o0-v direction respectively, and u0 and v0 are the coordinates of the origin of the image coordinate system in the pixel coordinate system; Light propagates along straight lines, so the vertex P of the convex polygonal figure in the object coordinate system J (X J ,Y J ,Z J ) and the camera center O1, and the vertex P J (X J ,Y J ,Z J ) in the image coordinate system J (x J ,y J ) are located on the same straight line, and the coordinates satisfy where x o1 , y o1 are the coordinates of the image principal point in the image coordinate system, f is the principal distance of the camera, b1 = cos ω sin κ, b2 = cos ω cos κ, b3 = -sin ω, ω and κ are angles of rotation of the camera about the O1Y1, O1X1 and O1Z1 axes. The OX axis and the OY axis of the object coordinate system O-XYZ are located in the plane in which the convex polygonal figure to be monitored is located, so that Z J = 0; the coordinates of the vertex P J (X J ,Y J ,Z J ) of the convex polygonal figure in the O-XY coordinate system are obtained from equations (13) and (14) wherein A1 = a1f + a3(x J -x o1 ), A2 = a2f + a3(y J -y o1 ), B1 = b1f + b3(x J -x o1 ), B2 = b2f + b3(y J - y o1 ), C1 = A1X O + B1Y O + (c1f + c3(x J - x o1 ))Z O , C2 = A2X O + B2Y O + (c2f + c3(y J - y o1 ))Z O , Therefore, the coordinates of the vertices of the convex polygon figure in the object coordinate system are P J (X J ,Y J ,0).

5. The convex polygon parameter calculation method for pose monitoring and wire weaving monitoring according to claim 4, characterized in that: The step 30) is specifically: calculating the distance between adjacent vertices of the convex polygon figure in the object coordinate system to obtain the length of each side of the convex polygon figure; in the object coordinate system, the length of the side between vertex P J (X J ,Y J ,0) and vertex P J+1 (X J+1 ,Y J+1 ,0) is In the formula, J = 1, 2, …, K-1, and the value of K is n-1, n or n+1; In the object coordinate system, the length of the edge between the polygonal figure vertex P1 and the end point P K is 6. The convex polygon parameter calculation method for pose monitoring and wire weaving monitoring according to claim 5, characterized in that: Said step 31) is in particular: calculating in the object coordinate system the area of the triangle formed by the adjacent vertices of the convex polygon figure and a point P inside it C The coordinates of the point P C (X C ,Y C ,0) are In the object coordinate system, point P C is at a distance of J from each vertex P In the formula, J = 1, 2, …, K; Connection point P C The convex polygonal figure is divided into K triangles with each vertex of the convex polygonal figure, and P J P J+1 edges, where J = 1, 2, …, K-1, and the opposite angle is ΔP C P J P J+1 the area of ΔP C P1P K In this case, the angle subtended by the side P1P K is ΔP C P1P K the area of 7. The convex polygon parameter calculation method for pose monitoring and wire weaving monitoring according to claim 6, characterized by The method for calculating the perimeter and the area of the convex polygon comprises steps 32) and 33), wherein the step 32) is specifically: the lengths of the edges obtained in step 30) are accumulated, and the perimeter of the convex polygon is obtained; according to formulas (17) and (18), the perimeter of the convex polygon is The step 33) is specifically: the areas of the triangles obtained in step 31) are accumulated, and the area of the convex polygon is obtained; according to formulas (23) and (25), the area of the convex polygon is

Citation Information

Patent Citations

  • Mining heading machine pose monitoring system and monitoring method

    CN111780666A

  • Three-dimensional wound surface finite element expansion method for mapping skin material characteristics

    CN114880906A