Camera extrinsic parameter calibration method, device, electronic device and storage medium
The three-dimensional mesh model is generated through multi-camera shooting and three-dimensional reconstruction network, and the external parameter calibration is optimized based on key point detection, which solves the problem of low efficiency of multi-camera external parameter calibration and achieves efficient camera configuration adjustment.
Patent Information
- Application Number
- CN202010844425.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-20
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-08-20
AI Technical Summary
In the existing technology, the multi-camera external parameter calibration process is cumbersome, time-consuming and inefficient, especially after the camera configuration is changed, cumbersome calibration operations are required.
By shooting the target object with multiple cameras, the pre-trained 3D reconstruction network is used to generate a 3D mesh model, determine the vertex coordinate set under the camera perspective, and calculate the external parameter calibration value based on the relative position relationship of the vertex coordinates, and optimize the key point detection The location information of the network is used to improve the accuracy of external parameter calibration.
There is no need to design and build additional external markers, which avoids offline calibration processing, improves the efficiency of camera external parameter calibration, and simplifies the calibration process of multi-camera systems.
Smart Images

Figure CN114170302B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a camera extrinsic calibration method, device, electronic device and storage medium. Background Art
[0002] Augmented Reality (AR) is a system that superimposes virtual objects on real scenes and displays and interacts with them. At present, AR technology has become an important field in virtual reality research and an important direction for the development of human-computer interface technology.
[0003] Existing technologies often use external markers to manually calibrate the extrinsic parameters of multiple cameras: first, the external markers need to be manually designed and built; after determining the installation configuration of the multi-camera system, an operator or a robotic arm is required to move the external markers within the shooting scene and synchronously capture camera data; then, in the offline processing stage, the feature points in the markers are detected in the collected calibration data of each viewpoint, and the extrinsic parameters of each camera are solved using the bundle adjustment method (BundleAdjustment).
[0004] It can be seen that the process of collecting additional calibration data is cumbersome, time-consuming and labor-intensive, and the offline processing process is time-consuming, resulting in low calibration efficiency when calibrating multi-camera extrinsics after each change of camera configuration. Summary of the invention
[0005] The present disclosure provides a camera extrinsic calibration method, device, electronic device and storage medium to at least solve the problem of low calibration efficiency when calibrating multi-camera extrinsic parameters in the related art. The technical solution of the present disclosure is as follows:
[0006] According to a first aspect of an embodiment of the present disclosure, a camera extrinsic calibration method is provided, the method comprising:
[0007] Performing multi-camera photography on the target object to obtain multiple images of the target object under different camera viewing angles; each of the camera viewing angles corresponds to one of the multiple cameras;
[0008] Inputting a plurality of the target object images into a pre-trained three-dimensional reconstruction network to generate a three-dimensional mesh model of the target object in each of the target object images;
[0009] Determine a vertex coordinate set of the three-dimensional mesh model in a corresponding camera coordinate system under each camera perspective;
[0010] According to the relative position relationship of the vertex coordinate sets corresponding to the respective camera viewing angles in the same coordinate system, the extrinsic parameter calibration values of the cameras corresponding to the respective camera viewing angles are determined.
[0011] In a possible implementation, determining the extrinsic calibration value of the camera corresponding to each camera view according to the relative position relationship of the vertex coordinate sets corresponding to each camera view in the same coordinate system includes:
[0012] Taking one of the camera perspectives as a reference camera perspective;
[0013] Based on the vertex position differences between the vertex coordinate set corresponding to the reference camera perspective and the vertex coordinate set corresponding to each of the camera perspectives, the extrinsic parameter calibration value of the camera corresponding to each of the camera perspectives is determined.
[0014] In a possible implementation, determining the extrinsic parameter calibration value of the camera corresponding to each camera perspective based on the vertex position difference between the vertex coordinate set corresponding to the reference camera perspective and the vertex coordinate set corresponding to each camera perspective includes:
[0015] Solving the rigid body transformation required to align the vertex coordinate sets corresponding to the camera perspectives to the coordinate system of the vertex coordinate sets corresponding to the reference camera perspective, respectively;
[0016] The obtained rigid body transformation corresponding to each of the camera viewing angles is used as the extrinsic parameter calibration value of the camera corresponding to each of the camera viewing angles.
[0017] In a possible implementation, after the step of determining the extrinsic parameter calibration value of the camera corresponding to each camera view according to the relative position relationship of the vertex coordinate sets corresponding to each camera view in the same coordinate system, the step further includes:
[0018] Inputting a plurality of target object images into a pre-trained key point detection network to obtain a two-dimensional key point of the target object in each of the target object images;
[0019] Based on the position information of the two-dimensional key points corresponding to each of the camera perspectives, the extrinsic parameter calibration values of the cameras corresponding to each of the camera perspectives are optimized to obtain the optimized extrinsic parameter calibration values of the cameras corresponding to each of the camera perspectives.
[0020] In a possible implementation, based on the position information of the two-dimensional key points corresponding to each of the camera perspectives, optimizing the extrinsic parameter calibration values of the camera corresponding to each of the camera perspectives to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each of the camera perspectives includes:
[0021] Based on the plurality of target object images, determining the two-dimensional coordinates of the two-dimensional key points in the corresponding image coordinate system under the perspective of each camera;
[0022] Determine the three-dimensional coordinates of the two-dimensional key points in the corresponding camera coordinate system in the vertex coordinate sets corresponding to the camera perspectives;
[0023] According to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points under each camera perspective, the extrinsic parameter calibration values of the camera corresponding to each camera perspective are optimized to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each camera perspective.
[0024] In a possible implementation, optimizing the extrinsic calibration values of the cameras corresponding to the camera perspectives according to the three-dimensional coordinates of the key points corresponding to the camera perspectives and the two-dimensional coordinates of the key points under the camera perspectives to obtain the optimized extrinsic calibration values of the cameras corresponding to the camera perspectives includes:
[0025] Determine, according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective, the projection error of the camera corresponding to each camera perspective when the extrinsic parameter calibration value is adopted; the projection error is the error between the two-dimensional coordinates obtained by projecting the three-dimensional coordinates of the key points onto the image plane of the camera corresponding to the camera perspective and the two-dimensional coordinates of the key points;
[0026] Based on the projection errors of the cameras corresponding to the camera perspectives when the extrinsic parameter calibration values are used, the extrinsic parameter calibration values of the cameras corresponding to the camera perspectives are adjusted to obtain the adjusted extrinsic parameter calibration values of the cameras corresponding to the camera perspectives as the optimized extrinsic parameter calibration values of the cameras corresponding to the camera perspectives;
[0027] Among them, the projection error of the camera corresponding to the camera viewing angle when using the optimized extrinsic parameter calibration value meets the preset condition.
[0028] In a possible implementation, determining the projection error of the camera corresponding to each camera perspective according to the three-dimensional coordinates of the key point corresponding to each camera perspective and the two-dimensional coordinates of the key point corresponding to each camera perspective includes:
[0029] By using a preset projection function and an external parameter calibration value of the camera corresponding to each camera view, the three-dimensional coordinates of the key point corresponding to each camera view are projected onto the image plane of the corresponding camera, so as to obtain the projection point of the two-dimensional key point corresponding to each camera view on the image plane of the corresponding camera;
[0030] Determine the two-dimensional coordinates of the projection points corresponding to the camera viewing angles in the corresponding image coordinate system;
[0031] The projection error of the camera corresponding to each camera view is determined according to the difference between the two-dimensional coordinates of the projection point corresponding to each camera view and the corresponding two-dimensional coordinates of the key point.
[0032] According to a second aspect of an embodiment of the present disclosure, a camera extrinsic calibration device is provided, including:
[0033] An acquisition unit is configured to perform multi-camera photography of a target object to obtain a plurality of images of the target object under different camera viewing angles; each of the camera viewing angles corresponds to one of the multiple cameras;
[0034] A reconstruction unit is configured to input a plurality of the target object images into a pre-trained three-dimensional reconstruction network to generate a three-dimensional mesh model of the target object in each of the target object images;
[0035] A determination unit, configured to determine a vertex coordinate set of the three-dimensional mesh model in a corresponding camera coordinate system under each camera perspective;
[0036] The calibration unit is configured to determine the extrinsic calibration value of the camera corresponding to each camera view according to the relative position relationship of the vertex coordinate sets corresponding to each camera view in the same coordinate system.
[0037] In one possible implementation, the calibration unit is specifically configured to execute one of the camera perspectives as a benchmark camera perspective; based on the vertex position difference between the vertex coordinate set corresponding to the benchmark camera perspective and the vertex coordinate set corresponding to each of the camera perspectives, determine the extrinsic parameter calibration value of the camera corresponding to each of the camera perspectives.
[0038] In one possible implementation, the calibration unit is specifically configured to execute respectively solving the rigid body transformation required to align the vertex coordinate sets corresponding to each of the camera perspectives to the coordinate system where the vertex coordinate sets corresponding to the reference camera perspective are located; and use the solved rigid body transformation corresponding to each of the camera perspectives as the external parameter calibration value of the camera corresponding to each of the camera perspectives.
[0039] In one possible implementation, the device also includes: a key point detection unit, configured to input multiple target object images into a pre-trained key point detection network to obtain two-dimensional key points of the target object in each of the target object images; an optimization unit, configured to optimize the extrinsic parameter calibration values of the camera corresponding to each camera view based on the position information of the two-dimensional key points corresponding to each camera view to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each camera view.
[0040] In one possible implementation, the optimization unit is specifically configured to execute, based on multiple images of the target object, determining the two-dimensional coordinates of the key points of the two-dimensional key points under each camera perspective in the corresponding image coordinate system; determining the three-dimensional coordinates of the key points of the two-dimensional key points under each camera perspective in the vertex coordinate set corresponding to each camera perspective in the corresponding camera coordinate system; optimizing the extrinsic parameter calibration values of the camera corresponding to each camera perspective according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective, so as to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each camera perspective.
[0041] In a possible implementation, the optimization unit is specifically configured to determine the projection error of the camera corresponding to each camera perspective when the extrinsic parameter calibration value is adopted according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective; the projection error is the error between the two-dimensional coordinates obtained by the camera corresponding to the camera perspective when the three-dimensional coordinates of the key points are projected onto the image plane of the camera and the two-dimensional coordinates of the key points; based on the projection error of the camera corresponding to each camera perspective when the extrinsic parameter calibration value is adopted, the extrinsic parameter calibration value of the camera corresponding to each camera perspective is adjusted to obtain the adjusted extrinsic parameter calibration value of the camera corresponding to each camera perspective as the optimized extrinsic parameter calibration value of the camera corresponding to each camera perspective; wherein the projection error of the camera corresponding to the camera perspective when the optimized extrinsic parameter calibration value is adopted satisfies a preset condition.
[0042] In one possible implementation, the optimization unit is specifically configured to execute a preset projection function and an external parameter calibration value of the camera corresponding to each camera view, and project the three-dimensional coordinates of the key points corresponding to each camera view onto the image plane of the corresponding camera, to obtain the projection points of the two-dimensional key points corresponding to each camera view on the image plane of the corresponding camera; determine the two-dimensional coordinates of the projection points corresponding to each camera view in the corresponding image coordinate system; and determine the projection error of the camera corresponding to each camera view based on the difference between the two-dimensional coordinates of the projection points corresponding to each camera view and the corresponding two-dimensional coordinates of the key points.
[0043] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the camera extrinsic parameter calibration method as described in the first aspect or any possible implementation manner of the first aspect is implemented.
[0044] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the camera extrinsic parameter calibration method as described in the first aspect or any possible implementation manner of the first aspect is implemented.
[0045] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, wherein the program product includes a computer program, wherein the computer program is stored in a readable storage medium, and at least one processor of a device reads and executes the computer program from the readable storage medium, so that the device executes the camera extrinsic parameter calibration method described in any one of the embodiments of the first aspect.
[0046] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects: by shooting the target object with multiple cameras, a plurality of target object images under different camera perspectives are obtained; and by using a pre-trained three-dimensional reconstruction network, a three-dimensional mesh model of the target object in each of the target object images is generated; and then a vertex coordinate set of the three-dimensional mesh model under each of the camera perspectives in the corresponding camera coordinate system is determined; finally, according to the relative position relationship of the vertex coordinate sets corresponding to each of the camera perspectives in the same coordinate system, the extrinsic parameter calibration value of the camera corresponding to each of the camera perspectives can be determined; in this way, there is no need to additionally design and build external markers, and there is no need to drive the external markers to move within the shooting scene range and synchronously shoot camera data after determining the installation configuration of the multi-camera system; and a series of offline calibration processes are performed, thereby avoiding a series of tedious, time-consuming and labor-intensive operations in the traditional calibration of the multi-camera system, and improving the calibration efficiency when calibrating the multi-camera extrinsic parameters after each change of the camera configuration.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0049] Figure 1 The figure is an application environment diagram of a camera extrinsic calibration method according to an exemplary embodiment.
[0050] Figure 2 The present invention is a flowchart of a camera extrinsic parameter calibration method according to an exemplary embodiment.
[0051] Figure 3 The figure is a flow chart of another camera extrinsic calibration method according to an exemplary embodiment.
[0052] Figure 4 It is a flowchart of a camera extrinsic parameter calibration method according to an exemplary embodiment.
[0053] Figure 5 The invention is a block diagram of a camera extrinsic parameter calibration device according to an exemplary embodiment.
[0054] Figure 6 The figure is a diagram showing the internal structure of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0055] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0057] The camera extrinsic calibration method provided in the present disclosure can be applied to Figure 1 In the application environment shown, the multi-camera 120 communicates with the electronic device 110 through a network. The electronic device 110 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.
[0058] Figure 2 is a flow chart of a camera extrinsic calibration method according to an exemplary embodiment. Figure 2 As shown, the camera extrinsic calibration method is used Figure 1 The electronic device 110 includes the following steps.
[0059] In step S210, the target object is photographed by multiple cameras to obtain multiple images of the target object under different camera viewing angles.
[0060] The target object may refer to a moving object that needs to be captured from multiple perspectives, such as an animal, a human body, or other moving objects.
[0061] The target object image may refer to a color image containing the target object.
[0062] In a specific implementation, taking the human body as an example, when the person being captured enters the capture area of the multi-view motion capture system, the electronic device controls multiple cameras of the multi-view motion capture system to start multi-camera shooting of the person being captured, so that the electronic device can obtain multiple color images of the person being captured at different camera angles, i.e., images of the target object. Each camera angle corresponds to a shooting camera in the multiple cameras.
[0063] In step S220, a three-dimensional mesh model of the target object in each target object image is generated by using a pre-trained three-dimensional reconstruction network.
[0064] The pre-trained 3D reconstruction network may refer to a neural network trained based on deep learning for reconstructing a 3D mesh model of an object in an input image. In practical applications, electronic devices estimate and reconstruct the 3D shape and posture of a human body in an input color image through a pre-trained 3D reconstruction network to obtain a 3D spatial representation of the human body in the image in the camera coordinate system.
[0065] In the specific implementation, after the electronic device obtains multiple color images of the captured person under different camera perspectives, namely, target object images, the electronic device inputs each target object image into a pre-trained 3D reconstruction network. Through the pre-trained 3D reconstruction network, the 3D shape and posture of the captured person are estimated and reconstructed to obtain a 3D mesh model of the captured person in each target object image.
[0066] In step S230, a vertex coordinate set of the three-dimensional mesh model in the corresponding camera coordinate system under each camera perspective is determined.
[0067] In a specific implementation, after the electronic device obtains the three-dimensional mesh model of the captured person in each target object image, the electronic device determines the vertex coordinate set of the three-dimensional mesh model in the corresponding camera coordinate system under each camera perspective.
[0068] The vertex coordinate set of the three-dimensional mesh model in the corresponding camera coordinate system under each camera perspective can be expressed as {M0,M1,...,M i}:
[0069] Among them, M i Represents the vertex coordinate set of the 3D mesh model in the i-th camera coordinate system (or camera perspective).
[0070] In step S240, the extrinsic calibration values of the cameras corresponding to the respective camera perspectives are determined according to the relative positional relationship of the vertex coordinate sets corresponding to the respective camera perspectives in the same coordinate system.
[0071] The camera extrinsic parameter may refer to an extrinsic parameter of a camera corresponding to a corresponding camera viewing angle, that is, a camera pose (R, t).
[0072] In a specific implementation, after the electronic device obtains the vertex coordinate sets of the three-dimensional mesh model under each camera perspective in the corresponding camera coordinate system, the electronic device determines the relative position relationship of the vertex coordinate sets corresponding to each camera perspective in the same coordinate system, and based on the relative position relationship of the vertex coordinate sets corresponding to each camera perspective in the same coordinate system, determines the external parameter calibration value of the camera corresponding to each camera perspective.
[0073] Specifically, the electronic device can unify the vertex coordinate sets corresponding to each camera perspective into the same coordinate system, and then, based on the relative position relationship of the vertex coordinate sets corresponding to each camera perspective in the same coordinate system, the electronic device determines the relative posture relationship between the cameras corresponding to each camera perspective, and further determines the external parameter calibration value of the camera corresponding to each camera perspective.
[0074] In practical applications, electronic devices can use computer graphics processing units (GPUs) to complete this task in real time online. In this way, after each change in the camera configuration of the multi-view motion capture system, the person being captured can directly enter the capture area to shoot without the need for tedious pre-calibration processes.
[0075] The technical solution of this embodiment is to obtain multiple target object images under different camera perspectives by photographing the target object with multiple cameras; and generate a three-dimensional mesh model of the target object in each of the target object images through a pre-trained three-dimensional reconstruction network; then determine the vertex coordinate set of the three-dimensional mesh model under each camera perspective in the corresponding camera coordinate system; finally, according to the relative position relationship of the vertex coordinate set corresponding to each camera perspective in the same coordinate system, the extrinsic parameter calibration value of the camera corresponding to each camera perspective can be determined; in this way, there is no need to additionally design and build external markers, and there is no need to drive the external markers to move within the shooting scene range and synchronously shoot camera data after determining the installation configuration of the multi-camera system; and a series of offline calibration processes are performed, thereby avoiding a series of tedious, time-consuming and labor-intensive operations in the traditional calibration of the multi-camera system, and improving the calibration efficiency when calibrating the multi-camera extrinsic parameters after each change of the camera configuration.
[0076] In an exemplary embodiment, the extrinsic calibration value of the camera corresponding to each camera perspective is determined according to the relative position relationship of the vertex coordinate sets corresponding to each camera perspective in the same coordinate system, including: taking one of the camera perspectives as a reference camera perspective; and determining the extrinsic calibration value of the camera corresponding to each camera perspective based on the vertex position difference between the vertex coordinate set corresponding to the reference camera perspective and the vertex coordinate set corresponding to each camera perspective.
[0077] In a specific implementation, the electronic device determines the external parameter calibration value of the camera corresponding to each camera perspective according to the relative position relationship of the vertex coordinate sets corresponding to each camera perspective in the same coordinate system, specifically including: the electronic device can use one of the camera perspectives as the reference camera perspective. Specifically, the electronic device can use the 0th camera perspective of each camera perspective as the reference camera perspective.
[0078] Then, the electronic device determines the extrinsic calibration values of the cameras corresponding to each camera perspective according to the relative position relationship of the vertex coordinate sets corresponding to each camera perspective in the same coordinate system. Specifically, the electronic device can unify the vertex coordinate sets corresponding to each camera perspective into the coordinate system where the vertex coordinate set corresponding to the reference camera perspective is located, and based on the vertex position difference between the vertex coordinate set corresponding to the reference camera perspective and the vertex coordinate set corresponding to each camera perspective in the coordinate system corresponding to the reference camera perspective, determine the relative posture relationship between the cameras corresponding to each camera perspective, and then preliminarily determine the extrinsic calibration values of the cameras corresponding to each camera perspective.
[0079] The technical solution of this embodiment is to determine the extrinsic parameter calibration value of the camera corresponding to each camera perspective by taking one of the camera perspectives as the reference camera perspective and based on the vertex position difference between the vertex coordinate set corresponding to the reference camera perspective and the vertex coordinate set corresponding to each camera perspective, thereby accurately determining the relative position relationship of the vertex coordinate set corresponding to each camera perspective in the same coordinate system, and then facilitating the subsequent determination of the extrinsic parameter calibration value corresponding to each camera perspective.
[0080] In an exemplary embodiment, based on the difference in vertex positions between the vertex coordinate set corresponding to a baseline camera perspective and the vertex coordinate set corresponding to each camera perspective, the extrinsic parameter calibration value of the camera corresponding to each camera perspective is determined, including: separately solving the rigid body transformation required to align the vertex coordinate set corresponding to each camera perspective to the coordinate system where the vertex coordinate set corresponding to the baseline camera perspective is located; and using the solved rigid body transformation corresponding to each camera perspective as the extrinsic parameter calibration value of the camera corresponding to each camera perspective.
[0081] In a specific implementation, when the electronic device determines the extrinsic calibration values of the camera corresponding to each camera perspective based on the difference in vertex positions between the vertex coordinate set corresponding to the baseline camera perspective and the vertex coordinate set corresponding to each camera perspective, the electronic device needs to solve the rigid body transformation required to align the vertex coordinate set corresponding to each camera perspective to the coordinate system of the vertex coordinate set corresponding to the baseline camera perspective; and use the solved rigid body transformation corresponding to each camera perspective as the extrinsic calibration value of the camera corresponding to each camera perspective. Specifically, the electronic device can use the SVD method (singular value decomposition algorithm) to calculate the rigid body transformation required to align the vertex coordinate set corresponding to the baseline camera perspective to the coordinate system where the vertex coordinate set corresponding to the baseline camera perspective is located, and obtain the rigid body transformation corresponding to each camera perspective. More specifically, the rigid body transformation (camera extrinsic calibration value) corresponding to the i-th camera perspective can be expressed as T I = {R i ,t i}, that is, the camera extrinsic calibration value corresponding to the i-th camera perspective can be equivalent to M i The rigid body transformation required to align to the coordinate system of M0.
[0082] Among them, R i =V i T ·U i , t i =c i -(R i c0),
[0083] in, c i is the center point of the 3D mesh model in the corresponding camera coordinate system under the i-th camera perspective.
[0084] Among them, SVD solves the intermediate variable L of rigid body transformation i =M0·M i .
[0085] The electronic device uses the solved rigid body transformation corresponding to each camera perspective as the external parameter calibration value of the camera corresponding to each camera perspective.
[0086] The technical solution of this embodiment is to use one of the camera perspectives as the reference camera perspective, and respectively solve the rigid body transformation required to align the vertex coordinate sets corresponding to each camera perspective to the coordinate system where the vertex coordinate sets corresponding to the reference camera perspective are located; so that the rigid body transformation corresponding to each camera perspective obtained by solving it can accurately represent the relative position relationship of the vertex coordinate sets corresponding to each camera perspective in the same coordinate system.
[0087] In an exemplary embodiment, after the step of determining the extrinsic parameter calibration value of the camera corresponding to each camera view according to the relative position relationship of the vertex coordinate sets corresponding to each camera view in the same coordinate system, the step further includes: inputting multiple target object images into a pre-trained key point detection network to obtain the two-dimensional key points of the target object in each target object image; and optimizing the extrinsic parameter calibration value of the camera corresponding to each camera view based on the position information of the two-dimensional key points corresponding to each camera view to obtain the optimized extrinsic parameter calibration value of the camera corresponding to each camera view.
[0088] When the target object is a human body, the two-dimensional key points in the target object image may be joint points of the target object in the target object image.
[0089] The pre-trained key point detection network may refer to a neural network for identifying key points of objects in an input image, which is obtained through deep learning training and training using massive labeled data. In practical applications, electronic devices detect and locate the positions of various joints of the human body in an input color image through the pre-trained key point detection network.
[0090] In a specific implementation, after the electronic device determines the extrinsic calibration value of the camera corresponding to each camera perspective according to the relative position relationship of the vertex coordinate sets corresponding to each camera perspective in the same coordinate system, the electronic device may input each target object image into a pre-trained key point detection network, and determine the two-dimensional key points of the target object in each target object image through the pre-trained key point detection network. The electronic device optimizes the extrinsic calibration value of the camera corresponding to each camera perspective based on the position information of the two-dimensional key points corresponding to each camera perspective, and obtains the optimized extrinsic calibration value of the camera corresponding to each camera perspective.
[0091] The technical solution of this embodiment is that after the electronic device determines the extrinsic parameter calibration value of the camera corresponding to each camera view according to the relative position relationship of the vertex coordinate sets corresponding to each camera view in the same coordinate system, the two-dimensional key points of the target object in each target object image are obtained by further inputting multiple target object images into a pre-trained key point detection network; based on the position information of the two-dimensional key points corresponding to each camera view, the extrinsic parameter calibration value of the camera corresponding to each camera view is further optimized, so that the optimized extrinsic parameter calibration value of the camera corresponding to each camera view can more accurately describe the actual camera posture of the camera corresponding to each camera view.
[0092] In an exemplary embodiment, based on the position information of the two-dimensional key points corresponding to each camera perspective, the extrinsic parameter calibration values of the camera corresponding to each camera perspective are optimized to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each camera perspective, including: determining the two-dimensional coordinates of the two-dimensional key points under each camera perspective in the corresponding image coordinate system based on multiple target object images; determining the three-dimensional coordinates of the key points under each camera perspective in the corresponding camera coordinate system in the vertex coordinate set corresponding to each camera perspective; optimizing the extrinsic parameter calibration values of the camera corresponding to each camera perspective according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points under each camera perspective to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each camera perspective.
[0093] In a specific implementation, the electronic device optimizes the external parameter calibration values of the cameras corresponding to the camera perspectives based on the position information of the two-dimensional key points corresponding to the camera perspectives, and the process of obtaining the optimized external parameter calibration values of the cameras corresponding to the camera perspectives specifically includes: determining the two-dimensional coordinates of the two-dimensional key points under each camera perspective in the corresponding image coordinate system based on multiple target object images. The two-dimensional coordinates of the key points under each camera perspective in the corresponding image coordinate system can be expressed as {P0, P1, ..., P i}:
[0094] Among them, P i Represents the two-dimensional coordinates of the two-dimensional key point in the i-th camera coordinate system (or camera perspective) in the corresponding image coordinate system.
[0095] At the same time, the electronic device determines the three-dimensional coordinates of the key points of the two-dimensional key points under each camera perspective in the corresponding camera coordinate system from the vertex coordinate sets corresponding to each camera perspective; and uses the two-dimensional coordinates of the key points and the three-dimensional coordinates of the key points as the key point position information. Among them, the three-dimensional coordinates of the key points of the key points under each camera perspective in the corresponding camera coordinate system can be expressed as {X0,X1,...,X i}:
[0096] Among them, X i Represents the three-dimensional coordinates of the two-dimensional key point in the i-th camera coordinate system (or camera perspective) in the corresponding camera coordinate system.
[0097] Finally, the electronic device optimizes the extrinsic parameter calibration values of the camera corresponding to each camera perspective based on the key point position information corresponding to each camera perspective, i.e., according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points under each camera perspective, to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each camera perspective.
[0098] The technical solution of this embodiment, in the process of optimizing the extrinsic parameter calibration values of the camera corresponding to each camera viewpoint, determines the key points of the target object in each target object image through a pre-trained key point detection network; determines the key point position information of the key points under each camera viewpoint in the corresponding camera coordinate system and the corresponding image coordinate system respectively; based on the key point position information corresponding to each camera viewpoint, accurately further optimizes the extrinsic parameter calibration values of the camera corresponding to each camera viewpoint, so that the optimized extrinsic parameter calibration values of the camera corresponding to each camera viewpoint have higher accuracy.
[0099] In an exemplary embodiment, according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective, the extrinsic parameter calibration values of the cameras corresponding to each camera perspective are optimized to obtain the optimized extrinsic parameter calibration values of the cameras corresponding to each camera perspective, including: determining the projection error of the cameras corresponding to each camera perspective when the extrinsic parameter calibration values are used according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective; adjusting the extrinsic parameter calibration values of the cameras corresponding to each camera perspective based on the projection error of the cameras corresponding to each camera perspective when the extrinsic parameter calibration values are used to obtain the adjusted extrinsic parameter calibration values of the cameras corresponding to each camera perspective as the optimized extrinsic parameter calibration values of the cameras corresponding to each camera perspective. Wherein, the projection error of the cameras corresponding to the camera perspectives when the optimized extrinsic parameter calibration values are used meets the preset conditions.
[0100] The projection error is the error between the two-dimensional coordinates of the key point obtained by projecting the three-dimensional coordinates of the key point onto the image plane of the camera corresponding to the camera angle of view and the two-dimensional coordinates of the key point.
[0101] In a specific implementation, the electronic device optimizes the extrinsic calibration values of the camera corresponding to each camera perspective according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective, and obtains the optimized extrinsic calibration values of the camera corresponding to each camera perspective. The process specifically includes: the electronic device determines, according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective, the error between the two-dimensional coordinates of the key points obtained by projecting the three-dimensional coordinates of the key points to the image plane of the camera when the camera corresponding to each camera perspective adopts the extrinsic calibration value.
[0102] In an exemplary embodiment, the projection error of the camera corresponding to each camera perspective is determined according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points under each camera perspective, specifically comprising: projecting the key points corresponding to each camera perspective onto the image plane of the corresponding camera based on the external parameter calibration values of the camera corresponding to each camera perspective and the three-dimensional coordinates of the key points corresponding to each camera perspective through a preset projection function to obtain the projection points of the key points corresponding to each camera perspective on the image plane of the corresponding camera; determining the two-dimensional coordinates of the projection points corresponding to each camera perspective in the corresponding image coordinate system; determining the projection error of the camera corresponding to each camera perspective according to the difference between the two-dimensional coordinates of the projection points corresponding to each camera perspective and the two-dimensional coordinates of the corresponding key points.
[0103] In other words, the electronic device can, through a preset projection function, based on the external parameter calibration values of the cameras corresponding to each camera view and the three-dimensional coordinates of the key points corresponding to each camera view, convert the three-dimensional coordinates of the key points corresponding to each camera view in the corresponding camera coordinate system into the three-dimensional coordinates of the key points corresponding to each camera view in the corresponding image coordinate system as the two-dimensional coordinates of the projection points corresponding to each camera view.
[0104] Finally, the electronic device adjusts the extrinsic parameter calibration values of the cameras corresponding to each camera perspective based on the projection errors of the cameras corresponding to each camera perspective when using the extrinsic parameter calibration values, and obtains the adjusted extrinsic parameter calibration values of the cameras corresponding to each camera perspective as the optimized extrinsic parameter calibration values of the cameras corresponding to each camera perspective.
[0105] Among them, the projection error of the camera corresponding to the camera viewing angle meets the preset conditions when the optimized external parameter calibration value is adopted.
[0106] In practical applications, the electronic device adjusts the extrinsic calibration values of the cameras corresponding to each camera perspective based on the projection errors corresponding to each camera perspective, and in the process of obtaining the optimized extrinsic calibration values corresponding to each camera perspective, the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective can be used as constraints, and the extrinsic parameters of each camera to be calibrated can be used as target variables to establish a nonlinear least squares problem, and solve it using the optimization mathematical method, and finally obtain the optimized extrinsic calibration values of each camera in the multi-view motion capture system. Specifically, the electronic device can use the extrinsic calibration value T of the camera corresponding to the i-th camera perspective I = {R i ,t i}, and at the same time combine the two-dimensional coordinates of the key points in the corresponding image coordinate system under each camera perspective {P0,P1,...,P i}: The following least squares problem can be established:
[0107]
[0108] Among them, π i is the projection function corresponding to the intrinsic parameters of each camera.
[0109] Finally, the electronic device solves the above nonlinear least squares problem by using the optimization mathematical method, and the obtained {R i , t i} is the final result of the external parameters of each camera. In practical applications, the Gauss-Newton method, Levenberg–Marquardt algorithm, Newton method, etc. can be used for solution. This solution does not restrict the specific solution method.
[0110] The technical solution of this embodiment is to determine the projection error of the camera corresponding to each camera perspective according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective; and based on the projection error corresponding to each camera perspective, adjust the extrinsic parameter calibration value of the camera corresponding to each camera perspective to obtain the adjusted extrinsic parameter calibration value corresponding to each camera perspective as the optimized extrinsic parameter calibration value of the camera corresponding to each camera perspective, so that the error generated when the camera corresponding to each camera perspective projects the two-dimensional key point to the image plane of the camera when using the optimized extrinsic parameter calibration value meets the preset condition.
[0111] Figure 3 is a flow chart of another camera extrinsic calibration method according to an exemplary embodiment. Figure 3 As shown, the camera extrinsic calibration method is used Figure 1The electronic device 110 includes the following steps. In step S302, the target object is photographed by multiple cameras to obtain multiple target object images under different camera perspectives. In step S304, a three-dimensional mesh model of the target object in each of the target object images is generated through a pre-trained three-dimensional reconstruction network. In step S306, the vertex coordinate set of the three-dimensional mesh model in the corresponding camera coordinate system under each of the camera perspectives is determined. In step S308, one of the camera perspectives of each of the camera perspectives is used as the reference camera perspective. In step S310, the rigid body transformation required to align the vertex coordinate set corresponding to each of the camera perspectives to the coordinate system where the vertex coordinate set corresponding to the reference camera perspective is located is solved. In step S312, the rigid body transformation corresponding to each of the camera perspectives obtained is used as the external parameter calibration value of the camera corresponding to each of the camera perspectives. In step S314, the two-dimensional key points of the target object in each of the target object images are determined through a pre-trained key point detection network. In step S316, based on the plurality of target object images, the two-dimensional coordinates of the key points of the two-dimensional key points under each of the camera perspectives in the corresponding image coordinate system are determined. In step S318, in the vertex coordinate sets corresponding to each of the camera perspectives, the three-dimensional coordinates of the key points of the two-dimensional key points under each of the camera perspectives in the corresponding camera coordinate system are determined. In step S320, the projection error of the camera corresponding to each of the camera perspectives when the extrinsic calibration value is adopted is determined according to the three-dimensional coordinates of the key points corresponding to each of the camera perspectives and the two-dimensional coordinates of the key points corresponding to each of the camera perspectives. In step S322, based on the projection error of the camera corresponding to each of the camera perspectives when the extrinsic calibration value is adopted, the extrinsic calibration value of the camera corresponding to each of the camera perspectives is adjusted to obtain the adjusted extrinsic calibration value of the camera corresponding to each of the camera perspectives as the optimized extrinsic calibration value of the camera corresponding to each of the camera perspectives. It should be noted that the specific definition of the above steps can refer to the specific definition of a camera extrinsic calibration method above, which will not be repeated here.
[0112] It should be understood that although Figure 2 and Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 3At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0113] To facilitate the logic of those skilled in the art, Figure 4 A flow chart of a camera extrinsic calibration method is provided; wherein, a target object is photographed by multiple cameras to obtain multiple target object images under different camera perspectives; then, the multiple target object images are input into a human body two-dimensional key point detection module to detect and locate the positions of various human body joints in the input color image. At the same time, the multiple target object images are input into a human body three-dimensional mesh model estimation module to estimate and reconstruct the three-dimensional shape and posture of the human body in the input color image, and obtain a three-dimensional spatial representation of the human body in the image under the camera coordinate system. Then, the human body key points and three-dimensional mesh model data detected in each frame of each camera are input into a multi-frame multi-view joint optimization module. This module uses the corresponding two-dimensional and three-dimensional key point positions under multiple frames and multiple perspectives as constraints, and the extrinsic parameters of each camera to be calibrated as target variables, establishes a nonlinear least squares problem, and solves it using an optimization mathematical method, and finally obtains the extrinsic calibration values of each camera in the multi-view dynamic compensation system.
[0114] Figure 5 is a block diagram of a camera extrinsic calibration device according to an exemplary embodiment. Figure 5 , the device comprises:
[0115] The acquisition unit 510 is configured to perform multi-camera shooting of the target object to obtain multiple images of the target object under different camera viewing angles; each of the camera viewing angles corresponds to one camera in the multiple cameras;
[0116] The reconstruction unit 520 is configured to input the plurality of target object images into a pre-trained 3D reconstruction network to generate a 3D mesh model of the target object in each of the target object images;
[0117] A determination unit 530 is configured to determine a vertex coordinate set of the three-dimensional mesh model in a corresponding camera coordinate system under each camera perspective;
[0118] The calibration unit 540 is configured to determine the extrinsic calibration value of the camera corresponding to each camera view according to the relative position relationship of the vertex coordinate sets corresponding to each camera view in the same coordinate system.
[0119] In an exemplary embodiment, the calibration unit 540 is specifically configured to execute using one of the camera perspectives as a benchmark camera perspective; based on the vertex position difference between the vertex coordinate set corresponding to the benchmark camera perspective and the vertex coordinate set corresponding to each of the camera perspectives, determine the extrinsic parameter calibration value of the camera corresponding to each of the camera perspectives.
[0120] In an exemplary embodiment, the calibration unit 540 is specifically configured to execute respectively solving the rigid body transformation required to align the vertex coordinate sets corresponding to each of the camera perspectives to the coordinate system where the vertex coordinate sets corresponding to the reference camera perspective are located; and use the solved rigid body transformation corresponding to each of the camera perspectives as the external parameter calibration value of the camera corresponding to each of the camera perspectives.
[0121] In an exemplary embodiment, the device also includes: a key point detection unit, configured to input multiple target object images into a pre-trained key point detection network to obtain two-dimensional key points of the target object in each of the target object images; an optimization unit, configured to optimize the extrinsic parameter calibration values of the camera corresponding to each camera perspective based on the position information of the two-dimensional key points corresponding to each camera perspective to obtain optimized extrinsic parameter calibration values of the camera corresponding to each camera perspective.
[0122] In an exemplary embodiment, the optimization unit is specifically configured to determine the two-dimensional coordinates of the key points of the two-dimensional key points under each of the camera perspectives in the corresponding image coordinate system based on multiple images of the target object; determine the three-dimensional coordinates of the key points of the two-dimensional key points under each of the camera perspectives in the corresponding camera coordinate system in the vertex coordinate sets corresponding to each of the camera perspectives; optimize the extrinsic parameter calibration values of the camera corresponding to each of the camera perspectives according to the three-dimensional coordinates of the key points corresponding to each of the camera perspectives and the two-dimensional coordinates of the key points corresponding to each of the camera perspectives, so as to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each of the camera perspectives.
[0123] In an exemplary embodiment, the optimization unit is specifically configured to determine the projection error of the camera corresponding to each camera perspective when the extrinsic parameter calibration value is adopted according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective; the projection error is the error between the two-dimensional coordinates obtained by the camera corresponding to the camera perspective when projecting the three-dimensional coordinates of the key points to the image plane of the camera and the two-dimensional coordinates of the key points; based on the projection error of the camera corresponding to each camera perspective when the extrinsic parameter calibration value is adopted, the extrinsic parameter calibration value of the camera corresponding to each camera perspective is adjusted to obtain the adjusted extrinsic parameter calibration value of the camera corresponding to each camera perspective as the optimized extrinsic parameter calibration value of the camera corresponding to each camera perspective; wherein the projection error of the camera corresponding to the camera perspective when the optimized extrinsic parameter calibration value is adopted satisfies a preset condition.
[0124] In an exemplary embodiment, the optimization unit is specifically configured to perform a projection of the three-dimensional coordinates of the key points corresponding to each camera perspective onto the image plane of the corresponding camera through a preset projection function and an external parameter calibration value of the camera corresponding to each camera perspective, to obtain the projection points of the two-dimensional key points corresponding to each camera perspective on the image plane of the corresponding camera; determine the two-dimensional coordinates of the projection points corresponding to each camera perspective in the corresponding image coordinate system; and determine the projection error of the camera corresponding to each camera perspective based on the difference between the two-dimensional coordinates of the projection points corresponding to each camera perspective and the corresponding two-dimensional coordinates of the key points.
[0125] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0126] Figure 6 6 is a block diagram of a device 600 for performing a camera extrinsic calibration method according to an exemplary embodiment. For example, the device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0127] Reference Figure 6 , device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0128] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0129] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0130] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.
[0131] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0132] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0133] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0134] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0135] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0136] In an exemplary embodiment, the device 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0137] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0138] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0139] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A camera extrinsic calibration method, characterized in that: The method comprises: Performing multi-camera photography on the target object to obtain multiple images of the target object under different camera viewing angles; each of the camera viewing angles corresponds to one of the multiple cameras; Inputting a plurality of the target object images into a pre-trained three-dimensional reconstruction network to generate a three-dimensional mesh model of the target object in each of the target object images; Determine a vertex coordinate set of the three-dimensional mesh model in a corresponding camera coordinate system under each camera perspective; According to the relative position relationship of the vertex coordinate sets corresponding to the camera perspectives in the same coordinate system, the extrinsic calibration values of the cameras corresponding to the camera perspectives are determined, including: taking one of the camera perspectives as the reference camera perspective; respectively solving the rigid body transformation required when aligning the vertex coordinate sets corresponding to the camera perspectives to the coordinate system where the vertex coordinate sets corresponding to the reference camera perspective are located, and obtaining the extrinsic calibration values of the cameras corresponding to the camera perspectives; wherein the extrinsic calibration value of the camera corresponding to the i-th camera perspective is to convert M i The rigid body transformation required to align to the coordinate system of M0, where M i represents a set of vertex coordinates of the three-dimensional mesh model under the perspective of the i-th camera, and M0 represents a set of vertex coordinates of the three-dimensional mesh model under the perspective of the reference camera.
2. The camera extrinsic calibration method according to claim 1, characterized in that: After the step of determining the extrinsic parameter calibration value of the camera corresponding to each camera view according to the relative position relationship of the vertex coordinate sets corresponding to each camera view in the same coordinate system, the method further includes: Inputting a plurality of target object images into a pre-trained key point detection network to obtain a two-dimensional key point of the target object in each of the target object images; Based on the position information of the two-dimensional key points corresponding to each of the camera perspectives, the extrinsic parameter calibration values of the cameras corresponding to each of the camera perspectives are optimized to obtain the optimized extrinsic parameter calibration values of the cameras corresponding to each of the camera perspectives.
3. The camera extrinsic calibration method according to claim 2, characterized in that: The step of optimizing the extrinsic calibration values of the cameras corresponding to the respective camera perspectives based on the position information of the two-dimensional key points corresponding to the respective camera perspectives, and obtaining the optimized extrinsic calibration values of the cameras corresponding to the respective camera perspectives, comprises: Based on the plurality of target object images, determining the two-dimensional coordinates of the two-dimensional key points in the corresponding image coordinate system under the perspective of each camera; Determine the three-dimensional coordinates of the two-dimensional key points in the corresponding camera coordinate system in the vertex coordinate sets corresponding to the camera perspectives; According to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points under each camera perspective, the extrinsic parameter calibration values of the camera corresponding to each camera perspective are optimized to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each camera perspective.
4. The camera extrinsic calibration method according to claim 3, characterized in that: The step of optimizing the extrinsic calibration values of the cameras corresponding to the camera perspectives according to the three-dimensional coordinates of the key points corresponding to the camera perspectives and the two-dimensional coordinates of the key points under the camera perspectives to obtain the optimized extrinsic calibration values of the cameras corresponding to the camera perspectives includes: Determine, according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective, the projection error of the camera corresponding to each camera perspective when the extrinsic parameter calibration value is adopted; the projection error is the error between the two-dimensional coordinates obtained by projecting the three-dimensional coordinates of the key points onto the image plane of the camera corresponding to the camera perspective and the two-dimensional coordinates of the key points; Based on the projection errors of the cameras corresponding to the camera perspectives when the extrinsic parameter calibration values are used, the extrinsic parameter calibration values of the cameras corresponding to the camera perspectives are adjusted to obtain the adjusted extrinsic parameter calibration values of the cameras corresponding to the camera perspectives as the optimized extrinsic parameter calibration values of the cameras corresponding to the camera perspectives; Among them, the projection error of the camera corresponding to the camera viewing angle when using the optimized extrinsic parameter calibration value meets the preset condition.
5. The camera extrinsic calibration method according to claim 4, characterized in that: The determining, according to the three-dimensional coordinates of the key points corresponding to the respective camera viewing angles and the two-dimensional coordinates of the key points corresponding to the respective camera viewing angles, the projection errors of the cameras corresponding to the respective camera viewing angles comprises: By using a preset projection function and an external parameter calibration value of the camera corresponding to each camera view, the three-dimensional coordinates of the key point corresponding to each camera view are projected onto the image plane of the corresponding camera, so as to obtain the projection point of the two-dimensional key point corresponding to each camera view on the image plane of the corresponding camera; Determine the two-dimensional coordinates of the projection points corresponding to the camera viewing angles in the corresponding image coordinate system; The projection error of the camera corresponding to each camera view is determined according to the difference between the two-dimensional coordinates of the projection point corresponding to each camera view and the corresponding two-dimensional coordinates of the key point.
6. A camera extrinsic calibration device, characterized in that: include: An acquisition unit is configured to perform multi-camera photography of a target object to obtain a plurality of images of the target object under different camera viewing angles; each of the camera viewing angles corresponds to one of the multiple cameras; A reconstruction unit is configured to input a plurality of the target object images into a pre-trained three-dimensional reconstruction network to generate a three-dimensional mesh model of the target object in each of the target object images; A determination unit, configured to determine a vertex coordinate set of the three-dimensional mesh model in a corresponding camera coordinate system under each camera perspective; A calibration unit is configured to determine an external parameter calibration value of the camera corresponding to each camera perspective according to a relative position relationship of a vertex coordinate set corresponding to each camera perspective in the same coordinate system; The calibration unit is specifically configured to execute one of the camera perspectives as a reference camera perspective; respectively solve the rigid body transformation required when aligning the vertex coordinate sets corresponding to each of the camera perspectives to the coordinate system where the vertex coordinate sets corresponding to the reference camera perspective are located, and obtain the external parameter calibration value of the camera corresponding to each of the camera perspectives; wherein the external parameter calibration value of the camera corresponding to the i-th camera perspective is to set M i The rigid body transformation required to align to the coordinate system of M0, where M i represents a set of vertex coordinates of the three-dimensional mesh model under the perspective of the i-th camera, and M0 represents a set of vertex coordinates of the three-dimensional mesh model under the perspective of the reference camera.
7. The camera extrinsic calibration device according to claim 6, characterized in that: The device further includes: a key point detection unit configured to input a plurality of target object images into a pre-trained key point detection network to obtain a two-dimensional key point of the target object in each of the target object images; The optimization unit is configured to optimize the extrinsic parameter calibration values of the camera corresponding to each camera perspective based on the position information of the two-dimensional key points corresponding to each camera perspective, so as to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each camera perspective.
8. The camera extrinsic calibration device according to claim 7, characterized in that: The optimization unit is specifically configured to perform, based on multiple images of the target object, determining the two-dimensional coordinates of the key points of the two-dimensional key points under each camera perspective in the corresponding image coordinate system; determining the three-dimensional coordinates of the key points of the two-dimensional key points under each camera perspective in the corresponding camera coordinate system in the vertex coordinate set corresponding to each camera perspective; optimizing the extrinsic parameter calibration values of the camera corresponding to each camera perspective according to the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective, so as to obtain the optimized extrinsic parameter calibration values of the camera corresponding to each camera perspective.
9. The camera extrinsic calibration device according to claim 8, characterized in that: The optimization unit is specifically configured to execute, based on the three-dimensional coordinates of the key points corresponding to each camera perspective and the two-dimensional coordinates of the key points corresponding to each camera perspective, to determine the projection error of the camera corresponding to each camera perspective when the extrinsic parameter calibration value is adopted; the projection error is the error between the two-dimensional coordinates obtained by the camera corresponding to the camera perspective when projecting the three-dimensional coordinates of the key points to the image plane of the camera and the two-dimensional coordinates of the key points; based on the projection error of the camera corresponding to each camera perspective when the extrinsic parameter calibration value is adopted, the extrinsic parameter calibration value of the camera corresponding to each camera perspective is adjusted to obtain the adjusted extrinsic parameter calibration value of the camera corresponding to each camera perspective as the optimized extrinsic parameter calibration value of the camera corresponding to each camera perspective; wherein the projection error of the camera corresponding to the camera perspective when the optimized extrinsic parameter calibration value is adopted meets a preset condition.
10. The camera extrinsic calibration device according to claim 9, characterized in that: The optimization unit is specifically configured to execute a preset projection function and an external parameter calibration value of the camera corresponding to each camera view, and project the three-dimensional coordinates of the key points corresponding to each camera view onto the image plane of the corresponding camera, to obtain the projection points of the two-dimensional key points corresponding to each camera view on the image plane of the corresponding camera; determine the two-dimensional coordinates of the projection points corresponding to each camera view in the corresponding image coordinate system; and determine the projection error of the camera corresponding to each camera view according to the difference between the two-dimensional coordinates of the projection points corresponding to each camera view and the corresponding two-dimensional coordinates of the key points.
11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the camera extrinsic parameter calibration method as described in any one of claims 1 to 5.
12. A storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the camera extrinsic parameter calibration method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
External parameter calibration method and device for multi-view camera, storage medium and electronic equipment
CN110473262A
Monitoring camera internal reference calibration method and device and electronic device
CN110930463A
