Camera calibration method and device, electronic device and terminal device

By identifying the QR code in the target image to obtain camera calibration information, and using the maximum likelihood estimation method to calculate the camera's intrinsic parameter values, the problem of cumbersome traditional camera calibration methods is solved, achieving seamless and efficient camera calibration, and improving user experience and shooting quality.

CN117237454BActive Publication Date: 2026-01-13齐鲁空天信息研究院
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310921161.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2026-01-13
Estimated Expiration
2043-07-25

AI Technical Summary

Technical Problem

Traditional camera calibration methods are cumbersome, resulting in a poor user experience and making it difficult for users to calibrate cameras anytime and anywhere in various scenarios.

Method used

By recognizing the target QR code in the target image, the position and identification information of feature points on the camera calibration board are obtained, and the camera intrinsic parameter values ​​are calculated using the maximum likelihood estimation method, thus achieving seamless camera calibration.

Benefits of technology

It simplifies the camera calibration process without the user's awareness, improves camera shooting quality and user experience, and is suitable for a variety of scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117237454B_ABST
    Figure CN117237454B_ABST
Patent Text Reader

Abstract

The application provides a camera calibration method and device, electronic equipment and terminal equipment, the method comprises the following steps: obtaining a target image, the target image comprises a target two-dimensional code, the target image is obtained by a camera of a target terminal equipment under the condition that the target terminal equipment scans the target two-dimensional code; identifying the target two-dimensional code in the target image, obtaining two-dimensional code information of the target two-dimensional code, the two-dimensional code information comprises target information and preset information; obtaining the camera internal parameter value of the camera based on the target information and the target image; calibrating the camera based on the camera internal parameter value. The camera calibration method and device, electronic equipment and terminal equipment provided by the application can calibrate the camera of the target terminal equipment without the user's awareness, thereby improving the camera shooting quality of the target terminal equipment, the camera calibration process is simpler and more efficient, the user's perception is improved, and the promotion is stronger.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a camera calibration method, apparatus, electronic device, and terminal device. Background Technology

[0002] With the development of science and technology, mobile phones, tablets, and other terminal devices have become an important part of modern smart living. As a crucial component of these terminal devices, cameras play an indispensable role in an increasing number of application scenarios.

[0003] Typically, to improve camera image quality, camera calibration is required before use. Traditional camera calibration methods involve taking pictures of the camera calibration board from multiple angles to obtain image datasets of the calibration board from these multiple angles. Based on these image datasets, the intrinsic parameters of the camera under ideal conditions are then obtained.

[0004] However, for users of terminal devices, the aforementioned traditional camera calibration methods are too cumbersome and have a poor user experience. Therefore, how to achieve camera calibration without the user's awareness is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] This invention provides a camera calibration method, apparatus, electronic device, and terminal device to solve the shortcomings of existing camera calibration methods that are too cumbersome and result in poor user experience, thereby enabling camera calibration without the user's awareness.

[0006] This invention provides a camera calibration method, comprising:

[0007] Acquire a target image, the target image including a target QR code, the target image being captured by the camera of the target terminal device when the target terminal device scans the target QR code;

[0008] Identify the target QR code in the target image, obtain the QR code information of the target QR code, the QR code information includes target information and preset information, the target information includes the position information of each feature point on the camera calibration board and the identification information of each feature point, the preset information is used to instruct the user of the target terminal device to complete a preset operation;

[0009] Based on the target information and the target image, obtain the camera's intra-camera parameter values;

[0010] The camera is calibrated based on the camera's intrinsic parameter values.

[0011] According to a camera calibration method provided by the present invention, the step of obtaining the camera's intra-camera parameter values ​​based on the target information and the target image includes:

[0012] Based on the target image, obtain the coordinate value of each feature point in the image coordinate system of the target image, and obtain the coordinate value of each feature point in the world coordinate system based on the position information of each feature point.

[0013] Based on the identification information of each feature point, a correspondence is established between the coordinate values ​​of each feature point in the image coordinate system and the coordinate values ​​in the world coordinate system.

[0014] Based on the correspondence, calculate the transformation parameter between the coordinates of each feature point in the image coordinate system and its coordinates in the world coordinate system;

[0015] The transformation parameter with the smallest error among all the transformation parameters is obtained by using the maximum likelihood estimation method, and is used as the camera intrinsic parameter value of the camera.

[0016] According to a camera calibration method provided by the present invention, the preset information includes a target link; the target link is used to run a target applet on a target platform; the target applet is used to instruct the user of the target terminal device to complete the preset operation.

[0017] According to a camera calibration method provided by the present invention, the preset operation includes a user information input operation and / or an input operation confirming entry into the target area.

[0018] According to a camera calibration method provided by the present invention, the preset information includes the installation information of the target application;

[0019] Accordingly, the preset operation includes installing the target application on the target terminal device.

[0020] According to a camera calibration method provided by the present invention, the camera calibration board is composed of multiple sub-calibration boards; the target information also includes the identification information of the sub-calibration board where each feature point is located.

[0021] According to a camera calibration method provided by the present invention, the target QR code is pre-generated based on the following steps:

[0022] The position information and identification information of each feature point on the camera calibration board are obtained as first information, and information for instructing the user to perform a preset operation is obtained as second information.

[0023] After fusing the first information and the second information to obtain fused information, the fused information is encoded to obtain the data code corresponding to the fused information;

[0024] Based on the data code, generate the error correction code corresponding to the data code;

[0025] The target QR code is generated based on the data code and the error correction code.

[0026] The present invention also provides a camera calibration device, comprising:

[0027] An image acquisition module is used to acquire a target image, the target image including a target QR code, the target image being captured by the camera of the target terminal device when the target terminal device scans the target QR code;

[0028] The image analysis module is used to identify the target QR code in the target image and obtain the QR code information of the target QR code. The QR code information includes target information and preset information. The target information includes the position information of each feature point on the camera calibration board and the identification information of each feature point. The preset information is used to instruct the user of the target terminal device to complete a preset operation.

[0029] The parameter acquisition module is used to acquire the camera's in-camera parameter values ​​based on the target information and the target image;

[0030] A camera calibration module is used to calibrate the camera based on the camera's intrinsic parameter values.

[0031] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the camera calibration method as described above.

[0032] The present invention also provides a terminal device, including: a camera and the electronic device described above.

[0033] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the camera calibration method as described above.

[0034] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the camera calibration method as described above.

[0035] The camera calibration method, apparatus, electronic device, and terminal device provided by this invention identify a target QR code in a target image. After identifying the target QR code, target information is obtained, including the position information of each feature point on the camera calibration board, the identification information of each feature point, and the identification information of the sub-calibration board where each feature point is located. Based on the target information, the camera's intra-camera parameters of the target terminal device are obtained. Then, based on the intra-camera parameters, the camera of the target terminal device is calibrated. The target image is captured by the camera of the target terminal device in a preset scene. The camera calibration of the target terminal device can be performed without the user's awareness, thereby improving the camera's shooting quality. The camera calibration process is simpler and more efficient, improving user perception and increasing its applicability. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0037] Figure 1 This is one of the flowcharts illustrating the camera calibration method provided by the present invention;

[0038] Figure 2 This is a schematic diagram of the process for generating a target QR code in the camera calibration method provided by the present invention;

[0039] Figure 3 This is the second flowchart illustrating the camera calibration method provided by the present invention;

[0040] Figure 4 This is a schematic diagram of the camera calibration device provided by the present invention;

[0041] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0043] In the description of the invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0044] It should be noted that the surface of the camera calibration plate is usually decorated with a checkerboard pattern. In traditional camera calibration methods, the camera to be calibrated takes pictures of the checkerboard pattern of the camera calibration plate from multiple angles. After obtaining the image dataset, the camera intrinsic parameters under ideal conditions can be estimated by extracting the checkerboard corner points from the image dataset.

[0045] However, the traditional camera calibration methods described above are rather cumbersome. For users of terminal devices, if they need to calibrate their cameras using these traditional methods before using them, it will inevitably cause user resentment and seriously affect their user experience.

[0046] Even if the traditional camera calibration method is optimized so that users only need to take a picture of the calibration board with the camera of their terminal device for camera calibration, in real-world applications, users cannot always find a camera calibration board for calibration. If users are required to go to a designated location where the camera calibration board is located to take a picture of it, it will cause user resentment and seriously affect user experience.

[0047] To address this issue, the present invention provides a camera calibration method. Based on the camera calibration method provided by the present invention, the camera of the user's terminal device can be calibrated under preset scenarios without the user's awareness, thus improving user perception.

[0048] Figure 1 This is one of the flowcharts illustrating the camera calibration method provided by this invention. The following is a combination of... Figure 1 The camera calibration method of the present invention is described. For example... Figure 1 As shown, the method includes: step 101, acquiring a target image, the target image including a target QR code, the target image being captured by the camera of the target terminal device when the target terminal device scans the target QR code.

[0049] It should be noted that the execution subject in this embodiment of the invention is a camera calibration device. The camera of the target terminal device is the calibration object of the camera calibration method provided by this invention. The target terminal device in this embodiment of the invention can be a smartphone, tablet computer, or other terminal device.

[0050] It should be noted that the aforementioned camera calibration device can be the processor in the target terminal device.

[0051] It should be noted that this invention provides a camera calibration method applicable to a preset scenario, in which the user needs to control the target terminal device to scan the target QR code. Therefore, based on the camera calibration method provided by this invention, the camera of the target terminal device can be calibrated in the preset scenario without the user's awareness.

[0052] Understandably, tourist attractions typically refer to spaces or areas where tourism and related activities are their primary or one of their main functions. Tourist attractions are known for their beautiful scenery, and it's very common for visitors to take photos using their devices within these areas.

[0053] Therefore, calibrating the cameras on tourists' devices before they enter the scenic area can improve the shooting quality of their cameras, allowing tourists to take more beautiful and satisfying photos, thus greatly enhancing their experience and perception of the scenic area. Furthermore, improved camera quality makes the photos taken by tourists more effective in promoting the scenic area and increasing its visibility.

[0054] For tourist attractions, some require verification of tourists' identities before allowing them to enter; some require monitoring of the number of people entering and therefore require tourists to register before entry; and some tourist attractions are large, and considering the personal safety of tourists, the operators may require tourists to install an application on their devices to verify their safety before allowing them to enter, with the tourists' consent.

[0055] Therefore, tourist attractions usually set up QR code signs at the entrance. Before obtaining permission to enter the tourist attraction, tourists need to scan the QR code with a terminal device, install the application used to verify the tourist's safety on the terminal device, or provide the tourist's identity information to the operator of the tourist attraction so that the operator can verify the tourist's identity information and determine whether to allow the tourist to enter the tourist attraction, or provide the tourist attraction operator with a registration for entry.

[0056] Therefore, the scenario of tourists scanning the QR code provided by the tourist attraction using their terminal devices before entering the attraction is a common one in real life.

[0057] It is understood that the user of the target terminal device in this embodiment of the invention can be a tourist in a tourist attraction.

[0058] Accordingly, the target area in the embodiments of the present invention can be a tourist attraction.

[0059] In this embodiment of the invention, by adding target information for calibrating the camera of a tourist's terminal device to the target QR code and placing the target QR code at the entrance of the tourist attraction, the camera of the tourist's terminal device can be calibrated without the tourist's awareness. The target information may include the position information and identification information of each feature point on the camera calibration plate.

[0060] The preset scenario in this embodiment of the invention can be a scenario where the user of the target terminal device controls the target terminal device to scan a target QR code before entering a tourist attraction. The user of the target terminal device can scan the target QR code and complete a preset operation to obtain permission to enter the tourist attraction.

[0061] Understandably, the target QR code could be provided by the operator of the tourist attraction.

[0062] It should be noted that, in addition to carrying target information for calibrating the camera of the target terminal device, the target QR code also carries preset information predefined by the operator of the tourist attraction. The preset information can be used to instruct the user of the target terminal device to complete preset operations.

[0063] For example, preset information can be used to instruct the user of the target terminal device to input user information, or to instruct the user of the target terminal device to confirm entry into the target area, or to instruct the user of the target terminal device to install an application.

[0064] In a preset scenario, users of the target terminal device can use the "scan" function of the target terminal device to scan the target QR code using the camera of the target terminal device, thereby obtaining an image including the target QR code.

[0065] It should be noted that, in this embodiment of the invention, an image including the target QR code captured by the camera of the target terminal device can be determined as the target image.

[0066] In this embodiment of the invention, the target image can be acquired through data communication, that is, the processor in the target terminal device can acquire the target image through the internal communication of the target terminal device.

[0067] Step 102: Identify the target QR code in the target image and obtain the QR code information. The QR code information includes target information and preset information. The target information includes the position information of each feature point on the camera calibration board and the identification information of each feature point. The preset information is used to instruct the user of the target terminal device to complete the preset operation.

[0068] Specifically, after acquiring the target image, the target QR code in the target image can be decoded to obtain the QR code information.

[0069] Figure 2 This is a schematic diagram illustrating the process of generating a target QR code in the camera calibration method provided by the present invention. Figure 2 As shown, the target QR code is generated based on the following steps: Step 21, obtain the position information and the identification information of each feature point on the camera calibration board as the first information, and obtain the information used to instruct the user to perform preset operations as the second information;

[0070] Optionally, the target information may also include the identification information of the sub-calibration board where each feature point is located.

[0071] It should be noted that the camera calibration plate in this embodiment of the invention can be composed of multiple sub-calibration plates. The sub-calibration plates can be square in shape, and the camera calibration plate composed of all the sub-calibration plates is also square.

[0072] For any sub-calibration board, a preset number of feature points are provided on the sub-calibration board, and the positions of the feature points on the sub-calibration board are randomly determined.

[0073] It should be noted that the number and size of the sub-calibration plates, as well as the aforementioned preset quantity, can be predefined based on prior knowledge and / or actual conditions. In this embodiment of the invention, the number and size of the sub-calibration plates, as well as the aforementioned preset quantity, are not specifically limited.

[0074] In this embodiment of the invention, the position information of each feature point on the camera calibration board, the identification information of each feature point, and the identification information of the sub-calibration board to which each feature point is located can be obtained through information collection as the first information.

[0075] It should be noted that the identification information of any feature point on the camera calibration board can be used to uniquely identify the feature point; the identification information of any sub-calibration board can be used to uniquely represent the sub-calibration board.

[0076] Optionally, in this embodiment of the invention, the coordinates of any feature point in the world coordinate system can be used to represent the position information of the feature point.

[0077] The embodiments of the present invention can obtain information for instructing a user to perform a preset operation in various ways as second information. For example, the second information can be obtained based on user input; or, the second information can be received from other electronic devices. The specific method for obtaining the second information is not limited in the embodiments of the present invention.

[0078] This invention solves the problem that traditional camera calibration methods require multiple calibration board images by stitching together multiple sub-calibration boards into a single camera calibration board.

[0079] Steps 22 and 23: After fusing the first and second information to obtain the fused information, the fused information is encoded to obtain the corresponding data code.

[0080] Specifically, after obtaining the first information and the second information, the first information and the second information can be fused to obtain fused information. Then, based on a predefined encoding method, the fused information can be encoded to convert the fused information into binary data code.

[0081] It should be noted that the encoding method for the above-mentioned fused information can be determined based on prior knowledge and / or actual circumstances in the embodiments of the present invention. The embodiments of the present invention do not impose specific limitations on the above-mentioned encoding method.

[0082] Step 24: Generate the error correction code corresponding to the data code based on the data code.

[0083] Specifically, after obtaining the data code corresponding to the above-mentioned fusion information, an error correction code corresponding to the above-mentioned data code can be generated based on the above-mentioned data code, which is used to determine whether the above-mentioned data code is read correctly when decrypting the target QR code.

[0084] Step 25: Generate the target QR code based on the data code and error correction code.

[0085] Specifically, after obtaining the aforementioned data code and the corresponding error correction code, the data code and error correction code can be sorted according to a predefined arrangement rule to obtain the data sequence corresponding to the aforementioned data code and error correction code.

[0086] After obtaining the data sequence corresponding to the above data code and error correction code, the data sequence can be filled into the QR code graphic matrix according to the predefined placement rules, thereby generating the target QR code.

[0087] It should be noted that the above arrangement rules and placement rules can be predefined based on prior knowledge and / or actual circumstances. The embodiments of this invention do not limit the above arrangement rules and placement rules.

[0088] Step 103: Based on the target information and target image, obtain the camera's intrinsic parameter values.

[0089] Specifically, after obtaining the aforementioned target information, the camera intrinsic parameter values ​​of the target terminal device's camera can be obtained based on the aforementioned target information and the aforementioned target image through numerical calculation, deep learning algorithms, and model design.

[0090] Step 104: Calibrate the camera based on its intrinsic parameters.

[0091] Specifically, after obtaining the camera intrinsic parameter values ​​of the target terminal device's camera, the intrinsic parameters of the target terminal device's camera can be corrected based on these camera intrinsic parameter values, thereby enabling camera calibration of the target terminal device.

[0092] It should be noted that after the camera of the target terminal device scans the target QR code and obtains the target image including the target QR code, it can also send the target image to the cloud server based on the communication function of the target terminal device. The cloud server can then decrypt the target QR code in the target image, obtain the target information, and then obtain the camera's intrinsic parameter values ​​based on the target information and the target image.

[0093] After the cloud server obtains the camera intrinsic parameter values ​​of the target terminal device's camera, it can send these values ​​to the processor in the target terminal device, so that the processor can calibrate the camera based on these intrinsic parameters.

[0094] This invention, through the identification of a target QR code in a target image, obtains target information including the position information of each feature point on a camera calibration board, the identification information of each feature point, and the identification information of the sub-calibration board to which each feature point is located. Based on this target information, the camera's intrinsic parameters are obtained, and then the camera of the target terminal device is calibrated based on these intrinsic parameters. The target image is captured by the camera of the target terminal device in a preset scene. This allows for camera calibration of the target terminal device without the user's awareness, thereby improving the camera's shooting quality. The camera calibration process is simpler and more efficient, enhancing user perception and making it more widely applicable.

[0095] As an optional embodiment, obtaining the camera's intra-camera parameter values ​​based on target information and target image includes: obtaining the coordinate values ​​of each feature point in the image coordinate system of the target image based on the target image, and obtaining the coordinate values ​​of each feature point in the world coordinate system based on the position information of each feature point.

[0096] Based on the identification information of each feature point, establish the correspondence between the coordinate values ​​of each feature point in the image coordinate system and the coordinate values ​​in the world coordinate system;

[0097] Based on the correspondence, calculate the transformation parameters between the coordinates of each feature point in the image coordinate system and its coordinates in the world coordinate system;

[0098] The maximum likelihood estimation method is used to obtain the transformation parameter with the smallest error among all transformation parameters, which is then used as the camera's intrinsic parameter value.

[0099] It should be noted that the location information of any feature point in the embodiments of the present invention may include the coordinate value of the feature point in the world coordinate system.

[0100] Specifically, based on the target image, the coordinates of each feature point in the target image in the image coordinate system can be obtained.

[0101] Based on the coordinates of each feature point in the image coordinate system and the coordinates in the world coordinate system, the transformation parameters between the world coordinate system and the image coordinate system for each feature point can be calculated.

[0102] The maximum likelihood estimation method can be used to identify the transformation parameters with the smallest error between the world coordinate system and the image coordinate system for feature points, which can then be used as the camera intrinsic parameter values ​​for the target terminal device's camera.

[0103] Among them, maximum likelihood estimation (MLE) is an important and widely used method for finding estimators. The basic idea of ​​maximum likelihood estimation is to find the parameter values ​​that maximize the probability of the observed data occurring under the same model, given certain model parameters. Specifically, maximum likelihood estimation means that, based on known observed data X, the model parameters are adjusted to maximize the probability of the observed data occurring.

[0104] The embodiments of the present invention can calculate the camera's intrinsic parameter values ​​more accurately and efficiently by using the maximum likelihood estimation method based on target information and target images.

[0105] As an optional embodiment, the preset information includes a target link; the target link is used to run a target mini-program on a target platform; the target mini-program is used to instruct the user of the target terminal device to complete a preset operation.

[0106] Specifically, the target QR code in the target image is decoded, and after the target mini-program is run on the target platform, the user of the target terminal device can perform input operations on the target terminal device according to the instructions of the preset information, such as inputting the user information of the target terminal device and / or confirming the entry into the target area.

[0107] As an optional embodiment, the preset operation includes user information input and / or confirmation of entering the target area.

[0108] Specifically, after decoding the target QR code in the target image and obtaining preset information, the user of the target terminal device can perform input operations on the target terminal device according to the instructions of the preset information, and input the user information of the target terminal device.

[0109] After obtaining the aforementioned user information, the target terminal device can send the user information to a third party.

[0110] Upon receiving the aforementioned user information, the third party can authenticate the user of the target terminal device based on the aforementioned user information, and if the user of the target terminal device passes the authentication, confirm that the user of the target terminal device is allowed to access the target area.

[0111] If a third party confirms that the user of the target terminal device is allowed to access the target area, it may return permission information to the target terminal device indicating that the user of the target terminal device is allowed to access the target area.

[0112] Upon receiving the aforementioned permission information, the user of the target terminal device can use this permission information to enter the target area.

[0113] It should be noted that the third party can be the operator of the tourist attraction.

[0114] After decoding the target QR code in the target image and obtaining the preset information, the user of the target terminal device can perform input operations on the target terminal device according to the instructions of the preset information. The input indicates confirmation information for entering the target area.

[0115] After the target terminal device obtains the above confirmation information, it can send the above user information to a third party.

[0116] Upon receiving the aforementioned confirmation information, a third party can use this information to confirm that the user of the target terminal device has entered the target area, thereby enabling the monitoring of pedestrian traffic in the target area. This third party can be the operator of the tourist attraction.

[0117] Optionally, upon receiving the aforementioned confirmation information, the third party may also return permission information to the target terminal device, indicating that the user of the target terminal device is permitted to access the target area.

[0118] Upon receiving the aforementioned permission information, the user of the target terminal device can use this permission information to enter the target area.

[0119] As an optional embodiment, the preset information includes the installation information of the target application;

[0120] Accordingly, the default operation includes installing the target application on the target terminal device.

[0121] Specifically, after decoding the target QR code in the target image and obtaining preset information, the target application can be installed on the target terminal device based on the installation information of the target application in the preset information.

[0122] Optionally, the aforementioned target application can be used to verify the personal safety of the user of the target terminal device. For example, the target application can be used to report the location information of the target terminal device to a third party so that the third party can verify the personal safety of the user of the target terminal device; wherein, the third party can be the operator of the tourist attraction.

[0123] Optionally, users of the target terminal device are only allowed access if the target application is installed on the target terminal device.

[0124] In this embodiment of the invention, the preset operations that the user of the target terminal device needs to perform can be determined based on actual needs, and preset information can be generated based on the preset operations. This enables the camera calibration method provided by the present invention to be adapted to a wider range of scenarios and further improves the scalability of the camera calibration method provided by the present invention.

[0125] To facilitate understanding of the camera calibration method provided by this invention, an example is given below to illustrate the camera calibration method provided by this invention. Figure 3 This is the second flowchart illustrating the camera calibration method, as shown below. Figure 3 As shown, the camera calibration method provided by the present invention includes: step 31, determining multiple sub-calibration boards, determining the identity of each sub-calibration board, and randomly determining a preset number of feature points on each sub-calibration board;

[0126] Step 32: Obtain the position information of each feature point on the camera calibration board, the identification information of each feature point, and the identification information of the sub-calibration board to which each feature point is located, as target information; obtain preset information;

[0127] Step 33: Based on the above target information and the above preset information, generate the target QR code;

[0128] Step 34: Obtain a target image including the target QR code captured by the camera of the target terminal device in a preset scene;

[0129] Step 35: Decrypt the target image to obtain target information;

[0130] Step 36: Based on the target information and target image, obtain the camera intrinsic parameter values ​​of the target terminal device's camera using the maximum likelihood estimation method;

[0131] Step 37: Based on the above camera intrinsic parameter values, calibrate the camera of the target terminal device.

[0132] Figure 4 This is a schematic diagram of the camera calibration device provided by the present invention. The following is in conjunction with... Figure 4 The camera calibration apparatus provided by this invention will be described below, and the camera calibration apparatus described below can be referred to in correspondence with the camera calibration method provided by this invention described above. For example... Figure 4 As shown, there are image acquisition module 401, image parsing module 402, parameter acquisition module 403, and camera calibration module 404.

[0133] The image acquisition module 401 is used to acquire a target image, which includes a target QR code. The target image is captured by the camera of the target terminal device when the target terminal device scans the target QR code.

[0134] The image parsing module 402 is used to identify the target QR code in the target image and obtain the QR code information of the target QR code. The QR code information includes target information and preset information. The target information includes the position information of each feature point on the camera calibration board and the identification information of each feature point. The preset information is used to instruct the user of the target terminal device to complete the preset operation.

[0135] The parameter acquisition module 403 is used to acquire the camera's in-camera parameter values ​​based on the target information and the target image;

[0136] The camera calibration module 404 is used to calibrate the camera based on its intrinsic parameter values.

[0137] Specifically, the image acquisition module 401, the image parsing module 402, the parameter acquisition module 403, and the camera calibration module 404 are electrically connected.

[0138] It should be noted that the camera calibration device in this embodiment of the invention is the processor in the target terminal device.

[0139] The camera calibration device in this embodiment of the invention identifies a target QR code in a target image. After identifying the target QR code, it obtains target information including the position information of each feature point on the camera calibration board, the identification information of each feature point, and the identification information of the sub-calibration board where each feature point is located. Based on the target information, it obtains the camera intrinsic parameters of the target terminal device's camera. Then, based on the camera intrinsic parameters, it calibrates the camera of the target terminal device. The target image is captured by the camera of the target terminal device in a preset scene. It can calibrate the camera of the target terminal device without the user's awareness, thereby improving the camera shooting quality of the target terminal device. The camera calibration process is simpler and more efficient, improves user perception, and has stronger promotional potential.

[0140] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a camera calibration method, which includes: acquiring a target image, the target image including a target QR code, the target image being captured by the camera of the target terminal device after scanning the target QR code; identifying the target QR code in the target image, acquiring the QR code information of the target QR code, the QR code information including target information and preset information, the target information including the position information and identification information of each feature point on the camera calibration board, the preset information being used to instruct the user of the target terminal device to complete a preset operation; acquiring the camera's intrinsic parameter values ​​based on the target information and the target image; and calibrating the camera based on the camera's intrinsic parameter values.

[0141] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0142] Based on the above embodiments, the present invention also provides a terminal device, including the above-mentioned electronic device and camera.

[0143] The terminal device in the embodiments of the present invention can be a smartphone, tablet computer, or other terminal device.

[0144] The terminal device in this embodiment of the invention includes a camera and the aforementioned electronic device. The aforementioned electronic device can perform camera calibration in a preset scenario without the user's awareness by executing the camera calibration method provided by this invention.

[0145] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the camera calibration method provided by the above methods. The method includes: acquiring a target image, the target image including a target QR code, the target image being captured by a camera of a target terminal device when the target terminal device scans the target QR code; identifying the target QR code in the target image, acquiring QR code information of the target QR code, the QR code information including target information and preset information, the target information including position information and identification information of each feature point on the camera calibration board, the preset information being used to instruct the user of the target terminal device to complete a preset operation; acquiring camera intrinsic parameter values ​​of the camera based on the target information and the target image; and calibrating the camera based on the camera intrinsic parameter values.

[0146] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the camera calibration method provided by the methods described above. The method includes: acquiring a target image, the target image including a target QR code, the target image being captured by a camera of a target terminal device after the target terminal device scans the target QR code; identifying the target QR code in the target image, acquiring QR code information of the target QR code, the QR code information including target information and preset information, the target information including position information and identification information of each feature point on a camera calibration board, the preset information being used to instruct the user of the target terminal device to complete a preset operation; acquiring camera intrinsic parameter values ​​of the camera based on the target information and the target image; and calibrating the camera based on the camera intrinsic parameter values.

[0147] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0148] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A camera calibration method, characterized by, The method comprises the following steps: acquiring a target image, the target image comprising a target two-dimensional code, the target image being captured by a camera of a target terminal device under the condition that the target terminal device scans the target two-dimensional code; identifying the target two-dimensional code in the target image, and acquiring two-dimensional code information of the target two-dimensional code, the two-dimensional code information comprising target information and preset information, the target information comprising position information of each feature point on a camera calibration board and identification information of each feature point, and the preset information being used for instructing a user of the target terminal device to complete a preset operation; acquiring a camera intrinsic parameter value of the camera based on the target information and the target image; and calibrating the camera based on the camera intrinsic parameter value.

2. The camera calibration method of claim 1, wherein, The step of acquiring the camera intrinsic parameter value of the camera based on the target information and the target image comprises the following steps: acquiring a coordinate value of each feature point in an image coordinate system of the target image based on the target image, and acquiring a coordinate value of each feature point in a world coordinate system based on the position information of each feature point; establishing a corresponding relationship between the coordinate value of each feature point in the image coordinate system and the coordinate value of each feature point in the world coordinate system based on the identification information of each feature point; calculating a conversion parameter between the coordinate value of each feature point in the image coordinate system and the coordinate value of each feature point in the world coordinate system based on the corresponding relationship; and acquiring a conversion parameter with the minimum error from the conversion parameters as the camera intrinsic parameter value of the camera by using a maximum likelihood estimation method.

3. The camera calibration method of claim 1, wherein, The preset information comprises a target link; the target link is used for running a target mini-program in a target platform; and the target mini-program is used for instructing the user of the target terminal device to complete the preset operation.

4. The camera calibration method of claim 1, wherein, The preset operation comprises an input operation of user information and / or an input operation of confirming entry into a target area.

5. The camera calibration method of claim 1, wherein, The preset information comprises installation information of a target application program. Correspondingly, the preset operation comprises installing the target application program in the target terminal device.

6. The camera calibration method of claim 1, wherein, The camera calibration board is spliced by a plurality of sub-calibration boards; and the target information further comprises identification information of a sub-calibration board where each feature point is located.

7. The camera calibration method of any one of claims 1 to 6, wherein, The target two-dimensional code is generated based on the following steps: acquiring the position information of each feature point on the camera calibration board and the identification information of each feature point as first information, and acquiring information used for instructing a user to perform a preset operation as second information; fusing the first information and the second information to obtain fused information, and encoding the fused information to obtain a data code corresponding to the fused information; generating an error correction code corresponding to the data code based on the data code; generating the target two-dimensional code based on the data code and the error correction code.

8. A camera calibration apparatus characterized by comprising: The method comprises the following steps: an image acquisition module is configured to acquire a target image, the target image comprising a target two-dimensional code, the target image being captured by a camera of a target terminal device under the condition that the target terminal device scans the target two-dimensional code; An image analysis module is configured to identify the target two-dimensional code in the target image, and obtain two-dimensional code information of the target two-dimensional code, the two-dimensional code information including target information and preset information, the target information including position information of each feature point on the camera calibration board and identification information of each feature point, and the preset information being used to indicate a user of the target terminal device to complete a preset operation. A parameter acquisition module is configured to acquire a camera intrinsic parameter value of the camera based on the target information and the target image. A camera calibration module is configured to calibrate the camera based on the camera intrinsic parameter value.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the camera calibration method according to any one of claims 1 to 7 when executing the program.

10. A terminal device, comprising: The electronic device comprises: a camera and the electronic device according to claim 9.

Citation Information

Patent Citations

  • Camera-array-based measurement method and measurement system

    CN107966100A

  • Camera calibration method and device, electronic equipment and storage medium

    CN114913246A