CN116187158A - Automatic layout method for multiple cameras in multi-vision measurement system - Google Patents

Automatic layout method for multiple cameras in multi-vision measurement system Download PDF

Info

Publication number
CN116187158A
CN116187158A CN202211573523.6A CN202211573523A CN116187158A CN 116187158 A CN116187158 A CN 116187158A CN 202211573523 A CN202211573523 A CN 202211573523A CN 116187158 A CN116187158 A CN 116187158A
Authority
CN
China
Prior art keywords
camera
layout
constraints
measurement system
multiple cameras
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211573523.6A
Other languages
Chinese (zh)
Inventor
黄琴
邓俊杰
汪流红
罗兴锋
李煌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Shibite Robot Co Ltd
Original Assignee
Hunan Shibite Robot Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Shibite Robot Co Ltd filed Critical Hunan Shibite Robot Co Ltd
Priority to CN202211573523.6A priority Critical patent/CN116187158A/en
Publication of CN116187158A publication Critical patent/CN116187158A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • G06F17/13Differential equations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/04Constraint-based CAD

Abstract

The invention discloses an automatic layout method of multiple cameras in a multi-vision measurement system, which comprises the following steps: step S1: initializing camera layout parameters; acquiring initial positions of cameras according to CAD digital-analog information of a workpiece to be detected, and further acquiring initial parameters of all cameras; step S2: optimizing an initial layout of the camera based on a simulated annealing algorithm; after all camera initial parameters are obtained, performing iterative optimization by using a simulated annealing algorithm to obtain an optimal solution meeting constraint conditions; step S3: and improving the measurement accuracy and robustness of three-dimensional reconstruction under the simulated annealing camera layout based on differential adjustment. And after the optimal layout is obtained based on simulated annealing, optimizing by taking Euclidean distance of the reconstructed three-dimensional coordinates and CAD digital-analog coordinates as a loss function based on an error back propagation algorithm with random gradient descent, so as to obtain the camera layout with better reconstruction robustness. The invention has the advantages of high automation degree, strong layout practicability, good three-dimensional reconstruction precision and robustness and the like.

Description

Automatic layout method for multiple cameras in multi-vision measurement system
Technical Field
The invention mainly relates to the technical field of industrial product quality detection, in particular to an automatic layout method of multiple cameras in a multi-vision measurement system.
Background
With the development of globalization, various manufacturing enterprises want to improve the qualification rate of products and the global competitiveness of the enterprises, and the quality detection of the products is the final step of the products. With the continuous development of manufacturing technology and the continuous innovation of products, more and more large-scale workpiece products with complex shapes are generated, and the quality detection of large-scale workpieces is a key problem to be focused on, and plays a significant role in the manufacturing of high-quality products and the construction of high-efficiency production environments.
At present, the industrial field mainly uses a three-coordinate measuring machine method to measure, and the measuring mode has low detection efficiency and requires a certain degree of skill of operators to achieve corresponding detection precision.
There is also a conventional method of 3D scanning and reconstruction of parts by a laser scanner, but the laser scanner is expensive, and has the problems of low working efficiency and complex operation, and cannot meet the requirements of the current detection departments.
Therefore, other practitioners propose a measuring system based on multi-eye vision, and the measuring system has the advantages of high efficiency, moderate price, applicability to full scenes and the like. In this technique, the multi-camera layout is the crucial first step, which directly affects the subsequent multi-camera joint calibration accuracy as well as the measurement accuracy.
Conventional multi-camera layouts are mostly manually laid out according to the characteristics of the object itself to be measured and the experience of an optical engineer. However, manual layout has some problems:
firstly, manual layout is time-consuming and labor-consuming, and the horizontal angle, the pitch angle, the yaw angle and the camera position of each camera need to be adjusted one by one manually according to the imaging of each camera;
secondly, manual layout lacks macroscopic control over the whole layout, for example, the information such as the number of coverage points of each camera and the coverage of each point by a plurality of cameras cannot be directly obtained, and the information has close relation with the subsequent measurement;
finally, the depth of field control is difficult to be performed on the observation points in the visual field range of each camera during manual layout, and the virtual focus is easy to occur.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the problems existing in the prior art, the invention provides an automatic layout algorithm with the advantages of high automation degree, strong layout practicability, good three-dimensional reconstruction precision, good robustness and the like.
In order to solve the technical problems, the invention adopts the following technical scheme:
a method of automatic placement of multiple cameras in a multi-vision measurement system, comprising:
step S1: initializing camera layout parameters; acquiring an initial position of a camera according to CAD digital-analog coordinates of a workpiece to be tested, and obtaining an initial layout;
step S2: optimizing an initial layout based on a simulated annealing algorithm; under the initial layout, iterative optimization is carried out based on a simulated annealing algorithm, so that an optimal solution meeting constraint is obtained;
step S3: the optimized layout can be differentially adjusted based on a random gradient descent algorithm, and the three-dimensional reconstruction precision is improved; and taking the simulated annealing optimization layout as an initial value, taking the Euclidean distance of the three-dimensional reconstruction coordinates and the CAD digital-analog coordinates as a loss function based on an error back propagation algorithm of random gradient descent, and carrying out error feedback to obtain the adjusted camera layout.
As a further improvement of the process of the invention: the flow of the step S1 includes:
step S101: reading CAD digital-analog information of a workpiece to be detected;
step S102: downsampling is carried out according to the model information according to the ratio, and the position information obtained through downsampling is used as the initial position of the camera;
step S103: and initializing a yaw angle, a pitch angle and a roll angle of the camera according to the camera positions to obtain initial parameters of all cameras.
As a further improvement of the process of the invention: the flow of the step S3 includes:
step S301: generating a training data set;
step S302: setting a loss function, a gradient descent optimizer, a learning rate and iteration times of data error back propagation of each round;
step S303: performing optimization training based on an error back propagation method;
step S304: judging whether convergence conditions are met under the current data set, and exiting if the convergence conditions are met; the return to the first step restart is not satisfied.
As a further improvement of the process of the invention: in the step S301, only the camera parameters on one side of the symmetric edge are read when the simulated annealing optimization parameters are read, and the other side is obtained according to the symmetric relation in the optimization process; obtaining one projection of a target object in the workpiece to be detected, which accords with the constraint under all cameras, according to CAD digital-analog coordinates of the workpiece to be detected and all camera rotation translation matrixes; according to the projection, the individual projection coordinates of the target object are obtained based on a quadtree method.
As a further improvement of the process of the invention: in the step S302, an RMSprop gradient optimizer is selected based on a mean square loss function, and the learning rate is automatically adjusted according to the iteration number.
As a further improvement of the process of the invention: the step S303 includes:
obtaining a reconstructed three-dimensional coordinate of the current projection and the current camera parameters according to the projection of the target object in each workpiece to be detected under the corresponding camera and the internal and external parameters of the corresponding camera;
calculating the reconstruction three-dimensional coordinates and CAD digital-analog coordinates to calculate the mean square error;
accumulating the mean square errors of the target objects in all the workpieces to be detected;
and returning the error sum, adjusting the camera parameter value, and starting the next iteration.
As a further improvement of the process of the invention: the constraints in step S2 include constraints of camera position and camera angle; there is a range constraint on the camera height, i.e., the camera Z coordinate; there are also constraints on the range of variation of yaw, pitch and roll angles of the camera angle.
As a further improvement of the process of the invention: the constraints in the step S2 include constraints that the camera covers the number of observation points; taking the inverse of the average value of all the camera coverage points as a part of the loss energy function, wherein the smaller the loss function value of the part is in the optimization process, the more the camera coverage points are under the current camera layout; and after the optimization is finished, obtaining the optimal solution which accords with the coverage points of the camera as much as possible.
As a further improvement of the process of the invention: the constraints in the step S2 comprise two-phase angle constraints of observing the same point; taking the absolute distance between the current two camera angles and 90 degrees as a part of the energy loss function; in the optimization process, the smaller the partial loss function value is, the closer the current two camera angles are to 90 degrees; and finally, obtaining the optimal solution which accords with the two-phase angle approaching 90 degrees.
As a further improvement of the process of the invention: the constraint in the step S2 includes a constraint of the inter-camera distance; the absolute distance between the camera distance and the set threshold is used as a part of the lost energy function; in the optimization process, the smaller the partial loss function value is, the closer the current camera distance is to a set threshold; and finally obtaining the optimal solution which accords with the fact that the camera distance approaches to the set threshold value.
As a further improvement of the process of the invention: the constraint in step S2 includes: depth of field constraints; firstly, under the conditions of fixed focus, fixed aperture and fixed diameter of a circle of diffusion, calculating the depth of field of each camera under different working distances; then calculating the distance from the optical center to a target object of the workpiece to be detected, and projecting the distance to an intersection point of the optical center-to-optical center ray and a workpiece plane; finally judging whether the projection distance is within the depth of field, if so, judging the point as a coverage point of the current camera, otherwise, not incorporating the coverage point of the current camera; finally, depth of field constraints are achieved by camera coverage point constraints.
As a further improvement of the process of the invention: the constraint in step S2 includes: kong Faxiang constraint; kong Faxiang constraint is to avoid the situation of overlarge included angle and poor visual field by constraining the included angle between the connecting line of the camera optical center and the measuring point and the normal direction of the measuring point.
As a further improvement of the process of the invention: the constraint in step S2 includes: the aperture obscures the constraint. The aperture shielding constraint is intended to exclude points that meet the above-described coverage constraint and are shielded by the workpiece facade or other shielding surface.
Compared with the prior art, the invention has the advantages that:
1. the automatic layout method of the multi-camera in the multi-vision measurement system has the advantages of simple principle, high automation degree and capability of replying to improve the detection precision, and can realize the automatic layout of the multi-camera by utilizing the digital-analog information of the large-size workpiece; the invention can add constraints such as camera coverage points, camera angles, distances among cameras, camera symmetry, depth of field range and the like in the camera layout optimization process, so that the generated camera layout automatically meets the requirements, and the problems caused by that the manual layout does not globally consider the problems are avoided.
2. The automatic layout method of the multiple cameras in the multi-vision measurement system realizes automatic layout of the cameras, solves the problems of time and labor waste, unreasonable camera angles, too small or too large distance between the cameras, imaging virtual focus and the like in manual layout, and has wider application value.
3. The automatic layout method of multiple cameras in the multi-vision measurement system, disclosed by the invention, is based on the coordinates of the measured points of the workpiece to be measured, takes the angles and the positions of the cameras as parameters, takes the changing ranges of the angles and the positions of the cameras as the upper and lower boundaries of a solution space, adds the coverage number of the measured points, the included angles between the cameras, the spacing between the cameras, the depth of field, kong Faxiang, hole shielding and the like as constraint conditions into an optimization process, automatically optimizes one-version camera layout parameters, and avoids a plurality of problems of manual layout.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
Fig. 2 is a schematic diagram of depth of field constraints in a specific application example of the present invention.
Fig. 3 is a schematic diagram of a quadtree generation projection model in a specific application example of the present invention.
FIG. 4 is a schematic flow chart of the differential optimization of the present invention in a specific application example.
Detailed Description
The invention will be described in further detail with reference to the drawings and the specific examples.
In order to facilitate the description of the method of the present invention, the following describes in detail the application of the method of the present invention to quality inspection of a battery case assembly hole of an electric vehicle as an example. The application is aimed at manufacturing error detection of a battery box assembly hole of an electric automobile in the industry detection industry, and the scene can be expressed as follows: firstly, completing the layout and the installation of multiple cameras, then, completing the accurate calibration of the internal and external parameters of the cameras, finally, giving a battery box (shown in figure 2), shooting by using a lighting device and a camera system, performing template matching on assembly holes of the battery box, reconstructing the spatial position information of the assembly holes, comparing the spatial position information with CAD (computer aided design) digital models of the assembly holes, and performing secondary manufacturing on the holes with large manufacturing errors.
From the above, the problem to be solved by the invention is how to utilize CAD digital-analog information of the assembly holes of the battery box workpiece to automatically layout the multiple cameras, so as to obtain the camera layout which accords with the number of the assembly holes covered by the cameras, the angles of the cameras, the distances between the cameras, the symmetry constraint, the depth of field constraint and the like. The system can obtain the camera layout suitable for different workpieces according to CAD digital models of the different workpieces, and achieves better effect in practice.
As shown in fig. 1, the automatic layout method of multiple cameras in the multi-vision measurement system of the present invention includes the steps of:
step S1: initializing camera layout parameters; acquiring initial positions of cameras according to CAD digital-analog information of a workpiece to be detected, and further acquiring initial parameters of all cameras;
step S2: optimizing an initial layout of the camera based on a simulated annealing algorithm; and after all the initial parameters of the camera are obtained, performing iterative optimization by using a simulated annealing algorithm to obtain an optimal solution meeting constraint conditions.
Step S3: robustness of three-dimensional reconstruction based on differential adjustment; on the basis of obtaining the optimal layout by simulated annealing, the invention provides an error back propagation algorithm based on random gradient descent, and the Euclidean distance between the three-dimensional coordinate reconstructed by the workpiece assembly hole and the CAD digital-analog coordinate is used as a loss function to obtain the camera layout with better reconstruction robustness.
In a specific application example, the flow of step S1 includes:
step S101: reading CAD digital-analog information of a workpiece assembly hole;
step S102: downsampling is carried out according to the model information according to a certain ratio, and the position information obtained by downsampling is used as the initial position of the camera;
step S103: and initializing a yaw angle, a pitch angle and a roll angle of the camera according to the camera positions to obtain initial parameters of all cameras.
In the initialization process, on one hand, in order to ensure that most of the assembly holes of the workpiece can be covered, and on the other hand, the number of cameras is excessive, a proper downsampling rate needs to be selected. This is because too high a downsampling rate may result in partial holes not being covered, and too low a downsampling rate may result in an excessive number of cameras.
In a specific application example, the constraint in the step S2 includes:
(a) Constraints of camera position and camera angle;
in actual measurement, according to field installation scenes, measurement requirements and the like, range constraint exists on the camera height, namely the Z coordinate of the camera; likewise, there are constraints on the range of variation of yaw, pitch and roll angles of the camera angle. The yaw angle represents the rotation angle about the Z-axis, i.e., the horizontal direction parallel to the workpiece, in which direction the rotation range is (-180, 180); pitch represents the rotation angle around the Y-axis, and in order to avoid excessive upward of the upper surface camera, excessive downward of the lower surface camera, the rotation range in this direction is set to (-15 °,15 °); the roll angle represents the rotation angle around the X-axis, and in order to avoid excessive left or right-facing of the camera, the rotation range in this direction is set to (-15 °,15 °).
In the simulated annealing optimization process, the constraint is set as the upper limit and the lower limit of the solution space, so that the constraint purpose can be achieved.
(b) The camera covers the constraint of the number of observation points;
the more observation points each camera covers, the better from the aspects of cost and measurement accuracy. The present invention uses the inverse of the average of the total camera coverage points as part of the lost energy function. The smaller the partial loss function value in the optimization process, the more the number of camera coverage points is represented under the current camera layout. And after the optimization is finished, obtaining the optimal solution which accords with the coverage points of the camera as much as possible.
(c) Observing two-phase angle constraint of the same point;
in terms of binocular theory, the angle of the two cameras is 90 degrees, and the reconstruction effect is best. The present invention uses the absolute distance of the current two camera angles from 90 degrees as part of the lost energy function. In the optimization process, the smaller the partial loss function value is, the closer the current two camera angles are to 90 degrees. And finally, obtaining the optimal solution which accords with the two-phase angle approaching 90 degrees. It is specifically noted that in many orders, the 90 degrees herein may be adjusted between (45 °,90 °).
(d) Constraint of inter-camera distance;
in the actual installation process, the distance between the cameras is too small, which causes the cameras to collide. To solve this problem, the present invention uses the absolute distance between the cameras and 0.2 as part of the lost energy function. In the optimization process, the smaller the partial loss function value, the closer the current camera distance is to 0.2. Finally, an optimal solution which accords with the camera distance approaching to 0.2 is obtained, and the problem that the camera distance is too far and too near is avoided;
(e) Symmetrically constraining;
in the practical application process, when the camera layout meets the symmetrical constraint, the dimming difficulty can be reduced. In the optimization process, one side of the camera of the symmetry plane is used as an optimization parameter, and the other side of the camera is calculated according to the symmetry relation.
(f) Depth of field constraints;
each camera corresponds to a different depth of field at a different focal length, a different aperture, a different diameter of the circle of confusion, and a different working distance. According to the invention, the purpose of depth of field constraint is realized by means of the constraint of the coverage point of the camera according to whether the current assembly hole is in the depth of field range of the current camera.
Referring to fig. 2, the method is specifically implemented by firstly calculating the depth of field of each camera under different working distances under the conditions of fixed focus, fixed aperture and fixed diameter of a circle of confusion; then calculating the distance from the optical center to the current assembly hole, and projecting the distance to the intersection point of the optical center-to-optical center ray and the workpiece plane; and finally judging whether the projection distance is within the depth of field, if so, judging the point as the coverage point of the current camera, otherwise, not taking the coverage point of the current camera into consideration. Finally, depth of field constraints are achieved by camera coverage point constraints.
First, the front depth of field is calculated according to formula (1):
Figure BDA0003989059490000081
the post depth of field is then calculated according to equation (2):
Figure BDA0003989059490000082
in the formulas (1) and (2), F represents a lens aperture value, σ represents an allowable circle diameter, F represents a lens focal length, and L represents a sum Jiao Wuju (photographing distance), i.e., a working distance in the present invention.
Taking fig. 2 as an example, a process of calculating each distance in the depth of field constraint will be specifically described. As shown in fig. 2, O is a camera optical center, a is an intersection point of the optical center and a workpiece plane, H is a center of an assembly hole, and H' is a projection of the center of the assembly hole on OA; AD1 is the front depth of field and AD2 is the rear depth of field.
Firstly, an equation of the O ray of the optical center can be obtained according to the angle of the camera and the three-dimensional coordinate of the optical center of the camera, and further an intersection point A coordinate can be obtained according to the equation of the straight line equation and the horizontal plane of the workpiece, and further the distance of the OA is obtained;
then, OD1 and OD2 can be calculated according to AD1, AD2 and OA;
and finally, calculating OH 'according to the three-dimensional coordinates of the optical center of the camera, the three-dimensional coordinates of the assembly hole and the angle relation, and judging whether OH' is between OD1 and OD 2.
The constraints mainly comprise constraints of camera positions and camera angles, constraints of camera angles of the same coverage measuring point, constraints of camera spacing and constraints of measuring point coverage. The constraint of the camera position and the camera angle aims at limiting the variation range of the camera position and the camera angle, namely the search space of the optimization solution, so as to avoid the worthless search in the optimization process. The camera angle constraint of the same covering measuring point is to ensure that the included angle of the optical axes of two cameras covering the same measuring point meets 90 degrees as far as possible so as to ensure the optimal measuring precision. The camera spacing constraint aims at solving the problem of collision in the camera installation process, and the constraint obtains a loss function value of the partial constraint by calculating a difference value between the camera spacing and 0.2m when the camera spacing is smaller than 0.2 m; the station coverage constraints include a visibility constraint, a depth of field constraint, a Kong Faxiang constraint, and an aperture occlusion constraint. The visual constraint aims to define that the measurement point is within the camera field of view, which is a basic condition for meeting the measurement point coverage. The depth of field constraint aims to constrain the measurement points within the field of view to be within the depth of field of the corresponding camera. The depth of field range of each camera is calculated, whether the point is in the depth of field range is judged, and whether the measuring point is covered by the depth of field is further judged. Kong Faxiang is restricted to avoid the conditions of overlarge included angle and poor visual field by restricting the included angle between the connecting line of the optical center of the camera and the measuring point and the normal direction of the measuring point. The aperture shielding constraint is intended to exclude points that meet the above-described coverage constraint and are shielded by the workpiece facade or other shielding surface.
Referring to fig. 4, in a specific application example, the flow of step S3 includes:
step S301: generating a training data set;
firstly, in order to ensure symmetry of the camera layout after differential optimization, only camera parameters on one side of a symmetrical side are read when the simulated annealing optimization parameters are read, and the other side is obtained according to a symmetrical relation in the optimization process;
then, according to CAD digital-analog coordinates of all the assembly holes and the rotation translation matrix of all the cameras, obtaining a projection of each assembly hole under all the cameras, which accords with the constraints of visual field, depth of field and the like;
finally, according to the projection, five projection coordinates of each assembly hole are obtained based on a quadtree method. As shown in fig. 3, the present invention takes the second stage shown by the red frame, i.e., five groups of each assembly hole;
step S302: a loss function, a gradient descent optimizer, a learning rate, the number of iterations of each round of data error back propagation, etc. are set. The method selects the RMSprop gradient optimizer based on the mean square loss function, and the learning rate is automatically adjusted according to the iteration times.
Step S303: and performing optimization training based on an error back propagation method.
Firstly, obtaining a reconstructed three-dimensional coordinate of a current projection and a current camera parameter according to the projection of each assembly hole under the corresponding camera and the internal and external parameters of the corresponding camera;
then calculating the reconstructed three-dimensional coordinates and CAD digital-analog coordinates to calculate the mean square error;
secondly, accumulating the mean square errors of all holes;
and returning the error sum again, adjusting the camera parameter value, and starting the next iteration.
Step S304: judging whether convergence conditions are met under the current data set, and exiting if the convergence conditions are met; the return to the first step restart is not satisfied.
In summary, the multi-camera automatic layout method for large-size measurement provided by the invention can realize automatic layout of cameras meeting various constraint conditions such as camera angles, camera positions, camera coverage points, angles between cameras, distances between cameras, symmetry and depth of field, and meanwhile, the algorithm can be efficiently adapted to other camera layout scenes, and provides technical support for multi-vision schemes in detection industry.
The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above examples, and all technical solutions belonging to the concept of the present invention belong to the protection scope of the present invention. It should be noted that modifications and adaptations to the invention without departing from the principles thereof are intended to be within the scope of the invention as set forth in the following claims.

Claims (13)

1. An automatic layout method of multiple cameras in a multi-vision measurement system, comprising:
step S1: initializing camera layout parameters; acquiring an initial position of a camera according to CAD digital-analog coordinates of a workpiece to be tested, and obtaining an initial layout;
step S2: optimizing an initial layout based on a simulated annealing algorithm; under the initial layout, iterative optimization is carried out based on a simulated annealing algorithm, so that an optimal solution meeting constraint is obtained;
step S3: differentially adjusting the initial layout based on a random gradient descent algorithm; and taking the simulated annealing optimization layout as an initial value, taking the Euclidean distance of the three-dimensional reconstruction coordinates and the CAD digital-analog coordinates as a loss function based on an error back propagation algorithm of random gradient descent, and carrying out error feedback to obtain the adjusted camera layout.
2. The method for automatic layout of multiple cameras in a multiview vision measurement system according to claim 1, wherein the flow of step S1 comprises:
step S101: reading CAD digital-analog information of a workpiece to be measured;
step S102: voxel downsampling is carried out according to the coordinates of the measuring point modulus and the ratio, and the position of the measuring point obtained through downsampling is used as the initial position of the camera;
step S103: the camera yaw, pitch and roll angles are initialized according to the camera position.
3. The method for automatic layout of multiple cameras in a multiview vision measurement system according to claim 1, wherein the flow of step S3 comprises:
step S301: generating a training data set;
step S302: setting a loss function, a gradient descent optimizer, a learning rate and iteration times of data error back propagation of each round;
step S303: performing optimization training based on an error back propagation method;
step S304: judging whether convergence conditions are met under the current data set, and exiting if the convergence conditions are met; the return to the first step restart is not satisfied.
4. The automatic layout method of multiple cameras in a multi-vision measurement system according to claim 3, wherein in the step S301, only the camera parameters on one side of the symmetry edge are read when the simulated annealing optimization parameters are read, and the other side is obtained according to the symmetry relationship in the optimization process; obtaining a projection of each measuring point of the workpiece to be measured under all cameras, wherein the projection accords with the constraint according to the CAD digital-analog coordinates of the workpiece to be measured and the rotation translation matrix of all cameras; according to the projection, the individual projection coordinates of the target object are obtained based on a quadtree method.
5. The automatic layout method of multiple cameras in a multi-vision measurement system according to claim 3, wherein in the step S302, iterative adjustment is implemented based on a mean square loss function and an RMSprop gradient optimizer.
6. The automatic layout method of multiple cameras in a multi-vision measurement system according to claim 3, wherein the step S303 comprises:
three-dimensional coordinates of all measuring points are reconstructed according to the projection and the camera parameters of the workpiece to be measured;
calculating the mean square error of the reconstructed three-dimensional coordinates and CAD digital-analog coordinates one by one, and accumulating;
and reversely returning the accumulated errors, and adjusting camera parameters for iteration.
7. The method of automatic layout of multiple cameras in a multi-vision measurement system according to any one of claims 1-6, wherein the constraints in step S2 include constraints on camera position and camera angle, i.e. constraints on camera position, camera yaw angle, pitch angle and roll angle ranges.
8. The method for automatic layout of multiple cameras in a multi-vision measurement system according to any one of claims 1-6, wherein the constraints in step S2 include constraints of camera coverage observation points; taking the inverse of the average value of all the camera coverage points as a part of the loss energy function, wherein the smaller the loss function value of the part is in the optimization process, the more the camera coverage points are under the current camera layout; and after the optimization is finished, obtaining the optimal solution which accords with the coverage points of the camera as much as possible.
9. The method for automatic placement of multiple cameras in a multi-vision measurement system according to any one of claims 1-6, characterized in that the constraints in step S2 include two-phase angular constraints where the same point is observed; taking the absolute distance between the current two camera angles and 90 degrees as a part of the energy loss function; in the optimization process, the smaller the partial loss function value is, the closer the current two camera angles are to 90 degrees; and finally, obtaining the optimal solution which accords with the two-phase angle approaching 90 degrees.
10. The method for automatic layout of multiple cameras in a multi-vision measurement system according to any one of claims 1-6, wherein the constraints in step S2 include constraints of inter-camera distances; the absolute difference between the camera pitch and the set threshold is used as part of the lost energy function; in the optimization process, the smaller the partial loss function value is, the closer the current camera distance is to a set threshold; and finally obtaining the optimal solution which accords with the fact that the camera distance approaches to the set threshold value.
11. The method for automatic layout of multiple cameras in a multi-vision measurement system according to any one of claims 1-6, wherein the constraints in step S2 include: depth of field constraints; firstly, under the conditions of fixed focus, fixed aperture and fixed diameter of a circle of diffusion, calculating the depth of field of each camera under different working distances; then calculating the distance from the optical center to a target object of the workpiece to be detected, and projecting the distance to an intersection point of the optical center-to-optical center ray and a workpiece plane; finally judging whether the projection distance is within the depth of field, if so, judging the point as a coverage point of the current camera, otherwise, not incorporating the coverage point of the current camera; finally, depth of field constraints are achieved by camera coverage point constraints.
12. The method for automatic layout of multiple cameras in a multi-vision measurement system according to any one of claims 1-6, wherein the constraints in step S2 include: kong Faxiang constraint; the Kong Faxiang constraint is to restrict the included angle between the camera optical center and the measuring point connecting line and the measuring point normal.
13. The method for automatic layout of multiple cameras in a multi-vision measurement system according to any one of claims 1-6, wherein the constraints in step S2 include: hole shielding constraint; the hole shielding constraint is that the measuring points which meet the covering constraint and are shielded by the vertical surface or other shielding surfaces of the workpiece are excluded.
CN202211573523.6A 2022-12-08 2022-12-08 Automatic layout method for multiple cameras in multi-vision measurement system Pending CN116187158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211573523.6A CN116187158A (en) 2022-12-08 2022-12-08 Automatic layout method for multiple cameras in multi-vision measurement system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211573523.6A CN116187158A (en) 2022-12-08 2022-12-08 Automatic layout method for multiple cameras in multi-vision measurement system

Publications (1)

Publication Number Publication Date
CN116187158A true CN116187158A (en) 2023-05-30

Family

ID=86441140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211573523.6A Pending CN116187158A (en) 2022-12-08 2022-12-08 Automatic layout method for multiple cameras in multi-vision measurement system

Country Status (1)

Country Link
CN (1) CN116187158A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116878381A (en) * 2023-08-01 2023-10-13 湖南视比特机器人有限公司 Online full-size detection method and system based on multi-eye vision
CN117672435A (en) * 2024-01-31 2024-03-08 广元水木新材料科技有限公司 Automatic fiber yarn layout method and system based on nanofiber preparation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116878381A (en) * 2023-08-01 2023-10-13 湖南视比特机器人有限公司 Online full-size detection method and system based on multi-eye vision
CN116878381B (en) * 2023-08-01 2024-01-30 湖南视比特机器人有限公司 Online full-size detection method and system based on multi-eye vision
CN117672435A (en) * 2024-01-31 2024-03-08 广元水木新材料科技有限公司 Automatic fiber yarn layout method and system based on nanofiber preparation
CN117672435B (en) * 2024-01-31 2024-04-09 广元水木新材料科技有限公司 Automatic fiber yarn layout method and system based on nanofiber preparation

Similar Documents

Publication Publication Date Title
CN116187158A (en) Automatic layout method for multiple cameras in multi-vision measurement system
CN111028340B (en) Three-dimensional reconstruction method, device, equipment and system in precise assembly
CN109029299B (en) Dual-camera measuring device and method for butt joint corner of cabin pin hole
CN104537707B (en) Image space type stereoscopic vision moves real-time measurement system online
CN103337069B (en) High-quality three-dimensional color image acquisition methods and device based on multiple camera
CN104463969B (en) A kind of method for building up of the model of geographical photo to aviation tilt
CN111091076B (en) Tunnel limit data measuring method based on stereoscopic vision
CN115345822A (en) Automatic three-dimensional detection method for surface structure light of aviation complex part
CN114283391A (en) Automatic parking sensing method fusing panoramic image and laser radar
CN103191958B (en) A kind of optical detecting method of sheet forming resilience
CN109903382A (en) The fusion method and device of point cloud data
CN115563732B (en) Spraying track simulation optimization method and device based on virtual reality
CN112733428A (en) Scanning attitude and coverage path planning method for optical measurement
CN111738971B (en) Circuit board stereoscopic scanning detection method based on line laser binocular stereoscopic vision
Zong et al. A high-efficiency and high-precision automatic 3D scanning system for industrial parts based on a scanning path planning algorithm
CN106952344A (en) A kind of Damaged model calculation method for being used to remanufacture reparation
CN113393577B (en) Oblique photography terrain reconstruction method
CN109798877A (en) A kind of bionical underwater fish binocular solid distance measuring method
CN113781576A (en) Binocular vision detection system, method and device for multi-degree-of-freedom pose real-time adjustment
CN112700548A (en) Fusion method of BIM (building information modeling) model and video information in visual transformer substation
CN116524109B (en) WebGL-based three-dimensional bridge visualization method and related equipment
CN115546016B (en) Method for acquiring and processing 2D (two-dimensional) and 3D (three-dimensional) images of PCB (printed Circuit Board) and related device
CN109215133B (en) Simulation image library construction method for visual alignment algorithm screening
JP4236202B2 (en) Modeling apparatus and camera parameter calculation method
CN113790711B (en) Unmanned aerial vehicle low-altitude flight pose uncontrolled multi-view measurement method and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination