CN109559352B - Camera calibration method, apparatus, electronic device and computer-readable storage medium - Google Patents
Camera calibration method, apparatus, electronic device and computer-readable storage medium Download PDFInfo
- Publication number
- CN109559352B CN109559352B CN201811452669.9A CN201811452669A CN109559352B CN 109559352 B CN109559352 B CN 109559352B CN 201811452669 A CN201811452669 A CN 201811452669A CN 109559352 B CN109559352 B CN 109559352B
- Authority
- CN
- China
- Prior art keywords
- camera
- calibration
- aperture value
- image
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 68
- 238000012545 processing Methods 0.000 claims abstract description 66
- 238000004590 computer program Methods 0.000 claims description 14
- 238000010586 diagram Methods 0.000 description 11
- 238000003384 imaging method Methods 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 5
- 238000012937 correction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000000977 initiatory effect Effects 0.000 description 3
- 238000003705 background correction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 239000000872 buffer Substances 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Studio Devices (AREA)
Abstract
The application relates to a camera calibration method, a camera calibration device, an electronic device and a computer readable storage medium. The method comprises the following steps: the method comprises the steps of sequentially obtaining different aperture values of a first camera, shooting a three-dimensional calibration plate through the first camera according to the different aperture values to obtain a first calibration image corresponding to each aperture value, and carrying out first calibration processing on the first camera according to the first calibration image to obtain first calibration parameters corresponding to each aperture value of the first camera. The three-dimensional calibration plate can be shot by the camera according to different aperture values, calibration processing is carried out according to the obtained calibration image corresponding to each aperture value, calibration parameters corresponding to the camera under different aperture values are obtained, and the calibration accuracy of the camera can be improved.
Description
Technical Field
The present application relates to the field of image technologies, and in particular, to a method and an apparatus for calibrating a camera, an electronic device, and a computer-readable storage medium.
Background
With the development of the imaging technology, more and more users shoot images through cameras. Before the camera leaves a factory, the camera needs to be calibrated to obtain camera parameters, so that the camera can restore an object in a three-dimensional space according to an image acquired by the camera parameters. In the image acquisition process, a user can select different shooting conditions according to different shooting scenes, however, different shooting conditions in the traditional method can affect the image center, the image definition and the like, and the problem of low camera calibration accuracy exists.
Disclosure of Invention
The embodiment of the application provides a camera calibration method, a camera calibration device, electronic equipment and a computer-readable storage medium, which can improve the accuracy of camera calibration.
A camera calibration method, comprising:
sequentially acquiring different aperture values of a first camera, and shooting a three-dimensional calibration plate by the first camera according to the different aperture values to obtain a first calibration image corresponding to each aperture value;
and carrying out first calibration processing on the first camera according to the first calibration image to obtain a first calibration parameter corresponding to each aperture value of the first camera.
A camera calibration device comprises:
the image shooting module is used for sequentially acquiring different aperture values of the first camera, and shooting the three-dimensional calibration plate by the first camera according to the different aperture values to obtain a first calibration image corresponding to each aperture value;
and the calibration processing module is used for carrying out first calibration processing on the first camera according to the first calibration image to obtain a first calibration parameter corresponding to each aperture value of the first camera.
An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
sequentially acquiring different aperture values of a first camera, and shooting a three-dimensional calibration plate by the first camera according to the different aperture values to obtain a first calibration image corresponding to each aperture value;
and carrying out first calibration processing on the first camera according to the first calibration image to obtain a first calibration parameter corresponding to each aperture value of the first camera.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
sequentially acquiring different aperture values of a first camera, and shooting a three-dimensional calibration plate by the first camera according to the different aperture values to obtain a first calibration image corresponding to each aperture value;
and carrying out first calibration processing on the first camera according to the first calibration image to obtain a first calibration parameter corresponding to each aperture value of the first camera.
According to the camera calibration method, the camera calibration device, the electronic equipment and the computer readable storage medium, different aperture values of the first camera are sequentially obtained, the three-dimensional calibration plate is shot through the first camera by using the different aperture values, a first calibration image corresponding to each aperture value is obtained, and first calibration processing is carried out on the first camera according to the first calibration image, so that first calibration parameters corresponding to each aperture value of the first camera are obtained. The three-dimensional calibration plate can be shot by the camera according to different aperture values, calibration processing is carried out according to the obtained calibration image corresponding to each aperture value, calibration parameters corresponding to the camera under different aperture values are obtained, and the calibration accuracy of the camera can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an application environment for a camera calibration method in one embodiment;
FIG. 2 is a flow diagram of a camera calibration method in one embodiment;
FIG. 3 is a flow chart of capturing with a first camera in one embodiment;
FIG. 4 is a flow chart of a camera calibration method in another embodiment;
FIG. 5 is a flow diagram of a camera calibration method in one embodiment;
FIG. 6 is a flow chart of a camera calibration method in another embodiment;
FIG. 7 is a flow chart of a camera calibration method in yet another embodiment;
FIG. 8 is a block diagram showing the structure of a camera calibration apparatus according to an embodiment;
FIG. 9 is a block diagram showing an internal configuration of an electronic apparatus according to an embodiment;
FIG. 10 is a schematic diagram of an image processing circuit in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first camera may be referred to as a second camera, and similarly, a second camera may be referred to as a first camera, without departing from the scope of the present application. The first camera and the second camera are both cameras, but they are not the same camera.
Fig. 1 is a schematic diagram of an application environment of the camera calibration method in one embodiment. As shown in fig. 1, the application environment includes an electronic device 110 and a three-dimensional calibration board 120. The three-dimensional calibration plate (chart) 120 may include at least three calibration surfaces thereon, each calibration surface carrying a chart image. The electronic device 110 may sequentially obtain different aperture values of the first camera, capture the three-dimensional calibration plate 120 with different aperture values through the first camera, obtain a first calibration image corresponding to each aperture value, and perform calibration processing on the first camera according to the first calibration image, to obtain a first calibration parameter corresponding to each aperture value of the first camera. The first calibration parameter is used for correcting the image acquired by the first camera.
Fig. 2 is a flow diagram of a camera calibration method in one embodiment. The camera calibration method in the present embodiment is described by taking the electronic device in fig. 1 as an example. As shown in fig. 2, the camera calibration method includes steps 202 to 204.
The first camera can be a front camera or a rear camera. The first camera may also be one of a plurality of cameras included with the electronic device. Specifically, the first camera is a camera that can perform shooting with different aperture values. The aperture value is a relative value of the focal length and the light transmission diameter of the camera. The aperture of the camera is a device for controlling the amount of light entering a light sensing surface in the camera, and the size of the aperture can be expressed by an aperture value. The larger the aperture value is, the smaller the light transmission diameter, i.e., the aperture is, the smaller the light input amount per unit time is; conversely, the smaller the aperture value, the larger the light transmission diameter, i.e., the aperture, and the larger the amount of light entering per unit time. The first camera is a camera having a plurality of aperture values so that photographing can be performed with different aperture values. The three-dimensional calibration plate refers to a three-dimensional figure with an image array with fixed spacing. In particular, the three-dimensional calibration plate may comprise at least three calibration faces. When the electronic equipment calibrates the first camera, at least three different calibration pictures are needed, so that the electronic equipment can shoot the three-dimensional calibration plate through the first camera with different aperture values, thereby obtaining a first calibration image corresponding to each aperture value, wherein the first calibration image comprises three different calibration graphs.
The electronic equipment can acquire different aperture values of the first camera in sequence, and the three-dimensional calibration plate is shot by the first camera according to different aperture values to obtain a first calibration image corresponding to each aperture value.
And 204, performing first calibration processing on the first camera according to the first calibration image to obtain a first calibration parameter corresponding to each aperture value of the first camera.
The calibration processing refers to the operation of solving parameters in a geometric model imaged by the camera, and the shot image can restore an object in a space through the geometric model imaged by the camera. The first calibration processing refers to an operation of performing calibration processing on the first camera. The calibration parameters refer to camera parameters obtained after the camera is calibrated, and the camera parameters can be used for correcting images acquired by the camera, so that the corrected images can restore objects in the space. Specifically, the calibration parameters may include an internal parameter, an external parameter, a distortion coefficient, and the like. The first calibration parameter is the calibration parameter corresponding to the first camera.
The electronic device performs a first calibration process on the first camera according to the first calibration image, and specifically, the electronic device may perform the calibration process on the first camera by using a conventional camera calibration method, a camera self-calibration method, a calibration method for a friend who is between the conventional calibration method and the self-calibration method, and the like, so as to obtain a first calibration parameter corresponding to the first camera. For example, when the electronic device acquires images with different aperture values by obtaining a first camera, where a first calibration image corresponding to a first aperture value is a first calibration image a, and a first calibration image corresponding to a second aperture value is a first calibration image B, the electronic device may perform first calibration processing according to the first calibration image a to obtain a first calibration parameter corresponding to the first camera at the first aperture value, and perform first calibration processing according to the first calibration image B to obtain a first calibration parameter corresponding to the first camera at the second aperture value; therefore, in the practical application process, the electronic device can select the corresponding first calibration parameter to process the image according to the aperture value adopted by the first camera.
In the embodiment of the application, through obtaining the different aperture values of first camera in proper order, shoot three-dimensional calibration board with different aperture values through first camera, obtain the first demarcation image that corresponds with each aperture value, mark the processing according to first demarcation image to first camera, obtain the first demarcation parameter that first camera corresponds under each aperture value, avoid the camera that has a plurality of aperture values to only do once and mark the processing, improved the accuracy that the camera was markd. Furthermore, in the using process of the first camera, the corresponding first calibration parameter can be obtained according to the adopted aperture value to process the image, and the accuracy of image processing can be improved.
As shown in fig. 3, in an embodiment, a camera calibration method is provided, in which different aperture values of a first camera are sequentially obtained, and a process of shooting a three-dimensional calibration plate with different aperture values by the first camera may include steps 302 to 306, where:
The aperture value of the first camera typically has a corresponding adjustment range. The minimum aperture value is the aperture value when the light transmission diameter of the first camera is maximum; the maximum aperture value is the aperture value when the light transmission diameter of the first camera is the minimum. The electronic device may acquire a minimum aperture value and a maximum aperture value of the first camera.
And step 304, determining a target aperture value according to the minimum aperture value and the maximum aperture value.
The target aperture value is an aperture value corresponding to a calibration image for performing calibration processing on the camera. The electronic equipment determines a target aperture value according to the minimum aperture value and the maximum aperture value, and specifically, the electronic equipment can obtain an aperture value as the target aperture value every other preset aperture difference value from the minimum aperture value; the electronic equipment can also obtain an aperture value as a target aperture value every preset number of aperture values from the minimum aperture value; the electronic device may further directly obtain, according to the preset aperture value, an aperture value that is the same as the preset aperture value among the minimum aperture value and the maximum aperture value as the target aperture value, and the like, which is not limited thereto, wherein the preset aperture difference value, the preset number, and the preset aperture value may be set according to the actual application requirement, and are not limited herein. For example, when the preset aperture difference value is 3, the minimum aperture value of the first camera is 3, and the maximum aperture value of the first camera is 9, the electronic apparatus may acquire one aperture value as the target aperture value every 3 preset aperture difference values from the minimum aperture value of 3, and the target aperture values are 3, 6, and 9.
And step 306, shooting the three-dimensional calibration plate by the first camera according to different target aperture values.
After the electronic equipment determines the target aperture value according to the minimum aperture value and the maximum aperture value, the target aperture value of the first camera can be obtained, the three-dimensional calibration plate is shot by the first camera according to different target aperture values, and first calibration images corresponding to each target aperture of the first camera are obtained.
The minimum aperture value and the maximum aperture value of the first camera are obtained, the target aperture value is determined according to the minimum aperture value and the maximum aperture value, the three-dimensional calibration plate is shot by the first camera through different target aperture values, so that a first calibration image corresponding to each target aperture value of the first camera can be obtained, the first camera is calibrated, the shooting of the calibration image at each aperture value of the first camera is avoided, and the efficiency of calibration image acquisition and calibration processing can be improved.
In one embodiment, when the electronic device photographs the three-dimensional calibration plate with different target aperture values through the first camera, the electronic device may further obtain a photographing focus corresponding to the three-dimensional calibration plate, focus the photographing focus through the first camera under different target aperture values, and acquire the first calibration image according to the target aperture value after focusing.
The shooting focus refers to the sharpest point in the shot image. The electronic equipment can obtain a shooting focus corresponding to the three-dimensional calibration plate, so that after focusing is carried out according to the shooting focus, patterns of the three-dimensional calibration plate can be clearly displayed in a shot calibration image. Focusing is a process of making a shot object image clearly by adjusting the distance between an imaging device and a shooting focus in electronic equipment. The electronic device focuses the shooting focus, and specifically, the focusing may be performed by laser focusing, phase focusing, contrast focusing, or the like, but the focusing method is not limited thereto. In one embodiment, the first camera performs focusing processing on the shooting focus in an automatic focusing mode, and shoots the three-dimensional calibration plate with different target aperture values by adopting the same exposure time after focusing to obtain a first calibration image. Therefore, the focus and the exposure time of the first calibration image corresponding to each aperture value can be ensured to be the same, and the accuracy of the calibration image can be improved.
As shown in fig. 4, in one embodiment, the provided camera calibration method may further include steps 402 to 406. Wherein:
and 402, acquiring a collection aperture value of the first camera when the initial image is collected by the first camera.
The initial image is an image which is acquired by the first camera and is not corrected through calibration parameters. And acquiring the aperture value, namely the aperture value corresponding to the initial image. The method comprises the steps that when the electronic equipment collects an initial image through a first camera, a collection aperture value of the first camera is obtained; the electronic device can also directly acquire the acquisition aperture value corresponding to the initial image.
In one embodiment, the electronic device may further acquire a target application program initiating a capture instruction for capturing the initial image when the initial image is captured by the first camera, and acquire a capture aperture value of the first camera when it is determined that the target application program belongs to the first type of application program.
An application refers to a computer program that can accomplish certain tasks. Specifically, the application program has a function of calling a camera to acquire an image. For example, the Instagram may capture an image through a camera, the WeChat may capture an image through a camera, or scan a two-dimensional code image, the payment application, or the lock screen application may capture a face image through a camera for recognition, and the like, but are not limited thereto. The acquisition instruction can be generated by clicking a button on the display screen by a user, or generated by pressing a control on the touch screen by the user, and the like, and when the electronic device acquires the initial image through the first camera, the electronic device acquires a target application program initiating the acquisition instruction for acquiring the initial image. The electronic device may classify the application, and specifically, the electronic device may classify the application according to a requirement for image accuracy, a requirement for image processing speed, and the like. The first type of application may be an application that requires a higher image accuracy or a lower image processing speed. The electronic device may determine whether the target application program belongs to a first type of application program when the target application program corresponding to the acquisition instruction is acquired, and acquire the acquisition aperture value of the first camera when the target application program belongs to the first type of application program.
And step 404, acquiring corresponding first target calibration parameters from the corresponding first calibration parameters of the first camera under each aperture value according to the acquired aperture value.
The electronic device performs first calibration processing on the first camera according to the first calibration image corresponding to each aperture value to obtain a first calibration parameter corresponding to the first camera at each aperture value, and then the electronic device may obtain a corresponding first target calibration parameter from the first calibration parameter corresponding to each aperture value according to the acquired aperture value. In one embodiment, when there is no first calibration parameter corresponding to the collected aperture value, the electronic device may acquire the first calibration parameter corresponding to the aperture value closest to the collected aperture value as the first target calibration parameter.
And step 406, correcting the initial image according to the first target calibration parameter, and outputting the obtained target image.
The electronic device corrects the initial image according to the first target calibration parameter, and specifically, the electronic device may correct the initial image according to an internal parameter, an external parameter, or a distortion coefficient of the first camera in the first calibration parameter, and obtain a target image obtained after the correction.
The acquisition aperture value when the initial image is acquired by the first camera is acquired, the corresponding first target calibration parameter is acquired according to the acquisition aperture value, the initial image is corrected to obtain the target image, the accuracy of the target image can be improved, the influence on the definition and the like of the image is avoided when the initial image is processed by adopting the unified calibration parameter, and the image processing effect is optimized.
In one embodiment, the provided camera calibration method may further include: and when the target application program is judged to belong to the second type of application program, acquiring a preset second target calibration parameter, correcting the initial image according to the second target calibration parameter, and outputting the obtained target image.
The camera usually has a default aperture value when in actual application, and when just starting the camera, the camera collects images through the default aperture value. The preset second target calibration parameter is a calibration parameter corresponding to the default aperture value. The electronic device may categorize applications that capture images according to a default aperture value as a second type of application. The electronic device may also classify applications that require less accuracy in image processing or more speed in image processing as a second class of applications. When the target application program belongs to the first type of application program, the electronic equipment acquires a first target calibration parameter corresponding to the acquired aperture value, and corrects the initial image according to the first target calibration parameter; and when the target application program is judged to belong to the second type of application program, the electronic equipment corrects the initial image according to a preset second target calibration parameter and outputs the obtained target image.
The electronic equipment judges the classification of the target application program according to the target application program initiating the acquisition instruction, so that the corresponding calibration parameters are obtained to correct the initial image, and when the target application program belongs to the second type of application program, the preset second target calibration parameters are directly adopted to process the initial image, so that the image processing efficiency can be improved.
As shown in fig. 5, in an embodiment, the provided camera calibration method may further include a process of calibrating the second camera, specifically including:
The second camera may form a dual camera with the first camera. The second camera may be a color camera, a black and white camera, a telephoto camera, a depth camera, or the like, but is not limited thereto. The electronic equipment can shoot the three-dimensional calibration plate through the second camera after acquiring the aperture value of the first camera each time, and particularly, the electronic equipment can shoot the three-dimensional calibration plate through the first camera and the second camera at the same time, so that a first calibration image corresponding to the first camera and a second calibration image corresponding to the second camera under each aperture value are obtained.
And step 504, performing second calibration processing on the second camera according to the second calibration image to obtain a second calibration parameter corresponding to each aperture value of the second camera.
The second calibration parameter is the calibration parameter corresponding to the second camera. The second calibration parameters may include internal parameters, external parameters, distortion coefficients, and the like of the second camera. The electronic device may perform second calibration processing on the second camera according to the second calibration image corresponding to each aperture value, so as to obtain a second calibration parameter corresponding to each aperture value of the second camera.
As shown in fig. 6, in one embodiment, the provided camera calibration method may further include steps 602 to 606. Wherein:
And step 604, performing second calibration processing on the second camera according to the second calibration image to obtain a second calibration parameter corresponding to each aperture value of the second camera.
The relative calibration parameter is a parameter for indicating a relative distance between the first camera and the second camera. Specifically, the relative calibration parameter may be an external parameter between the first camera and the second camera. The relative calibration parameters comprise a rotation matrix and a translation matrix between the first camera and the second camera. The electronic device calculates the relative calibration parameters according to the first calibration parameters and the second calibration parameters, and specifically, the electronic device may calculate the relative calibration parameters according to the internal reference and the external reference of the first camera in the first calibration parameters corresponding to each aperture value and the internal reference and the external reference of the second camera in the second calibration parameters corresponding to each aperture value. By calculating the relative calibration parameters according to the first calibration parameters and the second calibration parameters, the electronic device can obtain the relative calibration parameters corresponding to each aperture value, and the calibration accuracy of the dual-camera can be improved. Furthermore, in the using process of the first camera and the second camera, the electronic device can obtain the corresponding first target calibration parameter, the second target calibration parameter and the target relative calibration parameter according to the acquired aperture value adopted by the first camera, so that the image is processed, and the accuracy of image processing can be improved.
Fig. 7 is a flow chart of a camera calibration method in one embodiment. Taking two aperture values (a first target aperture value and a second target aperture value) of a first camera as an example, the camera calibration method includes:
and step 702, setting the shooting modes of the first camera and the second camera as automatic focusing and fixed exposure time.
And step 704, shooting at the first target aperture by the first camera and the second camera simultaneously. The electronic equipment acquires a first target aperture value of the first camera, and the three-dimensional calibration plate is shot by the first camera and the second camera through the first target aperture value.
And step 706, shooting at a second target aperture value by the first camera and the second camera at the same time. The electronic equipment acquires a second target aperture value of the first camera, and the three-dimensional calibration plate is shot by the first camera and the second camera through the second target aperture value.
And step 710, acquiring a calibration image shot by the second target aperture value for calibration processing. The electronic equipment obtains a first calibration image corresponding to the first camera under the second target aperture value and a second calibration image corresponding to the second camera, calculates a first calibration parameter of the first camera under the second target aperture value according to the first calibration image, calculates a second calibration parameter of the second camera under the second target aperture value according to the second calibration image, and further calculates a relative calibration parameter of the first camera and the second camera under the second target aperture value according to the first calibration parameter and the second calibration parameter.
And 712, storing the calibration parameters corresponding to each aperture value. And the electronic equipment stores the first calibration parameter, the second calibration parameter and the relative calibration parameter corresponding to the first target aperture value and the second target aperture value respectively.
The three-dimensional calibration plate is shot by the first camera and the second camera at different target aperture values simultaneously to obtain a first calibration image corresponding to the first camera and a second calibration image corresponding to the second camera under each aperture value, so that the first camera and the second camera are calibrated according to the first calibration image and the second calibration image to obtain a first calibration parameter, a second calibration parameter and a relative calibration parameter corresponding to each aperture value, and the calibration accuracy of the double cameras can be improved.
It should be understood that although the various steps in the flow charts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Fig. 8 is a block diagram of a camera calibration apparatus according to an embodiment. As shown in fig. 8, the camera calibration device includes an image capturing module 802 and a calibration processing module 804, wherein:
the image shooting module 802 is configured to sequentially obtain different aperture values of the first camera, and shoot the three-dimensional calibration plate with the different aperture values through the first camera to obtain a first calibration image corresponding to each aperture value;
the calibration processing module 804 is configured to perform first calibration processing on the first camera according to the first calibration image, so as to obtain a first calibration parameter corresponding to each aperture value of the first camera.
The camera calibration device provided by the embodiment of the application is used for acquiring different aperture values of the first camera in sequence, shooting the three-dimensional calibration plate through the first camera by using different aperture values, obtaining a first calibration image corresponding to each aperture value, performing first calibration processing on the first camera according to the first calibration image, obtaining a first calibration parameter corresponding to the first camera under each aperture value, and improving the calibration accuracy of the camera.
In one embodiment, the image capturing module 802 may be further configured to obtain a minimum aperture value and a maximum aperture value of the first camera; determining a target aperture value according to the minimum aperture value and the maximum aperture value; and shooting the three-dimensional calibration plate by the first camera according to different target aperture values.
In one embodiment, the image capture module 802 may also be configured to obtain a capture focus corresponding to the three-dimensional calibration plate; and focusing the shooting focus through the first camera under different target aperture values, and acquiring a first calibration image according to the target aperture value after focusing.
In an embodiment, the provided camera calibration apparatus may further include an image processing module 806, where the image processing module 806 is configured to obtain a collection aperture value of the first camera when the initial image is collected by the first camera; acquiring corresponding first target calibration parameters from corresponding first calibration parameters of the first camera under each aperture value according to the acquired aperture values; and correcting the initial image according to the first target calibration parameter, and outputting the obtained target image.
In one embodiment, the image processing module 806 may be further configured to, when an initial image is captured by the first camera, obtain a target application program that initiates a capture instruction to capture the initial image; when the target application program is judged to belong to the first type of application program, acquiring a collection aperture value of a first camera; acquiring corresponding first target calibration parameters from corresponding first calibration parameters of the first camera under each aperture value according to the acquired aperture values; and correcting the initial image according to the first target calibration parameter, and outputting the obtained target image.
In an embodiment, the image processing module 806 may be further configured to, when it is determined that the target application program belongs to the second type of application program, obtain a preset second target calibration parameter, perform correction processing on the initial image according to the second target calibration parameter, and output the obtained target image.
In an embodiment, the calibration processing module 804 may be further configured to capture a three-dimensional calibration plate through a second camera after acquiring an aperture value of the first camera each time, so as to obtain a second calibration image corresponding to the second camera; and carrying out second calibration processing on the second camera according to the second calibration image to obtain a second calibration parameter corresponding to each aperture value of the second camera.
In one embodiment, the calibration processing module 804 may be further configured to calculate a relative calibration parameter according to the first calibration parameter and the second calibration parameter, where the relative calibration parameter is used to represent a relative distance between the first camera and the second camera.
The division of the modules in the camera calibration device is merely used for illustration, and in other embodiments, the camera calibration device may be divided into different modules as needed to complete all or part of the functions of the camera calibration device.
Fig. 9 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 8, the electronic device includes a processor and a memory connected by a system bus. The electronic device also includes one or more cameras wherein the processor is configured to provide computing and control capabilities to support the operation of the entire electronic device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program is executable by a processor for implementing a camera calibration method provided in the following embodiments. The internal memory provides a cached execution environment for the operating system computer programs in the non-volatile storage medium. The electronic device may be a mobile phone, a tablet computer, or a personal digital assistant or a wearable device, etc.
The implementation of each module in the camera-calibration apparatus provided in the embodiments of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program modules constituted by the computer program may be stored on the memory of the terminal or the server. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides the electronic equipment. The electronic device includes therein an Image Processing circuit, which may be implemented using hardware and/or software components, and may include various Processing units defining an ISP (Image Signal Processing) pipeline. FIG. 10 is a schematic diagram of an image processing circuit in one embodiment. As shown in fig. 10, for convenience of explanation, only aspects of the image processing technology related to the embodiments of the present application are shown.
As shown in fig. 10, the image processing circuit includes an ISP processor 1040 and control logic 1050. The image data captured by the imaging device 1010 is first processed by the ISP processor 1040, and the ISP processor 1040 analyzes the image data to capture image statistics that may be used to determine and/or control one or more parameters of the imaging device 1010. The imaging device 1010 may include a camera having one or more lenses 1012 and an image sensor 1014. The image sensor 1014 may include an array of color filters (e.g., Bayer filters), and the image sensor 1014 may acquire light intensity and wavelength information captured with each imaging pixel of the image sensor 1014 and provide a set of raw image data that may be processed by the ISP processor 1040. The sensor 1020 (e.g., a gyroscope) may provide parameters of the acquired image processing (e.g., anti-shake parameters) to the ISP processor 1040 based on the type of sensor 1020 interface. The sensor 1020 interface may utilize an SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above.
In addition, the image sensor 1014 may also send raw image data to the sensor 1020, the sensor 1020 may provide the raw image data to the ISP processor 1040 based on the type of interface of the sensor 1020, or the sensor 1020 may store the raw image data in the image memory 1030.
The ISP processor 1040 processes the raw image data pixel by pixel in a variety of formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and ISP processor 1040 may perform one or more image processing operations on the raw image data, gathering statistical information about the image data. Wherein the image processing operations may be performed with the same or different bit depth precision.
Upon receiving raw image data from image sensor 1014 interface or from sensor 1020 interface or from image memory 1030, ISP processor 1040 may perform one or more image processing operations, such as temporal filtering. The processed image data may be sent to image memory 1030 for additional processing before being displayed. ISP processor 1040 receives processed data from image memory 1030 and performs image data processing on the processed data in the raw domain and in the RGB and YCbCr color spaces. The image data processed by ISP processor 1040 may be output to display 1070 for viewing by a user and/or further processed by a Graphics Processing Unit (GPU). Further, the output of ISP processor 1040 may also be sent to image memory 1030, and display 1070 may read image data from image memory 1030. In one embodiment, image memory 1030 may be configured to implement one or more frame buffers. Further, the output of the ISP processor 1040 may be transmitted to the encoder/decoder 1060 for encoding/decoding the image data. The encoded image data may be saved and decompressed before being displayed on a display 1070 device. The encoder/decoder 1060 may be implemented by a CPU or GPU or coprocessor.
The statistics determined by the ISP processor 1040 may be sent to the control logic 1050 unit. For example, the statistical data may include image sensor 1014 statistics such as auto-exposure, auto-white balance, auto-focus, flicker detection, black level compensation, lens 1012 shading correction, and the like. Control logic 1050 may include a processor and/or microcontroller that executes one or more routines (e.g., firmware) that may determine control parameters of imaging device 1010 and ISP processor 1040 based on the received statistical data. For example, the control parameters of the imaging device 1010 may include sensor 1020 control parameters (e.g., gain, integration time for exposure control, anti-shake parameters, etc.), camera flash control parameters, lens 1012 control parameters (e.g., focal length for focusing or zooming), or a combination of these parameters. The ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (e.g., during RGB processing), and lens 1012 shading correction parameters.
In the embodiment of the present application, the above-described camera calibration method can be implemented by using the image processing technique in fig. 10. The image processing circuitry as shown in fig. 10 may include one or more imaging devices.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the camera calibration method.
A computer program product comprising instructions which, when run on a computer, cause the computer to perform a camera calibration method.
Any reference to memory, storage, database, or other medium used by embodiments of the present application may include non-volatile and/or volatile memory. Suitable non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811452669.9A CN109559352B (en) | 2018-11-30 | 2018-11-30 | Camera calibration method, apparatus, electronic device and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811452669.9A CN109559352B (en) | 2018-11-30 | 2018-11-30 | Camera calibration method, apparatus, electronic device and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109559352A CN109559352A (en) | 2019-04-02 |
CN109559352B true CN109559352B (en) | 2021-04-23 |
Family
ID=65868292
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811452669.9A Active CN109559352B (en) | 2018-11-30 | 2018-11-30 | Camera calibration method, apparatus, electronic device and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109559352B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110264524B (en) * | 2019-05-24 | 2023-07-21 | 联想(上海)信息技术有限公司 | Calibration method, device, system and storage medium |
CN110675458B (en) * | 2019-10-08 | 2023-03-31 | Oppo广东移动通信有限公司 | Method and device for calibrating camera and storage medium |
CN115482291B (en) * | 2022-03-31 | 2023-09-29 | 华为技术有限公司 | Calibration methods, calibration systems, shooting methods, electronic equipment and storage media |
CN115937332B (en) * | 2023-03-09 | 2023-08-15 | 江西明天高科技股份有限公司 | Multi-camera quick calibration method and three-dimensional calibration object |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101447073A (en) * | 2007-11-26 | 2009-06-03 | 新奥特(北京)视频技术有限公司 | Zoom lens calibration method |
CN106131408A (en) * | 2016-07-11 | 2016-11-16 | 深圳市金立通信设备有限公司 | A kind of image processing method and terminal |
CN107566720A (en) * | 2017-08-25 | 2018-01-09 | 维沃移动通信有限公司 | A kind of method and mobile terminal of the calibration value for updating mobile terminal |
CN107958469A (en) * | 2017-12-28 | 2018-04-24 | 北京安云世纪科技有限公司 | A kind of scaling method of dual camera, device, system and mobile terminal |
CN108055471A (en) * | 2017-11-16 | 2018-05-18 | 深圳市维海德技术股份有限公司 | A kind of iris correction method and device |
CN108881736A (en) * | 2018-06-30 | 2018-11-23 | 浙江大华技术股份有限公司 | A kind of iris correction method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7620316B2 (en) * | 2005-11-28 | 2009-11-17 | Navisense | Method and device for touchless control of a camera |
-
2018
- 2018-11-30 CN CN201811452669.9A patent/CN109559352B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101447073A (en) * | 2007-11-26 | 2009-06-03 | 新奥特(北京)视频技术有限公司 | Zoom lens calibration method |
CN106131408A (en) * | 2016-07-11 | 2016-11-16 | 深圳市金立通信设备有限公司 | A kind of image processing method and terminal |
CN107566720A (en) * | 2017-08-25 | 2018-01-09 | 维沃移动通信有限公司 | A kind of method and mobile terminal of the calibration value for updating mobile terminal |
CN108055471A (en) * | 2017-11-16 | 2018-05-18 | 深圳市维海德技术股份有限公司 | A kind of iris correction method and device |
CN107958469A (en) * | 2017-12-28 | 2018-04-24 | 北京安云世纪科技有限公司 | A kind of scaling method of dual camera, device, system and mobile terminal |
CN108881736A (en) * | 2018-06-30 | 2018-11-23 | 浙江大华技术股份有限公司 | A kind of iris correction method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109559352A (en) | 2019-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109767467B (en) | Image processing method, apparatus, electronic device, and computer-readable storage medium | |
CN107948519B (en) | Image processing method, device and equipment | |
CN111246089B (en) | Jitter compensation method and apparatus, electronic device, computer-readable storage medium | |
CN109712192B (en) | Camera module calibration method and device, electronic equipment and computer readable storage medium | |
CN108055452B (en) | Image processing method, device and equipment | |
CN108024054B (en) | Image processing method, device, device and storage medium | |
CN109685853B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN109600548B (en) | Image processing method and apparatus, electronic device, computer-readable storage medium | |
CN109598764B (en) | Camera calibration method and apparatus, electronic device, computer-readable storage medium | |
CN109963080B (en) | Image acquisition method, device, electronic device and computer storage medium | |
CN110290323B (en) | Image processing method, apparatus, electronic device, and computer-readable storage medium | |
CN107948500A (en) | Image processing method and device | |
CN109559352B (en) | Camera calibration method, apparatus, electronic device and computer-readable storage medium | |
CN110475067B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
CN109584312B (en) | Camera calibration method, apparatus, electronic device and computer-readable storage medium | |
CN111246100B (en) | Anti-shake parameter calibration method and device and electronic equipment | |
CN112004029B (en) | Exposure processing method, exposure processing device, electronic apparatus, and computer-readable storage medium | |
CN110266966A (en) | Image generation method and device, electronic equipment and computer readable storage medium | |
CN109559353B (en) | Camera module calibration method, device, electronic device, and computer-readable storage medium | |
CN110177212B (en) | Image processing method and apparatus, electronic device, computer-readable storage medium | |
CN109660718B (en) | Image processing method and apparatus, electronic device, computer-readable storage medium | |
CN109671028B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
CN109584311B (en) | Camera calibration method, apparatus, electronic device and computer-readable storage medium | |
CN109697737B (en) | Camera calibration method, apparatus, electronic device and computer-readable storage medium | |
CN110233969B (en) | Image processing method and device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |