A method for automatic layout of multiple cameras in a multi-view vision measurement system

By optimizing the multi-camera layout using simulated annealing and stochastic gradient descent algorithms, and combining camera position and angle constraints, the problems of low efficiency and insufficient accuracy of manual layout in multi-view vision measurement systems are solved, achieving efficient and accurate camera layout suitable for the inspection of large workpieces.

CN116187158BActive Publication Date: 2026-04-07SPEEDBOT ROBOTICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, the multi-camera layout of multi-view vision measurement systems is time-consuming and labor-intensive, lacks macroscopic control, makes it difficult to obtain the number of coverage points and coverage information of each camera, and is prone to defocusing, affecting measurement accuracy.

Method used

Simulated annealing and stochastic gradient descent algorithms are used to optimize camera layout. Combined with constraints such as camera position, angle and number of coverage points, camera parameters are automatically adjusted to achieve efficient and accurate multi-camera layout.

Benefits of technology

It automates the layout of multiple cameras, improves detection accuracy, and solves the problems of time-consuming and labor-intensive manual layout and low measurement accuracy, making it suitable for efficient detection of large workpieces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116187158B_ABST
    Figure CN116187158B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-camera automatic layout method in multi-vision measurement system, it includes: step S1: initialization camera layout parameter;According to the CAD model information of workpiece to be detected, the initial position of camera is obtained, and then the initial parameters of all cameras are obtained;Step S2: optimization camera initial layout based on simulated annealing algorithm;After obtaining the initial parameters of all cameras, iterative optimization is carried out using simulated annealing algorithm, and the optimal solution satisfying the constraint condition is obtained;Step S3: based on the differentiable adjustment promotion, the measurement accuracy and robustness of three-dimensional reconstruction under the above simulated annealing camera layout are improved.Based on the optimal layout obtained based on simulated annealing, the error back propagation algorithm based on stochastic gradient descent is used, and the Euclidean distance between reconstructed three-dimensional coordinates and CAD model coordinates is used as a loss function to optimize, to obtain a camera layout with better reconstruction robustness.The application has the advantages of high automation, strong layout practicality, good accuracy and robustness of three-dimensional reconstruction, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention mainly relates to the field of industrial product quality inspection technology, specifically to an automatic layout method for multiple cameras in a multi-view vision measurement system. Background Technology

[0002] With globalization, all kinds of manufacturing companies are trying to improve product qualification rates and enhance their global competitiveness, and product quality inspection is a crucial final step in this process. As manufacturing technology continues to develop and products are constantly innovated, more and more large-scale workpieces with complex shapes are being produced. Quality inspection of these large workpieces is a key focus, playing a vital role in the manufacture of high-quality products and the construction of a high-efficiency production environment.

[0003] Currently, the industrial sector mainly uses coordinate measuring machines (CMMs) for measurement. This method is not only inefficient, but also requires operators to have a certain level of skill to achieve the required accuracy.

[0004] Another traditional method is to use a laser scanner to 3D scan and reconstruct the parts. However, these laser scanners are expensive and also suffer from low efficiency and complex operation, which cannot meet the current needs of inspection departments.

[0005] To address this, other practitioners have proposed a multi-view vision-based measurement system, which offers advantages such as high efficiency, reasonable price, and applicability to all scenarios. In this technology, multi-camera deployment is a crucial first step, directly impacting the accuracy of subsequent multi-camera joint calibration and measurement.

[0006] Traditional multi-camera setups are mostly done manually, based on the characteristics of the object under test and the experience of optical engineers. However, manual setup has some problems:

[0007] First, manual setup is time-consuming and labor-intensive, requiring manual adjustment of the camera's horizontal angle, pitch angle, yaw angle, and camera position based on the image captured by each camera.

[0008] Secondly, manual layout lacks macro-level control over the entire layout. For example, it is impossible to directly obtain information such as the number of coverage points of each camera and how many cameras cover each point, which is closely related to subsequent measurements.

[0009] Finally, when manually setting up the camera, it is difficult to control the depth of field of each observation point within the field of view, which can easily lead to out-of-focus situations. Summary of the Invention

[0010] The technical problem to be solved by this invention is: in view of the problems existing in the prior art, this invention proposes an automatic layout algorithm with advantages such as high degree of automation, strong practicality of layout, and good accuracy and robustness of 3D reconstruction.

[0011] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0012] An automatic layout method for multiple cameras in a multi-view vision measurement system, comprising:

[0013] Step S1: Initialize camera layout parameters; obtain the initial position of the camera based on the coordinates of the CAD model of the workpiece to be measured, and obtain the initial layout;

[0014] Step S2: Optimize the initial layout based on the simulated annealing algorithm; Under the above initial layout, iteratively optimize based on the simulated annealing algorithm to obtain the optimal solution that satisfies the constraints;

[0015] Step S3: Based on the stochastic gradient descent algorithm, the above optimized layout is differentially adjusted to improve the accuracy of 3D reconstruction. Using the simulated annealing optimized layout as the initial value, the error backpropagation algorithm based on stochastic gradient descent is used to backpropagate the error by using the Euclidean distance between the 3D reconstructed coordinates and the CAD model coordinates as the loss function to obtain the adjusted camera layout.

[0016] As a further improvement to the method of the present invention: the process of step S1 includes:

[0017] Step S101: Read the CAD model information of the workpiece to be inspected;

[0018] Step S102: Downsample the model information according to the ratio, and use the downsampled position information as the initial position of the camera;

[0019] Step S103: Initialize the camera yaw angle, pitch angle and roll angle based on the camera position to obtain the initial parameters of all cameras.

[0020] As a further improvement to the method of the present invention: the process of step S3 includes:

[0021] Step S301: Generate the training dataset;

[0022] Step S302: Set the loss function, gradient descent optimizer, learning rate, and the number of iterations for backpropagation of data error in each round;

[0023] Step S303: Perform optimization training based on the error backpropagation method;

[0024] Step S304: Determine whether the convergence condition is met under the current dataset. If it is met, exit; otherwise, return to step one and start again.

[0025] As a further improvement to the method of the present invention: in step S301, when reading the simulated annealing optimization parameters, only the camera parameters of one side of the symmetrical edge are read, and the other side is obtained according to the symmetry relationship during the optimization process; based on the CAD model coordinates of the workpiece to be inspected and the rotation and translation matrices of all cameras, a projection of the target object in the workpiece to be inspected that meets the constraints under all cameras is obtained; based on the above projection, the projected coordinates of the target object are obtained based on the quadtree method.

[0026] As a further improvement to the method of the present invention: in step S302, based on the mean square loss function, the RMSprop gradient optimizer is selected, and the learning rate is automatically adjusted according to the number of iterations.

[0027] As a further improvement to the method of the present invention: step S303 includes:

[0028] The reconstructed 3D coordinates of the target object in each workpiece to be inspected under the corresponding camera and the intrinsic and extrinsic parameters of the corresponding camera are obtained based on the projection of the target object under the corresponding camera and the intrinsic and extrinsic parameters of the corresponding camera.

[0029] Calculate the mean square error of the reconstructed 3D coordinates and CAD model coordinates;

[0030] The mean square error of the target object in all the workpieces to be inspected is summed.

[0031] The error is fed back, the camera parameter values ​​are adjusted, and the next iteration begins.

[0032] As a further improvement to the method of the present invention: the constraints in step S2 include constraints on camera position and camera angle; there are range constraints on camera height, i.e., camera Z coordinate; there are also constraints on the range of variation of camera angle yaw angle, pitch angle and roll angle.

[0033] As a further improvement to the method of the present invention: the constraints in step S2 include the constraint of the number of observation points covered by the camera; the inverse of the average number of all camera coverage points is used as part of the loss energy function. During the optimization process, the smaller the value of this loss function, the more camera coverage points there are under the current camera layout; after optimization, the optimal solution that meets the requirement of maximizing the number of camera coverage points is obtained.

[0034] As a further improvement to the method of the present invention: the constraints in step S2 include the angle constraints of the two cameras observing the same point; the absolute distance between the current angles of the two cameras and 90 degrees is used as part of the loss energy function; during the optimization process, the smaller the value of this part of the loss function, the closer the current angles of the two cameras are to 90 degrees; finally, the optimal solution that satisfies the condition that the angles of the two cameras are close to 90 degrees is obtained.

[0035] As a further improvement to the method of the present invention: the constraints in step S2 include the constraints on the distance between cameras; the absolute distance between cameras and the set threshold is used as part of the loss energy function; during the optimization process, the smaller the value of this part of the loss function, the closer the current camera distance is to the set threshold; finally, the optimal solution that meets the condition that the camera distance is close to the set threshold is obtained.

[0036] As a further improvement to the method of the present invention: the constraints in step S2 include: depth of field constraints; firstly, under the conditions of fixed focus, fixed aperture and fixed circle of confusion diameter, the depth of field of each camera at different working distances is calculated; then, the distance from the optical center to the target object of the current workpiece to be inspected is calculated and projected to the intersection of the ray from the optical center to the optical center and the workpiece plane; finally, it is determined whether the projected distance is within the depth of field range. If so, the point is determined as the coverage point of the current camera; otherwise, it is not included in the coverage point of the current camera; finally, the depth of field constraint is achieved through the camera coverage point constraint.

[0037] As a further improvement to the method of the present invention: the constraints in step S2 include: aperture normal constraint; aperture normal constraint is to avoid the situation where the angle is too large and the field of view is poor by constraining the angle between the line connecting the camera optical center and the measurement point and the normal of the measurement point.

[0038] As a further improvement to the method of the present invention, the constraints in step S2 include: hole occlusion constraints. Hole occlusion constraints aim to exclude measuring points that satisfy the above-mentioned coverage constraints but are occluded by the workpiece facade or other occluding surfaces.

[0039] Compared with the prior art, the advantages of the present invention are as follows:

[0040] 1. The automatic layout method for multiple cameras in the multi-view vision measurement system of the present invention is simple in principle, highly automated, and can improve detection accuracy. It utilizes the digital model information of large-size workpieces to realize the automatic layout of multiple cameras. The present invention can add constraints such as the number of camera coverage points, camera angle, distance between cameras, camera symmetry, and depth range during the camera layout optimization process, so that the generated camera layout automatically meets the above requirements, avoiding the problems caused by manual layout that does not consider the above issues globally.

[0041] 2. The automatic layout method of multiple cameras in the multi-view vision measurement system of the present invention realizes automatic camera layout and solves problems such as time-consuming and laborious manual layout, unreasonable camera angles, excessively small or large distances between cameras, and out-of-focus imaging. It has a wider range of application value.

[0042] 3. The automatic layout method of multiple cameras in the multi-view vision measurement system of the present invention is based on the digital coordinates of the measurement points of the workpiece to be measured, using the camera angle and camera position as parameters, taking the range of camera angle and position variation as the upper and lower bounds of the solution space, and incorporating the number of measurement point coverage, the angle between cameras, the camera spacing, as well as the depth of field, hole normal, hole occlusion, etc. as constraints into the optimization process, automatically optimizing a version of camera layout parameters, avoiding many problems of manual layout. Attached Figure Description

[0043] Figure 1 This is a flowchart illustrating the method of the present invention.

[0044] Figure 2 This is a schematic diagram illustrating the principle of depth constraint in a specific application example of the present invention.

[0045] Figure 3 This is a schematic diagram illustrating the principle of generating a projection model from a quadtree in a specific application example of the present invention.

[0046] Figure 4 This is a schematic diagram of the process that can be optimized by differentiability in a specific application example of the present invention. Detailed Implementation

[0047] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0048] To facilitate the description of the method of this invention, the following detailed description will use the application of the method of this invention to the quality inspection of battery box assembly holes in electric vehicles as an example. This application is for the detection of manufacturing errors in battery box assembly holes of electric vehicles in the industrial inspection industry. This scenario can be described as follows: First, the layout and installation of multiple cameras are completed; then, the internal and external parameters of the cameras are accurately calibrated; finally, a battery box (such as...) is given... Figure 2 Using lighting equipment and camera systems, the battery box assembly holes are photographed, templates are matched to reconstruct the spatial position information of the assembly holes, and the results are compared with the CAD model of the assembly holes. Holes with large manufacturing errors are remanufactured.

[0049] As can be seen from the above, the problem this invention aims to solve is how to automatically lay out multiple cameras using CAD model information of the assembly holes in a battery box workpiece, resulting in a camera layout that conforms to the requirements of the number of assembly holes covered by the cameras, camera angles, distances between cameras, symmetry constraints, and depth of field constraints. The system of this invention can obtain camera layouts suitable for different workpieces based on their CAD models, and has achieved good results in practice.

[0050] like Figure 1 As shown, the automatic layout method for multiple cameras in a multi-view vision measurement system of the present invention includes the following steps:

[0051] Step S1: Initialize camera layout parameters; Based on the CAD model information of the workpiece to be inspected, obtain the initial position of the camera, and then obtain the initial parameters of all cameras;

[0052] Step S2: Optimize the initial camera layout based on the simulated annealing algorithm; after obtaining all the initial camera parameters, iterative optimization is performed using the simulated annealing algorithm to obtain the optimal solution that satisfies the constraints.

[0053] Step S3: Achieving robustness of 3D reconstruction based on differentiable adjustment; Based on the optimal layout obtained by simulated annealing, this invention proposes an error backpropagation algorithm based on stochastic gradient descent, using the Euclidean distance between the reconstructed 3D coordinates of the workpiece assembly hole and the coordinates of the CAD model as the loss function, to obtain a camera layout with better reconstruction robustness.

[0054] In a specific application example, the process of step S1 includes:

[0055] Step S101: Read the CAD model information of the assembly holes of the workpiece;

[0056] Step S102: Downsample the model information at a certain ratio, and use the downsampled position information as the initial position of the camera;

[0057] Step S103: Initialize the camera yaw angle, pitch angle and roll angle based on the camera position to obtain the initial parameters of all cameras.

[0058] During initialization, to ensure that most of the assembly holes on the workpiece are covered, and to manage the large number of cameras, a suitable downsampling rate needs to be selected. This is because if the downsampling rate is too high, some holes will not be covered, while if the downsampling rate is too low, too many cameras will be used.

[0059] In a specific application example, the constraints in step S2 include:

[0060] (a) Constraints on camera position and camera angle;

[0061] In actual measurements, the camera height, i.e., the camera's Z-coordinate, is subject to range constraints based on the on-site installation scenario and measurement requirements. Similarly, the range of variation for the camera angles—yaw, pitch, and roll—is also constrained. The yaw angle represents the rotation angle around the Z-axis, which is parallel to the horizontal direction of the workpiece, and its rotation range in this direction is (-180°, 180°). The pitch angle represents the rotation angle around the Y-axis; to prevent the camera on the upper surface from tilting excessively upwards and the camera on the lower surface from tilting excessively downwards, its rotation range in this direction is set to (-15°, 15°). The roll angle represents the rotation angle around the X-axis; to prevent the camera from tilting excessively to the left or right, its rotation range in this direction is set to (-15°, 15°).

[0062] During simulated annealing optimization, setting the above constraints as the upper and lower limits of the solution space can achieve the constraint purpose.

[0063] (b) Constraints on the number of observation points covered by the camera;

[0064] From both cost and measurement accuracy perspectives, the more observation points each camera covers, the better. This invention uses the inverse of the average number of points covered by all cameras as part of the energy loss function. During optimization, the smaller this loss function value, the more points the cameras cover under the current camera layout. After optimization, the optimal solution that maximizes the number of camera coverage points will be obtained.

[0065] (c) Angle constraints between two cameras observing the same point;

[0066] From a binocular perspective, a 90-degree angle between the two cameras yields the best reconstruction results. This invention uses the absolute distance between the current angle of the two cameras and 90 degrees as part of the loss energy function. During optimization, the smaller this loss function value, the closer the current angle of the two cameras is to 90 degrees. Ultimately, the optimal solution that satisfies the condition of the two camera angles being close to 90 degrees is obtained. It is worth noting that in multi-view systems, this 90 degrees can be adjusted between (45°, 90°).

[0067] (d) Constraints on the distance between cameras;

[0068] In actual installation, if the distance between cameras is too small, collisions may occur. To address this issue, this invention incorporates the absolute distance between cameras and 0.2 as part of the energy loss function. During optimization, the smaller this loss function value, the closer the current camera distance is to 0.2. This ultimately yields an optimal solution where the camera distance is close to 0.2, avoiding the problem of cameras being too far apart or too close together.

[0069] (e) Symmetry constraints;

[0070] In practical applications, when the camera layout satisfies symmetry constraints, the difficulty of dimming can be reduced. In the optimization process of this invention, the camera on one side of the symmetrical plane is used as the optimization parameter, and the parameters for the camera on the other side are calculated based on the symmetry relationship.

[0071] (f) Depth of field constraints;

[0072] Each camera has a different depth of field depending on its focal length, aperture, circle of confusion diameter, and working distance. This invention achieves depth of field constraint by considering whether the current mounting hole is within the current camera's depth of field, using the constraints of the camera's coverage point.

[0073] See Figure 2The specific implementation is as follows: First, under the conditions of fixed focus, fixed aperture, and fixed circle of confusion diameter, the depth of field of each camera at different working distances is calculated; then, the distance from the optical center to the current assembly hole is calculated and projected to the intersection of the ray from the optical center to the optical center and the workpiece plane; finally, it is determined whether the projected distance is within the depth of field range. If it is, the point is determined as the coverage point of the current camera; otherwise, it is not included in the coverage point of the current camera. Ultimately, the depth of field constraint is achieved through camera coverage point constraint.

[0074] First, calculate the foreground depth according to formula (1):

[0075]

[0076] Then calculate the depth of field according to formula (2):

[0077]

[0078] In formulas (1) and (2), F represents the lens aperture value, σ represents the allowable circle of confusion diameter, f represents the lens focal length, and L represents the focusing distance (shooting distance), which is the working distance in this invention.

[0079] by Figure 2 Taking this as an example, let's describe in detail the calculation process of each distance in the depth-of-field constraint. Figure 2 As shown, O is the optical center of the camera, A is the intersection of the optical center and the workpiece plane, H is the center of the assembly hole, and H' is the projection of the center of the assembly hole onto OA; AD1 is the foreground depth of field, and AD2 is the background depth of field.

[0080] First, the equation of the ray passing through the optical center O can be obtained based on the camera angle and the three-dimensional coordinates of the camera's optical center. Then, the coordinates of the intersection point A can be obtained based on the equation of this line and the equation of the horizontal plane of the workpiece, and then the distance OA can be obtained.

[0081] Then, based on AD1, AD2, and OA, OD1 and OD2 can be calculated.

[0082] Finally, OH' is calculated based on the three-dimensional coordinates of the camera optical center, the three-dimensional coordinates of the mounting hole, and the angular relationship. It can then be determined whether OH' is between OD1 and OD2.

[0083] The constraints mentioned above mainly include constraints on camera position and angle, camera angle constraints for the same coverage measurement point, camera spacing constraints, and measurement point coverage constraints. The constraints on camera position and angle aim to limit the range of variation in camera position and angle, i.e., the search space for the optimization solution, avoiding worthless searches during the optimization process. The camera angle constraint for the same coverage measurement point aims to ensure that the optical axis angle between any two cameras covering the same measurement point is 90 degrees, guaranteeing optimal measurement accuracy. The camera spacing constraint aims to address collision issues during camera installation; this constraint is calculated by taking the difference between the camera spacing of less than 0.2m and 0.2m to obtain the loss function value for this part of the constraint. Measurement point coverage constraints include visibility constraints, depth of field constraints, aperture normal constraints, and aperture occlusion constraints. The visibility constraint aims to limit the measurement point to within the camera's field of view, which is a basic condition for satisfying measurement point coverage. The depth of field constraint aims to constrain the measurement point within the field of view to be within the depth of field of the corresponding camera. That is, by calculating the depth of field of each camera, it is determined whether the point is within the depth of field, and thus whether the measurement point is covered by the depth of field. The hole normal constraint avoids situations where the angle is too large and the field of view is poor by constraining the angle between the line connecting the camera optical center and the measurement point and the normal of the measurement point. The hole occlusion constraint aims to exclude measurement points that satisfy the above coverage constraints but are occluded by the workpiece facade or other occluding surfaces.

[0084] See Figure 4 In a specific application example, step S3 includes the following process:

[0085] Step S301: Generate the training dataset;

[0086] First, to ensure the symmetry of the camera layout after differentiable optimization, this invention only reads the camera parameters of one side of the symmetry when reading the simulated annealing optimization parameters, and the other side is obtained according to the symmetry relationship during the optimization process;

[0087] Then, based on the CAD model coordinates of all assembly holes and the rotation and translation matrices of all the cameras mentioned above, a projection of each assembly hole under all cameras that meets the constraints of field of view, depth of field, etc. is obtained.

[0088] Finally, based on the above projections, five projected coordinates for each assembly hole are obtained using the quadtree method. For example... Figure 3 As shown, the present invention achieves the second level indicated by the red box, that is, each assembly hole corresponds to five groups;

[0089] Step S302: Set the loss function, gradient descent optimizer, learning rate, and the number of iterations for backpropagation of data error in each round. This invention is based on the mean squared loss function, selects the RMSprop gradient optimizer, and the learning rate is automatically adjusted according to the number of iterations.

[0090] Step S303: Perform optimization training based on the error backpropagation method.

[0091] First, based on the projection of each assembly hole onto the corresponding camera and the intrinsic and extrinsic parameters of the corresponding camera, the reconstructed 3D coordinates under the current projection and current camera parameters are obtained;

[0092] Then, the mean square error of the above-mentioned reconstructed 3D coordinates and CAD model coordinates is calculated.

[0093] Next, the mean square error of all holes is summed up;

[0094] The error is fed back again, the camera parameter values ​​are adjusted, and the next iteration begins.

[0095] Step S304: Determine whether the convergence condition is met under the current dataset. If it is met, exit; otherwise, return to step one and start again.

[0096] In summary, the multi-camera automatic layout method for large-size measurement proposed in this invention can achieve automatic camera layout that meets various constraints such as camera angle, camera position, number of camera coverage points, angle between cameras, distance between cameras, symmetry, and depth of field. At the same time, the algorithm can be efficiently adapted to other camera layout scenarios, providing technical support for multi-view vision solutions in the inspection industry.

[0097] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.

Claims

1. An automatic layout method for multiple cameras in a multi-view vision measurement system, characterized in that, include: Step S1: Initialize camera layout parameters; obtain the initial position of the camera based on the coordinates of the CAD model of the workpiece to be measured, and obtain the initial layout; Step S2: Optimize the initial layout based on the simulated annealing algorithm; Under the above initial layout, iteratively optimize based on the simulated annealing algorithm to obtain the optimal solution that satisfies the constraints; Step S3: Adjust the initial layout based on the stochastic gradient descent algorithm; using the simulated annealing optimized layout as the initial value, and using the backpropagation algorithm based on stochastic gradient descent, the Euclidean distance between the 3D reconstructed coordinates and the CAD model coordinates is used as the loss function to backpropagate the error and obtain the adjusted camera layout. The constraints in step S2 include constraints on camera position and camera angle, namely, constraints on the range of changes in camera position, camera yaw angle, pitch angle, and roll angle.

2. The automatic layout method for multiple cameras in a multi-view vision measurement system according to claim 1, characterized in that, The process of step S1 includes: Step S101: Read the CAD model information of the workpiece to be tested; Step S102: Perform voxel downsampling according to the ratio of the digital model coordinates of the measurement points, and use the downsampled measurement point positions as the initial positions of the camera; Step S103: Initialize the camera yaw angle, pitch angle and roll angle according to the camera position.

3. The automatic layout method for multiple cameras in a multi-view vision measurement system according to claim 1, characterized in that, The process of step S3 includes: Step S301: Generate training dataset; Step S302: Set the loss function, gradient descent optimizer, learning rate, and the number of iterations for backpropagation of data error in each round; Step S303: Perform optimization training based on the error backpropagation method; Step S304: Determine whether the convergence condition is met under the current dataset. If it is met, exit; otherwise, return to step one and start again.

4. The automatic layout method for multiple cameras in a multi-view vision measurement system according to claim 3, characterized in that, In step S301, when reading the simulated annealing optimization parameters, only the camera parameters of one side of the symmetrical edge are read, and the other side is obtained according to the symmetry relationship during the optimization process; based on the CAD model coordinates of the workpiece to be tested and the rotation and translation matrices of all cameras, a projection of each measuring point of the workpiece to be tested that meets the constraints under all cameras is obtained. Based on the above projection, the projected coordinates of the target object are obtained using the quadtree method.

5. The automatic layout method for multiple cameras in a multi-view vision measurement system according to claim 3, characterized in that, In step S302, iterative adjustments are made based on the mean square loss function and the RMSprop gradient optimizer.

6. The automatic layout method for multiple cameras in a multi-view vision measurement system according to claim 3, characterized in that, Step S303 includes: The reconstructed 3D coordinates under the current projection and current camera parameters are obtained based on the projection of each assembly hole under the corresponding camera and the intrinsic and extrinsic parameters of the corresponding camera. Calculate the mean square error of the reconstructed 3D coordinates and CAD model coordinates one by one, and sum them up; The accumulated error is fed back in reverse, and the camera parameters are adjusted iteratively.

7. The automatic layout method for multiple cameras in a multi-view vision measurement system according to any one of claims 1-6, characterized in that, The constraints in step S2 include the constraint on the number of observation points covered by the camera; the negative of the average number of all camera coverage points is used as part of the loss energy function. During the optimization process, the smaller the value of this loss function, the more camera coverage points there are under the current camera layout; after optimization, the optimal solution that maximizes the number of camera coverage points is obtained.

8. The automatic layout method for multiple cameras in a multi-view vision measurement system according to any one of claims 1-6, characterized in that, The constraints in step S2 include the angle constraints of the two cameras observing the same point; the absolute distance between the current angles of the two cameras and 90 degrees is used as part of the energy loss function; During the optimization process, the smaller the value of this loss function, the closer the current angle between the two cameras is to 90 degrees; finally, the optimal solution that satisfies the condition that the angle between the two cameras is close to 90 degrees is obtained.

9. The automatic layout method for multiple cameras in a multi-view vision measurement system according to any one of claims 1-6, characterized in that, The constraints in step S2 include the distance between cameras; the absolute difference between the camera distance and a set threshold is used as part of the loss energy function; during the optimization process, the smaller this part of the loss function value, the closer the current camera distance is to the set threshold; finally, the optimal solution that satisfies the requirement that the camera distance is close to the set threshold is obtained.

10. The automatic layout method for multiple cameras in a multi-view vision measurement system according to any one of claims 1-6, characterized in that, The constraints in step S2 include: depth of field constraints; first, under the conditions of fixed focus, fixed aperture, and fixed circle of confusion diameter, the depth of field of each camera at different working distances is calculated; then, the distance from the optical center to the target object of the current workpiece is calculated and projected to the intersection of the ray from the optical center to the optical center and the workpiece plane; finally, it is determined whether the projected distance is within the depth of field range. If it is, the point is determined as the coverage point of the current camera; otherwise, it is not included in the coverage point of the current camera; finally, the depth of field constraint is achieved through the camera coverage point constraint.

11. The automatic layout method for multiple cameras in a multi-view vision measurement system according to any one of claims 1-6, characterized in that, The constraints in step S2 include: aperture normal constraint; the aperture normal constraint is the angle between the line connecting the camera optical center and the measuring point and the normal of the measuring point.

12. The automatic layout method for multiple cameras in a multi-view vision measurement system according to any one of claims 1-6, characterized in that, The constraints in step S2 include: hole occlusion constraint; the hole occlusion constraint excludes measuring points that satisfy the coverage constraint but are occluded by the workpiece facade or other occlusion surfaces.

Citation Information

Patent Citations

  • Layout optimization method for camera in binocular vision measuring system

    CN103630072A

  • Binocular vision different-plane round hole detection method based on cross laser

    CN114119553A