A method for evaluating the regularity of irregular polyhedron surfaces
By describing the optimization method of the smallest inclusion sphere of irregular polyhedron, the distance to the radius ratio between the boundary point of the polyhedron and the center of the inclusion sphere is analyzed, and the data error and reliability problems of the regularity evaluation of irregular polyhedron surface in the prior art are solved, achieving the evaluation effect of high accuracy and wide appropriation.
Patent Information
- Application Number
- CN202210328586.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-03-30
AI Technical Summary
When evaluating the regularity of irregular polyhedron surfaces, the data error is large, the quantification accuracy and reliability are poor, and the scope of application is limited.
An optimization method is adopted to describe the minimum inclusion sphere of irregular polyhedron. By obtaining the ratio between the distance between the boundary point of the polyhedron and the radius of the inclusion sphere, the numerical distribution of the ratio array is analyzed to achieve a comprehensive judgment on the regularity of the irregular polyhedron surface.
It realizes rapid and accurate quantitative analysis and evaluation of the regularity of irregular polyhedron surfaces, improves accuracy and reliability, and is suitable for polyhedrons of different shapes, sizes and surfaces.
Smart Images

Figure CN114782518B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of surface regularity evaluation, and in particular to a method for evaluating the surface regularity of an irregular polyhedron. Background Art
[0002] In the fields of medicine and surface analysis, it is necessary to evaluate the surface regularity of irregular polyhedrons. In the existing surface regularity evaluation, the image data of the polyhedron to be evaluated is obtained, and after object segmentation and image processing, the structure of the polyhedron is compared with the spherical surface of the same volume to determine how much it deviates from the spherical surface, which is used to judge the surface irregularity of the polyhedron. However, due to the limited scope of application of this method, the surface area of the irregular object calculated only by reconstructed data may have large data errors, which is not conducive to the accuracy of quantification and the reliability of surface regularity acquisition is poor. Summary of the invention
[0003] The purpose of the present invention is to provide a method for evaluating the surface regularity of an irregular polyhedron in order to overcome the defects of the prior art.
[0004] The purpose of the present invention can be achieved by the following technical solutions:
[0005] A method for evaluating the regularity of an irregular polyhedron surface comprises the following steps:
[0006] S1: Obtain the three-dimensional data of the boundary points of the polyhedron to be evaluated;
[0007] S2: Obtaining the initial center coordinates of the enclosing sphere of the polyhedron to be evaluated based on the three-dimensional data of the boundary points;
[0008] S3: Obtain the radius corresponding to the coordinates of the center of the current enclosing sphere according to the three-dimensional data of the boundary point;
[0009] S4: Determine whether the number of iterations exceeds the preset maximum number of iterations. If so, proceed to step S6. Otherwise, determine whether the current enclosing sphere is the minimum enclosing sphere of the polyhedron to be evaluated. If so, proceed to S6. Otherwise, proceed to step S5.
[0010] S5: Update the coordinates of the center of the enclosing sphere, and return to step S3;
[0011] S6: Obtain the distance from the boundary point of the polyhedron to be evaluated to the center of the containing sphere, and obtain the evaluation parameters of the boundary point of the polyhedron to be evaluated, and obtain the surface regularity of the polyhedron to be evaluated according to the evaluation parameters.
[0012] Preferably, the initial coordinate formula of the center of the containing sphere is:
[0013]
[0014] Among them, Ooriginal is the initial coordinate of the center of the containing sphere, are the average values of the coordinates of all boundary points of the polyhedron to be evaluated in the x, y, and z directions, respectively. N is the number of boundary points. (x i ,y i , z i ) is the coordinate of the i-th boundary point of the polyhedron to be evaluated.
[0015] Preferably, the step S3 comprises:
[0016] S31: Obtain a set of Euclidean distances from the boundary points of the polyhedron to be evaluated to the center of the current containing sphere;
[0017] S31: Obtain the maximum value of the Euclidean distance set as the radius of the containing sphere.
[0018] Preferably, the Euclidean distance set is:
[0019]
[0020] Among them, d i is the Euclidean distance from the i-th boundary point to the center of the current containing sphere,
[0021] d i =||O t -(x i ,y i ,z i )||2
[0022] Among them, O t is the coordinate of the center of the current containing sphere, (x i ,y i , z i ) is the coordinate of the i-th boundary point of the polyhedron to be evaluated.
[0023] Preferably, the calculation formula of the enclosing sphere radius in step S42 is:
[0024]
[0025] Where R is the radius of the containing sphere.
[0026] Preferably, the specific steps of determining whether the current enclosing sphere is the minimum enclosing sphere of the polyhedron to be evaluated include:
[0027] Get the maximum and second maximum values in the Euclidean distance set, and confirm the boundary points corresponding to the maximum and second maximum values;
[0028] Determine whether the following three conditions are met at the same time:
[0029] The moving increment of the 3D coordinates of the center of the containing sphere in this iteration and the previous iteration is less than the preset increment threshold, the difference between the maximum value and the second maximum value in the Euclidean distance set is less than the preset difference threshold, and the angle formed by the line connecting the boundary points corresponding to the maximum value and the second maximum value and the center of the sphere is greater than π / 2.
[0030] If both conditions are met at the same time, the current enclosing sphere is the smallest enclosing sphere of the polyhedron to be evaluated.
[0031] Preferably, the step S5 specifically includes:
[0032] S51: Get the three-dimensional coordinate value of the boundary point corresponding to the maximum value in the Euclidean distance set and the vector between the center of the current enclosing sphere
[0033]
[0034] in, is the three-dimensional coordinate value of the boundary point corresponding to the maximum value, (x O ,y O ,z O ) is the coordinate O of the center of the current enclosing sphere t The three-dimensional coordinate value of
[0035] S52: Update the step size according to the preset learning rate:
[0036]
[0037] Among them, lr is the preset learning rate and res is the step size;
[0038] S53: Update the three-dimensional coordinate value of the center of the enclosing sphere:
[0039] O t+1 =O t +res
[0040] Among them, O t+1 is the updated three-dimensional coordinate of the center of the enclosing sphere, O t The three-dimensional coordinates of the center of the current containing ball are returned to step S3.
[0041] Preferably, the step S6 specifically includes:
[0042] S61: Obtaining evaluation parameters of the boundary points of the polyhedron to be evaluated, the evaluation parameters being the ratio P of the distance from the boundary points to the center of the current containing sphere to the radius of the containing sphere, obtaining the mean and standard deviation of the evaluation parameters, and confirming the regularity judgment interval;
[0043] S62: Obtain the ratio of the number of boundary points within the regularity judgment interval of the evaluation parameter to the total number of boundary points, and determine whether the ratio is greater than a preset regularity threshold. If so, determine that the surface of the polyhedron to be evaluated is regular; otherwise, determine that the surface of the polyhedron to be evaluated is irregular.
[0044] Preferably, the mean value of the evaluation parameter is:
[0045]
[0046] Where N is the number of boundary points, P i is the ratio of the distance from the i-th boundary point to the center of the current containing sphere to the radius of the containing sphere;
[0047] The standard deviation of the evaluation parameter is:
[0048]
[0049] Preferably, the regularity judgment interval is [μ(P)-α·σ(P),μ(P)+α·σ(P)], wherein α is an interval scaling parameter.
[0050] Compared with the prior art, the present invention has the following advantages:
[0051] (1) The present invention adopts an optimization method for describing the minimum enclosing sphere of an irregular polyhedron. By counting the ratio of the distance from the boundary point of the irregular polyhedron to the center of the enclosing sphere to the radius of the enclosing sphere, the numerical distribution of the ratio array is analyzed, and the local and global morphologies of the irregular polyhedron are described at the same time, so as to achieve a comprehensive judgment on the surface irregularity of the irregular polyhedron. The present invention can quickly and accurately perform quantitative analysis and evaluation on the surface regularity of the irregular polyhedron with high accuracy and good reliability.
[0052] (2) The present invention adopts a method for evaluating the regularity of the surface of an irregular polyhedron, which can realize the detection of surface defects or flatness of parts in the industrial field. The evaluation effect is good and the speed is fast. It is suitable for polyhedrons of different shapes, sizes, and surfaces and has a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 is a flow chart of the present invention;
[0054] Figure 2 A schematic diagram of the structure of an irregular polyhedron according to an embodiment of the present invention;
[0055] Figure 3 Schematic diagram of an enclosing sphere of an irregular polyhedron according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. Note that the following embodiments are merely illustrative in nature, and the present invention is not intended to limit its applicable objects or uses, and the present invention is not limited to the following embodiments.
[0057] Example
[0058] A method for evaluating the regularity of irregular polyhedron surfaces, such as Figure 1 As shown, the following steps are included:
[0059] S1: Obtaining three-dimensional data of boundary points of a polyhedron to be evaluated. The polyhedron to be evaluated is an industrial product, such as a workpiece, an assembly part, or an industrial product.
[0060] In step S1, the polyhedron to be evaluated is scanned to obtain a three-dimensional data file such as a DICOM file, and the polyhedron region is segmented using segmentation software such as mimics to reconstruct three-dimensional data of the boundary points of the irregular polyhedron.
[0061] S2: Obtain the initial center coordinates of the enclosing sphere of the polyhedron to be evaluated based on the three-dimensional data of the boundary points.
[0062] The initial coordinate formula of the center of the containing sphere is:
[0063]
[0064] Among them, O original is the initial coordinate of the center of the containing sphere, are the average values of the coordinates of all boundary points of the polyhedron to be evaluated in the x, y, and z directions, respectively. N is the number of boundary points. (x i ,y i , z i ) is the coordinate of the i-th boundary point of the polyhedron to be evaluated.
[0065] In one embodiment of the present invention
[0066] S3: Obtain the radius corresponding to the center coordinates of the current enclosing sphere based on the three-dimensional data of the boundary point:
[0067]
[0068] Where R is the radius of the containing sphere.
[0069] Step S3 includes:
[0070] S31: Get the Euclidean distance set from the boundary points of the polyhedron to be evaluated to the center of the current enclosing sphere:
[0071]
[0072] Among them, di is the Euclidean distance from the i-th boundary point to the center of the current containing sphere,
[0073] d i =||O t -(x i ,y i ,z i )||2
[0074] Among them, O t is the coordinate of the center of the current containing sphere, (x i ,y i , z i ) is the coordinate of the i-th boundary point of the polyhedron to be evaluated.
[0075] S31: Obtain the maximum value of the Euclidean distance set as the radius of the containing sphere.
[0076] S4: Determine whether the number of iterations exceeds the preset maximum number of iterations. If so, proceed to step S6. Otherwise, determine whether the current enclosing sphere is the minimum enclosing sphere of the polyhedron to be evaluated. If so, proceed to S6. Otherwise, proceed to step S5. In this embodiment, the preset number of iterations T=10 6 ;
[0077] Specifically, the minimum enclosing sphere is determined according to the three conditions. The specific steps of determining whether the current enclosing sphere is the minimum enclosing sphere of the polyhedron to be evaluated include:
[0078] Get the maximum and second maximum values in the Euclidean distance set, and confirm the boundary points corresponding to the maximum and second maximum values;
[0079] Determine whether the following three conditions are met at the same time:
[0080] The moving increment of the 3D coordinates of the center of the containing sphere in this iteration and the previous iteration is less than the preset increment threshold, the difference between the maximum value and the second maximum value in the Euclidean distance set is less than the preset difference threshold, and the angle formed by the line connecting the boundary points corresponding to the maximum value and the second maximum value and the center of the sphere is greater than π / 2.
[0081] If both conditions are met at the same time, the current enclosing sphere is the smallest enclosing sphere of the polyhedron to be evaluated.
[0082] When making a judgment, if it is the first iteration, the judgment is made based on the preset center of the previous generation of the enclosing ball, and the three-dimensional coordinate value of the center of the enclosing ball in the previous iteration is initialized [10 6 , 10 6 , 10 6 ].
[0083] S5: Update the coordinates of the center of the containing sphere and return to step S3.
[0084] Step S5 specifically includes:
[0085] S51: Get the three-dimensional coordinate value of the boundary point corresponding to the maximum value in the Euclidean distance set and the vector between the center of the current enclosing sphere
[0086]
[0087] in, is the three-dimensional coordinate value of the boundary point corresponding to the maximum value, (x O ,y O ,z O ) is the coordinate O of the center of the current enclosing sphere t The three-dimensional coordinate value of
[0088] S52: Update the step size according to the preset learning rate:
[0089]
[0090] Wherein, lr is the preset learning rate, res is the step size, and in this embodiment, the preset learning rate lr=10 3 ,
[0091] S53: Update the three-dimensional coordinate value of the center of the enclosing sphere:
[0092] O t+1 =O t +res
[0093] Among them, O t+1 is the updated three-dimensional coordinate of the center of the enclosing sphere, O t The three-dimensional coordinates of the center of the current containing ball are returned to step S3.
[0094] S6: Obtain the distance from the boundary point of the polyhedron to be evaluated to the center of the containing sphere, and obtain the evaluation parameters of the boundary point of the polyhedron to be evaluated, and obtain the surface regularity of the polyhedron to be evaluated according to the evaluation parameters.
[0095] Step S6 specifically includes:
[0096] S61: Obtain evaluation parameters of the boundary points of the polyhedron to be evaluated, the evaluation parameters being the ratio P of the distance from the boundary points to the center of the current enclosing sphere to the radius of the enclosing sphere, and obtaining the mean and standard deviation of the evaluation parameters:
[0097] The mean of the evaluation parameters is:
[0098]
[0099] Where N is the number of boundary points, P i is the ratio of the distance from the i-th boundary point to the center of the current containing sphere to the radius of the containing sphere;
[0100] The standard deviation of the evaluation parameter is:
[0101]
[0102] Confirm the regularity judgment interval [μ(P)-α·σ(P),μ(P)+α·σ(P)], where α is the interval scaling parameter.
[0103] S62: Obtain the ratio of the number of boundary points within the regularity judgment interval of the evaluation parameter to the total number of boundary points, and determine whether the ratio is greater than a preset regularity threshold. If so, determine that the surface of the polyhedron to be evaluated is regular; otherwise, determine that the surface of the polyhedron to be evaluated is irregular.
[0104] In this embodiment, Figure 2 As shown in FIG. 1 , it is a schematic diagram of the boundary points of the irregular polyhedron to be evaluated. The enclosing sphere obtained after iteration according to the method in this embodiment is as follows: Figure 3 shown.
[0105] The above embodiments are merely examples and do not limit the scope of the present invention. These embodiments can also be implemented in various other ways, and various omissions, substitutions, and changes can be made without departing from the technical concept of the present invention.
Claims
1. A method for evaluating the regularity of an irregular polyhedron surface, characterized in that: The following steps are involved: S1: Obtain three-dimensional data of boundary points of the polyhedron to be evaluated; S2: Obtaining the initial center coordinates of the enclosing sphere of the polyhedron to be evaluated based on the three-dimensional data of the boundary points; S3: Obtain the radius corresponding to the coordinates of the center of the current enclosing sphere according to the three-dimensional data of the boundary point; S4: Determine whether the number of iterations exceeds the preset maximum number of iterations. If so, proceed to step S6. Otherwise, determine whether the current enclosing sphere is the minimum enclosing sphere of the polyhedron to be evaluated. If so, proceed to S6. Otherwise, proceed to step S5. S5: Update the coordinates of the center of the enclosing sphere, and return to step S3; S6: Obtain the distance from the boundary point of the polyhedron to be evaluated to the center of the containing sphere, and obtain the evaluation parameters of the boundary point of the polyhedron to be evaluated, and obtain the surface regularity of the polyhedron to be evaluated according to the evaluation parameters; The specific steps of judging whether the current enclosing sphere is the minimum enclosing sphere of the polyhedron to be evaluated include: Get the maximum and second maximum values in the Euclidean distance set, and confirm the boundary points corresponding to the maximum and second maximum values; Determine whether the following three conditions are met at the same time: The moving increment of the 3D coordinates of the center of the containing sphere in this iteration and the previous iteration is less than the preset increment threshold, the difference between the maximum value and the second maximum value in the Euclidean distance set is less than the preset difference threshold, and the angle formed by the line connecting the boundary points corresponding to the maximum value and the second maximum value and the center of the sphere is greater than π / 2. If both conditions are met at the same time, the current enclosing sphere is the smallest enclosing sphere of the polyhedron to be evaluated; The step S5 specifically includes: S51: Get the three-dimensional coordinate value of the boundary point corresponding to the maximum value in the Euclidean distance set and the vector between the center of the current enclosing sphere in, is the three-dimensional coordinate value of the boundary point corresponding to the maximum value, (x O ,y O ,z O ) is the coordinate O of the center of the current enclosing sphere t The three-dimensional coordinate value of S52: Update the step size according to the preset learning rate: Among them, lr is the preset learning rate and res is the step size; S53: Update the three-dimensional coordinate value of the center of the enclosing sphere: THE t+1 =The t +res Among them, O t+1 is the updated three-dimensional coordinate of the center of the enclosing sphere, O t is the three-dimensional coordinate of the center of the current containing ball, and returns to step S3; The step S6 specifically includes: S61: Obtaining evaluation parameters of the boundary points of the polyhedron to be evaluated, the evaluation parameters being the ratio P of the distance from the boundary points to the center of the current containing sphere to the radius of the containing sphere, obtaining the mean and standard deviation of the evaluation parameters, and confirming the regularity judgment interval; S62: Obtaining a ratio of the number of boundary points of the evaluation parameter within the regularity judgment interval to the total number of boundary points, and determining whether the ratio is greater than a preset regularity threshold; if so, determining that the surface of the polyhedron to be evaluated is regular; otherwise, determining that the surface of the polyhedron to be evaluated is irregular; The mean values of the evaluation parameters are: Where N is the number of boundary points, P i is the ratio of the distance from the i-th boundary point to the center of the current containing sphere to the radius of the containing sphere; The standard deviation of the evaluation parameter is: The regularity judgment interval is [μ(P)-α·σ(P),μ(P)+α·σ(P)], where α is an interval scaling parameter.
2. The method for evaluating the surface regularity of an irregular polyhedron according to claim 1, characterized in that: The initial coordinate formula of the center of the containing sphere is: Among them, O original is the initial coordinate of the center of the containing sphere, are the average values of the coordinates of all boundary points of the polyhedron to be evaluated in the x, y, and z directions, respectively. N is the number of boundary points. (x i ,y i , z i ) is the coordinate of the i-th boundary point of the polyhedron to be evaluated.
3. The method for evaluating the surface regularity of an irregular polyhedron according to claim 1, characterized in that: The step S3 comprises: S31: Obtain a set of Euclidean distances from the boundary points of the polyhedron to be evaluated to the center of the current containing sphere; S32: Obtain the maximum value of the Euclidean distance set as the radius of the containing sphere.
4. The method for evaluating the surface regularity of an irregular polyhedron according to claim 3, characterized in that: The Euclidean distance set is: Among them, d i is the Euclidean distance from the i-th boundary point to the center of the current containing sphere, d i =||O t -(x i ,y i ,z i )||2 Among them, O t is the coordinate of the center of the current containing sphere, (x i ,y i , z i ) is the coordinate of the i-th boundary point of the polyhedron to be evaluated.
5. The method for evaluating the surface regularity of an irregular polyhedron according to claim 3, characterized in that: The calculation formula of the inclusion sphere radius in step S32 is: Where R is the radius of the containing sphere.
Citation Information
Patent Citations
Method for evaluating roundness and sphericity errors based on self-adaption iteration neighbourhood search
CN101957191A
Sphere target recognition method and recognition device based on three-dimensional point cloud data
CN112307971A