Long-focus camera calibration method and device, electronic equipment and storage medium
After the telephoto camera is installed on the rod, the external parameters are calibrated and the 2D image point is mapped to the 3D space point on the ground, and the f value in the internal parameter parameters is optimized by the ground truth point, the problem of the difficulty of calibration of the telephoto camera is solved, and high-precision internal parameter calibration and simplified calibration process is achieved.
Patent Information
- Application Number
- CN202510320071.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-13
AI Technical Summary
During the internal calibration process of telephoto cameras, due to the large distance and huge checkerboard calibration boards, it is difficult to find a suitable calibration site in actual scenes. It is difficult to make a flat huge checkerboard, which affects the internal calibration efficiency and accuracy of telephoto cameras.
By installing the telephoto camera on the rod, the external parameter parameters are obtained, and the 2D image point is mapped to the 3D space point on the ground, and the f value in the internal parameter parameters are optimized and updated using the ground truth point point to achieve accurate calibration of the internal parameter parameters of the telephoto camera.
This method can optimize the internal parameter parameters of the telephoto camera without the need for a huge calibration plate and a large distance, improve positioning accuracy, simplify the calibration process, reduce manual participation, and improve deployment efficiency.
Smart Images

Figure CN120147438A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of camera calibration, and particularly to a long - focal - length camera calibration method, device, electronic device, and storage medium. Background Art
[0002] In the road traffic system, long - focal - length cameras are usually used to locate and track distant road targets, so as to cooperate with short - focal - length cameras and fisheye cameras to achieve the perception of targets on the road.
[0003] For the positioning of long - focal - length cameras, internal parameter calibration work needs to be done in advance. However, common internal parameter calibration algorithms are mainly for wide - angle cameras or medium - short - focal - length cameras. If you want to calibrate a long - focal - length camera, there needs to be a large distance between the camera and the calibration board, generally more than 20m. At the same time, a very large checkerboard calibration board is required to cover the camera's field of view.
[0004] Considering that it is not convenient to find an open space / calibration field at such a distance, and it is difficult to make a huge flat checkerboard, it has been relatively difficult to calibrate the internal parameters of long - focal - length cameras in actual scenario deployment. Summary of the Invention
[0005] Embodiments of this application provide a long - focal - length camera calibration method, device, electronic device, and storage medium to optimize the internal parameter of the long - focal - length camera.
[0006] Embodiments of this application adopt the following technical solutions:
[0007] In a first aspect, embodiments of this application provide a long - focal - length camera calibration method, where the method includes:
[0008] Calibrate the internal parameters of the long - focal - length camera, where the internal parameters at least include the f value;
[0009] After installing the long - focal - length camera on a pole, calibrate the external parameters of the long - focal - length camera;
[0010] Map the 2D image points of the long - focal - length camera into the ground 3D space points to obtain a first point set, and use the ground truth points as a second point set;
[0011] Optimize and update the f value in the internal parameters of the long - focal - length camera according to the first point set and the second point set.
[0012] In some embodiments, the optimizing and updating the f value in the internal parameters of the long - focal - length camera according to the first point set and the second point set includes:
[0013] Obtain the image ground projection points according to the first point set;
[0014] Determine the ground truth points according to the second point set;
[0015] Optimize the optimal f value of the internal parameters of the telephoto camera according to the minimum Euclidean distance between the ground projection point of the image and the ground truth point.
[0016] In some embodiments, the optimizing and updating the f value in the internal parameters of the telephoto camera includes:
[0017] Establish an optimization function according to the longitude and latitude values of the ground projection point of the image and the longitude and latitude values of the ground truth point: min_error = the minimum Euclidean distance of |ground projection point - ground truth point|;
[0018] Obtain the optimal f value of the camera internal parameters according to the minimized Euclidean distance in the optimization function, and assume that fx = fy, where fx and fy represent the focal lengths of the camera internal parameters.
[0019] In some embodiments, the using the ground truth point as the second point set includes:
[0020] Use an RTK truth device to calibrate and mark points on the ground to obtain multiple ground truth points.
[0021] In some embodiments, the mapping the 2D image points of the telephoto camera into the ground 3D space points to obtain the first point set includes:
[0022] According to the internal parameters of the telephoto camera, convert the image pixel coordinates of the telephoto camera to the world coordinate system on the ground to obtain the first point set.
[0023] In some embodiments, the calibrating and obtaining the external parameters of the telephoto camera after the telephoto camera is installed on the pole includes:
[0024] After the telephoto camera is installed on the pole, use the PNP algorithm to perform external parameter calibration on the telephoto camera, and determine the rotation and translation relationship between the camera coordinate system and the world coordinate system.
[0025] In some embodiments, the calibrating and obtaining the internal parameters of the telephoto camera includes:
[0026] Use the Zhang Zhengyou calibration method to obtain the internal parameters of the telephoto camera, and the internal parameters at least include the camera f value.
[0027] In a second aspect, an embodiment of the present application further provides a telephoto camera calibration device, where the device includes:
[0028] An internal parameter calibration module, configured to calibrate and obtain the internal parameters of the telephoto camera, where the internal parameters at least include the f value;
[0029] An external parameter calibration module, which is used to calibrate the external parameter of the long - focal - length camera after the long - focal - length camera is installed on the pole;
[0030] A mapping module, which is used to map the 2D image points of the long - focal - length camera into the ground 3D space points to obtain a first point set, and use the ground truth points as a second point set;
[0031] An optimization module, which is used to optimize and update the f value in the internal parameters of the long - focal - length camera according to the first point set and the second point set.
[0032] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor; and a memory arranged to store computer - executable instructions, where the executable instructions, when executed, cause the processor to execute the above - mentioned method.
[0033] In a fourth aspect, an embodiment of the present application further provides a computer - readable storage medium, where the computer - readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device is caused to execute the above - mentioned method.
[0034] The above - mentioned at least one technical solution adopted in the embodiment of the present application can achieve the following beneficial effects: The internal parameters of the long - focal - length camera are obtained by calibration in advance, and the internal parameters at least include the f value, where the f value refers to the camera focal length. After the long - focal - length camera is installed on the pole, the external parameters of the long - focal - length camera are calibrated. Then, the 2D image points of the long - focal - length camera are mapped into the ground 3D space points to obtain a first point set, and the ground truth points are used as a second point set. Based on the obtained first point set and the second point set, the f value in the internal parameters of the long - focal - length camera is optimized and updated. By the above method, when calibrating the internal parameters of the long - focal - length camera, the camera f value in the internal parameters can be optimized. Description of the Drawings
[0035] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:
[0036] Figure 1 It is a schematic diagram of the calibration scenario of the long - focal - length camera calibration method in the embodiment of the present application;
[0037] Figure 2 It is a schematic flowchart of the long - focal - length camera calibration method in the embodiment of the present application;
[0038] Figure 3 It is a schematic structural diagram of the long - focal - length camera calibration device in the embodiment of the present application;
[0039] Figure 4Schematic diagram of the structure of an electronic device in an embodiment of the present application. Detailed implementation manners
[0040] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0041] The following will detail the technical solutions provided by each embodiment of the present application with reference to the drawings.
[0042] As Figure 1 shown, assuming that the ground is a flat ground plane, a long-focus camera is installed on a road pole for sensing a target at a far end of the road. Usually, the internal parameters of the long-focus camera can be pre-calibrated to obtain the internal reference parameters. When the long-focus camera is installed on the road pole, further calibration of the external reference parameters of the camera is required. When converting the coordinates of the 2D image in the long-focus camera to the real 3D coordinates of the road space, it will not affect the calibration of the external reference parameters of the camera. The optimization method in the present application can optimize the f value of the internal reference parameters of the long-focus camera and obtain the optimal solution of the f value, thereby improving the positioning accuracy of the long-focus camera.
[0043] An embodiment of the present application provides a method for calibrating a long-focus camera. As Figure 2 shown, a schematic flowchart of the method for calibrating a long-focus camera in an embodiment of the present application is provided. The method at least includes the following steps S210 to step 240:
[0044] Step S210, calibrating to obtain the internal reference parameters of the long-focus camera, where the internal reference parameters at least include the f value.
[0045] Generally, camera internal parameter calibration refers to the process of determining the internal parameters of a camera through a series of steps, and these parameters describe the inherent characteristics of the camera, including focal length, principal point coordinates, pixel aspect ratio, radial and tangential distortion parameters, etc. The purpose of camera internal parameter calibration is to accurately measure these parameters, usually obtained by calculating the known three-dimensional space points and their two-dimensional correspondences in the camera image. For a long-focus camera, the same calibration methods common in related technologies can be used for calibration. A long-focus camera can be considered a camera with a focal length greater than 20 mm.
[0046] It should be noted that after the internal parameters of the telephoto camera are calibrated, the f value (the camera f value refers to the camera focal length), the principal point position, the distortion coefficient, etc. in the internal parameters of the telephoto camera are obtained. However, at this time, the f value in the internal parameters is not accurate enough. Since the focal length of the telephoto camera is too large and the distance is not far enough during calibration, the pixel positions occupied by the obtained corner point information are too large, and the accuracy of the information of the real points is relatively low.
[0047] Step S220: After installing the telephoto camera on the pole, calibrate to obtain the external parameters of the telephoto camera.
[0048] After the internal parameter calibration is completed, installing the telephoto camera on the pole can further calibrate to obtain the external parameters of the telephoto camera.
[0049] It should be noted that the external parameters of the telephoto camera usually include the external parameter matrix R and t, where R is the rotation matrix and t is the translation matrix.
[0050] Step S230: Map the 2D image points of the telephoto camera into the ground 3D space points to obtain the first point set, and use the ground truth points as the second point set.
[0051] Map the 2D image points of any image captured by the telephoto camera to the ground to obtain the first point set. That is to say, the first point set contains multiple 2D-3D mapping points. At the same time, the second point set collects at least one ground truth point on the ground. It can be understood that the more the number of ground truth points, the more accurate the calibration result.
[0052] Step S240: Optimize and update the f value in the internal parameters of the telephoto camera according to the first point set and the second point set.
[0053] Optimize the f value in the internal parameters of the telephoto camera through the obtained first point set and second point set, and update the f value to achieve the purpose of optimizing the internal parameters of the telephoto camera.
[0054] Through the above method, the calibration of the internal parameters of the telephoto camera is optimized, making the positioning result of the telephoto camera more accurate.
[0055] Through the above method, by mapping the 2D image points of the telephoto camera into the ground 3D space points to obtain the first point set, and using the ground truth points as the second point set, based on the obtained first point set and second point set, optimize and update the f value in the internal parameters of the telephoto camera. At the same time, it solves the problem that the telephoto camera requires a large distance between the camera and the calibration board, generally more than 20m, and at the same time requires a large checkerboard calibration board to cover the camera's field of view.
[0056] Different from the related art where the interval distance for long - focal - length camera calibration is large, making it inconvenient to find an open space / calibration field, and it is difficult to make a huge flat checkerboard. Through the above - mentioned method, by performing internal - parameter calibration, external - parameter calibration, and solving for the optimal f - value in the internal parameters, the optimization of the internal - parameter calibration process is achieved. At the same time, manual participation can be reduced, and the deployment work efficiency can be improved.
[0057] In an embodiment of the present application, the optimizing and updating the f - value in the internal parameters of the long - focal - length camera according to the first point set and the second point set includes: obtaining the image ground projection points according to the first point set; determining the ground truth points according to the second point set; and optimizing the optimal f - value of the camera internal parameters in the long - focal - length camera according to the minimum Euclidean distance between the image ground projection points and the ground truth points.
[0058] Calculate the minimum Euclidean distance between the image ground projection points obtained according to the first point set and the ground truth points obtained according to the second point set. Then, substitute the minimum Euclidean distance into the relevant formula and inversely calculate the optimal f - value of the camera internal parameters in the long - focal - length camera.
[0059] In an embodiment of the present application, the optimizing and updating the f - value in the internal parameters of the long - focal - length camera includes: establishing an optimization function according to the longitude and latitude values of the image ground projection points and the longitude and latitude values of the ground truth points: min_error = the minimum Euclidean distance of |ground projection point - ground truth point|; obtaining the optimal f - value of the camera internal parameters according to the minimized Euclidean distance in the optimization function, and assuming fx = fy, where fx and fy represent the focal lengths of the camera internal parameters, corresponding to the focal lengths of the camera in the x and y directions.
[0060] Furthermore, to ensure the convenience of calculation, the longitude and latitude values of the image ground projection points can be directly converted with the longitude and latitude values of the ground truth points. Create an optimization function: min_error = |the minimum Euclidean distance between the ground projection point and the ground truth point|. At this time, fx is used as the only variable to optimize the Euclidean distance between the minimized projection point and the ground truth point, and the optimal fx is obtained.
[0061] It should be noted that when calculating, it is assumed that fx = fy, where fx and fy represent the focal lengths of the camera internal parameters.
[0062] Since the initial internal - parameter coefficients of the long - focal - length camera are calibrated, theoretically, fx and fy of the camera are the same. Here, it is assumed that fx = fy. According to the following formula for converting the world - coordinate points (Xw, Yw, Zw) to the image - coordinate points (u, v), it can be known that the accuracy of the camera f - value is only related to the scaling factor s and does not affect the external - parameter calibration effect of the camera.
[0063] When finding the optimal fx, the following matrix relationship can be referred to:
[0064]
[0065] Among them,
[0066] C X 、C Y represent the principal point positions of the camera in the CMOS / CCD image sensor;
[0067] (Xw, Yw, Zw) is a point with known position in the world coordinate system in the real world;
[0068] u, v are points (u, v) in the image coordinate system, and the values of u and v are also known (user-defined);
[0069] Rt represents that the external parameter matrix is known.
[0070] In an embodiment of the present application, the step of using the ground truth points as the second point set includes: using an RTK truth device to calibrate and mark points on the ground to obtain multiple ground truth points.
[0071] Using an RTK truth device can calibrate and mark points on the ground, thereby obtaining multiple ground truth points, which can be used to solve the minimum Euclidean distance.
[0072] In an embodiment of the present application, the step of mapping the 2D image points of the telephoto camera to the ground 3D space points to obtain the first point set includes: according to the internal parameter of the telephoto camera, converting the image pixel coordinates of the telephoto camera to the world coordinate system on the ground to obtain the first point set.
[0073] Here, it is assumed that the road surface is flat, and the road plane equation, the initial internal parameter matrix and the external parameter matrix of the camera are known. The image points can be projected onto the road plane to obtain the corresponding point set of the image points and the road ground points. Specifically, fitting the plane equation projects the points in the image onto the ground (at this time, the ground is regarded as a large checkerboard), and there are also multiple truth points on the ground.
[0074] In an embodiment of the present application, the step of calibrating the external parameters of the telephoto camera after the telephoto camera is installed on the pole includes: after the telephoto camera is installed on the pole, using the PNP algorithm to calibrate the external parameters of the telephoto camera and determine the rotation and translation relationship between the camera coordinate system and the world coordinate system.
[0075] After the camera is installed on the roadside pole, use the PNP method to calibrate the external parameters of the camera, and solve to obtain the external parameter matrix R and t, that is, the rotation and translation relationship corresponding to the camera coordinate system and the world coordinate system.
[0076] It is understandable that the PNP method is a commonly used technical means for calibrating the external parameters of a camera, so it will not be elaborated here. At the same time, the use of the PNP method is not used to limit the protection scope in the embodiments of the present application.
[0077] In an embodiment of the present application, the internal parameters of the telephoto camera obtained by calibration include: using the Zhang Zhengyou calibration method to obtain the internal parameters of the telephoto camera, and the internal parameters at least include the camera f value.
[0078] Prepare a checkerboard image. Usually, a planar checkerboard with known dimensions is used as the calibration pattern. The checkerboard provides a series of regular corner points that can be easily detected in the image. The accurate dimensions of the calibration pattern are necessary for calculating the camera parameters. Select a checkerboard with known dimensions, such as a checkerboard paper with known square sizes. Take multiple images containing the checkerboard to ensure that there is sufficient visual information of the checkerboard in the images.
[0079] Detect the corner points of the checkerboard. For each image, use a corner point detection algorithm (such as the function findChessboardCorners() in OpenCV) to automatically detect the corner points of the checkerboard. The number of detected corner points should match the number of actual corner points of the checkerboard.
[0080] Determine the correspondence between the corner points. For each corner point, correspond its position in the image coordinate system to its position in the actual world coordinate system. The position in the actual world coordinate system can be determined by the known dimensions of the checkerboard and the spacing between the grid points.
[0081] Finally, perform camera calibration. Use the image coordinates of the corner points and the corresponding actual world coordinates for camera calibration.
[0082] As described above, the Zhang Zhengyou calibration method uses an optimization algorithm based on the least squares method to estimate the internal parameters and distortion coefficients of the camera by minimizing the reprojection error. The reprojection error refers to the difference between the actual world coordinates projected through the calibration result and the corresponding image coordinates.
[0083] As described above, the Zhang Zhengyou calibration method uses an iterative optimization method to continuously adjust the camera parameters and distortion coefficients to minimize the reprojection error. In each iteration, the calibration algorithm will try to optimize the camera parameters, distortion coefficients, and the detection and matching of corner points until a certain convergence criterion is reached.
[0084] After calibration, the quality of the calibration can be evaluated by calculating the reprojection error and observing the distortion correction effect. A lower reprojection error and more accurate distortion correction indicate a better calibration result.
[0085] The embodiment of the present application also provides a telephoto camera calibration device 300, as Figure 3As shown, a structural schematic diagram of a long - focal - length camera calibration device in an embodiment of the present application is provided. The long - focal - length camera calibration device 300 at least includes: an internal - parameter calibration module 310, an external - parameter calibration module 320, a mapping module 330, and an optimization module 340, where:
[0086] In an embodiment of the present application, the internal - parameter calibration module 310 is specifically configured to: calibrate the internal - parameter of the long - focal - length camera, and the internal - parameter at least includes the f - value.
[0087] Generally, camera internal - parameter calibration refers to the process of determining the internal parameters of a camera through a series of steps. These parameters describe the inherent characteristics of the camera, including focal length, principal - point coordinates, pixel aspect ratio, radial and tangential distortion parameters, etc. The purpose of camera internal - parameter calibration is to accurately measure these parameters, usually obtained by calculating the known three - dimensional space points and their two - dimensional correspondences on the camera image. For a long - focal - length camera, the common calibration methods in related technologies can also be used for calibration. A long - focal - length camera can be considered as a camera with a focal length greater than 20 mm.
[0088] It should be noted that after the internal - parameter calibration of the long - focal - length camera, the f - value, principal - point position, distortion coefficient, etc. in the internal - parameter of the long - focal - length camera are obtained. However, at this time, the f - value in the internal - parameter is not accurate enough. Due to the excessive focal length of the long - focal - length camera and the insufficient distance during calibration, the pixel positions occupied by the obtained corner - point information are too large, resulting in a low accuracy of the information of the real points.
[0089] In an embodiment of the present application, the external - parameter calibration module 320 is specifically configured to: after installing the long - focal - length camera on a pole, calibrate the external - parameter of the long - focal - length camera.
[0090] After completing the internal - parameter calibration, install the long - focal - length camera on a pole, and the external - parameter of the long - focal - length camera can be further calibrated.
[0091] It should be noted that the external - parameters of the long - focal - length camera usually include the external - parameter matrix R and t.
[0092] In an embodiment of the present application, the mapping module 330 is specifically configured to: map the 2D image points of the long - focal - length camera into the ground 3D space points to obtain a first point set, and use the ground truth points as a second point set.
[0093] Map the 2D image points of any image captured by the long - focal - length camera to the ground to obtain a first point set. That is to say, the first point set contains multiple 2D - 3D mapping points. At the same time, the second point set collects at least one ground truth point on the ground. It can be understood that the more the number of ground truth points, the more accurate the calibration result.
[0094] In an embodiment of the present application, the optimization module 340 is specifically configured to: optimize and update the f value in the internal parameters of the telephoto camera according to the first point set and the second point set.
[0095] Optimize the f value in the internal parameters of the telephoto camera by using the obtained first point set and second point set, and update the f value to achieve the purpose of optimizing the internal parameters of the telephoto camera.
[0096] In an embodiment of the present application, the optimization module 340 is further configured to:
[0097] Obtain the image ground projection points according to the first point set;
[0098] Determine the ground truth points according to the second point set;
[0099] Optimize the optimal f value of the camera internal parameters in the telephoto camera according to the minimum Euclidean distance between the image ground projection points and the ground truth points.
[0100] In an embodiment of the present application, the optimization module 340 is further configured to:
[0101] Establish an optimization function according to the longitude and latitude values of the image ground projection points and the longitude and latitude values of the ground truth points: min_error = |ground projection point - ground truth point|;
[0102] Obtain the optimal f value of the camera internal parameters according to the minimum Euclidean distance in the optimization function, and assume that fx = fy, where fx and fy represent the focal lengths of the camera internal parameters.
[0103] In an embodiment of the present application, the mapping module 330 is further configured to:
[0104] Use a RTK truth device to calibrate and mark points on the ground to obtain multiple ground truth points.
[0105] In an embodiment of the present application, the mapping module 330 is further configured to:
[0106] Convert the image pixel coordinates of the telephoto camera to the world coordinate system on the ground according to the internal parameters of the telephoto camera to obtain the first point set.
[0107] In an embodiment of the present application, the external parameter calibration module 320 is further configured to:
[0108] After the telephoto camera is installed on the pole, use the PNP algorithm to perform external parameter calibration on the telephoto camera, and determine the rotation and translation relationship between the camera coordinate system and the world coordinate system.
[0109] In one embodiment of the present application, the internal parameter calibration module 310 is further configured to:
[0110] Use the Zhang Zhengyou calibration method to obtain the internal parameters of the telephoto camera, and the internal parameters at least include the camera f value.
[0111] It can be understood that the above-mentioned telephoto camera calibration device can implement each step of the telephoto camera calibration method provided in the foregoing embodiment. The relevant explanations regarding the telephoto camera calibration method are applicable to the telephoto camera calibration device and will not be elaborated herein.
[0112] Figure 4 It is a schematic structural diagram of an electronic device according to an embodiment of the present application. Please refer to Figure 4 , at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory, such as at least one disk memory, etc. Of course, the electronic device may also include other hardware required for other services.
[0113] The processor, the network interface, and the memory can be interconnected through the internal bus, and the internal bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 4 only a bidirectional arrow is used in
[0114] but it does not mean that there is only one bus or one type of bus.
[0115] The memory is used to store a program. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory can include a memory and a non-volatile memory, and provide instructions and data to the processor.
[0116] Calibrate to obtain the internal parameters of the telephoto camera, and the internal parameters at least include the f value;
[0117] After installing the telephoto camera on the pole, calibrate the external parameter of the telephoto camera;
[0118] Map the 2D image points of the telephoto camera into the ground 3D space points to obtain the first point set, and use the ground truth points as the second point set;
[0119] According to the first point set and the second point set, optimize and update the f value in the internal parameter of the telephoto camera.
[0120] The above as in this application Figure 2 The method executed by the telephoto camera calibration device disclosed in the embodiments shown can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor or the instructions in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by the hardware decoding processor, or executed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.
[0121] The electronic device can also execute Figure 2 the method executed by the medium telephoto camera calibration device, and implement the functions of the medium telephoto camera calibration device in Figure 2 the embodiments shown, which will not be elaborated in the embodiments of the present application.
[0122] An embodiment of the present application also provides a computer-readable storage medium storing one or more programs, and the one or more programs include instructions that, when executed by an electronic device including a plurality of application programs, enable the electronic device to execute Figure 2 the method executed by the long focal length camera calibration device in the illustrated embodiment, and specifically used to execute:
[0123] Calibrate the internal parameter of the long focal length camera, where the internal parameter includes at least the f value;
[0124] After installing the long focal length camera on the pole, calibrate the external parameter of the long focal length camera;
[0125] Map the 2D image points of the long focal length camera to the ground 3D space points to obtain a first point set, and use the ground truth points as the second point set;
[0126] Optimize and update the f value in the internal parameter of the long focal length camera according to the first point set and the second point set.
[0127] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can be implemented in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0128] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0129] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the functions in Figure 1 one process or multiple processes and / or blocks Figure 1the functions specified in one or more boxes.
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 one process or more processes and / or boxes Figure 1 step of the functions specified in one or more boxes.
[0131] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0132] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0133] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0134] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.
[0135] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0136] The above are only the embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A telephoto camera calibration method, wherein: The method comprises: Calibrate and obtain the intrinsic parameters of the telephoto camera, wherein the intrinsic parameters at least include the f-value; After the telephoto camera is mounted on the pole, calibrate and obtain the external parameters of the telephoto camera; Mapping the 2D image points of the telephoto camera to the 3D space points on the ground to obtain a first point set, and using the ground truth points as a second point set; The f-value in the intrinsic parameters of the telephoto camera is optimized and updated according to the first point set and the second point set.
2. The method of claim 1, wherein: The optimizing and updating the f-value in the intrinsic parameter of the telephoto camera according to the first point set and the second point set includes: Obtaining image ground projection points according to the first point set; Determining ground truth points based on the second point set; The optimal f-value of the camera intrinsic parameter in the telephoto camera is optimized according to the minimum Euclidean distance between the ground projection point of the image and the ground truth point.
3. The method of claim 2, wherein: The optimizing and updating the f-value in the intrinsic parameters of the telephoto camera includes: According to the latitude and longitude values of the ground projection point of the image and the latitude and longitude values of the ground truth point, an optimization function is established: min_error = the minimum Euclidean distance of |ground projection point - ground truth point|; According to the minimized Euclidean distance in the optimization function, the optimal f value of the camera intrinsic parameter is obtained, and it is assumed that fx=fy, and fx and fy represent the focal length of the camera intrinsic parameter.
4. The method of claim 1, wherein: The method of taking the ground truth points as the second point set includes: Use RTK truth value equipment to calibrate points on the ground to obtain multiple ground truth points.
5. The method of claim 1, wherein: Mapping the 2D image points of the telephoto camera to ground 3D space points to obtain a first point set includes: According to the intrinsic parameters of the telephoto camera, the image pixel coordinates of the telephoto camera are converted into a world coordinate system on the ground to obtain the first point set.
6. The method of claim 1, wherein: After the telephoto camera is mounted on the pole, calibrating to obtain the external parameters of the telephoto camera includes: After the telephoto camera is mounted on the pole, the PNP algorithm is used to perform external parameter calibration on the telephoto camera, and the relationship between the rotation and translation of the camera coordinate system and the world coordinate system is determined.
7. The method of claim 1, wherein: The calibration obtains the internal parameters of the telephoto camera, including: The Zhang Zhengyou calibration method is used to obtain the intrinsic parameters of the telephoto camera, where the intrinsic parameters at least include the camera f-value.
8. A telephoto camera calibration device, wherein: The device comprises: An internal parameter calibration module, used to calibrate the internal parameter parameters of the telephoto camera, wherein the internal parameter parameters at least include the f value; An external parameter calibration module, used to calibrate the external parameter parameters of the telephoto camera after the telephoto camera is mounted on the pole; A mapping module, used for mapping the 2D image points of the telephoto camera to the 3D space points on the ground to obtain a first point set and taking the ground truth points as a second point set; An optimization module is used to optimize and update the f value in the intrinsic parameter parameters of the telephoto camera according to the first point set and the second point set.
9. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, which when executed cause the processor to perform the method of any one of claims 1 to 7.
10. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, causes the electronic device to execute any one of the methods of claims 1 to 7.