A shape recovery method based on discrete point curvature and curve length

By dividing the curve into multiple arcs and performing translation connections of the coordinate system, the shortcomings of the shape recovery method based on discrete curvature in the prior art in terms of data processing volume and accuracy are solved, and efficient shape reconstruction and high-precision fitting effect are achieved.

CN115330904BActive Publication Date: 2025-06-06CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210947902.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2025-06-06
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

The existing shape recovery method based on discrete curvature has shortcomings in data processing volume and accuracy, resulting in long run time and low reconstruction accuracy.

Method used

A method based on the curvature of discrete points and the length of the curve is used to divide the curve into multiple arcs, and a coordinate system is established and translated based on the recursion method to connect the arcs to restore the curve shape.

Benefits of technology

It reduces data processing volume, improves work efficiency, simplifies the morphological reduction algorithm, and improves the fitting accuracy, and is suitable for high-precision applications in shape detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115330904B_ABST
    Figure CN115330904B_ABST
Patent Text Reader

Abstract

The present invention provides a shape recovery method based on the curvature of discrete points and the length of a curve, including calculating the arc radius and the center angle of the arc between the two adjacent discrete points according to the curvature of the two adjacent discrete points and the length of the curve between the two adjacent discrete points for each two adjacent discrete points; making a tangent through one end point of the arc for each two adjacent discrete points, taking the tangent direction as the x-axis, taking the radius direction through the end point as the y-axis, and establishing the coordinate system of the arc; obtaining the parametric equation of the arc in its coordinate system according to the arc radius and the center angle of the arc; selecting any one of all coordinate systems as a fixed coordinate system, taking other coordinate systems as translation coordinate systems, and translating the parametric equations of the arcs in each translation coordinate system to the fixed coordinate system; connecting each arc in the fixed coordinate system in sequence, and restoring the curve shape in the fixed coordinate system. The present invention has small data processing volume and high accuracy and precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer graphics, and in particular relates to a shape recovery method based on discrete point curvature and curve length. Background Art

[0002] In recent years, the restoration of curve and surface morphology has received great attention. It can be applied to the shape restoration of endoscopes in the medical field and the shape perception of flexible materials in the aerospace field. Obtaining the shape parameters of materials can control their state of motion, enhance safety and improve work efficiency. There are many methods for shape perception, and fiber Bragg grating sensors are small in size, light in weight, not subject to electromagnetic interference, and can be used for long-distance multi-point measurement, becoming an important means of shape perception. Fiber Bragg gratings obtain curvature information, so using discrete curvature data to restore the shape is a key technical part of shape perception.

[0003] The commonly used discrete curvature shape restoration methods include bilinear interpolation, curvature integral method, recursion method, etc., among which the recursion method is the most used. The recursion method first interpolates on the basis of certain curvature data to make the discrete curvature continuous. Then, the relative position between each two points is obtained by combining the geometric relationship between the curve curvature and arc length, and then connected with a straight line to reconstruct the curved straight line.

[0004] The use of different interpolation methods and curve fitting methods has an impact on the accuracy of shape restoration. Commonly used interpolation methods include linear interpolation, quadratic interpolation, Hermite interpolation, etc.

[0005] Linear interpolation is the simplest interpolation method, which means that the curvature between two curvature points is in a linear relationship.

[0006] Quadratic interpolation means that the curvature between two curvature points is a quadratic function.

[0007] Hermite interpolation requires not only that the function values ​​at the nodes are equal, but also that the derivative values ​​at the nodes are equal. The more common one is two-point cubic interpolation, that is, given two interpolation nodes, function values, and the derivative value of a point.

[0008] All the methods proposed so far use the step of curvature interpolation, which makes the discrete curvature continuous. This results in a large increase in curvature data, a significant increase in algorithm running time, and data processing becomes very troublesome, affecting work efficiency. Moreover, many of the data are based on assumptions, and the interpolation methods are different, so the accuracy of the data cannot be determined. There is also a lot of redundant data, which is not very useful. Connecting two points with a straight line increases the error. This method collects a large amount of data, requires a large amount of calculation, is complex to process, has low collection accuracy, and has low reconstruction accuracy. Summary of the invention

[0009] The present invention provides a shape recovery method based on discrete point curvature and curve length to solve the problems of excessive data processing volume, low accuracy and reconstruction precision when performing shape reconstruction based on discrete curvature.

[0010] According to a first aspect of an embodiment of the present invention, a shape recovery method based on discrete point curvature and curve length is provided, comprising:

[0011] Step S110, obtaining the curvature of the discrete points and the length of the curve between each adjacent discrete point;

[0012] Step S120: for every two adjacent discrete points, according to the curvature of the two adjacent discrete points and the length of the curve between the two adjacent discrete points, calculate the arc radius and the center angle of the arc between the two adjacent discrete points;

[0013] Step S130: for each arc between two adjacent discrete points, a tangent is drawn through one end point of the arc, the direction of the tangent is taken as the x-axis, the direction of the radius passing through the end point is taken as the y-axis, and a coordinate system of the arc is established; and a parametric equation of the arc in its coordinate system is obtained according to the arc radius and the center angle of the arc;

[0014] Step S140: selecting any one of the coordinate systems of the arcs as a fixed coordinate system, taking the coordinate system of each arc except the fixed coordinate system as a translation coordinate system, and translating the parametric equations of the arcs in each translation coordinate system to the fixed coordinate system according to the rotation matrix between each translation coordinate system and the fixed coordinate system;

[0015] Step S150: connect the arcs in the fixed coordinate system in sequence to restore the curve shape in the fixed coordinate system.

[0016] In an optional implementation, in step S120, for each two adjacent discrete points, the arc radius R between the two adjacent discrete points is calculated according to the following formula: i and the central angle θ i :

[0017]

[0018] where k i represents the curvature of one of two adjacent discrete points, k i+1 represents the curvature of another discrete point among two adjacent discrete points, l i Represents the length of the curve between two adjacent discrete points.

[0019] In another optional implementation, step S130 includes: for each arc between two adjacent discrete points, taking the first discrete point in the clockwise or counterclockwise direction of the arc as one of the endpoints of the arc, making a tangent through the first discrete point, and correspondingly taking the clockwise or counterclockwise direction of the tangent as the x-axis, and the radial direction passing through the first discrete point as the y-axis, to establish a coordinate system for the arc.

[0020] In another optional implementation, when the first discrete point in the clockwise or counterclockwise direction of the arc is taken as an end point of the arc, the i-th discrete point P from front to back or from back to front is correspondingly i and the i+1th discrete point P i+1 The arc between is taken as the i-th arc, and the coordinate system of the i-th arc is x i -y i , i is an integer greater than 0 and when i is used as the number of discrete points, it is less than or equal to the total number of discrete points; when i is used as the number of arcs and coordinate systems, it is less than or equal to the total number of arcs or coordinate systems;

[0021] In the step S130, obtaining the parametric equation of the arc in its coordinate system according to the arc radius and the center angle of the arc includes: obtaining the parametric equation of the i-th arc in its coordinate system x according to the following formula: i -y i The parametric equation is:

[0022]

[0023] in and Respectively represent the i-th arc in the coordinate system x i -y i The abscissa and ordinate in the coordinate system are shown in Table 1. The superscript i indicates the coordinate system number, the subscript i indicates the arc number, and R i represents the radius of the i-th arc, θ i Represents the center angle of the i-th arc.

[0024] In another optional implementation, in the coordinate system x i -y i In the example, one end point P of the arc i The coordinates of the circle are (0, 0), and the coordinates of the center of the circle are (0, R i ).

[0025] In another optional implementation, after step S110 and before step S120, the method further performs the following steps:

[0026] For each discrete point, determine whether the curvature of the discrete point is 0. If so, the discrete point is the i-th discrete point P from front to back or from back to front. i When, according to the i-th discrete point P i The i+1th discrete point P adjacent to it i+1 The length of the curve between i , according to the following formula, we can get the corresponding i-th arc in its coordinate system x i -y i The parametric equation is:

[0027]

[0028] in and Indicates the i-th arc in the coordinate system x i -y i The horizontal and vertical coordinates in ;

[0029] Otherwise, execute step S120.

[0030] In another optional implementation, the arc between the ith discrete point and the (i+1)th discrete point from front to back or from back to front is the ith arc, and the coordinate system of the ith arc is x i -y i , i is an integer greater than 0 and when i is used as the serial number of discrete points, it is less than or equal to the total number of discrete points; when i is used as the serial number of arcs and coordinate systems, it is less than or equal to the total number of arcs or coordinate systems;

[0031] The step S140 includes:

[0032] Step S141, select the coordinate system x in the coordinate system of each arc n -y n is a fixed coordinate system, n is an integer greater than zero and less than or equal to the total number of coordinate systems;

[0033] Step S142: Remove the fixed coordinate system x n -y n The coordinate system of each arc outside is used as the translation coordinate system; for each translation coordinate system x i -y i , i is not equal to n, first determine the translation coordinate system x i -y i The corresponding arc is located in the fixed coordinate system x n -y n Before or after the corresponding arc:

[0034] If it is located in the fixed coordinate system x n -y nBefore the corresponding arc, the rotation matrix between the translation coordinate system and the fixed coordinate system is determined to be a clockwise rotation matrix:

[0035]

[0036] If it is located in the fixed coordinate system x n -y n After the corresponding arc, the rotation matrix between the translation coordinate system and the fixed coordinate system is determined to be a counterclockwise rotation matrix:

[0037]

[0038] Where α is the rotation angle. For a clockwise rotation matrix, the rotation angle α is equal to the sum of the center angles of each arc from the i-th arc to the n-th arc in sequence; for a counterclockwise rotation matrix, the rotation angle α is equal to the sum of the center angles of each arc from the i-1-th arc to the n-th arc in sequence; for the center angle of each arc in the sum, when the concavity of the arc is the same as the concavity of the n-th arc, the center angle of the arc is positive; when the convexity of the arc is different from the concavity of the n-th arc, the center angle of the arc is negative;

[0039] Step S144: for each translation coordinate system, translate the parametric equation of the arc in the translation coordinate system to the fixed coordinate system according to the following formula:

[0040]

[0041] in and Respectively represent the i-th arc in the fixed coordinate system x n -y n The horizontal and vertical coordinates are and Respectively represent the i-th arc in the coordinate system x i -y i The horizontal and vertical coordinates in and They respectively represent the horizontal coordinate and vertical coordinate of the end point of the (i-1)th arc close to the (i-1)th arc in the (n)th coordinate system.

[0042] In another optional implementation, after step S150, the method further includes:

[0043] Step S160: Determine the fixed coordinate system x n -y n The angle β between the x-axis and the horizontal x-axis in the rectangular coordinate system is n -y n The rotation matrix Q between the rectangular coordinate system 0, the fixed coordinate system x is converted into n -y n The following curve shape is translated into the rectangular coordinate system:

[0044]

[0045] in, and They represent the abscissa and ordinate of the curve shape in the rectangular coordinate system respectively; and Respectively represent the curve shape in the fixed coordinate system x n -y n The horizontal and vertical coordinates below;

[0046] When the positive direction of the horizontal x-axis in the rectangular coordinate system is located at the fixed coordinate system x n -y n When the x-axis is in the counterclockwise direction, the rotation matrix Q 0 For counterclockwise rotation matrix:

[0047]

[0048] When the positive direction of the horizontal x-axis in the rectangular coordinate system is located in the clockwise direction of the x-axis in the nth coordinate system, the rotation matrix Q 0 For clockwise rotation matrix:

[0049]

[0050] In another optional implementation, the step S110 includes: obtaining the curvature of discrete points on a linear sensor and the length of a curve between each adjacent discrete point, and the linear sensor is a fiber Bragg grating.

[0051] In another optional implementation, a surface connection method is used to restore the surface based on the reconstruction of multiple curves.

[0052] The beneficial effects of the present invention are:

[0053] 1. In the process of restoring the shape based on discrete curvature, the present invention deletes the commonly used step of interpolating discrete curvature to make discrete curvature continuous, directly uses the collected discrete curvature to divide the curve into multiple arcs, establishes a coordinate system for each arc based on the recursive method, translates the arcs in different coordinate systems to the same coordinate system, and connects the arcs in the same coordinate system, that is, the present invention fits the curve into arcs for connection instead of connecting discrete points in the existing way, thus avoiding a large amount of inaccurate discrete curvature data introduced in the interpolation process, so the shape reconstruction method of the present invention greatly reduces the amount of data processing, improves the original disadvantage of long running time, improves work efficiency, simplifies the commonly used morphological restoration algorithm, and can also greatly reduce the amount of collected data; the present invention also has high fitting accuracy and has a high application prospect in shape detection;

[0054] 2. After restoring the curve shape in the fixed coordinate system, the present invention also translates the curve shape from the fixed coordinate system to the rectangular coordinate system, so that it is convenient to compare different curves, and it is convenient to use the surface connection method based on the reconstruction of multiple curves to restore the surface. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 is a flow chart of an embodiment of a shape recovery method based on discrete point curvature and curve length of the present invention;

[0056] Figure 2 It is a shape reconstruction diagram of an embodiment of the shape recovery method based on discrete point curvature and curve length of the present invention;

[0057] Figure 3 It is a shape reconstruction diagram of another embodiment of the shape recovery method based on discrete point curvature and curve length of the present invention;

[0058] Figure 4 This is a simulation result diagram of shape reconstruction of the present invention;

[0059] Figure 5 This is a simulation result diagram of shape reconstruction using the proposed algorithm;

[0060] Figure 6 is another simulation result diagram of shape reconstruction of the present invention;

[0061] Figure 7 is another simulation result diagram of shape reconstruction using the proposed algorithm. DETAILED DESCRIPTION

[0062] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention and to make the above-mentioned purposes, features and advantages of the embodiments of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings.

[0063] In the description of the present invention, unless otherwise specified and limited, it should be noted that the term "connection" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two elements. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0064] See also Figure 1 , is a flow chart of an embodiment of the shape recovery method based on discrete point curvature and curve length of the present invention. The method may include the following steps:

[0065] Step S110: Obtain the curvature of the discrete points and the length of the curve between each adjacent discrete point.

[0066] In this step, a linear sensor can be used to sense the shape, and the curvature of the discrete points on the linear sensor and the length of the curve between each adjacent discrete point can be obtained. The linear sensor can be a fiber Bragg grating. The curvature of the discrete points on the linear sensor and the length of the curve between each adjacent discrete point are easy to obtain, and are mature technologies, which will not be described in detail here.

[0067] Step S120: For every two adjacent discrete points, the arc radius and the center angle of the arc between the two adjacent discrete points are calculated according to the curvature of the two adjacent discrete points and the length of the curve between the two adjacent discrete points.

[0068] In this step, the present invention can calculate the arc radius R of the arc between the two adjacent discrete points according to the following formula based on the geometric relationship between the curvature, the curve length, the arc radius and the center angle for each two adjacent discrete points: i and the central angle θ i :

[0069]

[0070] where k i represents the curvature of one of two adjacent discrete points, k i+1 represents the curvature of another discrete point among two adjacent discrete points, l i represents the length of the curve between two adjacent discrete points, i can be an integer greater than 0, k i and k i+1 It can represent the curvature of the i-th discrete point and the i+1-th discrete point from front to back or from back to front, respectively. iIt represents the length of the curve between the i-th discrete point and the i+1-th discrete point. The arc between the i-th discrete point and the i+1-th discrete point is the i-th arc. When i is used as the discrete point number, it is less than or equal to the total number of discrete points; when i is used as the arc number, it is less than or equal to the total number of arcs.

[0071] Step S130, for each arc between two adjacent discrete points, draw a tangent through one end point of the arc, use the tangent direction as the x-axis, and the radius direction through the end point as the y-axis to establish the coordinate system of the arc; based on the arc radius and center angle of the arc, obtain the parametric equation of the arc in its coordinate system.

[0072] In this step, step S130 may specifically include: for each arc between two adjacent discrete points, the first discrete point of the arc in the clockwise or counterclockwise direction is used as an end point of the arc, a tangent line passing through the first discrete point is drawn, the clockwise or counterclockwise direction of the tangent line is used as the x-axis, and the radial direction passing through the first discrete point is used as the y-axis to establish the coordinate system of the arc. Figure 2 As shown, for the i-th discrete point P from front to back i and the i+1th discrete point P i+1 The i-th arc between the two is used to establish its corresponding coordinate system x i -y i When , firstly, the first discrete point P in the clockwise direction of the i-th arc is i As one end point of the arc, make a i The tangent line points clockwise as the x-axis x i , will pass through the first discrete point P i The radial direction is the y-axis i .

[0073] In this step, when the first discrete point in the clockwise or counterclockwise direction of the arc is taken as an end point of the arc, the i-th discrete point P from front to back or from back to front is correspondingly i and the i+1th discrete point P i+1 The arc between is taken as the i-th arc, and the coordinate system of the i-th arc is x i -y i , i is an integer greater than 0, i is an integer greater than 0 and when i is used as a discrete point number, it is less than or equal to the total number of discrete points, and when i is used as a circular arc and a coordinate system number, it is less than or equal to the total number of circular arcs or coordinate systems. In the step S130, obtaining the parametric equation of the circular arc in its coordinate system according to the circular arc radius and the central angle of the circular arc may include: obtaining the parametric equation of the i-th circular arc in its coordinate system x according to the following formula i -yi The parametric equation is:

[0074]

[0075] in and Respectively represent the i-th arc in the coordinate system x i -y i The abscissa and ordinate in the coordinate system are shown in Table 1. The superscript i indicates the coordinate system number, the subscript i indicates the arc number, and R i represents the radius of the i-th arc, θ i represents the central angle of the i-th arc. i -y i In the example, one end point P of the arc i The coordinates of the circle are (0, 0), and the coordinates of the center of the circle are (0, R i ).

[0076] In addition, there may be a discrete point with a curvature of 0 among the discrete points. If the length of the curve between the discrete point and its adjacent discrete point is known, the arc between the two discrete points can be regarded as a straight line. Therefore, after step S110 and before step S120, the method further performs the following steps: for each discrete point, determine whether the curvature of the discrete point is 0. If so, then the discrete point P from the front to the back or from the back to the front is the i-th discrete point P. i When, according to the i-th discrete point P i The i+1th discrete point P adjacent to it i+1 The length of the curve between i , according to the following formula, the corresponding i-th arc in its coordinate system x is obtained i -y i The parametric equation is:

[0077]

[0078] in and Indicates the i-th arc in the coordinate system x i -y i The horizontal and vertical coordinates in ;

[0079] Otherwise, execute step S120.

[0080] Step S140, select any one of the coordinate systems of each arc as a fixed coordinate system, and use the coordinate system of each arc except the fixed coordinate system as a translation coordinate system, and translate the parametric equations of the arc in each translation coordinate system to the fixed coordinate system according to the rotation matrix between each translation coordinate system and the fixed coordinate system.

[0081] In this step, similarly, the arc between the ith discrete point and the i+1th discrete point from front to back or from back to front is set as the ith arc, and the coordinate system of the ith arc is x i -y i , i is an integer greater than 0 and when i is used as the serial number of discrete points, it is less than or equal to the total number of discrete points; when i is used as the serial number of arcs and coordinate systems, it is less than or equal to the total number of arcs or coordinate systems;

[0082] The step S140 may specifically include:

[0083] Step S141, select the coordinate system x in the coordinate system of each arc n -y n is a fixed coordinate system, and n is an integer greater than zero and less than or equal to the total number of coordinate systems.

[0084] Step S142: Remove the fixed coordinate system x n -y n The coordinate system of each arc outside is used as the translation coordinate system; for each translation coordinate system x i -y i , i is not equal to n, first determine the translation coordinate system x i -y i The corresponding arc is located in the fixed coordinate system x n -y n Before or after the corresponding arc: If it is located in the fixed coordinate system x n -y n Before the corresponding arc, the rotation matrix between the translation coordinate system and the fixed coordinate system is determined to be a clockwise rotation matrix:

[0085] If it is located in the fixed coordinate system x n -y n After the corresponding arc, the rotation matrix between the translation coordinate system and the fixed coordinate system is determined to be a counterclockwise rotation matrix:

[0086] Wherein α is the rotation angle. For a clockwise rotation matrix, the rotation angle α is equal to the sum of the center angles of each arc from the i-th arc to the n-th arc in sequence; for a counterclockwise rotation matrix, the rotation angle α is equal to the sum of the center angles of each arc from the i-1-th arc to the n-th arc in sequence; for the center angle of each arc in the sum, when the concavity of the arc is the same as the concavity of the n-th arc, the center angle of the arc is positive; when the convexity of the arc is different from the concavity of the n-th arc, the center angle of the arc is negative.

[0087] In step S143, since the coordinate system corresponding to the arc takes the tangent of one end point of the arc as the x-axis and the radial direction passing through the end point of the arc as the y-axis, the rotation direction of the coordinate system is from the x-axis to the y-axis. n -y n When the corresponding arc endpoint is the nth discrete point, the coordinate system constructed before the nth discrete point rotates clockwise, and the coordinate system constructed after the nth discrete point rotates counterclockwise. Similarly, the rotation direction of rotating the translation coordinate system to the fixed coordinate system can also be determined based on the positional relationship between the corresponding arc of the translation coordinate system and the corresponding arc of the fixed coordinate system.

[0088] Step S144: for each translation coordinate system, translate the parametric equation of the arc in the translation coordinate system to the fixed coordinate system according to the following formula:

[0089]

[0090] and Respectively represent the i-th arc in the fixed coordinate system x n -y n The horizontal and vertical coordinates are and Respectively represent the i-th arc in the coordinate system x i -y i The horizontal and vertical coordinates in and They respectively represent the horizontal coordinate and vertical coordinate of the end point of the (i-1)th arc close to the (i-1)th arc in the (n)th coordinate system.

[0091] For example, Figure 2 As shown, when the coordinate system x is selected i -y i When the coordinate system is fixed, the arc corresponding to the i-1th discrete point (i.e. the translation coordinate system x i-1 -y i-1 The corresponding arc) is located at the arc corresponding to the i-th discrete point (that is, the fixed coordinate system x i -y i The corresponding arc) and the concavity and convexity of the two are the same, so the translation coordinate system x i-1 -y i-1 With fixed coordinate system x i -y i The rotation matrix between is a clockwise rotation matrix, and the rotation angle α is equal to the center angle θ of the i-1th arc i-1 And is positive. Since the arc corresponding to the i+1th discrete point (i.e. the translation coordinate system x i+1 -y i+1 The corresponding arc) is located at the arc corresponding to the i-th discrete point (that is, the fixed coordinate system xi -y i After the corresponding arc) and the concavity and convexity of the two are the same, the coordinate system x is translated i+1 -y i+1 With fixed coordinate system x i -y i The rotation matrix between is the inverse rotation matrix, and the rotation angle α is equal to the center angle θ of the i-th arc i And it is positive.

[0092] Another example Figure 3 As shown, when the coordinate system x is selected 1 -y 1 When the coordinate system is fixed, the arc corresponding to the second discrete point (i.e. the translation coordinate system x 2 -y 2 The arc corresponding to the first discrete point (i.e., the fixed coordinate system x 1 -y 1 After the corresponding arc) and the concavity and convexity of the two are the same, the coordinate system x is translated 2 -y 2 With fixed coordinate system x 1 -y 1 The rotation matrix between is a counterclockwise rotation matrix, and the rotation angle α is equal to the center angle θ of the first arc. 1 , the central angle is positive. Since the arc corresponding to the third discrete point (i.e. the translation coordinate system x 3 -y 3 The arc corresponding to the first discrete point (i.e., the fixed coordinate system x 1 -y 1 After the corresponding arc) and the concavity and convexity of the two are the same, the coordinate system x is translated 3 -y 3 With fixed coordinate system x 1 -y 1 The rotation matrix between is a counterclockwise rotation matrix, and the rotation angle α is equal to the center angle θ of the first arc. 1 The angle θ between the center of the second arc 2 The sum of the two central angles is positive. Since the arc corresponding to the fourth discrete point (i.e. the translation coordinate system x 4 -y 4 The arc corresponding to the first discrete point (i.e., the fixed coordinate system x 1 -y 1 The first and second arcs have the same concavity and convexity, and the third arc has different concavity and convexity, so the translation coordinate system x 4 -y 4 With fixed coordinate system x 1 -y 1The rotation matrix between is a counterclockwise rotation matrix, and the rotation angle α is equal to the center angle θ of the first arc. 1 、The center angle of the second arc θ 2 and the central angle θ of the third arc 3 The sum of the central angle θ 1 、Central angle θ 2 is positive, the central angle θ 3 is negative.

[0093] Step S150: connect the arcs in the fixed coordinate system in sequence to restore the curve shape in the fixed coordinate system. In particular, a surface connection method can be used based on the reconstruction of multiple curves to restore the surface.

[0094] After step S150, the method further includes:

[0095] Step S160: Determine the fixed coordinate system x n -y n The angle β between the x-axis and the horizontal x-axis in the rectangular coordinate system is n -y n The rotation matrix Q between the rectangular coordinate system 0 , the fixed coordinate system x is converted into n -y n The following curve shape is translated into the rectangular coordinate system:

[0096]

[0097] in, and They represent the abscissa and ordinate of the curve shape in the rectangular coordinate system respectively; and Respectively represent the curve shape in the fixed coordinate system x n -y n The horizontal and vertical coordinates below;

[0098] When the positive direction of the horizontal x-axis in the rectangular coordinate system is located at the fixed coordinate system x n -y n When the x-axis is in the counterclockwise direction, the rotation matrix Q 0 For counterclockwise rotation matrix:

[0099]

[0100] When the positive direction of the horizontal x-axis in the rectangular coordinate system is located in the clockwise direction of the x-axis in the nth coordinate system, the rotation matrix Q 0 For clockwise rotation matrix:

[0101]

[0102] After restoring the curve shape in the fixed coordinate system, the present invention also translates the curve shape from the fixed coordinate system to the rectangular coordinate system, which makes it convenient to compare different curves and to use the surface connection method based on the reconstruction of multiple curves to restore the surface.

[0103] It can be seen from the above embodiments that, in the process of restoring the shape based on discrete curvature, the present invention deletes the commonly used step of interpolating discrete curvature to make discrete curvature continuous, directly uses the collected discrete curvature to divide the curve into multiple arcs, establishes a coordinate system for each arc based on the recursive method, translates the arcs in different coordinate systems to the same coordinate system, and connects the arcs in the same coordinate system, that is, the present invention fits the curve into arcs for connection instead of connecting discrete points in the existing way, thus avoiding a large amount of inaccurate discrete curvature data introduced in the interpolation process. Therefore, the shape reconstruction method of the present invention greatly reduces the amount of data processing, improves the original disadvantage of long running time, improves work efficiency, simplifies the commonly used morphological restoration algorithm, and can also greatly reduce the amount of collected data; the present invention also has high fitting accuracy and has a high application prospect in shape detection.

[0104] In the actual experiment, the curvature data and the length of the curve can be obtained by measurement. To use this algorithm for MATLAB simulation, first preset some curves, select corresponding points, get the curvature data and the length of the curve, and then use the above algorithm to restore the shape. Compare the restored shape with the preset curve to obtain the accuracy and running time of the shape reconstruction algorithm.

[0105] First, the inverse proportional function Simulate. Take x = [2, 3], select six evenly distributed points in this interval, calculate the slope of the point and the length of the curve between each two points. Based on the obtained six-point curvature and five-segment curve length, reconstruct the curve according to the above shape reconstruction algorithm. The result is as follows Figure 4 Then the proposed algorithm is used for simulation, and the results are shown in Figure 5 As shown. Figure 4 and Figure 5 It can be seen from the figure that the simulation effect of the present invention is better.

[0106] Table 1 Comparison of errors between the two algorithms

[0107] algorithm Root mean square error Mean relative error The proposed algorithm <![CDATA[2.6265×10 -5 ]]> 0.0024 Proposed algorithm <![CDATA[1.6195×10 -4 ]]> 0.0092

[0108] Then for the square function y=x 2 For simulation, take x = [0, 0.5], and also take six evenly distributed points in this interval, and calculate the slope of the point and the length of the curve between every two points. The final result is as follows Figure 6 Then the proposed algorithm is used for simulation, and the results are shown in Figure 7 As shown. Figure 6 and Figure 7 It can be seen from the figure that the simulation effect of the present invention is better.

[0109] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0110] It will be appreciated that the invention is not limited to the precise construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from its scope. The scope of the invention is governed solely by the appended claims.

Claims

1. A shape recovery method based on discrete point curvature and curve length, It is characterized in that include: Step S110, obtaining the curvature of the discrete points and the length of the curve between each adjacent discrete point; The step S110 includes: using a linear sensor to sense the shape, obtaining the curvature of discrete points on the linear sensor and the length of the curve between each adjacent discrete point, wherein the linear sensor is a fiber Bragg grating; Step S120: for every two adjacent discrete points, according to the curvature of the two adjacent discrete points and the length of the curve between the two adjacent discrete points, calculate the arc radius and the center angle of the arc between the two adjacent discrete points; Step S130: for each arc between two adjacent discrete points, a tangent is drawn through one end point of the arc, the direction of the tangent is taken as the x-axis, the direction of the radius passing through the end point is taken as the y-axis, and a coordinate system of the arc is established; and a parametric equation of the arc in its coordinate system is obtained according to the arc radius and the center angle of the arc; Step S140: selecting any one of the coordinate systems of the arcs as a fixed coordinate system, taking the coordinate system of each arc except the fixed coordinate system as a translation coordinate system, and translating the parametric equations of the arcs in each translation coordinate system to the fixed coordinate system according to the rotation matrix between each translation coordinate system and the fixed coordinate system; Step S150: connect the arcs in the fixed coordinate system in sequence to restore the curve shape in the fixed coordinate system.

2. The shape recovery method based on discrete point curvature and curve length according to claim 1, It is characterized in that In step S120, for each two adjacent discrete points, the arc radius R between the two adjacent discrete points is calculated according to the following formula: i and the central angle θ i : where k i represents the curvature of one of two adjacent discrete points, k i+1 represents the curvature of another discrete point among two adjacent discrete points, l i Represents the length of the curve between two adjacent discrete points.

3. The shape recovery method based on discrete point curvature and curve length according to claim 1, It is characterized in that The step S130 includes: for each arc between two adjacent discrete points, taking the first discrete point of the arc in the clockwise or counterclockwise direction as an end point of the arc, making a tangent through the first discrete point, and correspondingly taking the clockwise or counterclockwise direction of the tangent as the x-axis, and taking the radial direction through the first discrete point as the y-axis, to establish a coordinate system for the arc.

4. The shape recovery method based on discrete point curvature and curve length according to claim 3, It is characterized in that Assume that when the first discrete point in the clockwise or counterclockwise direction of the arc is taken as one end point of the arc, the i-th discrete point P from front to back or from back to front is correspondingly i and the i+1th discrete point P i+1 The arc between is taken as the i-th arc, and the coordinate system of the i-th arc is x i -y i , i is an integer greater than 0 and when i is used as the number of discrete points, it is less than or equal to the total number of discrete points; when i is used as the number of arcs and coordinate systems, it is less than or equal to the total number of arcs or coordinate systems; In the step S130, obtaining the parametric equation of the arc in its coordinate system according to the arc radius and the center angle of the arc includes: obtaining the parametric equation of the i-th arc in its coordinate system x according to the following formula: i -y i The parametric equation is: in and Respectively represent the i-th arc in the coordinate system x i -y i The abscissa and ordinate in the coordinate system are shown in Table 1. The superscript i indicates the coordinate system number, the subscript i indicates the arc number, and R i represents the radius of the i-th arc, θ i Represents the center angle of the i-th arc.

5. The shape recovery method based on discrete point curvature and curve length according to claim 4, It is characterized in that In this coordinate system x i -y i In the example, one end point P of the arc i The coordinates of the circle are (0, 0), and the coordinates of the center of the circle are (0, R i ).

6. The shape recovery method based on discrete point curvature and curve length according to claim 5, It is characterized in that After step S110 and before step S120, the method further performs the following steps: For each discrete point, determine whether the curvature of the discrete point is 0. If so, the discrete point is the i-th discrete point P from front to back or from back to front. i When, according to the i-th discrete point P i The i+1th discrete point P adjacent to it i+1 The length of the curve between i , according to the following formula, we can get the corresponding i-th arc in its coordinate system x i -y i The parametric equation is: in and Indicates the i-th arc in the coordinate system x i -y i The horizontal and vertical coordinates in ; Otherwise, execute step S120.

7. The shape recovery method based on discrete point curvature and curve length according to claim 1, It is characterized in that Let the arc between the ith discrete point and the i+1th discrete point from front to back or from back to front be the ith arc, and the coordinate system of the ith arc is x i -y i , i is an integer greater than 0 and when i is used as the serial number of discrete points, it is less than or equal to the total number of discrete points; when i is used as the serial number of arcs and coordinate systems, it is less than or equal to the total number of arcs or coordinate systems; The step S140 includes: Step S141, select the coordinate system x in the coordinate system of each arc n -y n is a fixed coordinate system, n is an integer greater than zero and less than or equal to the total number of coordinate systems; Step S142: Remove the fixed coordinate system x n -y n The coordinate system of each arc outside is used as the translation coordinate system; for each translation coordinate system x i -y i , i is not equal to n, first determine the translation coordinate system x i -y i The corresponding arc is located in the fixed coordinate system x n -y n Before or after the corresponding arc: If it is located in the fixed coordinate system x n -y n Before the corresponding arc, the rotation matrix between the translation coordinate system and the fixed coordinate system is determined to be a clockwise rotation matrix: If it is located in the fixed coordinate system x n -y n After the corresponding arc, the rotation matrix between the translation coordinate system and the fixed coordinate system is determined to be a counterclockwise rotation matrix: Where α is the rotation angle. For a clockwise rotation matrix, the rotation angle α is equal to the sum of the center angles of each arc from the i-th arc to the n-th arc in sequence; for a counterclockwise rotation matrix, the rotation angle α is equal to the sum of the center angles of each arc from the i-1-th arc to the n-th arc in sequence; for the center angle of each arc in the sum, when the concavity of the arc is the same as the concavity of the n-th arc, the center angle of the arc is positive; when the convexity of the arc is different from the concavity of the n-th arc, the center angle of the arc is negative; Step S144: for each translation coordinate system, translate the parametric equation of the arc in the translation coordinate system to the fixed coordinate system according to the following formula: in and Respectively represent the i-th arc in the fixed coordinate system x n -y n The horizontal and vertical coordinates are and Respectively represent the i-th arc in the coordinate system x i -y i The horizontal and vertical coordinates in and They respectively represent the horizontal coordinate and vertical coordinate of the end point of the (i-1)th arc close to the (i-1)th arc in the (n)th coordinate system.

8. The shape recovery method based on discrete point curvature and curve length according to claim 1, It is characterized in that After step S150, the method further includes: Step S160: Determine the fixed coordinate system x n -y n The angle β between the x-axis and the horizontal x-axis in the rectangular coordinate system is n -y n The rotation matrix Q between the rectangular coordinate system 0 , the fixed coordinate system x is converted into n -y n The following curve shape is translated into the rectangular coordinate system: in, and They represent the abscissa and ordinate of the curve shape in the rectangular coordinate system respectively; and Respectively represent the curve shape in the fixed coordinate system x n -y n The horizontal and vertical coordinates below; When the positive direction of the horizontal x-axis in the rectangular coordinate system is located at the fixed coordinate system x n -y n When the x-axis is in the counterclockwise direction, the rotation matrix Q 0 For counterclockwise rotation matrix: When the positive direction of the horizontal x-axis in the rectangular coordinate system is located in the clockwise direction of the x-axis in the nth coordinate system, the rotation matrix Q 0 For clockwise rotation matrix:

9. The shape recovery method based on discrete point curvature and curve length according to claim 8, It is characterized in that The surface is restored by using the surface connection method based on the reconstruction of multiple curves.