Calibration verification method and system of binocular camera, computer device and medium
By using different images to verify the calibration parameters of the binocular camera, and combining depth and distance values to determine successful calibration, the problem of inaccurate calibration parameter errors in existing technologies is solved, achieving higher accuracy in calibration parameter verification and disparity map accuracy.
Patent Information
- Application Number
- CN202310149903.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-09
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2043-02-09
AI Technical Summary
In the existing technology, the calibration process of binocular cameras may lead to overfitting due to the use of the same image for verification, resulting in inaccurate calibration parameters and affecting the accuracy of the disparity map.
Different second left and right images were used to verify the calibration parameters of the binocular camera. The success of the calibration was determined by determining the depth value of the target object and the distance value between it and the camera. The Zhang's binocular camera calibration algorithm was used for preliminary verification and recalibration.
It improves the accuracy of calibration parameter verification, ensures the accuracy of calibration parameters, avoids overfitting, and improves the accuracy of disparity maps.
Smart Images

Figure CN116843759B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of optics, and in particular to a binocular camera calibration verification method and system, a computer device and a computer readable storage medium. BACKGROUND
[0002] Calibration of a binocular camera is the key to achieving the above 3D applications of the binocular camera. In measurement and vision applications based on a binocular camera, the relationship between the three-dimensional position of an object point in space and the corresponding two-dimensional pixel position in an image is mathematically described by a geometric projection model. The parameters of this model are generally obtained by photographing a known size calibration pattern (such as a solid circle array or a black and white checkerboard), image processing and calculation. This process of determining the camera projection model parameters is called calibration.
[0003] The general solution in the prior art is to first perform re-projection of the corner points in the world coordinate system, and then calculate the error between the projected points and the detected corner points as a basis for measuring the calibration. The prior art has the following technical problems:
[0004] 1. Since the images used in the calibration process are the same as the images used in the verification process, and the calibration parameters are calculated from these images, using the same images for verification may result in overfitting, i.e. the error is very small, but the disparity map calculated using this calibration parameter is not accurate.
[0005] 2. Since the error is an average value, it cannot truly reflect the accuracy of each calibration parameter. For example, some calibration parameters may result in a small calibration error, while others may result in a larger calibration error. After averaging, the final error is small, which may result in less than ideal correction quality in actual applications, thereby making the final disparity map inaccurate. SUMMARY
[0006] Therefore, it is necessary to provide a binocular camera calibration verification method, system, computer device and computer readable storage medium to solve the above technical problems.
[0007] In a first aspect, an embodiment of the present application provides a binocular camera calibration verification method, which comprises:
[0008] Calibrating a binocular camera based on a plurality of first left and right images collected by the binocular camera, to obtain calibration parameters of the binocular camera; the first left and right images contain a calibration object;
[0009] Determining a depth value of a target object in second left and right images collected by the binocular camera;
[0010] determine whether the binocular camera is successfully calibrated based on the depth value and a distance value between the target object and the binocular camera.
[0011] In an embodiment, the determining the depth value of the target object in the second left and right images based on the second left and right images captured by the binocular camera comprises:
[0012] stereo rectifying the second left and right images;
[0013] determining a disparity value of the second left and right images based on the stereo rectified second left and right images;
[0014] determining the depth value of the target object in the second left and right images based on the disparity value.
[0015] In an embodiment, the determining the depth value of the target object in the second left and right images based on the disparity value comprises:
[0016] converting the disparity map into a depth map based on a conversion relationship of disparity value depth conversion, the disparity map being generated based on the disparity value;
[0017] determining the depth value of the target object based on the depth map.
[0018] In an embodiment, the conversion relationship of disparity value depth conversion is:
[0019]
[0020] wherein Z represents depth; d represents disparity value; b represents the distance of the optical center of the binocular camera; and f represents the focal length of the binocular camera.
[0021] In an embodiment, the determining whether the binocular camera is successfully calibrated based on the depth value and the distance value between the target object and the binocular camera comprises:
[0022] determining whether the depth value is within a preset distance range, the preset distance range being determined based on the distance value;
[0023] if yes, determining that the calibration verification of the binocular camera is successful; and if no, determining that the calibration verification of the binocular camera fails, and recalibrating the binocular camera.
[0024] In an embodiment, the first left and right images are captured under the condition that the photographing time stamps of the binocular camera are synchronized.
[0025] In an embodiment, after the calibration of the binocular camera based on a plurality of first left and right images respectively captured by the binocular camera to obtain the calibration parameters of the binocular camera, the method further comprises:
[0026] obtaining a calibration error of the calibration parameters by using Zhang's binocular camera calibration algorithm;
[0027] if the calibration error does not satisfy a preset condition, recalibrating the binocular camera.
[0028] In a second aspect, an embodiment of the present application provides a calibration verification system of a binocular camera, the system comprising:
[0029] a calibration module configured to calibrate the binocular camera based on a plurality of first left and right images respectively captured by the binocular camera to obtain calibration parameters of the binocular camera, wherein the first left and right images contain a calibration object;
[0030] a first determination module configured to determine a depth value of a target object in second left and right images respectively captured by the binocular camera based on the second left and right images;
[0031] a second determination module configured to determine whether the calibration of the binocular camera is successful based on the depth value and a distance value between the target object and the binocular camera.
[0032] In a third aspect, an embodiment of the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of the first aspect when executing the computer program.
[0033] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method of the first aspect.
[0034] Compared with the prior art, the above method, system, computer device and storage medium determine a depth value of a target object in second left and right images respectively captured by the binocular camera, and determine whether the calibration of the binocular camera is successful based on the depth value and a distance value between the target object and the binocular camera. Compared with the prior art, since different second left and right images are used to verify the calibration parameters of the binocular camera, the accuracy of the verification of the calibration parameters is improved. Furthermore, the depth value of the target object is used to verify the calibration parameters of the binocular camera, which further improves the accuracy of the verification of the calibration parameters compared with the verification using the calibration error. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1Fig. 1 is a schematic diagram of a structure of a calibration system for an object to be measured in an embodiment;
[0036] Figure 2 Fig. 2 is a schematic diagram of a structure of a terminal in an embodiment;
[0037] Figure 3 Fig. 3 is a flowchart of a calibration verification method for a binocular camera in an embodiment;
[0038] Figure 4 Fig. 4 is a flowchart of a preliminary verification method in an embodiment;
[0039] Figure 5 Fig. 5 is a flowchart of a depth value determination method in an embodiment;
[0040] Figure 6 Fig. 6 is a schematic diagram of a binocular camera calibration;
[0041] Figure 7 Fig. 7 is a flowchart of a determination method for whether calibration is successful in an embodiment;
[0042] Figure 8 Fig. 8 is a schematic diagram of a module connection of a calibration verification system for a binocular camera in an embodiment;
[0043] Figure 9 Fig. 9 is a schematic diagram of a structure of a computer device in an embodiment. DETAILED DESCRIPTION
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings in the following description are only some examples or embodiments of the present application, and for those skilled in the art, the present application can be applied to other similar scenarios without creative labor on the basis of these drawings. Unless it is clear from the language context or otherwise indicated, the same reference numbers in the drawings represent the same structures or operations.
[0045] As shown in the present application and claims, unless the context clearly indicates otherwise, the words "one", "an", "a", and / or "the" do not mean to specify a single number, but can also include a plurality. Generally, the terms "comprising" and "including" only indicate including the steps and elements explicitly identified, and these steps and elements do not constitute an exclusive list, and the method or device can also include other steps or elements.
[0046] Although the present application makes various references to certain modules in the system according to the embodiments of the present application, however, any number of different modules can be used and run on the computing device and / or processor. The modules are only illustrative, and different aspects of the system and method can use different modules.
[0047] It should be understood that when a unit or module is referred to as being "connected" or "coupled" to another unit, module or block, it can be directly connected or coupled to the other unit, module or block, or there can be intervening units, modules or blocks between them, unless otherwise specifically noted. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0048] A structure diagram of the calibration system is shown in Figure 1 The terminal 10 is in communication connection with the binocular camera 20, the binocular camera 20 collects a plurality of first left and right images and sends them to the terminal 10, and the terminal 10 realizes calibration of the binocular camera 20 according to the first left and right images. Then, the binocular camera 20 collects second left and right images and sends them to the terminal 10, and the terminal 10 determines a depth value of a target object in the second left and right images based on the second left and right images collected by the binocular camera 20 respectively, and determines whether the binocular camera is calibrated successfully based on the depth value and a distance value between the target object and the binocular camera.
[0049] The first left and right images contain a calibration object, for example, a checkerboard, and the calibration object is arranged on a calibration board 30.
[0050] The target object in the second left and right images is, for example, a face image, and the target object is arranged on an auxiliary calibration board 40.
[0051] The calibration verification method of the binocular camera provided in the present application can be applied to a terminal as shown in Figure 1 As shown in Figure 1 The terminal 10 can include one or two (only one is shown in Figure 1 The processor 102 can include but is not limited to a microprocessor MCU or a programmable logic device FPGA and the like. The terminal 10 can further include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that Figure 2 The structure shown in Figure 2 The terminal 10 can further include more or fewer components than those shown in Figure 2 or have a different configuration from that shown in
[0052] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as the computer program corresponding to the binocular camera calibration verification method in the embodiment. The processor 102 executes various functional applications and data processing, i.e., implements the method described above, by running the computer program stored in the memory 104. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include memories remotely arranged with respect to the processor 102, which can be connected to the terminal through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0053] The transmission device 106 is used to receive or send data via a network. The network includes a wireless network provided by a communication provider of the terminal. In an example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In an example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
[0054] In an embodiment, as shown in Figure 3 , a binocular camera calibration verification method is provided. The method is applied to the terminal in Figure 2 for example, and includes the following steps:
[0055] S302: Based on a plurality of first left-right image pairs respectively collected by a binocular camera, calibrating the binocular camera to obtain calibration parameters of the binocular camera.
[0056] The first left-right images are a first left image and a first right image respectively collected by the binocular camera. The first left image and the first right image both contain a calibration object, such as a checkerboard.
[0057] The number of the first left-right images is, for example, 20, which can be set according to actual calibration requirements.
[0058] Taking the calibration of the binocular camera with the checkerboard as an example, before calibration, the checkerboard image is printed and pasted on a calibration board to ensure that the corner points of the black and white grids are clearly visible and the checkerboard plane is flat and straight.
[0059] In an embodiment, before calibration, the shooting synchronization of the binocular camera also needs to be detected to ensure the accuracy of the calibration parameters. Specifically, the binocular camera is opened to start the shooting function, and an electronic stopwatch image is shot to check whether the time display in the first left and right images is synchronized to ensure that the shooting timestamps of the binocular camera are synchronized. If the timestamps of the binocular camera are synchronized, 20 checkerboard images, i.e., first left and right images, are shot. In the same field of view of the binocular camera, the checkerboard is shot once for each position change. The checkerboard remains stationary during shooting, and the poses are all different from those of the previously shot images. If the timestamps of the binocular camera are not synchronized, it means that the binocular camera is not available, and calibration is not performed on it.
[0060] In the present embodiment, based on a plurality of first left and right images respectively collected by the binocular camera, a Zhang's binocular camera calibration algorithm is run to calibrate the binocular camera to obtain calibration parameters of the binocular camera, including intrinsic parameters, extrinsic parameters, and calibration errors, etc. It should be noted that other calibration methods can also be used to calibrate the binocular camera, and the present embodiment does not limit it.
[0061] In a preferred embodiment, the calibration parameters are preliminarily verified to improve the accuracy of the calibration. Specifically, as shown in Figure 4 the following steps are included:
[0062] S402: The calibration error of the calibration parameters is obtained by using the Zhang's binocular camera calibration algorithm.
[0063] S404: If the calibration error does not meet the preset condition, the binocular camera is recalibrated.
[0064] If the calibration error meets the preset condition, it is saved to the terminal.
[0065] S304: Based on the second left and right images respectively collected by the binocular camera, the depth value of the target object in the second left and right images is determined.
[0066] The target object is, for example, a face image, which is printed and flatly pasted on an auxiliary calibration board. The auxiliary calibration board is between the calibration board and the binocular camera, and is at a preset distance from the binocular camera, for example, 1 meter.
[0067] After the binocular camera collects a plurality of first left and right images, the second left and right images are collected.
[0068] S306: Based on the depth value and the distance value between the target object and the binocular camera, it is determined whether the binocular camera is successfully calibrated.
[0069] In the embodiment, based on the steps S302-S306, the depth value of the target object in the second left and right images is determined based on the second left and right images collected by the binocular camera, and whether the binocular camera is successfully calibrated is determined based on the depth value and the distance value between the target object and the binocular camera. Compared with the prior art, the accuracy of the calibration parameter verification is improved by verifying the calibration parameters of the binocular camera by using different second left and right images. Furthermore, the accuracy of the calibration parameter verification is further improved by verifying the calibration parameters of the binocular camera by using the depth value of the target object, compared with verifying by using the calibration error.
[0070] In an embodiment, as shown in Figure 5 The depth value of the target object in the second left and right images is determined based on the second left and right images collected by the binocular camera.
[0071] S502: The second left and right images are stereoscopic corrected.
[0072] Before stereoscopic correction, face detection is performed on the obtained second left and right images to obtain a face region, i.e., a region where the target object is located.
[0073] Stereoscopic correction is to make the first left and right images of the binocular camera completely aligned. Thus, when block matching is performed on the first left and right images, only pixel search needs to be performed in the same row, which reduces the calculation amount and simplifies the subsequent steps such as disparity value calculation.
[0074] After stereoscopic correction, the corrected first left and right images are displayed to check whether the correction is correct, i.e., a random pixel is taken to check whether the vertical coordinates of the left and right images are equal. If not, recalibration is performed.
[0075] S504: The disparity value of the second left and right images is determined based on the stereoscopic corrected second left and right images.
[0076] The block matching algorithm is used to obtain the disparity map of the left face image. Each pixel of the left face image is looped by row, and pixel-by-pixel matching is performed in the right face image. The pixel matching cost in the second left and right images is calculated according to the color, brightness, gradient, and other indicators of the pixel. When the matching cost is the smallest, the current disparity value is the disparity value of the corresponding pixel of the left face image.
[0077] S506: The depth value of the target object in the second left and right images is determined based on the disparity value.
[0078] Specifically, a disparity map is generated based on the disparity value, the disparity map is converted into a depth map based on a conversion relationship of disparity value depth conversion and the depth value of the corresponding position of the target object in the depth map is determined based on the depth map.
[0079] The depth value is an average depth.
[0080] The conversion relationship of disparity value depth conversion is:
[0081]
[0082] Wherein, Z represents depth; d represents disparity value; b represents the distance of the optical center of the binocular camera, and f represents the focal length of the binocular camera.
[0083] Figure 6 A binocular camera calibration schematic diagram is shown, wherein C1 and C2 respectively represent the coordinate system of the binocular camera, P1 and P2 are a point in a three-dimensional space; P(x1, y1, z1) is a coordinate point on the imaging plane of the left and right cameras, b represents the distance of the optical center of the binocular camera, Z represents the depth of the three-dimensional space point P, the position relationship of the binocular camera after stereo correction is known, and the similar triangle can be obtained After simplification, the conversion relationship of disparity value depth conversion can be obtained Wherein, disparity value d = X R -X T , X R and X T respectively represent the distance of the left and right imaging points of the binocular camera to the left image plane.
[0084] In an embodiment, as shown in Figure 7 The determination of whether the binocular camera is calibrated successfully based on the depth value and the distance value between the target object and the binocular camera comprises:
[0085] S702: Determine whether the depth value is within a preset distance range, and the preset distance range is determined based on the distance value;
[0086] S704: If yes, it is determined that the calibration verification of the binocular camera is successful; if not, it is determined that the calibration verification of the binocular camera fails, and the binocular camera is recalibrated.
[0087] Wherein, the preset distance range is determined according to the preset distance of the auxiliary calibration board from the binocular camera, for example, if the auxiliary calibration board is 1 meter away from the binocular camera, the preset distance range can be set to 90 cm to 1.1 m. If it is necessary to improve the accuracy of the calibration verification accuracy, the preset distance range can be reduced.
[0088] If the calculated depth value is between 90 cm and 1.1 m, the calibration is considered successful and the calibration is complete; if the calculated depth value is less than 90 cm or greater than 1.1 m, the calibration is considered unsuccessful and needs to be repeated.
[0089] In one embodiment, if the requirements are still not met after three repeated calibrations, the current binocular camera is abandoned, and the calibration of the next binocular camera is verified.
[0090] It should be understood that although the steps in the flowchart above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0091] In one embodiment, such as Figure 8 As shown in the figure, an embodiment of the present invention proposes a calibration and verification system for a binocular camera, the system comprising:
[0092] The calibration module 802 is used to calibrate the binocular camera based on several first left and right images respectively acquired by the binocular camera, and to obtain the calibration parameters of the binocular camera; the first left and right images contain calibration objects;
[0093] The first determining module 804 is used to determine the depth value of the target object in the second left and right images based on the second left and right images respectively captured by the binocular cameras;
[0094] The second determining module 806 is used to determine whether the binocular camera has been successfully calibrated based on the depth value and the distance value between the target object and the binocular camera.
[0095] The first determining module determines the depth value of the target object in the second left and right images respectively acquired by the binocular cameras. The second determining module determines whether the binocular cameras have been successfully calibrated based on the depth value and the distance between the target object and the binocular cameras. Compared with the prior art, the accuracy of calibration parameter verification is improved by using different second left and right images to verify the calibration parameters of the binocular cameras. Furthermore, using the depth value of the target object to verify the calibration parameters of the binocular cameras further improves the accuracy of calibration parameter verification compared with verification using calibration error.
[0096] In an embodiment, the first determining module comprises:
[0097] a stereo rectification module, configured to perform stereo rectification on the second left and right images;
[0098] a disparity value determining module, configured to determine a disparity value of the second left and right images based on the stereo rectified second left and right images;
[0099] a depth value determining module, configured to determine a depth value of a target object in the second left and right images based on the disparity value.
[0100] In an embodiment, the depth value determining module is specifically configured to:
[0101] convert a disparity map into a depth map based on a conversion relationship of disparity value depth conversion, the disparity map being generated based on the disparity value;
[0102] determine the depth value of the target object based on the depth map.
[0103] In an embodiment, the conversion relationship of disparity value depth conversion is:
[0104]
[0105] wherein Z represents depth; d represents disparity value; b represents the distance of the optical center of the binocular camera; and f represents the focal length of the binocular camera.
[0106] In an embodiment, the second determining module is specifically configured to:
[0107] determine whether the depth value is within a preset distance range, the preset distance range being determined based on the distance value;
[0108] if yes, determine that the calibration verification of the binocular camera is successful; if no, determine that the calibration verification of the binocular camera fails, and recalibrate the binocular camera.
[0109] In an embodiment, the first left and right images are collected under the condition that the photograph timestamps of the binocular camera are synchronized.
[0110] In an embodiment, the system further comprises:
[0111] a preliminary verification module, configured to obtain a calibration error of the calibration parameter by using Zhang's binocular camera calibration algorithm; and if the calibration error does not satisfy a preset condition, recalibrate the binocular camera.
[0112] The specific definition of the object-to-be-detected calibration system can refer to the definition of the calibration method in the foregoing, and will not be described here again. Each module in the object-to-be-detected calibration system described above can be implemented by software, hardware, or a combination thereof, in whole or in part. The modules described above can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0113] In an embodiment, the present application provides a computer device, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 9 The computer device includes a processor, a memory, and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store action detection data. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the steps in any of the binocular camera calibration and verification method embodiments.
[0114] Those skilled in the art can understand that Figure 9 The structure shown in the foregoing is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the diagram, or combine certain components, or have a different component arrangement.
[0115] In an embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps in any of the binocular camera calibration and verification method embodiments.
[0116] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, database or other medium used in each embodiment provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0117] Each technical feature of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of each technical feature in the above embodiments are not described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0118] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for calibrating and verifying a binocular camera, characterized in that, The method comprises: obtaining calibration parameters of the binocular camera based on calibration of the binocular camera by a plurality of first left and right images respectively collected by the binocular camera, the first left and right images containing a calibration object; determining a depth value of a target object in second left and right images respectively collected by the binocular camera based on the second left and right images; determining whether the calibration of the binocular camera is successful based on the depth value and a distance value between the target object and the binocular camera; the determination of the depth value of the target object in the second left and right images based on the second left and right images respectively collected by the binocular camera comprises: stereo rectification of the second left and right images; determining a parallax value of the second left and right images based on the stereo rectified second left and right images; determining the depth value of the target object in the second left and right images based on the parallax value; the determination of the depth value of the target object in the second left and right images based on the parallax value comprises: converting a parallax map into a depth map based on a conversion relationship of parallax value depth conversion, the parallax map being generated based on the parallax value; determining the depth value of the target object based on the depth map; the conversion relationship of parallax value depth conversion is: ; wherein Z represents a depth; d represents a parallax value; b represents a distance of an optical center of the binocular camera, f represents a focal length of the binocular camera.
2. The method of claim 1, wherein, the determination of whether the calibration of the binocular camera is successful based on the depth value and the distance value between the target object and the binocular camera comprises: determining whether the depth value is within a preset distance range, the preset distance range being determined based on the distance value; if yes, determining that the calibration verification of the binocular camera is successful; if no, determining that the calibration verification of the binocular camera fails, and recalibrating the binocular camera.
3. The method of claim 1, wherein, The first left and right images are collected under the condition that the photograph timestamps of the binocular camera are synchronized.
4. The method of claim 1, wherein, After the calibration of the binocular camera based on the plurality of first left and right images respectively collected by the binocular camera, the method further comprises: obtaining a calibration error of the calibration parameters by using Zhang's binocular camera calibration algorithm; if the calibration error does not meet a preset condition, recalibrating the binocular camera. 5.A system for calibrating and verifying a binocular camera, characterized in that, The system comprises: a calibration module configured to obtain calibration parameters of the binocular camera based on calibration of the binocular camera by a plurality of first left and right images respectively collected by the binocular camera, the first left and right images containing a calibration object; a first determination module configured to determine a depth value of a target object in second left and right images respectively collected by the binocular camera based on the second left and right images; a second determination module configured to determine whether the calibration of the binocular camera is successful based on the depth value and a distance value between the target object and the binocular camera; the first determination module comprises: a stereo rectification module configured to perform stereo rectification on the second left and right images; a parallax value determination module configured to determine a parallax value of the second left and right images based on the stereo rectified second left and right images; a depth value determination module configured to determine the depth value of the target object in the second left and right images based on the parallax value; The depth value determination module is specifically configured to: convert the disparity map into a depth map based on a conversion relationship of disparity value depth conversion, the disparity map being generated based on the disparity values; determine the depth value of the target object; the conversion relationship of the disparity value depth conversion is: ; wherein Z represents a depth; d represents a parallax value; b represents a distance of an optical center of the binocular camera, f represents a focal length of the binocular camera. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-5 when the computer program is executed by the processor. The processor executes the computer program, and steps of the method in any one of claims 1-4 are implemented.
7. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor, and steps of the method in any one of claims 1-4 are implemented.
Citation Information
Patent Citations
Depth information determination method and device and binocular vision system
CN112950721A
Binocular distance measurement method and device
CN113587895A