A part screening method and system based on quasi-newton optimization process
By using a quasi-Newtonian optimization process to scan feature point coordinates and calculate iterative deviations for parts, the problem of inaccurate detail detection in parts inspection is solved, achieving high precision and high efficiency in parts inspection.
Patent Information
- Application Number
- CN202211494201.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2042-11-25
AI Technical Summary
Existing technologies cannot accurately inspect the details of various parts in component inspection, resulting in inaccurate inspection results.
A method based on quasi-Newton optimization is adopted. The coordinates of feature points are obtained by scanning the part to be tested, an initial transformation is performed, and the quasi-Newton optimization equation is called to perform iterative deviation calculation. By combining the optimization coefficient and transformation parameters, the deviation between the part and the standard part is judged point by point to ensure the accurate matching of each feature point.
It improves the accuracy and efficiency of part inspection, ensures the precision of each feature point detection, reduces the number of iterations, and improves the accuracy of inspection results.
Smart Images

Figure CN115760817B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of parts inspection technology, and in particular to a parts screening method and system based on a quasi-Newtonian optimization process. Background Technology
[0002] In the field of 3D vision imaging, rigid body transformation motion is often used to match and align the 3D measurement point set of the part under test with the 3D measurement point set of the standard part, and then the deviation between the 3D point sets is used to determine whether the part under test is qualified.
[0003] When comparing the deviations between the 3D measurement point set of the part under test and the 3D measurement point set of the standard part, the least squares method is often used to calculate the deviation. The least squares method calculates the average deviation of the overall structure of the part under test and compares this average with that of the standard part. The resulting data reflects more the overall quality of the part and cannot provide precise measurement of individual structural components.
[0004] The quality of the part under test can affect the final assembly result and the accuracy of related instruments and equipment. Therefore, it is necessary not only to inspect the overall structural quality of the part under test, but also to inspect the local details of the part under test in order to ensure the accuracy requirements. Summary of the Invention
[0005] This application provides a part screening method and system based on a quasi-Newtonian optimization process to solve the problem that the part inspection results are inaccurate because the details of each part are not inspected during the part inspection process.
[0006] Firstly, this application provides a part selection method based on a quasi-Newtonian optimization process, including:
[0007] Scan the part to be tested to obtain the first point set data; the first point set data is used to characterize the coordinates of the feature points of the part to be tested.
[0008] The first point set data is initialized and transformed to obtain the first initial point set data;
[0009] The first initial point set data is standardized by applying a quasi-Newton optimization equation to obtain the iterative deviation of the first initial point set data; the quasi-Newton optimization equation is constructed based on the deviation of the part to be tested and the part deviation equation; the iterative deviation includes a first iterative deviation and a second iterative deviation.
[0010] If the difference between the first iteration deviation and the second iteration deviation is less than or equal to the iteration deviation threshold, then the optimal iteration point set data is output.
[0011] If the deviation between the optimal iterative point set data and the point set data of the standard part is less than the deviation threshold, then the part to be tested is marked as qualified.
[0012] Optionally, the step of initializing and transforming the first point set data includes:
[0013] Based on the type of the part to be tested, a second set of point data is obtained to characterize the coordinates of feature points of a standard part; the standard part is of the same type as the part to be tested.
[0014] Calculate the initial transformation equation based on the first point set data and the second point set data;
[0015] The first point set data is initialized and transformed according to the initialization transformation equation to obtain the first initial point set data.
[0016] Optionally, the method further includes:
[0017] An objective function is established based on the deviation of the part to be tested; the objective function is used to calculate the deviation value of the part to be tested.
[0018] The modified gradient function of the objective function is optimized to obtain a quasi-Newton optimization equation.
[0019] Optionally, optimizing the deformed gradient function of the objective function includes adding optimization coefficients to the deformed gradient function, wherein the step of adding optimization coefficients includes:
[0020] Initialize the optimization coefficients and assign initial values to the optimization coefficients; the optimization coefficients include a first optimization coefficient, a second optimization coefficient, and an intermediate coefficient;
[0021] Obtain the correlation between the first optimization coefficient, the second optimization coefficient, and the intermediate coefficients, and establish the optimization coefficient equation;
[0022] The optimization coefficient equation is added to the deformed gradient function to obtain the quasi-Newton optimization equation.
[0023] Optionally, the step of applying the quasi-Newton optimization equation to standardize the first initial point set data to obtain the iterative bias of the first initial point set data includes:
[0024] Based on the quasi-Newton optimization equation, calculate the first initial point set iterative data of the first initial point set data;
[0025] The difference between the first initial point set data and the first initial point set iterative data is calculated to obtain the first iteration deviation.
[0026] Optionally, the step of obtaining the first initial iterative data of the first initial point set data according to the quasi-Newton optimization equation includes:
[0027] Based on the quasi-Newton optimization equation, the transformation parameters for standardizing the first initial point set data are obtained; the transformation parameters include rotation parameters and offset parameters.
[0028] The first initial point set iterative data is obtained based on the first initial point set data, the rotation parameters, and the offset parameters.
[0029] Optionally, after calculating the difference between the first initial point set data and the first initial point set iterative data to obtain the first iteration deviation, the method further includes:
[0030] Based on the quasi-Newtonian optimization equation, the second initial point set iteration data is obtained;
[0031] The difference between the second initial point set iteration data and the first initial point set iteration data is calculated to obtain the second iteration deviation.
[0032] Optionally, the method further includes:
[0033] Calculate the difference between the first iteration deviation and the second iteration deviation;
[0034] If the difference between the first iteration deviation and the second iteration deviation is less than the iteration deviation threshold, then the optimal iteration point set data is output.
[0035] If the deviation between the optimal iterative point set data and the point set data of the standard part is less than the deviation threshold, then the part to be tested is marked as qualified.
[0036] If the difference between the first iteration deviation and the second iteration deviation is greater than the iteration deviation threshold, then the third iteration deviation is obtained, and the difference between the third iteration deviation and the second iteration deviation is calculated.
[0037] Optionally, the method further includes:
[0038] Set an iteration count threshold;
[0039] Record the number of iterations to calculate the deviation;
[0040] If the number of iterations required to calculate the deviation exceeds the threshold number of iterations, then the calculation of the iteration deviation is stopped.
[0041] Secondly, this application also provides a parts screening system based on a quasi-Newtonian optimization process, characterized in that it includes: a data acquisition module, a processing module, and a decision module;
[0042] The acquisition module is used to scan the part under test and obtain a first set of point data; the first set of point data is used to characterize the part under test.
[0043] The processing module is used to perform initialization transformation on the first point set data to obtain the first initial point set data;
[0044] The processing module is also used to construct a quasi-Newtonian optimization equation based on the deviation of the part to be tested and the part deviation equation;
[0045] The processing module is also used to call the quasi-Newton optimization equation to perform a standardization transformation on the first initial point set data to obtain the iteration deviation of the first initial point set data; the iteration deviation includes a first iteration deviation and a second iteration deviation.
[0046] The decision module is used to output the optimal iteration point set data when the difference between the first iteration deviation and the second iteration deviation is less than or equal to the iteration deviation threshold.
[0047] The decision module is also used to mark the test part as qualified when the deviation between the optimal iterative point set data and the point set data of the standard part is less than the deviation threshold.
[0048] As described above, this application provides a part screening method and system based on a quasi-Newton optimization process. The method first scans the part to be tested, obtaining the coordinates of several feature points representing the part, forming a first point set. Then, an initialization transformation is performed on the first point set to obtain initial point set data. This initialization transformation is equivalent to a coarse matching between the part to be tested and a standard part, reducing the number of iterations required in the inspection and screening process. Next, a quasi-Newton optimization equation is established to iteratively transform the first initial point set until the iteration deviation between each iteration result is less than an iteration deviation threshold, at which point the part to be tested is marked as qualified. This method incorporates optimization coefficients into the quasi-Newton optimization equation and judges each feature point by comparing its distance from the corresponding point on the standard part to the distance on the normal vector, making the screening results more accurate. Attached Figure Description
[0049] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 A schematic diagram of a parts selection process based on a quasi-Newtonian optimization process is provided for an embodiment of this application;
[0051] Figure 2A schematic diagram illustrating the point set data matching between the part under test and the standard part provided in this application embodiment;
[0052] Figure 3 This is a schematic diagram of the first point set data initialization transformation provided in an embodiment of this application;
[0053] Figure 4 This is a schematic diagram illustrating the transformation of the first initial point set data to obtain the optimal point set data through iterative transformation, as provided in the embodiments of this application. Detailed Implementation
[0054] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0055] In the field of 3D vision imaging, rigid body transformation motion is often used to match and align the 3D measurement point set of the part under test with the 3D measurement point set of a standard part. The deviation between the 3D point sets is then used to determine whether the part under test is qualified. However, in actual inspection, simply using the least squares method to match the point sets of the part under test and the standard part cannot perform detailed inspection of every feature point and the features composed of each type of feature point, thus resulting in low inspection accuracy.
[0056] In view of the above problems, this application provides a part selection method based on a quasi-Newtonian optimization process, such as... Figure 1 As shown, the steps include:
[0057] S101: Scan the part to be tested to obtain the first point set data;
[0058] The first set of point data is used to characterize the coordinates of feature points of the part under test. During part inspection, for a small number of parts, measuring tools can be used for dimensional inspection to determine whether the parts are qualified. However, in the case of mass production, the inspection method needs to balance accuracy and efficiency; therefore, measuring each part individually with measuring tools does not meet this requirement. Instead, the scanned image of the part under test is analyzed to determine whether it meets production standards.
[0059] The methods for acquiring scanned images of the part under test can include, but are not limited to, structured light scanning, binocular stereo vision, and time-of-flight methods. This part is not the focus of this application, therefore, the principles of each method will not be elaborated upon. Using any of the above methods, a point cloud image of the part under test can be acquired. Furthermore, the point cloud image can be segmented based on the point cloud image and the features of the part under test to distinguish the features of each part, and feature points can be selected to form a point set to characterize the part under test.
[0060] For example, for a hexagonal bolt, after acquiring a 3D image of the bolt, a coordinate system can be established based on the 3D image, and the bolt's shank and head can be segmented and feature points marked. The head of the hexagonal bolt has a hexagonal shape, therefore, the relevant feature points of the hexagonal portion need to be marked to fully represent the characteristics of the hexagonal bolt.
[0061] S102: Perform initialization transformation on the first point set data to obtain the first initial point set data;
[0062] Initialization transformation refers to the comparison with standard parts during the inspection and screening process of the part to be tested. The method used in this application embodiment is to match the first set of point data with the point set data corresponding to the standard part. Through multiple iterations of the first set of point data, the process stops only when a preset iteration condition is reached. Then, the iteration deviation corresponding to the stop iteration is calculated to determine whether the part is qualified.
[0063] like Figure 2 As shown, when part A is scanned, its position is exactly the same as that of the standard part during scanning. Therefore, its image only needs to be moved in the coordinate system to match and align. Thus, during the iteration process, only a few iterations are needed to verify whether part A is qualified. However, when part B is scanned, its pose differs significantly from that of the standard part. Therefore, multiple iterations are required to match and align it, thereby verifying whether part B is qualified.
[0064] Because the image of the part under test is sometimes acquired without a specific placement or arrangement, the coordinates of the acquired image data within the same coordinate system vary significantly. This large coordinate difference results in different iteration counts for the corresponding point sets. Some image point sets require too many iterations to reach the preset iteration conditions due to the distribution of the images within the coordinate system. To improve the efficiency of detection and screening, the first point set is initialized before iteration to obtain a more ideal initial point set. This initialization transformation only changes the initial position of the corresponding image, without altering the actual dimensions of the part under test. Therefore, the first point set data after initialization remains valid data.
[0065] When initializing the first point set data, a transformation basis is required. Therefore, a second point set data, used to characterize the coordinates of feature points of a standard part, is also needed as the transformation direction for the first point set data. Using the second point set data as a reference, the first point set data undergoes initialization transformation. The steps for initializing the first point set data include:
[0066] Based on the type of part to be tested, obtain a second set of point data for characterizing the coordinates of feature points of a standard part;
[0067] Calculate the initial transformation equation based on the first point set data and the second point set data;
[0068] The first point set data is initialized and transformed according to the initialization transformation equation to obtain the first initial point set data.
[0069] The standard part is of the same type as the part under test to ensure it can be used as a reference for inspection. The second point set data can be obtained by searching for a standard part of the same type in the database based on the type of the part under test, and simultaneously acquiring the second point set data of that standard part. Alternatively, known standard parts can be scanned in real time to acquire the second point set data, which is then stored in the database for subsequent testing.
[0070] like Figure 3 As shown, a rigid body transformation based on the least squares method can be used as the basis for initializing the transformation of the first point set data. In the process of obtaining the least squares rigid body transformation, the transformation matrix is obtained based on the second point set data. It is important to understand that the initial transformation of the first point set data according to the transformation matrix generally does not directly yield the second point set data. Instead, it yields relatively ideal initial values. Based on these initial values, the optimal first point set data is obtained through multiple iterations, and deviation checks are performed to determine whether the part under test is qualified.
[0071] The first initial point set data is obtained by initializing and transforming the first point set data. The deviation between the first initial point set data and the second point set data can be calculated first. If the deviation is less than the deviation threshold, the part under test can be directly judged as qualified. In more cases, iterative transformation of the first initial point set data is required, and the iteration deviation generated by each iteration is used to determine whether the iteration has ended.
[0072] S103: Apply the quasi-Newton optimization equation to standardize the first initial point set data to obtain the iteration deviation of the first initial point set data;
[0073] The quasi-Newton optimization equation provided in this embodiment is used to process the 3D point set corresponding to the 3D image of the part under test. By constructing a quasi-Newton optimization process, the rigid body transformation during the iterative transformation of the first initial point set data to the point set data corresponding to the standard part is obtained. Then, the first initial point set data is standardized according to the rigid body transformation to obtain the first initial point set data after one iteration. The rigid body transformation involves rotation, offset, and other transformations on the image of the part under test. The target formula required for constructing the quasi-Newton optimization process in this embodiment is as follows:
[0074] η=min max|((Rp i +T)-q i )*n i |
[0075] Where η represents the deviation between the point set data of the part under test and the point set data of the standard part, R represents the rotation matrix corresponding to the rigid body transformation process, T represents the offset vector corresponding to the rigid body transformation process, and p i This represents the point set data corresponding to the part to be tested, where i refers to the number of each feature point, and q... i This represents the point set data corresponding to the standard part, n i The normal vector represents the point set data corresponding to the standard part.
[0076] As shown in the formula annotation, 'i' refers to the number of each feature point. Therefore, this embodiment uses a quasi-Newton optimization process to obtain the maximum deviation between the feature points of the part under test and the corresponding feature points of the standard part. This allows for the detection of the maximum deviation of each feature point, improving the detection accuracy of each part and achieving higher precision detection results. It is understood that each part can include several feature sections, and each feature section can be characterized by several feature points. Therefore, using a quasi-Newton optimization process to detect the part under test ensures that no feature points are missed during the detection process. The feature point with the largest deviation in each group is compared with a deviation threshold; if the deviation exceeds the threshold, it is considered unqualified.
[0077] After standardization, the first initial point set data is obtained. The difference between the first initial point set data and the first point set data is used as the iteration bias. Conditions can be set to terminate the iteration process based on the iteration bias.
[0078] When constructing the quasi-Newton optimization process, the second point set data is used as the reference, and the first initial point set data is iteratively transformed into the second point set data in a certain direction. The steps include:
[0079] An objective function is established based on the deviation of the part to be tested; the objective function is used to calculate the deviation value of the part to be tested.
[0080] The modified gradient function of the objective function is optimized to obtain a quasi-Newton optimization equation.
[0081] This application embodiment determines whether a part is qualified by detecting its deviation. Therefore, an objective function is established based on the part deviation. As shown in the objective function formula above, when judging the deviation of the part to be tested, the second point set data is used as a reference. This is equivalent to calculating the projection distance between the points of the first initial point set data and the second point set data onto the normal vector of the second point set data. This distance is the deviation.
[0082] like Figure 4 As shown, the iterative transformation process is equivalent to finding the optimal solution for the deformed gradient function of the objective function along a specific search direction. Therefore, the deformed gradient function of the objective function contains parameters for the transformation. Optimizing the deformed gradient function also facilitates the selection of optimal parameters. By adding optimization coefficients to the deformed gradient function, the quasi-Newton optimization equation can be obtained:
[0083] η=f(x k , λ k ξ k )=∑ i∈I1 ×0.5λ k [Φi(x k ξ k )] 2 +∑ i∈I2 ×0.5λ k [Φi(x k ξ k )] 2
[0084] Where, λ k ξ k All of these are optimization coefficients. The optimization coefficients are used to ensure that each iteration finds the feature point in the test part's point set data that has the largest deviation from the corresponding feature point in the standard part's point set data. The direction of the test part's point set data iteration is the direction with the smallest deviation from the standard part's point set data, thereby ensuring detection accuracy.
[0085] I1 and I2 are derived from Φi(x k ξ k ) and λ k The set to be determined, x k This represents the rotation angle (rotation parameter) and translation vector (offset parameter) corresponding to the k-th transformation.
[0086] Optimizing the deformed gradient function of the objective function further includes adding optimization coefficients to the deformed gradient function, the steps of which include:
[0087] Initialize the optimization coefficients and assign initial values to the optimization coefficients; the optimization coefficients include a first optimization coefficient, a second optimization coefficient, and an intermediate coefficient;
[0088] Obtain the correlation between the first optimization coefficient, the second optimization coefficient, and the intermediate coefficients, and establish the optimization coefficient equation;
[0089] The optimization coefficient equation is added to the deformed gradient function to obtain the quasi-Newton optimization equation.
[0090] The optimization coefficients will also change with the iteration of the first initial point set data; therefore, the optimization coefficients should have initial values. In calculating the optimization coefficients λ... k ξ k When this is needed, an intermediate coefficient σ is required, and the expression for σ is in λ. k The positive and negative states differ slightly at different times:
[0091] σ=∑ i=1 (e i (x k )-ξ k )λ ki , λ ki >0
[0092] σ=∑ i=1 (e i (x k )-ξ k ), λ ki ≤0
[0093] σ is the deviation and optimization coefficient ξ for each feature point k The sum of the differences. λ can be obtained from the formula for calculating σ. k The calculation formula is as follows:
[0094] λ ki =(e i (x k )-ξ k )λ ki / σ,λ ki >0
[0095] λ ki =(e i (x k )-ξ k ) / σ,λ ki <0
[0096] λ ki =0,λ ki =0
[0097] According to λ ki The calculation formula can be used to obtain ξ k The calculation formula is as follows:
[0098] ξ k =∑ i=0 λ k *e i (x k )
[0099] In summary, because the optimization coefficient λ k ξ k The expression and x k Correlation, therefore the optimization coefficient λ k ξ k After each iteration, it will vary with x. k The changes and updates are achieved through a quasi-Newton optimization process that updates the optimization coefficients in real time, and iterates the point set data to ensure that the maximum deviation is minimized in each iteration, thereby ensuring the final detection accuracy. At the same time, it also makes each iteration more accurate and reduces the number of iterations.
[0100] After adding optimization coefficients to the deformation gradient function, the first initial point set data can be standardized according to the quasi-Newton optimization equation to obtain the iteration bias of the first initial point set data. The steps include:
[0101] Based on the quasi-Newton optimization equation, calculate the first initial point set iterative data of the first initial point set data;
[0102] The first initial point set data is used to obtain the first initial point set iterative data based on rotation and translation. This first initial point set iterative data is used to calculate the deviation from the point set data corresponding to the standard part. The part under test is judged to be qualified by determining whether the deviation is less than a deviation threshold. Therefore, according to the quasi-Newton optimization equation, the steps for calculating the first initial point set iterative data can be further refined as follows:
[0103] Based on the quasi-Newton optimization equation, the transformation parameters for standardizing the first initial point set data are obtained; the transformation parameters include rotation parameters and offset parameters.
[0104] The first initial point set iterative data is obtained based on the first initial point set data, the rotation parameters, and the offset parameters.
[0105] As shown in the formula above, in the process of calculating the iterative data of the first initial point set, x is required. k Participation, and x k It is unknown, and can represent transformation parameters. Each search is performed in a specific direction, and the calculation of the optimal solution involves finding x. k And the point set data after iteration. In the above quasi-Newton optimization equation, Φi(x k ξ k ) contains x k The corresponding formula for the part is:
[0106] Φi(x k ξ k )=|e i (x k )|-ξ k ;
[0107] e i (x k () represents the iteration deviation generated in the k-th transformation. Since the transformation is performed on a 3D image, the point set data involved is also 3D point set data, therefore x k = (α, β, γ, t) x , t y , t z ), that is, x k It includes rotation angles and translation vectors in the x, y, and z axes. The initial point set data can be determined based on x... k The transformation is performed to obtain the first initial point set of iterative data.
[0108] The difference between the first initial point set data and the first initial point set iterative data is calculated to obtain the first iteration deviation.
[0109] It is usually difficult to obtain the optimal point set in a single iteration. Therefore, the iterative data of the first initial point set is also used to calculate the first iteration deviation. The difference between the first iteration deviation and the second iteration deviation, third iteration deviation, etc., generated by subsequent iterations is used to determine whether the iteration has terminated. Therefore, to ensure that the iteration process does not continue indefinitely, it is also necessary to determine whether the iteration termination condition has been reached based on the difference between the iteration deviations. The iteration termination condition can be an iteration deviation threshold. After calculating the difference between the first initial point set data and the iterative data of the first initial point set to obtain the first iteration deviation, the steps further include:
[0110] Based on the quasi-Newtonian optimization equation, the second initial point set iteration data is obtained;
[0111] The difference between the second initial point set iteration data and the first initial point set iteration data is calculated to obtain the second iteration deviation.
[0112] It should be noted that the second initial point set iteration data is not the data obtained by iterating the second point set data corresponding to the standard part, but rather the point set data obtained by iterating the first initial point set iteration data. It represents the feature points of the part under test whose pose has changed. The difference between the second initial point set iteration data and the second point set data representing the feature points of the standard part can also be calculated to determine whether the part under test is qualified. If the optimal point set has not yet been reached, iteration continues, and the iteration deviation is calculated based on the second initial point set iteration data and the first initial point set iteration data to determine whether the iteration termination condition has been reached. If the iteration termination condition is reached and the deviation value is still greater than the deviation threshold, the part under test is marked as unqualified.
[0113] In summary, the initial point set data is standardized using a quasi-Newton optimization equation. First, an objective function is established based on the calculation method for part deviation. The deformation gradient function is obtained from the objective equation, containing optimization coefficients and relevant parameters for the transformation. When the iteration deviation for the current transformation number is obtained, the corresponding rotation angle and translation vector can be derived. Based on the rotation angle and translation vector, new initial values can be calculated, and iteration continues to obtain the optimal iterative point set data. The deviation of the part under test is then calculated, and its qualification is determined.
[0114] S104: If the difference between the first iteration deviation and the second iteration deviation is less than or equal to the iteration deviation threshold, then output the optimal iteration point set data.
[0115] The difference between the first iteration deviation and the second iteration deviation needs to be calculated, and the decision on whether to continue iteration or output the optimal iteration point set data needs to be made based on the difference. The steps include:
[0116] Calculate the difference between the first iteration deviation and the second iteration deviation;
[0117] If the difference between the first iteration deviation and the second iteration deviation is less than the iteration deviation threshold, then the optimal iteration point set data is output.
[0118] If the deviation between the optimal iterative point set data and the point set data of the standard part is less than the deviation threshold, then the part to be tested is marked as qualified.
[0119] If the difference between the first iteration deviation and the second iteration deviation is greater than the iteration deviation threshold, then the third iteration deviation is obtained, and the difference between the third iteration deviation and the second iteration deviation is calculated.
[0120] The optimal iterative point set data is used to calculate the difference with the second point set data representing the standard part, and compared with the deviation threshold to determine whether the part under test is qualified.
[0121] If the difference between the first iteration deviation and the second iteration deviation is greater than the iteration deviation threshold, the first initial point set data will continue to iterate, and further iteration deviations will occur. When the continuously generated iteration deviations, such as the difference between the first and second iteration deviations, no longer change significantly, it can be considered that the current iteration count has reached the optimal state. Continuing the iteration no longer has any practical effect on the final judgment of whether the part under test is qualified, so the iteration can be stopped. Furthermore, the iteration point set data corresponding to the point where iteration stops is taken as the optimal iteration point set data.
[0122] Using the difference between iteration deviations as the iteration termination condition can reduce the occurrence of endless iterations. However, for some parts under test, a large number of iterations are required to determine whether they are qualified. This wastes a lot of computing power, burdens the computing equipment, and affects the inspection efficiency. Therefore, in addition to using the iteration deviation as a preset condition to limit the inspection accuracy, it is also necessary to set the number of iterations to ensure iteration efficiency. The steps include:
[0123] Set an iteration count threshold;
[0124] Record the number of iterations to calculate the deviation;
[0125] If the number of iterations required to calculate the deviation exceeds the threshold number of iterations, then the calculation of the iteration deviation is stopped.
[0126] The number of iterations is set for standard parts that meet general conditions, and this number of iterations applies to most parts, thus having general applicability. Limiting the iteration process by the number of iterations ensures the efficiency of the inspection. Furthermore, based on actual inspection results, parts that have not reached the optimal solution after exceeding the number of iterations can be separately categorized and subjected to further inspection to ensure that no parts are wasted.
[0127] S105: If the deviation between the optimal iterative point set data and the point set data of the standard part is less than the deviation threshold, then the part to be tested is marked as qualified.
[0128] The deviation threshold, used to determine whether a part under test is qualified, can influence the number of iterations by setting the deviation threshold. The quasi-Newton optimization process can specify different iteration directions based on the magnitude of the deviation threshold, thereby maximizing the matching and alignment of the initial point set data with the point set data corresponding to the standard part, thus improving the detection accuracy of the part under test.
[0129] This application also provides a parts screening system based on a quasi-Newtonian optimization process. It includes: a data acquisition module, a processing module, and a decision module.
[0130] The acquisition module is used to scan the part under test and obtain a first set of point data; the first set of point data is used to characterize the part under test.
[0131] The processing module is used to perform initialization transformation on the first point set data to obtain the first initial point set data;
[0132] The processing module is also used to construct a quasi-Newtonian optimization equation based on the deviation of the part to be tested and the part deviation equation;
[0133] The processing module is also used to call the quasi-Newton optimization equation to perform a standardization transformation on the first initial point set data to obtain the iteration deviation of the first initial point set data; the iteration deviation includes a first iteration deviation and a second iteration deviation.
[0134] The decision module is used to output data indicating that the part under test is qualified when the difference between the first iteration deviation and the second iteration deviation is less than or equal to the iteration deviation threshold.
[0135] This application provides a part screening method and system based on a quasi-Newton optimization process. The method first scans the part to be tested, obtaining the coordinates of several feature points representing the part, forming a first point set. Then, an initialization transformation is performed on the first point set to obtain initial point set data. This initialization transformation is equivalent to a coarse matching between the part to be tested and a standard part, reducing the number of iterations required in the inspection and screening process. Next, a quasi-Newton optimization equation is established to iteratively transform the first initial point set until the iteration deviation between each iteration result is less than an iteration deviation threshold, at which point the part to be tested is marked as qualified. The method incorporates optimization coefficients into the quasi-Newton optimization equation and judges each feature point by comparing its distance on the normal vector between each feature point of the part to be tested and its corresponding point on the standard part, making the screening results more accurate.
[0136] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.
Claims
1. A part screening method based on a quasi-Newton optimization procedure, characterized in that, The method comprises the following steps: scanning a to-be-tested part to obtain first point set data; the first point set data is used to represent the coordinates of feature points of the to-be-tested part; a target function is established according to the deviation of the to-be-tested part; the target function is used to calculate the deviation value of the to-be-tested part; a deformation gradient function of the target function is optimized to obtain a quasi-Newton optimization equation; the first point set data is initialized to obtain first initial point set data; the quasi-Newton optimization equation is called to perform standardization transformation on the first initial point set data to obtain the iterative deviation of the first initial point set data; the quasi-Newton optimization equation is obtained according to the deviation of the to-be-tested part and a part deviation equation; the iterative deviation includes a first iterative deviation and a second iterative deviation; the quasi-Newton optimization equation is called to perform standardization transformation on the first initial point set data to obtain the iterative deviation of the first initial point set data; the steps include: according to the quasi-Newton optimization equation, the first initial point set iterative data of the first initial point set data is calculated; the difference between the first initial point set data and the first initial point set iterative data is calculated to obtain the first iterative deviation; if the difference between the first iterative deviation and the second iterative deviation is less than or equal to an iterative deviation threshold, the optimal iterative point set data is output; if the deviation between the optimal iterative point set data and the point set data of the standard part is less than a deviation threshold, the to-be-tested part is marked as qualified.
2. The method of claim 1, wherein, the step of initializing the first point set data includes: according to the type of the to-be-tested part, second point set data representing the coordinates of feature points of the standard part is obtained; the standard part and the to-be-tested part are of the same type; an initialization transformation equation is calculated according to the first point set data and the second point set data; the first point set data is initialized according to the initialization transformation equation to obtain the first initial point set data.
3. The method of claim 1, wherein, the optimization of the deformation gradient function of the target function includes adding an optimization coefficient to the deformation gradient function; the step of adding the optimization coefficient includes: the optimization coefficient is initialized and an initial value is assigned to the optimization coefficient; the optimization coefficient includes a first optimization coefficient, a second optimization coefficient and an intermediate coefficient; the correlation of the first optimization coefficient, the second optimization coefficient and the intermediate coefficient is obtained to establish an optimization coefficient equation; the optimization coefficient equation is added to the deformation gradient function to obtain the quasi-Newton optimization equation.
4. The method of claim 1, wherein, the step of obtaining the first initial point set iterative data of the first initial point set data according to the quasi-Newton optimization equation includes: the transformation parameters when the first initial point set data is standardized are obtained according to the quasi-Newton optimization equation; the transformation parameters include rotation parameters and offset parameters; the first initial point set iterative data is obtained according to the first initial point set data, the rotation parameters and the offset parameters.
5. The method of claim 1, wherein, after calculating the difference between the first initial point set data and the first initial point set iterative data to obtain the first iterative deviation, the steps further include: the second initial point set iterative data is obtained according to the quasi-Newton optimization equation; Calculate the difference between the second initial point set iteration data and the first initial point set iteration data to obtain a second iteration deviation.
6. The method of claim 1, wherein, Further comprising: Calculate the difference between the first iteration deviation and the second iteration deviation; If the difference between the first iteration deviation and the second iteration deviation is less than the iteration deviation threshold, output the optimal iteration point set data; If the deviation between the optimal iteration point set data and the point set data of the standard part is less than the deviation threshold, mark the test part as qualified; If the difference between the first iteration deviation and the second iteration deviation is greater than the iteration deviation threshold, calculate a third iteration deviation, and calculate the difference between the third iteration deviation and the second iteration deviation.
7. The method of claim 6, wherein, Further comprising: Set an iteration number threshold; Record the number of times the iteration deviation is calculated; If the number of times the iteration deviation is calculated is greater than the iteration number threshold, stop calculating the iteration deviation.
8. A part screening system based on a quasi-Newton optimization procedure, characterized in that, Comprise: Acquisition module, processing module and decision module; The acquisition module is used to scan the test part to obtain first point set data; The first point set data is used to represent the test part; The processing module is used to establish a target function according to the deviation of the test part; the target function is used to calculate the deviation value of the test part; the deformation gradient function of the target function is optimized to obtain a quasi-Newton optimization equation; the first point set data is initialized to obtain first initial point set data; The processing module is also used to construct a quasi-Newton optimization equation according to the deviation of the test part and the part deviation equation; The processing module is also used to call the quasi-Newton optimization equation to perform standardization transformation on the first initial point set data to obtain the iteration deviation of the first initial point set data; the iteration deviation includes the first iteration deviation and the second iteration deviation; The step of calling the quasi-Newton optimization equation to perform standardization transformation on the first initial point set data to obtain the iteration deviation of the first initial point set data includes: calculating the first initial point set iteration data of the first initial point set data according to the quasi-Newton optimization equation; Calculate the difference between the first initial point set data and the first initial point set iteration data to obtain the first iteration deviation; The decision module is used to output the optimal iteration point set data when the difference between the first iteration deviation and the second iteration deviation is less than or equal to the iteration deviation threshold; The decision module is also used to mark the test part as qualified when the deviation between the optimal iteration point set data and the point set data of the standard part is less than the deviation threshold.
Citation Information
Patent Citations
Automatic part processing precision detecting method utilizing three-dimensional point cloud
CN109489548A
Non-rigid registration method and system
CN111462202A