Binocular camera parameter calibration method, device, equipment and storage medium
By acquiring multi-frame continuous images and three-dimensional Gaussian point cloud data from binocular cameras, constructing image constraints and epipolar geometric constraints, and solving binocular external parameters, the problem of low convenience in binocular camera parameter calibration is solved, and a more accurate and accurate Convenient calibration process.
Patent Information
- Application Number
- CN202410727753.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-06
AI Technical Summary
The parameter calibration method of binocular cameras in the existing technology relies on professionally customized calibration plates, which makes the calibration inconvenient and difficult to perform quickly and accurately in practical applications.
By acquiring multi-frame continuous target binocular images collected by a binocular camera, the three-dimensional Gaussian point cloud data of the left eye image is obtained, image constraints and epipolar geometric constraints are constructed, and binocular external parameters are solved for parameter calibration to achieve accurate calibration without a calibration board. Calibration.
It improves the accuracy and convenience of binocular camera parameter calibration, reduces dependence on professional calibration boards, and is suitable for scenarios such as vehicle-mounted terminals.
Smart Images

Figure CN118298033B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a parameter calibration method, device, equipment and storage medium for a binocular camera. Background Art
[0002] Binocular cameras are widely used in the field of autonomous driving, because they can directly obtain depth information and are cheaper than lidar. However, the measurement of depth information depends on accurate binocular external parameter information, so the external parameter calibration of binocular stereo cameras is particularly important. However, most of the calibration methods in related technologies are based on calibration plates, which require professional customized calibration plates to complete. Summary of the invention
[0003] In view of this, the present invention provides a method, device, equipment and storage medium for parameter calibration of a binocular camera to solve the problem of low convenience in parameter calibration of a binocular camera in the related art.
[0004] In a first aspect, the present invention provides a method for calibrating parameters of a binocular camera, the method comprising:
[0005] Acquire multiple frames of continuous target binocular images captured by the binocular camera, the target binocular images include a left-eye image and a right-eye image, the left-eye image is obtained based on the image captured by the left camera in the binocular camera, and the right-eye image is obtained based on the image captured by the right camera in the binocular camera;
[0006] For any frame of the target binocular image, obtain the three-dimensional Gaussian point cloud data corresponding to the left eye image;
[0007] Based on the three-dimensional Gaussian point cloud data, an image constraint of the right eye image is constructed, and the image constraint is used to characterize the pixel consistency between the right eye rendered image rendered based on the three-dimensional Gaussian point cloud data and the right eye image;
[0008] Match the feature points of the left and right images, and construct epipolar geometry constraints based on the obtained matching point pairs and binocular extrinsic parameters. The epipolar geometry constraints are used to characterize the mixed product relationship between the matching point pairs and the binocular extrinsic parameters.
[0009] Based on image constraints and epipolar geometry constraints, the binocular extrinsic parameters are solved to calibrate the binocular camera parameters.
[0010] In some optional implementations, acquiring multiple frames of continuous target binocular images captured by a binocular camera includes:
[0011] Acquire multiple frames of continuous binocular images captured by a binocular camera;
[0012] Perform distortion correction on the binocular image based on the calibration internal reference to obtain a corrected binocular image;
[0013] The rectified binocular image is stereo-rectified based on the initial external parameters to obtain the target binocular image. The initial external parameters are obtained based on the measurement.
[0014] In some optional implementations, obtaining three-dimensional Gaussian point cloud data corresponding to the left-eye image includes:
[0015] Get the depth map and corresponding pose of the left eye image;
[0016] The camera coordinate system of the first frame of the binocular image is used as the world coordinate system, and the initial point cloud data of the left eye image is determined based on the depth map;
[0017] Render the initial point cloud data based on the pose to obtain the left-eye rendered image and left-eye rendered depth map corresponding to the left-eye camera;
[0018] Based on a first pixel difference between a left-eye rendered image and a left-eye image, and a second pixel difference between a left-eye rendered depth map and a depth map of the left-eye image, the initial point cloud data is adjusted to obtain three-dimensional Gaussian point cloud data corresponding to the left-eye image.
[0019] In some optional implementations, obtaining a depth map of a left-eye image and a corresponding posture includes:
[0020] Perform disparity matching on the target binocular image to obtain the initial disparity map of the left image and the right image;
[0021] After removing abnormal disparity pixels in the initial disparity map, disparity pixels are interpolated to obtain the target disparity map;
[0022] Based on the target disparity map, determine the depth map and corresponding posture corresponding to the left eye image.
[0023] In some optional implementations, constructing image constraints of the right eye image based on the three-dimensional Gaussian point cloud data includes:
[0024] The 3D Gaussian point cloud data in the world coordinate system is converted to the left camera coordinate system through the transformation matrix to obtain the left camera 3D Gaussian point cloud data;
[0025] Based on the initial external parameters, the left-eye 3D Gaussian point cloud data is converted to the right camera coordinate system to obtain the right-eye 3D Gaussian point cloud data;
[0026] Render the right-eye three-dimensional Gaussian point cloud data to obtain a right-eye rendered image;
[0027] Based on the pixel difference between the right-eye rendered image and the right-eye image, the image constraint of the right-eye image is constructed.
[0028] In some optional implementations, matching feature points of the left eye image and the right eye image, and constructing epipolar geometry constraints based on the obtained matching point pairs and binocular extrinsic parameters, includes:
[0029] Extract feature points of the left and right images, and match them to obtain matching point pairs;
[0030] For any matching point pair, the epipolar geometric constraints of the target binocular image are constructed based on the mixed product of the matching point pair and the binocular extrinsic parameters.
[0031] In some optional implementations, based on image constraints and epipolar geometry constraints, the model for solving binocular extrinsic parameters is:
[0032]
[0033]
[0034]
[0035] in, is the cost function, is the image constraint, Render the image for the right eye of the i-th frame, is the right eye image of the i-th frame, is the epipolar geometry constraint, is the feature point of the left image in the i-th frame matching point pair, is the feature point of the right image in the i-th frame matching point pair, is the rotation matrix in the binocular external parameters, is the translation vector in the binocular external parameters, N is the number of frames, is the number of matching point pairs in the i-th frame.
[0036] In a second aspect, the present invention provides a parameter calibration device for a binocular camera, the device comprising:
[0037] An image acquisition module is used to acquire multiple frames of continuous target binocular images acquired by a binocular camera. The target binocular images include a left-eye image and a right-eye image. The left-eye image is obtained based on an image acquired by a left camera in the binocular camera, and the right-eye image is obtained based on an image acquired by a right camera in the binocular camera.
[0038] A data acquisition module is used to acquire the three-dimensional Gaussian point cloud data corresponding to the left eye image for any frame of the target binocular image;
[0039] An image constraint module is used to construct image constraints of a right eye image based on three-dimensional Gaussian point cloud data, and the image constraints are used to characterize the pixel consistency between a right eye rendered image rendered based on three-dimensional Gaussian point cloud data and the right eye image;
[0040] The geometric constraint module is used to match the feature points of the left and right images, and construct epipolar geometric constraints based on the obtained matching point pairs and binocular extrinsic parameters. The epipolar geometric constraints are used to characterize the mixed product relationship between the matching point pairs and the binocular extrinsic parameters.
[0041] The parameter calibration module is used to solve the binocular external parameters based on image constraints and epipolar geometry constraints to calibrate the parameters of the binocular camera.
[0042] In a third aspect, the present invention provides a computer device, comprising:
[0043] The memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the parameter calibration method of the binocular camera of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the parameter calibration method for a binocular camera according to the first aspect or any corresponding embodiment thereof.
[0045] The technical solution provided by the embodiment of the present invention obtains multiple frames of continuous target binocular images collected by a binocular camera to obtain three-dimensional Gaussian point cloud data corresponding to a left-eye image for any frame of the target binocular image; constructs image constraints of the right-eye image based on the three-dimensional Gaussian point cloud data, matches feature points of the left-eye image and the right-eye image, and constructs epipolar geometry based on the obtained matching point pairs and binocular extrinsic parameters, solves the binocular extrinsic parameters based on the image constraints and epipolar geometry constraints, and calibrates the binocular camera parameters, thereby improving the accuracy of the parameter calibration of the binocular camera.
[0046] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1is a flow chart of a method for calibrating parameters of a binocular camera according to an embodiment of the present invention;
[0049] Figure 2 is a structural block diagram of a parameter calibration device for a binocular camera according to an embodiment of the present invention;
[0050] Figure 3 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0052] In this embodiment, a parameter calibration method for a binocular camera is provided, which can be used in a vehicle-mounted terminal. Figure 1 is a flow chart of a method for calibrating parameters of a binocular camera according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0053] Step S101, acquiring multiple frames of continuous target binocular images captured by a binocular camera.
[0054] The target binocular image includes a left-eye image and a right-eye image. The left-eye image is obtained based on an image captured by a left camera in the binocular camera, and the right-eye image is obtained based on an image captured by a right camera in the binocular camera.
[0055] In some optional embodiments, when acquiring multiple frames of continuous target binocular images captured by a binocular camera, multiple frames of continuous binocular images captured by a binocular camera can be acquired; distortion correction is performed on the binocular images based on calibrated internal parameters to obtain a corrected binocular image; stereo correction is performed on the corrected binocular images based on initial external parameters to obtain a target binocular image, and the initial external parameters are obtained based on measurements.
[0056] Specifically, firstly, N consecutive frames of binocular images are collected based on the binocular camera: [< >,< >,...,< >], is the Nth frame of the left camera’s binocular image, is the Nth frame of the binocular image of the right camera. Then, the calibration internal parameters are determined based on the calibrated internal reference image, and the distortion of the binocular image is corrected by the calibration internal parameters to obtain the corrected binocular image. Assume that the initial external parameter transformation from the right camera to the left camera with disturbance is known, that is, the initial external parameter. Therefore, the corrected binocular image can be stereo-corrected based on the initial external parameter to obtain the target binocular image, so that the optical axes of the left and right cameras are parallel, that is, the binocular image taken by the left camera is aligned with the binocular image taken by the right camera in the same plane; after stereo correction, any left pixel point of the binocular image taken by the left camera only needs to be searched in the horizontal direction along the epipolar line to find the corresponding right matching point of the binocular image taken by the right camera.
[0057] The parameter calibration method of the binocular camera provided by the embodiment of the present invention performs distortion correction and stereo correction on multiple frames of continuous binocular images collected by the binocular camera, thereby obtaining multiple frames of continuous target binocular images with higher reliability, providing a basis for accurate calibration of the binocular extrinsic parameters of the binocular camera.
[0058] Step S102, for any frame of target binocular image, obtain the three-dimensional Gaussian point cloud data corresponding to the left eye image.
[0059] The left-eye image is obtained by collecting the target binocular image by the left-eye camera of the binocular camera.
[0060] In some optional embodiments, when obtaining the three-dimensional Gaussian point cloud data corresponding to the left-eye image, the depth map and the corresponding posture of the left-eye image can be obtained; the camera coordinate system of the first frame of the binocular image is used as the world coordinate system, and the initial point cloud data of the left-eye image is determined based on the depth map; the initial point cloud data is rendered based on the posture to obtain the left-eye rendered image and the left-eye rendered depth map corresponding to the left-eye camera; based on the first pixel difference between the left-eye rendered image and the left-eye image, and the second pixel difference between the left-eye rendered depth map and the depth map of the left-eye image, the initial point cloud data is adjusted to obtain the three-dimensional Gaussian point cloud data corresponding to the left-eye image.
[0061] Specifically, for each frame of the left-eye image, a 3D positioning and mapping method based on ORB (Oriented FAST and RotatedBRIEF, an algorithm for fast feature point extraction and description) features is used to obtain its corresponding position and posture. The camera coordinate system of the first frame of the binocular image is used as the world coordinate system, and the initial point cloud data of the left-eye image is determined based on the depth map corresponding to the left-eye image; the initial point cloud data is rendered using 3D Gaussian jet technology based on the position and posture to obtain the left-eye rendering image (left-eye RGB image) corresponding to the left-eye camera. And the left eye rendering depth map ; Based on the first pixel difference between the left-eye rendered image and the left-eye image, and the second pixel difference between the left-eye rendered depth map and the left-eye image depth map, the initial point cloud data is adjusted to obtain the three-dimensional Gaussian point cloud data corresponding to the left-eye image. That is, the rendered image should be as close as possible to the real collected data, so the initial point cloud data can be optimized through the point cloud constraint to obtain the three-dimensional Gaussian point cloud data corresponding to the left-eye image. The expression of the point cloud constraint is:
[0062]
[0063] in, Indicates the left-eye rendered image of the i-th frame, represents the left eye image of the i-th frame, Render the depth map for the left eye of the i-th frame, is the depth map of the left eye image of the i-th frame. is the cost function of the point cloud constraint.
[0064] It can be understood that the above-mentioned three-dimensional Gaussian point cloud data is constructed based on the depth map calculated based on the erroneous binocular camera extrinsic parameters, so there are errors, and it is necessary to further construct constraints to optimize the extrinsic parameters.
[0065] In some optional embodiments, when obtaining the depth map and the corresponding posture of the left-eye image, the target binocular image can be subjected to disparity matching processing to obtain an initial disparity map of the left-eye image and the right-eye image; after removing abnormal disparity pixels in the initial disparity map, disparity pixel interpolation is performed to obtain a target disparity map; based on the target disparity map, the depth map and the corresponding posture corresponding to the left-eye image are determined.
[0066] Specifically, the binocular stereo matching algorithm can be used to perform disparity matching on the target binocular image to obtain the initial disparity map of the left eye image and the right eye image; then, after removing the abnormal disparity pixels in the initial disparity map, the disparity of the surrounding pixels is used to perform pixel interpolation to obtain the target disparity map; then, the depth map of the left eye image is obtained based on the conversion relationship between disparity and depth. The conversion relationship between disparity and depth is:
[0067]
[0068] Among them, z represents the depth of the pixel, f is the focal length, b is the distance between the optical centers of the left camera and the right camera, and d is the disparity pixel (disparity value) corresponding to the pixel.
[0069] Step S103: constructing image constraints of the right eye image based on the three-dimensional Gaussian point cloud data.
[0070] The image constraint is used to characterize the pixel consistency between the right-eye rendered image and the right-eye image rendered based on three-dimensional Gaussian point cloud data.
[0071] In some optional embodiments, when constructing image constraints for the right eye image based on the three-dimensional Gaussian point cloud data, the three-dimensional Gaussian point cloud data in the world coordinate system can be converted to the left camera coordinate system through a transformation matrix to obtain the left eye three-dimensional Gaussian point cloud data; based on the initial external parameters, the left eye three-dimensional Gaussian point cloud data is converted to the right camera coordinate system to obtain the right eye three-dimensional Gaussian point cloud data; the right eye three-dimensional Gaussian point cloud data is rendered to obtain a right eye rendered image; based on the pixel difference between the right eye rendered image and the right eye image, the image constraints for the right eye image are constructed.
[0072] Specifically, firstly transform the three-dimensional Gaussian point cloud data (3D Gaussian point cloud) in the world coordinate system through the transformation matrix Convert to the left camera coordinate system of the i-th frame, and further convert it to the right camera coordinate system through the initial external parameters. Then render the right eye rendering image (right eye RGB image) through transparency blending to construct the image constraint:
[0073]
[0074] in, Indicates the right eye rendered image of the i-th frame, represents the right eye image of the i-th frame, Represents an image constraint.
[0075] Step S104, matching feature points of the left eye image and the right eye image, and constructing epipolar geometry constraints based on the obtained matching point pairs and binocular extrinsic parameters.
[0076] Among them, the epipolar geometry constraint is used to characterize the mixed product relationship between the matching point pairs and the binocular extrinsic parameters.
[0077] In some optional embodiments, when matching the feature points of the left eye image and the right eye image and constructing the epipolar geometric constraints based on the obtained matching point pairs and binocular extrinsic parameters, the feature points of the left eye image and the right eye image can be first extracted and matched to obtain matching point pairs; then, for any matching point pair, the epipolar geometric constraints of the target binocular image are constructed based on the mixed product of the matching point pair and the binocular extrinsic parameters.
[0078] Specifically, for the left eye image and the right eye image in each frame of the target binocular image, the feature points of the left eye image and the right eye image are extracted and matched to obtain the matching point pair: [< >,< >,...,< >], are the feature points of the left image, are the feature points of the right image; for the jth group of matching points, the corresponding epipolar geometry constraints are satisfied:
[0079] =0,j=1,2,...,Mi.
[0080] Therefore, for N frames of target binocular images, epipolar geometric constraints for binocular extrinsic parameters can be constructed:
[0081]
[0082] in, is the epipolar geometry constraint, is the feature point of the left image in the i-th frame matching point pair, is the feature point of the right image in the i-th frame matching point pair, is the rotation matrix in the binocular external parameters, is the translation vector in the binocular external parameters, N is the number of frames, is the number of matching point pairs in the i-th frame.
[0083] Step S105 , solving binocular extrinsic parameters based on image constraints and epipolar geometry constraints to calibrate the binocular camera parameters.
[0084] Specifically, based on image constraints and epipolar geometry constraints, the model for solving binocular extrinsic parameters is:
[0085]
[0086]
[0087]
[0088] in, is the cost function, is the image constraint, Render the image for the right eye of the i-th frame, is the right eye image of the i-th frame, is the epipolar geometry constraint, is the feature point of the left image in the i-th frame matching point pair, is the feature point of the right image in the i-th frame matching point pair, is the rotation matrix in the binocular external parameters, is the translation vector in the binocular external parameters, N is the number of frames, is the number of matching point pairs in the i-th frame.
[0089] The parameter calibration method of a binocular camera provided by an embodiment of the present invention obtains a plurality of frames of continuous target binocular images collected by a binocular camera, so as to obtain three-dimensional Gaussian point cloud data corresponding to a left-eye image for any frame of the target binocular image; constructs image constraints of a right-eye image based on the three-dimensional Gaussian point cloud data, matches feature points of the left-eye image and the right-eye image, and constructs epipolar geometry based on the obtained matching point pairs and binocular extrinsic parameters, so as to solve the binocular extrinsic parameters based on the image constraints and epipolar geometry constraints, and performs parameter calibration on the binocular camera, thereby improving the accuracy of parameter calibration of the binocular camera.
[0090] This embodiment provides a parameter calibration device for a binocular camera. Figure 2 As shown, including:
[0091] The image acquisition module 201 is used to acquire multiple frames of continuous target binocular images acquired by the binocular camera. The target binocular images include left-eye images and right-eye images. The left-eye image is obtained based on the image acquired by the left camera in the binocular camera, and the right-eye image is obtained based on the image acquired by the right camera in the binocular camera.
[0092] The data acquisition module 202 is used to acquire the three-dimensional Gaussian point cloud data corresponding to the left eye image for any frame of the target binocular image.
[0093] The image constraint module 203 is used to construct image constraints of the right eye image based on the three-dimensional Gaussian point cloud data. The image constraints are used to characterize the pixel consistency between the right eye rendered image rendered based on the three-dimensional Gaussian point cloud data and the right eye image.
[0094] The geometric constraint module 204 is used to match the feature points of the left eye image and the right eye image, and construct epipolar geometric constraints based on the obtained matching point pairs and binocular extrinsic parameters. The epipolar geometric constraints are used to characterize the mixed product relationship between the matching point pairs and the binocular extrinsic parameters.
[0095] The parameter calibration module 205 is used to solve the binocular extrinsic parameters based on the image constraints and the epipolar geometry constraints to calibrate the parameters of the binocular camera.
[0096] In some optional implementations, the image acquisition module 201 includes:
[0097] The image acquisition unit is used to acquire multiple frames of continuous binocular images captured by the binocular camera.
[0098] The distortion correction unit is used to perform distortion correction on the binocular image based on the calibration internal reference to obtain a corrected binocular image.
[0099] The stereo correction unit is used to perform stereo correction on the corrected binocular image based on initial external parameters to obtain a target binocular image, wherein the initial external parameters are obtained based on measurement.
[0100] In some optional implementations, the data acquisition module 202 includes:
[0101] The posture acquisition unit is used to obtain the depth map of the left eye image and the corresponding posture.
[0102] The data determination unit is used to use the camera coordinate system of the first frame of the binocular image as the world coordinate system and determine the initial point cloud data of the left eye image based on the depth map.
[0103] The image determination unit is used to render the initial point cloud data based on the posture to obtain the left-eye rendered image and the left-eye rendered depth map corresponding to the left-eye camera.
[0104] The data adjustment unit is used to adjust the initial point cloud data based on the first pixel difference between the left-eye rendered image and the left-eye image, and the second pixel difference between the left-eye rendered depth map and the depth map of the left-eye image, so as to obtain the three-dimensional Gaussian point cloud data corresponding to the left-eye image.
[0105] In some optional implementations, the posture acquisition unit includes:
[0106] The disparity matching subunit is used to perform disparity matching processing on the target binocular image to obtain an initial disparity map of the left eye image and the right eye image.
[0107] The disparity processing subunit is used to remove abnormal disparity pixels in the initial disparity map and then perform disparity pixel interpolation to obtain a target disparity map.
[0108] The posture determination subunit is used to determine the depth map and the corresponding posture of the left eye image based on the target disparity map.
[0109] In some optional implementations, the image constraint module 203 includes:
[0110] The first data conversion unit is used to convert the three-dimensional Gaussian point cloud data in the world coordinate system to the left camera coordinate system through a transformation matrix to obtain the left-eye three-dimensional Gaussian point cloud data.
[0111] The second data conversion unit is used to convert the left-eye three-dimensional Gaussian point cloud data into the right camera coordinate system based on the initial external parameters to obtain the right-eye three-dimensional Gaussian point cloud data.
[0112] The point cloud data rendering unit is used to render the right-eye three-dimensional Gaussian point cloud data to obtain a right-eye rendered image.
[0113] The image constraint construction unit is used to construct the image constraint of the right eye image based on the pixel difference between the right eye rendering image and the right eye image.
[0114] In some optional implementations, the geometric constraint module 204 includes:
[0115] The feature matching unit is used to extract the feature points of the left and right images and perform matching to obtain matching point pairs.
[0116] The geometric constraint unit is used to construct the epipolar geometric constraint of the target binocular image for any matching point pair based on the mixed product of the matching point pair and the binocular extrinsic parameters.
[0117] In some optional implementations, based on image constraints and epipolar geometry constraints, the model for solving binocular extrinsic parameters is:
[0118]
[0119]
[0120]
[0121] in, is the cost function, is the image constraint, Render the image for the right eye of the i-th frame, is the right eye image of the i-th frame, is the epipolar geometry constraint, is the feature point of the left image in the i-th frame matching point pair, is the feature point of the right image in the i-th frame matching point pair, is the rotation matrix in the binocular external parameters, is the translation vector in the binocular external parameters, N is the number of frames, is the number of matching point pairs in the i-th frame.
[0122] The parameter calibration device of the binocular camera provided in the present embodiment obtains three-dimensional Gaussian point cloud data corresponding to the left eye image for any frame of the target binocular image by acquiring multiple frames of continuous target binocular images collected by the binocular camera; constructs image constraints of the right eye image based on the three-dimensional Gaussian point cloud data, matches feature points of the left eye image and the right eye image, and constructs epipolar geometry based on the obtained matching point pairs and binocular extrinsic parameters, solves the binocular extrinsic parameters based on the image constraints and epipolar geometry constraints, and performs parameter calibration on the binocular camera, thereby improving the accuracy of parameter calibration of the binocular camera.
[0123] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0124] The parameter calibration device of the binocular camera in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0125] The embodiment of the present invention also provides a computer device having the above Figure 2 The battery health status prediction device shown.
[0126] See also Figure 3 , Figure 3 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 3 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 3 A processor 10 is taken as an example.
[0127] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0128] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0129] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0130] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0131] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0132] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0133] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A parameter calibration method for a binocular camera. It is characterized in that The method comprises: Acquire multiple frames of continuous target binocular images captured by a binocular camera, wherein the target binocular images include a left-eye image and a right-eye image, wherein the left-eye image is obtained based on an image captured by a left camera in the binocular camera, and the right-eye image is obtained based on an image captured by a right camera in the binocular camera; For any frame of the target binocular image, obtain the three-dimensional Gaussian point cloud data corresponding to the left eye image; Based on the three-dimensional Gaussian point cloud data, construct an image constraint of the right eye image, wherein the image constraint is used to characterize pixel consistency between a right eye rendered image rendered based on the three-dimensional Gaussian point cloud data and the right eye image; Matching feature points of the left eye image and the right eye image, and constructing epipolar geometry constraints based on the obtained matching point pairs and binocular extrinsic parameters, wherein the epipolar geometry constraints are used to characterize a mixed product relationship between the matching point pairs and the binocular extrinsic parameters; Based on the image constraint and the epipolar geometry constraint, solving the binocular extrinsic parameter to calibrate the binocular camera parameters; The model for solving the binocular extrinsic parameters based on the image constraint and the epipolar geometry constraint is: in, is the cost function, is the image constraint, Render the image for the right eye of the i-th frame, is the right eye image of the i-th frame, is the epipolar geometry constraint, is the feature point of the left image in the i-th frame matching point pair, is the feature point of the right image in the i-th frame matching point pair, is the rotation matrix in the binocular external parameters, is the translation vector in the binocular external parameters, N is the number of frames, is the number of matching point pairs in the i-th frame.
2. The method according to claim 1, It is characterized in that The step of acquiring multiple frames of continuous target binocular images collected by a binocular camera includes: Acquire multiple frames of continuous binocular images captured by the binocular camera; Performing distortion correction on the binocular image based on the calibration internal reference to obtain a corrected binocular image; The corrected binocular image is stereo-corrected based on initial external parameters to obtain the target binocular image, wherein the initial external parameters are obtained based on measurement.
3. The method according to claim 1, It is characterized in that The obtaining of three-dimensional Gaussian point cloud data corresponding to the left-eye image includes: Obtaining a depth map and corresponding posture of the left-eye image; Taking the camera coordinate system of the binocular image of the first frame as the world coordinate system, and determining the initial point cloud data of the left-eye image based on the depth map; Rendering the initial point cloud data based on the posture to obtain a left-eye rendered image and a left-eye rendered depth map corresponding to the left-eye camera; Based on a first pixel difference between the left-eye rendered image and the left-eye image, and a second pixel difference between the left-eye rendered depth map and the depth map of the left-eye image, the initial point cloud data is adjusted to obtain three-dimensional Gaussian point cloud data corresponding to the left-eye image.
4. The method according to claim 3, It is characterized in that The obtaining of the depth map of the left-eye image and the corresponding posture includes: Performing disparity matching processing on the target binocular image to obtain an initial disparity map of the left-eye image and the right-eye image; After removing abnormal disparity pixels in the initial disparity map, disparity pixel interpolation is performed to obtain a target disparity map; Based on the target disparity map, a depth map and a corresponding posture corresponding to the left-eye image are determined.
5. The method according to claim 1, It is characterized in that The constructing the image constraint of the right image based on the three-dimensional Gaussian point cloud data includes: The three-dimensional Gaussian point cloud data in the world coordinate system is converted to the left camera coordinate system through a transformation matrix to obtain the left camera three-dimensional Gaussian point cloud data; The left-eye three-dimensional Gaussian point cloud data is converted to the right camera coordinate system based on the initial external parameters to obtain the right-eye three-dimensional Gaussian point cloud data; Rendering the right-eye three-dimensional Gaussian point cloud data to obtain the right-eye rendered image; Based on the pixel difference between the right-eye rendered image and the right-eye image, an image constraint of the right-eye image is constructed.
6. The method according to claim 1, It is characterized in that The matching of the feature points of the left eye image and the right eye image, and constructing epipolar geometry constraints based on the obtained matching point pairs and binocular extrinsic parameters, includes: Extracting feature points of the left-eye image and the right-eye image, and matching them to obtain matching point pairs; For any of the matching point pairs, based on a mixed product of the matching point pair and the binocular extrinsic parameter, an epipolar geometric constraint of the target binocular image is constructed.
7. A parameter calibration device for a binocular camera, It is characterized in that The device comprises: An image acquisition module is used to acquire multiple frames of continuous target binocular images acquired by the binocular camera, wherein the target binocular image includes a left-eye image and a right-eye image, wherein the left-eye image is obtained based on an image acquired by a left camera in the binocular camera, and the right-eye image is obtained based on an image acquired by a right camera in the binocular camera; A data acquisition module, used for acquiring the three-dimensional Gaussian point cloud data corresponding to the left eye image for any frame of the target binocular image; An image constraint module, used for constructing an image constraint of the right eye image based on the three-dimensional Gaussian point cloud data, wherein the image constraint is used for characterizing pixel consistency between a right eye rendered image rendered based on the three-dimensional Gaussian point cloud data and the right eye image; A geometric constraint module, used for matching feature points of the left eye image and the right eye image, and constructing epipolar geometric constraints based on the obtained matching point pairs and binocular extrinsic parameters, wherein the epipolar geometric constraints are used for characterizing the mixed product relationship between the matching point pairs and the binocular extrinsic parameters; A parameter calibration module, used for solving the binocular extrinsic parameters based on the image constraint and the epipolar geometry constraint, so as to perform parameter calibration on the binocular camera; The model for solving the binocular extrinsic parameters based on the image constraint and the epipolar geometry constraint is: in, is the cost function, is the image constraint, Render the image for the right eye of the i-th frame, is the right eye image of the i-th frame, is the epipolar geometry constraint, is the feature point of the left image in the i-th frame matching point pair, is the feature point of the right image in the i-th frame matching point pair, is the rotation matrix in the binocular external parameters, is the translation vector in the binocular external parameters, N is the number of frames, is the number of matching point pairs in the i-th frame.
8. A computer device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the parameter calibration method of the binocular camera according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the parameter calibration method for a binocular camera according to any one of claims 1 to 6.
