Method and device for identifying central axis of cylindrical surface based on local measurement data

By randomly selecting initial fitting points in local measurement data, calculating the axis offset vector and iteratively fitting the straight line equations of the cylindrical surface and the central axis, and combining the nonlinear least squares method to optimize the radius, the computational difficulty and low precision of the central axis identification of the cylindrical surface under local measurement data are solved, and higher precision identification is achieved.

CN116721147BActive Publication Date: 2025-09-16XIAN THERMAL POWER RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310713796.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2025-09-16
Estimated Expiration
2043-06-15

AI Technical Summary

Technical Problem

The existing technology has great computational difficulty and low recognition accuracy when using local measurement data to identify the center axis of a cylindrical surface. In particular, when the circumferential angle range of the cylindrical measurement data is small or the axial length range is small, the fitting accuracy is affected, resulting in great difficulty and low accuracy in identifying the center axis.

Method used

By obtaining the original point cloud of local measurement data, randomly selecting initial fitting points to fit the cylindrical surface and straight line equations, calculating the axis offset vector, using the axis offset vector to update the central axis straight line direction vector, iteratively fitting the cylindrical surface and central axis straight line equations, and combining the nonlinear least squares method to optimize the cylinder radius, reducing the amount of calculation and improving the fitting accuracy.

Benefits of technology

The calculation amount in the case of large data volume is reduced, the fitting accuracy of local measurement data is improved, the difficulty of identifying the optimal central axis is reduced, and higher-precision central axis identification of the cylindrical surface is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116721147B_ABST
    Figure CN116721147B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of reverse engineering technology, and discloses a method and device for identifying the central axis of a cylindrical surface based on local measurement data. The method comprises the following steps: obtaining original point cloud data of local measurement of the cylindrical surface to obtain point cloud data to be processed; randomly selecting two initial fitting points to fit the cylindrical surface equation and the linear equation to obtain an initial fitting radius, an initial central axis linear direction vector, and an initial central axis linear equation; updating the central axis linear direction vector, and iteratively fitting the cylindrical surface equation and the central axis linear equation by selecting points other than the fitted points according to a preset rule; determining the effective point cloud data required for optimizing the cylindrical surface radius, and optimizing to obtain the optimal cylindrical radius; and evaluating the deviation of the updated central axis linear equation. If the evaluation is qualified, the central axis determined by the central axis linear equation is used as the final identified cylindrical surface central axis. The present invention improves the fitting accuracy based on local measurement data and reduces the difficulty of identifying the optimal central axis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of reverse engineering, and in particular to a method and device for identifying the central axis of a cylindrical surface based on local measurement data. Background Art

[0002] Currently, reverse engineering based on 3D scanning data is becoming increasingly widespread, and the processing and recognition of 3D point clouds or facets plays a crucial role in reverse engineering. Typically, 3D coordinate scanning generates point cloud data or a faceted model of the object being measured. Data processing methods are then used to segment, recognize, and align the data. The goal is to extract key geometric features and structural types, and then leverage this extracted geometric information to achieve the desired design. To improve the efficiency and accuracy of 3D reverse design, it is necessary to continuously enhance the measurement accuracy of 3D scanning equipment, or to obtain more accurate measurement data. Furthermore, data processing and analysis techniques and methods must be improved to provide more efficient and accurate technical support for reverse design. Whether using contact or 3D optical measurement, measurement data is inevitably contaminated by noise, which significantly impacts the recognition of curved structures. Therefore, under the premise of maintaining a certain level of measurement and design accuracy, it is crucial to effectively process scanned data and accurately identify curved structures. Taking cylindrical and conical structures as examples, currently widely used surface fitting methods include the least squares method, spatial traversal search, and the MSAC algorithm (modified RANSAC algorithm). The least squares method fits cylinders and cones based on the principle of global fitting minimum absolute error; the spatial traversal search method uses the principle of parameter space search to fit spatial structures and identify features; the improved RANSAC algorithm is a fitting method based on sample estimation. First, the initial values ​​of the model parameters of the cylinder or cone surface are determined, and then the deviation evaluation equation is established. The model equation is solved or optimized through iteration. This method has a wide range of applications in the identification of planes, cylinders, and spheres.

[0003] However, in practice, three-dimensional measurement data often does not cover the data of the entire cylindrical surface. Most of the measurement data is localized, such as the measurement data of large-radius wheel cylindrical surfaces, local edge fillets of mechanical structures, and periodic rotating parts. In most cases, the center axis of these cylindrical surfaces is a key structural parameter in the design. Especially when it comes to the center axis of a rotating body, the quality of the center axis identification directly affects the establishment of the reference coordinates in the reverse design. Regardless of which of the above methods is used, when fitting the center axis of the cylindrical surface, the fitting accuracy is often affected by the amount of measurement data. For cylindrical measurement data with a small circumferential data angle range or a small axial length range, the cylindrical radius fitting deviation angle and the center axis direction offset often occur, making it difficult to extract the center axis and the identification accuracy low. Summary of the Invention

[0004] In view of this, the present invention provides a method and device for identifying the central axis of a cylindrical surface based on local measurement data, so as to solve the problem of high computational difficulty and low recognition accuracy when identifying the central axis of a cylindrical surface using local measurement data.

[0005] In a first aspect, the present invention provides a method for identifying the central axis of a cylindrical surface based on local measurement data, the method comprising:

[0006] Obtain the original point cloud data of the local measurement of the cylindrical surface, and obtain the point cloud data to be processed after preprocessing;

[0007] Randomly select two initial fitting points from the point cloud data to be processed to fit the cylindrical surface equation and the straight line equation, obtain the initial fitting radius, the initial center axis straight line direction vector and the initial center axis straight line equation, and calculate the axis offset vector based on the two initial fitting points and the initial center axis straight line equation;

[0008] The axis offset vector is used to update the central axis straight line direction vector. Points other than the fitted points are selected from the point cloud data to be processed according to preset rules. The updated central axis straight line direction vector is used to iteratively fit the cylindrical surface equation and the central axis straight line equation.

[0009] Draw the cylindrical surface and the central axis line according to the fitted cylindrical surface equation and the central axis line equation, determine the effective point cloud data required for the optimization of the cylindrical surface radius, and use the effective point cloud data to optimize the radius of the cylinder to obtain the optimal cylindrical radius;

[0010] The fitted cylindrical surface equation and the central axis straight line equation are obtained based on the optimal cylindrical radius, and the deviation of the updated central axis straight line equation is evaluated;

[0011] If the deviation of the updated central axis straight line equation is qualified, the central axis determined by the central axis straight line equation is used as the final identified central axis of the cylinder.

[0012] The cylindrical surface central axis identification method based on local measurement data provided by the present invention reduces the amount of calculation in the case of large amounts of data by selectively extracting fitting points, determines the direction of the central axis straight line vector based on the rotational symmetry of point cloud data relative to the central axis, improves the fitting accuracy based on local measurement data, and uses nonlinear least squares method for verification, reducing the difficulty of identifying the optimal central axis.

[0013] In an optional embodiment, the process of calculating the axis offset vector according to the two initial fitting points and the initial central axis straight line equation is:

[0014] Calculate the two symmetrical points of the two initial fitting points relative to the initial central axis straight line equation, and calculate the distances between the points other than the initial fitting points and the two symmetrical points, and obtain four points corresponding to the two maximum distances and the two minimum distances;

[0015] Calculate a first vector determined by two points corresponding to the two maximum distances, and a second vector determined by two points corresponding to the two minimum distances, and calculate the angle between the first vector and the second vector;

[0016] Calculate the axis offset vector based on the angle.

[0017] In an optional embodiment, the process of calculating the axis offset vector according to the included angle is as follows:

[0018] If the included angle is less than or equal to 90°, normalize the first vector and the second vector and sum them up, and use the sum as the axis offset vector;

[0019] If the included angle is greater than 90°, the first vector and the second vector are normalized and the difference is calculated, and the difference result is used as the axis offset vector.

[0020] By calculating the axis offset, it is convenient to accurately find the two vector angle bisectors within the acute angle range, evaluate the fitting accuracy of the central axis straight line equation, and thus reduce the fitting deviation in iterative fitting.

[0021] In an optional embodiment, the process of iteratively fitting the cylindrical surface equation and the central axis line equation is:

[0022] Update the central axis straight line direction vector using the axis offset vector;

[0023] Select four second fitting points in addition to the two initial fitting points, and use the updated central axis straight line direction vector, the initial fitting points, and the second fitting points to fit the cylindrical surface equation and the central axis straight line equation;

[0024] According to the preset rules, select points other than the fitted points to continue fitting the cylindrical surface equation and the central axis straight line equation until all the point cloud data to be processed are iteratively fitted to obtain the final cylindrical surface equation and the central axis straight line equation. The preset rule is that the number of added points is twice the number of points in the last fitting.

[0025] In an optional embodiment, during the iterative fitting process, the central axis straight line direction vector used each time is the sum of the central axis straight line direction vector and the axis offset vector obtained in the previous fitting.

[0026] In this embodiment, the axis offset vector in each iterative fitting process is calculated correspondingly from the two initial fitting points, which reduces the amount of calculation and uses all the point cloud data to be processed for iterative fitting, thereby reducing the fitting deviation.

[0027] In an optional embodiment, the process of determining the valid point cloud data required for optimizing the cylindrical radius is as follows:

[0028] Determine the point cloud data included in the drawn cylindrical surface and the central axis straight line as the first valid point cloud data;

[0029] The first valid point cloud data is rotationally symmetric with respect to the central axis line to obtain second valid point cloud data.

[0030] By utilizing the first valid point cloud data contained on the cylindrical surface and the central axis straight line and the second valid point cloud data obtained by rotational symmetry thereof, the performance of the drawn cylindrical surface and the central axis straight line can be better evaluated, which is conducive to further reducing the deviation.

[0031] In an optional embodiment, the radius of the cylinder is optimized using valid point cloud data. The process of obtaining the optimal cylinder radius is as follows:

[0032] Calculating the distance between corresponding points in the first valid point cloud data and the second valid point cloud data;

[0033] Compare the distances between corresponding points, and take half of the sum of the maximum and minimum values ​​as the radius of the cylinder;

[0034] The central axis line is offset by a preset offset, the second valid point cloud data is obtained by recalculating the first point cloud data to be rotationally symmetric with respect to the central axis line, and the distance between the new corresponding points is calculated;

[0035] The optimal cylinder radius is calculated using the nonlinear least squares method, where the optimal cylinder radius is the cylinder radius when the deviation between the average distance between corresponding points and the cylinder diameter is the smallest.

[0036] The identified central axis is verified by the nonlinear least squares method, and the central axis equation is optimized according to the cylinder radius to avoid the situation where the optimal solution cannot be obtained.

[0037] In a second aspect, the present invention provides a device for identifying the central axis of a cylindrical surface based on local measurement data, the device comprising:

[0038] The original data acquisition module is used to obtain the original point cloud data of the local measurement of the cylindrical surface and obtain the point cloud data to be processed after preprocessing;

[0039] The initial fitting module is used to randomly select two initial fitting points from the point cloud data to be processed to fit the cylindrical surface equation and the straight line equation, obtain the initial fitting radius, the initial center axis straight line direction vector and the initial center axis straight line equation, and calculate the axis offset vector based on the two initial fitting points and the initial center axis straight line equation;

[0040] An iterative fitting module is used to update the central axis straight line direction vector using the axis offset vector, select points other than the fitted points from the point cloud data to be processed according to preset rules, and iteratively fit the cylindrical surface equation and the central axis straight line equation based on the updated central axis straight line direction vector;

[0041] The radius optimization module is used to draw the cylindrical surface and the central axis line according to the fitted cylindrical surface equation and the central axis line equation, determine the effective point cloud data required for the cylindrical surface radius optimization, and use the effective point cloud data to optimize the radius of the cylinder to obtain the optimal cylindrical radius;

[0042] A deviation evaluation module is used to obtain the fitted cylindrical surface equation and the central axis straight line equation based on the optimal cylindrical radius, and to evaluate the deviation of the updated central axis straight line equation;

[0043] The central axis identification module is used to determine the central axis determined by the central axis straight line equation as the final identified central axis of the cylindrical surface if the deviation of the updated central axis straight line equation is qualified.

[0044] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for identifying the central axis of a cylindrical surface based on local measurement data of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0045] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the cylindrical center axis identification method based on local measurement data of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 1 is a flow chart of a method for identifying the central axis of a cylindrical surface based on local measurement data according to an embodiment of the present invention;

[0048] Figure 2 is a schematic diagram of obtaining original point cloud data of local measurement according to an embodiment of the present invention;

[0049] Figure 3is a flow chart of another method for identifying the central axis of a cylindrical surface based on local measurement data according to an embodiment of the present invention;

[0050] Figure 4 is a schematic diagram of selecting fitting points during the equation fitting process according to an embodiment of the present invention;

[0051] Figure 5 is a schematic diagram of a straight line fitting result of a cylindrical surface and a central axis according to an embodiment of the present invention;

[0052] Figure 6 2. It is a schematic diagram of selecting effective point clouds in the radius optimization process according to an embodiment of the present invention;

[0053] Figure 7 is a schematic diagram of finding the best fitting radius in the cylinder radius optimization process according to an embodiment of the present invention;

[0054] Figure 8 is a structural block diagram of a device for identifying the central axis of a cylindrical surface based on local measurement data according to an embodiment of the present invention;

[0055] Figure 9 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0057] In practice, three-dimensional measurement data often does not cover the data of the entire cylindrical surface. Most of the measurement data is localized, such as the measurement data of large-radius wheel cylindrical surfaces, local edge fillets of mechanical structures, and periodic rotating parts. In most cases, the center axis of these cylindrical surfaces is a key structural parameter in the design. Especially when it comes to the center axis of a rotating body, the quality of the center axis identification directly affects the establishment of the reference coordinates in the reverse design. Regardless of the relevant technology, when fitting the center axis of a cylindrical surface, its fitting accuracy is often affected by the amount of measurement data. For cylindrical measurement data with a small circumferential data angle range or a small axial length range, the cylindrical radius fitting deviation angle and the center axis direction offset often occur, making it difficult to extract the center axis and the identification accuracy low.

[0058] According to an embodiment of the present invention, an embodiment of a method for identifying the central axis of a cylindrical surface based on local measurement data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0059] In this embodiment, a method for identifying the central axis of a cylindrical surface based on local measurement data is provided, which can be used in the above-mentioned computer device. Figure 1 FIG. 1 is a flow chart of a method for identifying the central axis of a cylindrical surface based on local measurement data according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0060] Step S101: obtain the original point cloud data of the local measurement of the cylindrical surface, and obtain the point cloud data to be processed after preprocessing. Figure 2 As shown in the figure, the original point cloud data of the local measurement of the cylindrical surface is obtained. This measurement data is the point cloud data containing the cylindrical surface on a component of a periodic rotating structure. The measurement angle range is 360° / m, where m is the number of points in one revolution of the periodic component. First, it is segmented and denoised in the modeling software to remove isolated points and non-connected items far from the data. The other geometric structure data that does not belong to the fitted cylindrical surface and the boundary point cloud connecting other structures are deleted using the lasso box method. The point cloud data to be processed is retained. The amount of point cloud data to be processed is N.

[0061] In step S102, two initial fitting points are randomly selected from the point cloud data to be processed to fit the cylindrical surface equation and the linear equation, obtaining the initial fitting radius, the initial central axis linear direction vector, and the initial central axis linear equation. The axis offset vector is calculated based on the two initial fitting points and the initial central axis linear equation. For example, in order to reliably identify the central axis of the cylindrical surface, a high-precision fitting cylindrical surface equation is required. The general cylindrical surface equation in a spatial rectangular coordinate system is:

[0062] (x-x0) 2 +(y-y0) 2 +(z-z0) 2 -[u(x-x0)+v(y-y0)+w(z-z0)] 2 / (u 2 +v 2 +w 2 )=r 2

[0063] The equation is in the form of the distance from a point on the cylindrical surface to the central axis of the cylinder, which is always the radius of the cylinder and is determined by seven parameters, where (x0, y0, z0) is any point on the central axis of the cylinder, the vector (u, v, w) is the direction vector of the central axis, and r is the radius of the cylinder. When the direction vector is normalized, that is, u 2 +v 2 +w 2 =1, the equation can be simplified accordingly.

[0064] The cylinder equation obtained by fitting can be used to calculate the equation of the straight line around the cylinder's center axis. The equation gives a point-to-point straight line equation, which can also be converted into a parametric equation. The point-to-point straight line equation is as follows:

[0065]

[0066] Two initial fitting points, P0 and P1, are randomly selected from the point cloud data to be processed. P0 and P1 are fitted with both the cylindrical surface equation and the linear equation. For the first fitting, arbitrary initial values ​​are given (the initial value of the direction vector of the given central axis is the same as that of vectors P0 and P1, the constraints (u, v, w) are unit vectors and an arbitrary direction is specified, and the initial value of x0 is the average value of the x-coordinate of the point cloud data). P0 and P1 can be manually selected as any two points that are far apart in the point cloud data. Using the least squares principle for the initial fitting, the coordinates of the two initial fitting points are substituted into the cylindrical surface equation and the constraints to obtain the initial fitting radius r0 and the central axis linear direction vector (u, v, w). Substituting any point A (x0, y0, z0) on the central axis into the linear equation, the linear equation of the central axis, L0, is obtained.

[0067] Step S103, using the axis offset vector to update the center axis straight line direction vector, select points other than the fitted points from the point cloud data to be processed according to preset rules, and iteratively fit the cylindrical surface equation and the center axis straight line equation in combination with the updated center axis straight line direction vector. Exemplarily, a model for updating the initial value of the center axis vector is established, and the cylindrical surface equation is iteratively fitted to ensure that the direction of the cylindrical axis approaches the direction with smaller deviation. This process is done by selectively extracting points from the original point cloud data as cylindrical fitting points until all data are taken and the final fitting is completed. Since the points farthest and closest to the symmetrical point are added for fitting each time, the newly fitted cylindrical axis is affected by the axis offset vector on the original basis. As for the offset, the offset direction approaches the central axis line that makes the difference between the maximum and minimum values ​​smaller. Therefore, the direction and position of the central axis line gradually approach the theoretical direction, and the error decreases successively. In general, the maximum and minimum points of the distance between the symmetrical point and the point cloud are on the boundary of the point cloud range. Based on this feature, the points extracted in each iteration are dispersed and the fitting deviation is reduced. In addition, in order to reduce the amount of calculation, the axis offset vector in each iteration process is They are calculated from the two points P0 and P1, and it is not necessary for all points involved in the fitting to participate. Calculation.

[0068] Step S104: Draw the cylindrical surface and the central axis line according to the fitted cylindrical surface equation and the central axis line equation, determine the effective point cloud data required for optimizing the cylindrical surface radius, and use the effective point cloud data to optimize the radius of the cylinder to obtain the optimal cylindrical radius.

[0069] In step S105, the fitted cylindrical surface equation and the central axis linear equation are obtained based on the optimal cylindrical radius, and the deviation of the updated central axis linear direction vector is evaluated. For example, the fitted cylindrical surface equation and the central axis linear equation are obtained based on the optimal cylindrical radius, and the root mean square error of the distance from the point cloud data data2 to the cylinder central axis L2 is output to comprehensively represent the recognition accuracy of the cylinder central axis. Generally, in the absence of a theoretical central axis, other associated geometric features can be used to assist in determining the recognition accuracy of the central axis. For example, the position of the central axis can be compared with other coaxial cylindrical or conical surface features to determine the recognition effect.

[0070] Step S106, if the deviation of the updated center axis straight line direction vector is qualified, the center axis determined by the center axis straight line equation is used as the final identified cylinder center axis. For example, the cylinder center axis is drawn by the final straight line equation, and the complete or partial cylindrical surface is drawn as needed. Among them, the length of the cylindrical surface is determined by the boundary range of the point cloud data, and the remaining parameters are derived according to the cylindrical surface equation. The process of evaluating the qualified deviation of the updated center axis straight line direction vector is: by calculating the root mean square error of the difference between the distance of each point cloud data to the cylinder center axis L2 and the cylinder radius, the recognition accuracy of the cylinder center axis is comprehensively characterized (generally, in the absence of a theoretical center axis, the recognition accuracy of the center axis can be assisted by other associated geometric features, such as comparing the position of the center axis with other coaxial cylindrical or conical surface features to determine the recognition effect). The smaller the error, the more accurate it is. The appropriate deviation value can be set as needed. When it is reached, the deviation is qualified.

[0071] It should be noted that the point cloud data processing, straight line and cylindrical surface fitting equations involved in the above processing can all be achieved through programming.

[0072] The cylindrical surface central axis identification method based on local measurement data provided by the present invention reduces the amount of calculation in the case of large amounts of data by selectively extracting fitting points, determines the direction of the central axis straight line vector based on the rotational symmetry of point cloud data relative to the central axis, improves the fitting accuracy based on local measurement data, and uses nonlinear least squares method for verification, reducing the difficulty of identifying the optimal central axis.

[0073] In this embodiment, a method for identifying the central axis of a cylindrical surface based on local measurement data is provided, which can be used in the above-mentioned computer device. Figure 3 FIG. 1 is a flow chart of a method for identifying the central axis of a cylindrical surface based on local measurement data according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0074] Step S201: Obtain the original point cloud data of the local measurement of the cylindrical surface, and obtain the point cloud data to be processed after preprocessing. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0075] In step S202, two initial fitting points are randomly selected from the point cloud data to be processed to fit the cylindrical surface equation and the straight line equation, and the initial fitting radius, the initial center axis straight line direction vector and the initial center axis straight line equation are obtained. The axis offset vector is calculated based on the two initial fitting points and the initial center axis straight line equation.

[0076] Specifically, the above step S202 includes:

[0077] Step S2021, calculate the two symmetrical points of the two initial fitting points relative to the initial central axis line equation, and calculate the distances between the points other than the initial fitting points and the two symmetrical points, and obtain four points corresponding to the two maximum distances and the two minimum distances. For example, calculate the symmetrical points P0' and P1' of points P0 and P1 relative to the central axis line L0, such as Figure 4 As shown, the distances between points other than the initial fitting point and P0' and P1' are calculated respectively, and four points P2-P5 corresponding to the two maximum distances and the two minimum distances are obtained.

[0078] Step S2022, calculate the first vector determined by the two points corresponding to the two maximum distances, and the second vector determined by the two points corresponding to the two minimum distances, and calculate the angle between the first vector and the second vector. For example, calculate the first vector determined by P2 and P3 and the second vector determined by P4 and P5 And the angle between the two vectors:

[0079] Step S2023, calculate the axis offset vector according to the angle θ

[0080] By calculating the axis offset, it is convenient to find the two vector angle bisectors within the acute angle range and evaluate the fitting accuracy of the central axis straight line equation, thereby reducing the fitting deviation in iterative fitting.

[0081] In some optional implementations, step S2023 includes:

[0082] Step a1: If the included angle is less than or equal to 90°, normalize the first vector and the second vector respectively and then sum them, and use the sum result as the axis offset vector.

[0083] Step a2: If the included angle is greater than 90°, normalize the first vector and the second vector and calculate the difference, and use the difference result as the axis offset vector.

[0084] Step S203, using the axis offset vector to update the central axis straight line direction vector, selecting points other than the fitted points from the point cloud data to be processed according to preset rules, and iteratively fitting the cylindrical surface equation and the central axis straight line equation in combination with the updated central axis straight line direction vector.

[0085] Specifically, the above step S203 includes:

[0086] Step S2031: Update the central axis linear direction vector using the axis offset vector.

[0087] Step S2032: Select four second fitting points in addition to the two initial fitting points, and use the updated center axis line direction vector, the initial fitting points, and the second fitting points to fit the cylinder surface equation and the center axis line equation. For example, the new four points plus P0 and P1 are used as the cylinder equation fitting points, and the center axis direction vector (u, v, w) is given as the L0 direction vector and the axis offset vector of the previous fitting. Sum, where the direction vector (u, v, w) and All need to be unitized.

[0088] In step S2033, according to the preset rules, points other than the already fitted points are selected to continue fitting the cylindrical surface equation and the central axis line equation, until all the pending point cloud data are iteratively fitted to obtain the final cylindrical surface equation and the central axis line equation. The preset rule is to add twice the number of points in the previous fitting. Step S2031 is repeated, each time adding new points (not overlapping with points already fitted), until all points in the pending point cloud data are fitted. The iteration is terminated, and the final cylindrical surface equation and the central axis line equation are obtained.

[0089] In this embodiment, the axis offset vector in each iterative fitting process is calculated correspondingly from the two initial fitting points, which reduces the amount of calculation and uses all the point cloud data to be processed for iterative fitting, thereby reducing the fitting deviation.

[0090] Step S204: Draw the cylindrical surface and the central axis line according to the fitted cylindrical surface equation and the central axis line equation, determine the effective point cloud data required for the cylindrical surface radius optimization, and use the effective point cloud data to optimize the cylinder radius to obtain the optimal cylinder radius. For example, Figure 5 Shown is a schematic diagram of the fitting results of the determined cylindrical surface and the central axis straight line.

[0091] Specifically, the above step S204 includes:

[0092] Step S2041 : determining the point cloud data data1 included in the drawn cylindrical surface and the central axis line as the first valid point cloud data.

[0093] In step S2042 , the first valid point cloud data is rotationally symmetric with respect to the central axis line L1 to obtain second valid point cloud data data2 .

[0094] By utilizing the first valid point cloud data contained on the cylindrical surface and the central axis straight line and the second valid point cloud data obtained by rotational symmetry thereof, the performance of the drawn cylindrical surface and the central axis straight line can be better evaluated, which is conducive to further reducing the deviation.

[0095] Step S2043: Calculate the distance between the corresponding points in the first valid point cloud data and the second valid point cloud data. Figure 6 As shown, the distance between corresponding points can be represented by d1-dN, which is an example only and not limited to this. The statistical performance of the N distance data is evaluated, including the mean, maximum, minimum, and standard deviation. The size of the extreme values ​​is evaluated while considering the accuracy and distribution of the measurement data. If there are obviously abnormal extreme values ​​and excessive standard deviations, return to step S202 and reselect a new two-point fitting cylinder equation.

[0096] Step S2044: compare the distances between the corresponding points, and use half of the sum of the maximum and minimum values ​​as the radius of the cylinder. For example, in order to obtain the optimal cylinder radius when the linear direction of the central axis is determined, the radius r1 is linearly selected between 1 / 2 of the maximum and minimum distances as the cylinder radius. Figure 7 The figure shows a schematic diagram of the cylinder radius optimization method.

[0097] Step S2045 : offsetting the central axis line by a preset offset, recalculating second valid point cloud data obtained after rotational symmetry of the first point cloud data with respect to the central axis line, and calculating the distance between the new corresponding points.

[0098] Step S2046 , using the nonlinear least squares method, calculate the optimal cylinder radius, where the optimal cylinder radius is the cylinder radius when the deviation between the average value of the distance between the corresponding points and the cylinder diameter is the smallest.

[0099] The identified central axis is verified by the nonlinear least squares method, and the central axis equation is optimized according to the cylinder radius to avoid the situation where the optimal solution cannot be obtained.

[0100] Step S205: Obtain the fitted cylindrical surface equation and the central axis straight line equation based on the optimal cylindrical radius, and evaluate the deviation of the updated central axis straight line equation. Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.

[0101] Step S206: If the deviation of the updated central axis linear equation is qualified, the central axis determined by the central axis linear equation is used as the final identified central axis of the cylindrical surface. Figure 1 Step S106 of the illustrated embodiment will not be described in detail here.

[0102] In this embodiment, a device for identifying the central axis of a cylindrical surface based on local measurement data is also provided. The device is used to implement the above-mentioned embodiments and preferred embodiments, and the details that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0103] This embodiment provides a cylindrical surface central axis identification device based on local measurement data, such as Figure 8 Shown, including:

[0104] The raw data acquisition module 801 is used to acquire the raw point cloud data of the local measurement of the cylindrical surface and obtain the point cloud data to be processed after preprocessing;

[0105] An initial fitting module 802 is configured to randomly select two initial fitting points from the point cloud data to be processed, perform fitting on the cylindrical surface equation and the straight line equation, obtain an initial fitting radius, an initial central axis straight line direction vector, and an initial central axis straight line equation, and calculate an axis offset vector based on the two initial fitting points and the initial central axis straight line equation;

[0106] An iterative fitting module 803 is configured to update the central axis line direction vector using the axis offset vector, select points other than the fitted points from the point cloud data to be processed according to a preset rule, and iteratively fit the cylindrical surface equation and the central axis line equation using the updated central axis line direction vector;

[0107] The radius optimization module 804 is used to draw the cylindrical surface and the central axis line according to the fitted cylindrical surface equation and the central axis line equation, determine the valid point cloud data required for the cylindrical surface radius optimization, and optimize the cylinder radius using the valid point cloud data to obtain the optimal cylindrical radius;

[0108] Deviation evaluation module 805, used to obtain the fitted cylindrical surface equation and the central axis straight line equation according to the optimal cylindrical radius, and evaluate the deviation of the updated central axis straight line equation;

[0109] The central axis identification module 806 is configured to use the central axis determined by the central axis straight line equation as the final identified central axis of the cylindrical surface if the deviation of the updated central axis straight line equation is qualified.

[0110] In some optional implementations, the initial fitting module 802 includes:

[0111] The distance calculation unit is used to calculate two symmetrical points of the two initial fitting points relative to the initial central axis straight line equation, and respectively calculate the distances between points other than the initial fitting points and the two symmetrical points to obtain four points corresponding to the two maximum distances and the two minimum distances.

[0112] The vector angle calculation unit is used to calculate a first vector determined by two points corresponding to two maximum distances, a second vector determined by two points corresponding to two minimum distances, and calculate the angle between the first vector and the second vector.

[0113] The axis offset vector calculation unit is used to calculate the axis offset vector according to the size of the angle.

[0114] In some optional implementations, the axis offset vector calculation unit includes:

[0115] The summing subunit is used to normalize the first vector and the second vector and then sum them if the included angle is less than or equal to 90 degrees, and the summation result is used as the axis offset vector.

[0116] The difference subunit is used to normalize the first vector and the second vector and then calculate the difference if the angle is greater than 90°, and the difference result is used as the axis offset vector.

[0117] In some optional implementations, the iterative fitting module 803 includes:

[0118] The equation fitting unit is used to select four second fitting points in addition to the two initial fitting points, and use the initial fitting points and the second fitting points to fit the cylindrical surface equation and the central axis straight line equation.

[0119] The iterative unit is used to select points other than the fitted points according to the preset rules to continue fitting the cylindrical surface equation and the central axis straight line equation until all the point cloud data to be processed are iteratively fitted to obtain the final cylindrical surface equation and the central axis straight line equation. The preset rule is that the number of added points is twice the number of points in the last fitting.

[0120] The vector updating unit is used to update the central axis line direction vector using the final cylindrical surface equation and the central axis line equation.

[0121] In some optional implementations, the radius optimization module 804 includes:

[0122] The effective point cloud determination unit is used to determine the point cloud data contained on the drawn cylindrical surface and the central axis straight line as the first effective point cloud data; the first effective point cloud data is rotationally symmetric with respect to the central axis straight line to obtain the second effective point cloud data.

[0123] a distance calculation unit, configured to calculate the distance between corresponding points in the first valid point cloud data and the second valid point cloud data;

[0124] The radius calculation unit is used to compare the distances between corresponding points, and half of the sum of the maximum and minimum values ​​is used as the radius of the cylinder;

[0125] a cyclic calculation unit, configured to offset the central axis line by a preset offset, recalculate second valid point cloud data obtained by rotationally symmetric the first point cloud data relative to the central axis line, and calculate the distance between the new corresponding points;

[0126] The radius determination unit is used to calculate the optimal cylinder radius by using the nonlinear least square method, wherein the optimal cylinder radius is the cylinder radius when the deviation between the average value of the distance between the corresponding points and the cylinder diameter is the smallest.

[0127] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0128] The cylindrical center axis identification device based on local measurement data in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0129] The embodiment of the present invention also provides a computer device having the above Figure 9 The device shown is a cylindrical center axis identification device based on local measurement data.

[0130] See also Figure 9 , Figure 9 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 9As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 9 A processor 10 is taken as an example.

[0131] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0132] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0133] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0134] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0135] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0136] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0137] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for identifying the central axis of a cylindrical surface based on local measurement data, characterized in that: The method comprises: Obtain the original point cloud data of the local measurement of the cylindrical surface, and obtain the point cloud data to be processed after preprocessing; Randomly select two initial fitting points from the point cloud data to be processed to fit the cylindrical surface equation and the straight line equation, obtain the initial fitting radius, the initial central axis straight line direction vector and the initial central axis straight line equation, and calculate the axis offset vector based on the two initial fitting points and the initial central axis straight line equation; The axis offset vector is used to update the central axis straight line direction vector. Points other than the fitted points are selected from the point cloud data to be processed according to preset rules. The updated central axis straight line direction vector is used to iteratively fit the cylindrical surface equation and the central axis straight line equation. Draw the cylindrical surface and the central axis line according to the fitted cylindrical surface equation and the central axis line equation, determine the effective point cloud data required for optimizing the cylindrical surface radius, and use the effective point cloud data to optimize the radius of the cylinder to obtain the optimal cylindrical radius; The fitted cylindrical surface equation and the central axis straight line equation are obtained based on the optimal cylindrical radius, and the deviation of the updated central axis straight line equation is evaluated; If the deviation of the updated central axis straight line equation is qualified, the central axis determined by the central axis straight line equation is used as the final identified central axis of the cylinder.

2. The method for identifying the central axis of a cylindrical surface based on local measurement data according to claim 1, characterized in that: The process of calculating the axis offset vector according to the two initial fitting points and the initial central axis straight line equation is: Calculate two symmetrical points of the two initial fitting points relative to the equation of the initial central axis, and respectively calculate the distances between points other than the initial fitting points and the two symmetrical points to obtain four points corresponding to the two maximum distances and the two minimum distances; Calculate a first vector determined by two points corresponding to the two maximum distances, and a second vector determined by two points corresponding to the two minimum distances, and calculate the angle between the first vector and the second vector; The axis offset vector is calculated according to the size of the angle.

3. The method for identifying the central axis of a cylindrical surface based on local measurement data according to claim 2, characterized in that: The process of calculating the axis offset vector according to the angle is as follows: If the angle is less than or equal to 90°, normalize the first vector and the second vector and sum them, and use the sum as the axis offset vector; If the angle is greater than 90°, the first vector and the second vector are normalized and then the difference is calculated, and the difference result is used as the axis offset vector.

4. The method for identifying the central axis of a cylindrical surface based on local measurement data according to claim 1, characterized in that: The process of iteratively fitting the cylindrical surface equation and the central axis straight line equation is: Update the central axis straight line direction vector using the axis offset vector; Select four second fitting points in addition to the two initial fitting points, and use the updated central axis straight line direction vector, the initial fitting points, and the second fitting points to fit the cylindrical surface equation and the central axis straight line equation; According to the preset rules, points other than the fitted points are selected to continue fitting the cylindrical surface equation and the central axis straight line equation until all the point cloud data to be processed are iteratively fitted to obtain the final cylindrical surface equation and the central axis straight line equation. The preset rule is that the number of added points is twice the number of points in the last fitting.

5. The method for identifying the central axis of a cylindrical surface based on local measurement data according to claim 4, characterized in that: During the iterative fitting process, the central axis straight line direction vector used each time is the sum of the central axis straight line direction vector obtained from the previous fitting and the axis offset vector.

6. The method for identifying the central axis of a cylindrical surface based on local measurement data according to claim 1, characterized in that: The process of determining the effective point cloud data required for cylindrical radius optimization is as follows: Determining point cloud data included in the drawn cylindrical surface and the central axis straight line as first valid point cloud data; The first valid point cloud data is rotationally symmetric with respect to the central axis line to obtain second valid point cloud data.

7. The method for identifying the central axis of a cylindrical surface based on local measurement data according to claim 6, characterized in that: The process of optimizing the radius of the cylinder using the effective point cloud data to obtain the optimal cylinder radius is as follows: Calculating the distance between corresponding points in the first valid point cloud data and the second valid point cloud data; Compare the distances between the corresponding points, and take half of the sum of the maximum and minimum values ​​as the radius of the cylinder; The central axis line is offset by a preset offset, the second valid point cloud data is obtained by recalculating the first point cloud data to be rotationally symmetric with respect to the central axis line, and the distance between the new corresponding points is calculated; The optimal cylinder radius is calculated using a nonlinear least squares method, wherein the optimal cylinder radius is the cylinder radius when the deviation between the average value of the distances between corresponding points and the cylinder diameter is the smallest.

8. A device for identifying the central axis of a cylindrical surface based on local measurement data, characterized in that: The device comprises: The original data acquisition module is used to obtain the original point cloud data of the local measurement of the cylindrical surface and obtain the point cloud data to be processed after preprocessing; An initial fitting module is used to randomly select two initial fitting points from the point cloud data to be processed to fit the cylindrical surface equation and the straight line equation, obtain the initial fitting radius, the initial central axis straight line direction vector and the initial central axis straight line equation, and calculate the axis offset vector based on the two initial fitting points and the initial central axis straight line equation; An iterative fitting module is used to update the central axis straight line direction vector using the axis offset vector, select points other than the fitted points from the point cloud data to be processed according to preset rules, and iteratively fit the cylindrical surface equation and the central axis straight line equation based on the updated central axis straight line direction vector; The radius optimization module is used to draw the cylindrical surface and the central axis line according to the fitted cylindrical surface equation and the central axis line equation, determine the effective point cloud data required for the cylindrical surface radius optimization, and optimize the radius of the cylinder using the effective point cloud data to obtain the optimal cylindrical radius; A deviation evaluation module is used to obtain the fitted cylindrical surface equation and the central axis straight line equation based on the optimal cylindrical radius, and to evaluate the deviation of the updated central axis straight line equation; The central axis identification module is used to determine the central axis determined by the central axis straight line equation as the final identified central axis of the cylindrical surface if the deviation of the updated central axis straight line equation is qualified.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for identifying the central axis of a cylindrical surface based on local measurement data according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the cylindrical surface central axis identification method based on local measurement data according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Flexible cable identification and three-dimensional reconstruction method based on point cloud

    CN112907735A

  • Cone fitting method and device based on point cloud data

    CN115661334A