Calibration Method, Device, Equipment and Medium for Multi-Camera Module
The method of determining and adjusting camera angles in a multi-camera setup addresses the calibration challenge, achieving accurate and efficient alignment of camera axes for improved system performance.
Patent Information
- Application Number
- CN202210470759.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-04-28
AI Technical Summary
The prior art cannot effectively calibrate the angle between multi-camera modules, affecting the quality of the module.
By determining the first distance between the reference camera and the calibration template, the center mark of the reference camera coincides with the center mark of the calibration template, and rotating the target camera within the preset rotation accuracy range, the deflection angle of the target camera relative to the reference camera is calculated.
It realizes fast and accurate calibration of multi-camera modules, ensures that the camera optical axis angle is within the appropriate range, and improves the module quality.
Smart Images

Figure CN114742902B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photographing, and in particular, to a calibration method, device, equipment and medium for a multi-camera module. Background Art
[0002] With the rise of the Internet of Things (IOT) industry, people's demand for intelligent electronic devices is getting higher and higher. Intelligent electronic devices generally include multi-camera modules, so the market demand for multi-camera modules has also generally increased. A multi-camera module is generally a combination of multiple camera modules through a certain structure. However, there is an image plane angle between any two camera modules in the assembled multiple camera modules. The image plane angle refers to the angle between the optical axes of any two camera modules. This angle needs to be kept within a certain range, otherwise it will affect the quality of the multi-camera module. At present, the prior art is still unable to calibrate the angle between multi-camera modules.
[0003] Therefore, how to achieve the calibration of multi-camera modules is a technical problem that needs to be solved urgently at present. Summary of the Invention
[0004] By providing a calibration method for a multi-camera module in an embodiment of the present application, the rapid and accurate calibration of a multi-camera module can be achieved.
[0005] On the one hand, the present application provides a calibration method for a multi-camera module through an embodiment of the present application. The multi-camera module includes a reference camera and m offset cameras. There is an angle between the imaging optical axis of each offset camera and the imaging optical axis of the reference camera, and m is a positive integer. The method includes:
[0006] Determine a first distance between the reference camera and a pre-configured calibration template, where at the first distance, the center marking line of the preview image collected by the reference camera coincides with the center marking line of the calibration template in the preview image;
[0007] Rotate the target camera within a preset rotation accuracy range, and determine a second distance between the center marking line of the preview image collected by the rotated target camera and the center marking line of the calibration template in the preview image. The target camera is one of the m offset cameras;
[0008] Calculate the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance.
[0009] Optionally, the determining the first distance between the reference camera and the pre-configured calibration template includes:
[0010] Adjust the distance between the reference camera and the pre-configured calibration template so that the center line of the preview image captured by the adjusted reference camera coincides with the center line of the calibration template in the preview image, and record the current first distance between the reference camera and the calibration template.
[0011] Optionally, rotating the target camera within a preset rotation accuracy range includes:
[0012] Rotate the target camera so that the center line of the preview image captured by the rotated target camera and the center line of the calibration template in the preview image are on the same straight line.
[0013] Optionally, rotating the target camera within a preset rotation accuracy range includes:
[0014] Rotate the target camera according to a target angle, where the target angle is the angle between the imaging optical axis of the target camera and the imaging optical axis of the reference camera at the initial time.
[0015] Optionally, calculating the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance includes:
[0016] Calculate the tangent value of the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance;
[0017] Calculate the deflection angle of the target camera relative to the reference camera according to the calculated tangent value.
[0018] Optionally, the method further includes:
[0019] Adjust the target camera according to the deflection angle to adjust the position of the target camera relative to the reference camera.
[0020] Optionally, the reference camera is arranged at the central position of all cameras in the multi-camera module.
[0021] Optionally, the m offset cameras include a first offset camera and a second offset camera arranged on the left and right sides of the reference camera, and the imaging optical axes of the first offset camera and the second offset camera respectively have the same angle with the imaging optical axis of the reference camera.
[0022] On the other hand, an embodiment of the present application provides a calibration device for a multi-camera module. The multi-camera module includes a reference camera and m offset cameras, where there is an angle between the imaging optical axis of each offset camera and the imaging optical axis of the reference camera, and m is a positive integer. The device includes: a determination module, a rotation module, and a calculation module, where:
[0023] The determination module is configured to determine a first distance between the reference camera and a pre-configured calibration template, where at the first distance, the center mark line of the preview image collected by the reference camera coincides with the center mark line of the calibration template in the preview image;
[0024] The rotation module is configured to rotate a target camera within a preset rotation accuracy range and determine a second distance between the center mark line of the preview image collected by the rotated target camera and the center mark line of the calibration template in the preview image. The target camera is one of the m offset cameras;
[0025] The calculation module is configured to calculate a deflection angle of the target camera relative to the reference camera according to the first distance and the second distance.
[0026] On the other hand, an embodiment of the present application provides a terminal device. The terminal device includes: a processor, a memory, a communication interface, and a bus; the processor, the memory, and the communication interface are connected through the bus and complete communication with each other; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory to execute the calibration method of the multi-camera module as described above.
[0027] On the other hand, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a program that executes the calibration method of the multi-camera module as described above when the program runs on a terminal device.
[0028] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: The present application determines a first distance between a reference camera in a multi-camera module and a pre-configured calibration template, where at the first distance, the center line of the preview image captured by the reference camera coincides with the center line of the calibration template in the preview image; rotates a target camera within a preset rotation accuracy range, and determines a second distance between the center line of the preview image captured by the rotated target camera and the center line of the calibration template in the preview image, where the target camera is a camera among m offset cameras; calculates a deflection angle of the target camera relative to the reference camera according to the first distance and the second distance. In the above solution, the present application obtains the first distance between the adjusted reference camera and the calibration template, and the second distance between the center line of the preview image captured by the adjusted target camera and the center line of the calibration template in the preview image, and then calculates the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance, that is, calibrates the included angle (deflection angle) between the imaging optical axis of the target camera and the imaging optical axis of the reference camera, thereby realizing the rapid and accurate calibration of the multi-camera module. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0030] Figure 1 FIG. is a schematic diagram of a scenario for calibrating a multi-camera module provided in an embodiment of the present application.
[0031] Figure 2 FIG. is a schematic diagram of a multi-camera module provided in an embodiment of the present application.
[0032] Figure 3 FIG. is a schematic flowchart of a method for calibrating a multi-camera module provided in an embodiment of the present application.
[0033] Figures 4(a)-4(c) FIG. is a schematic diagram of preview images captured by several different cameras provided in an embodiment of the present application.
[0034] Figure 5 FIG. is a schematic structural diagram of a calibration device for a multi-camera module provided in an embodiment of the present application.
[0035] Figure 6 FIG. is a schematic structural diagram of a terminal device provided in an embodiment of the present application. Detailed implementation mode
[0036] By providing a calibration method for a multi-camera module in an embodiment of the present application, rapid and accurate calibration of the multi-camera module can be achieved.
[0037] The technical solution of the embodiment of the present application is to solve the technical problem that the calibration of the multi-camera module cannot be achieved in the prior art. The general idea is as follows:
[0038] A calibration method for a multi-camera module, the multi-camera module includes a reference camera and m offset cameras, and there is an included angle between the imaging optical axis of each offset camera and the imaging optical axis of the reference camera, where m is a positive integer. The method includes:
[0039] Determine a first distance between the reference camera and a pre-configured calibration template, where at the first distance, the center marking line of the preview image collected by the reference camera coincides with the center marking line of the calibration template in the preview image;
[0040] Rotate the target camera within a preset rotation accuracy range, and determine a second distance between the center marking line of the preview image collected by the rotated target camera and the center marking line of the calibration template in the preview image, where the target camera is one of the m offset cameras;
[0041] Calculate the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance.
[0042] To better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the specification drawings and specific implementation manners.
[0043] First, it should be noted that the term "and / or" appearing in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0044] Figure 1 is a schematic diagram of a multi-camera calibration scenario provided by an embodiment of the present application. As Figure 1The schematic diagram of the shown scenario includes: a rotary table with a micrometer (which can also be simply referred to as a rotary micrometer) 100, a laser rangefinder 200, a calibration template 300, and a multi-camera module 400. Optionally, it also includes a jig 500 and a level (not shown in the figure). Among them, the multi-camera module 400 is fixedly installed on the rotary micrometer 100 through the jig 500. Specifically, the support shaft 600 on the jig 500 is fixed in the central hole 700 of the rotary micrometer 100. When the rotary micrometer 100 rotates, it can drive the jig 500 to rotate, thereby driving the multi-camera module 400 to rotate. In other words, in this application, operations such as rotation or adjustment of any camera in the multi-camera module 400 can be achieved by operating the rotary micrometer 100, and this application does not make any limitations.
[0045] The multi-camera module 400 may include multiple cameras. For example, it may include a reference camera and m offset cameras, where m is a positive integer defined by the system. The installation position of each offset camera has a certain position offset relative to the reference camera. In other words, there is a certain angle (which can also be called the optical axis angle) between the imaging optical axis of each offset camera and the imaging optical axis of the reference camera. These angles can be the same or different, and this application does not make any limitations. Among them, the imaging optical axis refers to the optical axis of the corresponding camera in the multi-camera module 400, simply referred to as the imaging optical axis. The imaging optical axes (which can also be called image plane optical axes) corresponding to the multiple cameras may intersect at a point. For example Figure 2 point O in, and at this time, the axis center of the rotary micrometer 100 is also point O. The distance between this axis center O and the multi-camera module 400 is E.
[0046] For example, please refer to Figure 2 which shows a schematic diagram of a possible multi-camera module. As Figure 2 shown, the multi-camera module 400 includes a total of 3 cameras, which are respectively shown as camera A, camera B, and camera C in the figure. Among them, camera B is the reference camera, and camera A and camera C are two offset cameras arranged on the left and right sides of the reference camera B respectively, and can also be respectively called the first offset camera A and the second offset camera C, etc., and this application does not make any limitations. The image plane optical axes of these three cameras intersect at a point O, and the distance between point O and the multi-camera module 400 is E. And as Figure 2 shown, there is the same angle, such as X°, between the mirror planes of camera A and camera C and the mirror plane of the reference camera B, where X is a value defined by the system settings, and this application does not make any limitations.
[0047] Understandably, in theory, the image plane optical axes of the three cameras, Camera A, Camera B, and Camera C, should intersect at a point O. If a circle is drawn with the intersection point O as the center, the left and right cameras, Camera A and Camera C respectively, rotate +X° to the right and -X° to the left. Specifically, the left camera, Camera A, rotates +X° to the right, and the right camera, Camera C, rotates -X° to the left, that is, Camera A rotates +X° and Camera C rotates -X°. After rotation, the respective mirror planes of Camera A and Camera C coincide with the mirror plane of Camera B.
[0048] Optionally, the reference camera can be installed at the central position of all the cameras included in the multi-camera module 400. In other words, the reference camera can be arranged at the central position of all the cameras in the multi-camera module 400. For example, Figure 2 as shown, the reference camera B is arranged at the central position of the three cameras in the multi-camera module 400.
[0049] The spirit level can be used to measure the installation angles of the components in the calibration scene to determine whether the components are installed flatly and compliant, etc. For example, after the multi-camera module 400 is installed on the rotary micrometer 100, the present invention can use the spirit level to measure the installation angle of the multi-camera module 400 relative to the rotary micrometer to determine whether the multi-camera module 400 is installed parallel to the rotary micrometer 100, that is, to determine whether the multi-camera module 400 is installed flatly, etc. The present application does not make any limitations.
[0050] The calibration template 300 is used to calibrate the multi-camera module 400. Specifically, there is a certain distance between the calibration template 300 and the multi-camera module 400. The multi-camera module 400 realizes its own calibration by previewing / capturing the calibration template 300. The specific implementation manner of the calibration will be described in detail in the following text of the present application and will not be elaborated here. The calibration template 300 can include, but is not limited to, for example, a cross chart or other calibration plates for calibration / testing.
[0051] The laser rangefinder 200 is used to measure distances. For example, it can measure the distance between the adjusted calibration template 300 and the multi-camera module 400 (specifically, any camera in the multi-camera module 400), etc. Understandably, during the installation / adjustment process of any camera in the multi-camera module 400, the present application can use any adjusted camera to preview / capture relevant images of the current environment, and the images include, but are not limited to, the calibration template and relevant objects or scenery in the environment.
[0052] Please refer to Figure 3 which is a schematic flowchart of a calibration method for a multi-camera module provided by an embodiment of the present application. As Figure 3 shown, the method is applied to Figure 1In the scene schematic diagram shown, the multi-camera module includes a reference camera and m offset cameras. There is an angle between the imaging optical axis of each offset camera and the imaging optical axis of the reference camera. The method includes the following implementation steps:
[0053] S301. Determine the first distance S1 between the reference camera and a pre-configured calibration template, where at the first distance S1, the center marking line of the preview image collected by the reference camera coincides with the center marking line of the calibration template in the preview image.
[0054] In this application, taking the reference camera as a reference, adjust the distance between the reference camera and the calibration template so that the center marking line of the preview image collected by the adjusted reference camera coincides with the center marking line of the calibration template in the preview image, and record the distance between the reference camera and the calibration template at this time as the first distance S1. Among them, the preview image is an image previewed by the adjusted reference camera, and this image at least includes the image area formed by the calibration template. For the content included in the preview image, reference can be made to the relevant introduction in the foregoing Figure 1 embodiments, which will not be elaborated here.
[0055] The center marking line in this application refers to a marker / marking object used to identify the center of the preview image or the calibration template in the preview image. Its specific manifestation forms can be, for example, a cross marking line, a small dot, etc., which are not limited in this application.
[0056] For example, referring to Figure 2 the example shown, in this application, taking the middle camera B as a reference, adjust the distance between camera B and the calibration template. Usually, at a test distance of about 1 meter, make the center marking line of the preview image collected by the adjusted camera B coincide with the center marking line of the calibration template and take a photo, and record the reading S1 of the laser rangefinder 200 at this time, which is the first distance S1.
[0057] S302. Rotate the target camera within a preset rotation accuracy range, and determine the second distance S2 between the center marking line of the preview image collected by the rotated target camera and the center marking line of the calibration template in the preview image. The target camera is a camera among the m offset cameras.
[0058] The rotation accuracy range in this application is an accuracy interval set by the system by itself, such as (X±0.5)°, etc., which are not limited in this application. The following introduces the specific implementation manner of step S302.
[0059] In a specific embodiment, the present application can rotate the target camera according to the target angle. For example, the target camera can be directly rotated in a preset direction (such as horizontally to the left or right) according to the target angle, or the target camera can be rotated within a preset rotation accuracy range (the target angle ±0.5°) according to the target angle, etc., which is not limited in the present application. Wherein, the target angle refers to the angle between the imaging optical axis of the target camera at the initial time (i.e., before rotation) and the imaging optical axis of the reference camera, such as Figure 2 X° in the example shown.
[0060] In a specific embodiment, the present application can rotate the target camera so that the central marking line of the preview image captured by the rotated target camera is on the same straight line as the central marking line of the calibration template in the preview image. The target camera can be any one or more cameras among the m offset cameras in the multi-camera module, which is not limited in the present application.
[0061] For example, referring to Figure 2 the above example, the present application takes the middle camera B as the reference and rotates camera A so that the central marking line of the preview image captured by the rotated camera A is on the same straight line as the central marking line of the calibration template in this preview image and takes a picture. Please refer to Figures 4(a)-4(c) FIG. 4 shows a schematic diagram of the preview images of the cameras in a possible adjusted multi-camera module. As shown in FIG. 4(a), the preview image of the adjusted camera B is shown. As shown in the figure, the central marking line of this preview image coincides with the central marking line of the calibration template (cross chart). As shown in FIG. 4(b), the preview image of the rotated camera A is shown. As shown in the figure, the central marking line of this preview image is above the central marking line of the calibration template, and they are all on the same straight line. As shown in FIG. 4(c), the preview image of the rotated camera C is shown. As shown in the figure, the central marking line of this preview image is below the central marking line of the calibration template, and they are all on the same straight line.
[0062] Optionally, after rotating camera A, the present invention can also read and obtain the horizontal rotation angle of the rotary table 100 with a micrometer, which is the horizontal rotation angle of camera A. Similarly, the present application can use the above rotation principle to rotate camera C to obtain the horizontal rotation angle of camera C.
[0063] It should be noted that the above two specific embodiments can be implemented separately or in combination, which is not limited in the present application. For example, the present application can rotate the target camera according to the target angle so that the central marking line of the preview image captured by the rotated target camera is on the same straight line as the central marking line of the calibration template in the preview image, and then the rotation can be ended, etc.
[0064] After rotating the target camera, the present application can further determine a second distance S2 between the center marking line of the preview image captured by the rotated target camera and the center marking line of the calibration template in the preview image. Specifically, the present application can perform image analysis on the preview image captured by the rotated target camera to obtain the second distance S2 therefrom. The specific implementation process of the image analysis is not limited in the present application. For example, an image recognition algorithm can be used for image analysis and the like.
[0065] S303. Calculate the deflection angle of the target camera relative to the reference camera according to the first distance S1 and the second distance S2.
[0066] In a specific embodiment, the present application can calculate the tangent value tanM of the deflection angle of the target camera relative to the reference camera according to the first distance S1 and the second distance S2. The specific calculation is shown in the following formula (1):
[0067]
[0068] Furthermore, the present application can calculate the deflection angle M of the target camera relative to the reference camera according to the calculated tangent value tanM, that is, M = arctanM.
[0069] Further optionally, the present application can adjust the target camera according to the calculated deflection angle M, thereby adjusting the position of the target camera relative to the reference camera. For example Figure 2 in the assumption that the deflection angle M of camera A is +(X + 1)°, the present application can adjust camera A to the right by (X + 1)° and the like.
[0070] By implementing the embodiments of the present application, the present application determines a first distance S1 between a reference camera in a multi-camera module and a pre-configured calibration template, where at the first distance S1, the center line of the preview image captured by the reference camera coincides with the center line of the calibration template in the preview image; rotates a target camera within a preset rotation accuracy range, and determines a second distance S2 between the center line of the preview image captured by the rotated target camera and the center line of the calibration template in the preview image, where the target camera is a camera among m offset cameras; and calculates a deflection angle of the target camera relative to the reference camera according to the first distance S1 and the second distance S2. In the above solution, the present application obtains the first distance S1 between the adjusted reference camera and the calibration template, and the second distance S2 between the center line of the preview image captured by the adjusted target camera and the center line of the calibration template in the preview image, and then calculates the deflection angle of the target camera relative to the reference camera according to the first distance S1 and the second distance S2, that is, calibrates the included angle (deflection angle) between the imaging optical axis of the target camera and the imaging optical axis of the reference camera, thereby realizing the rapid and accurate calibration of the multi-camera module.
[0071] Based on the same inventive concept, another embodiment of the present application provides a device and a terminal device corresponding to the method for calibrating the multi-camera module described in the embodiments of the present application.
[0072] Please refer to Figure 5 , which is a schematic structural diagram of a calibration device for a multi-camera module provided by an embodiment of the present application. As Figure 5 shown, the device 50 is applied to Figure 1 the multi-camera module shown, and the device 50 includes a determination module 501, a rotation module 502, and a calculation module 503, where:
[0073] The determination module 501 is configured to determine a first distance S1 between the reference camera and a pre-configured calibration template, where at the first distance S1, the center line of the preview image captured by the reference camera coincides with the center line of the calibration template in the preview image;
[0074] The rotation module 502 is configured to rotate the target camera within a preset rotation accuracy range, and determine a second distance S2 between the center line of the preview image captured by the rotated target camera and the center line of the calibration template in the preview image, where the target camera is a camera among m offset cameras;
[0075] The calculation module 503 is configured to calculate a deflection angle of the target camera relative to the reference camera according to the first distance S1 and the second distance S2.
[0076] Optionally, the determination module 501 is specifically configured to:
[0077] Adjust the distance between the reference camera and a pre-configured calibration template so that the center marking line of the preview image captured by the adjusted reference camera coincides with the center marking line of the calibration template in the preview image, and record the first distance S1 between the current reference camera and the calibration template.
[0078] Optionally, the rotation module 502 is specifically configured to:
[0079] Rotate the target camera according to a target angle, where the target angle is the angle between the imaging optical axis of the target camera and the imaging optical axis of the reference camera at the initial time.
[0080] Optionally, the calculation module 503 is specifically configured to:
[0081] Calculate the tangent value of the deflection angle of the target camera relative to the reference camera according to the first distance S1 and the second distance S2;
[0082] Calculate the deflection angle of the target camera relative to the reference camera according to the calculated tangent value.
[0083] Optionally, the device further includes an adjustment module 504, where:
[0084] The adjustment module 504 is configured to adjust the target camera according to the deflection angle to adjust the position of the target camera relative to the reference camera.
[0085] Optionally, the reference camera is arranged at the central position of all the cameras in the multi-camera module.
[0086] Optionally, the m offset cameras include a first offset camera and a second offset camera arranged on the left and right sides of the reference camera, and the imaging optical axes of the first offset camera and the second offset camera respectively have the same angle with the imaging optical axis of the reference camera.
[0087] Please refer to FIG. 6 together, which is a schematic structural diagram of a terminal device provided by an embodiment of the present application. As Figure 6The terminal device 60 shown includes: at least one processor 601, a communication interface 602, a user interface 603, and a memory 604. The processor 601, the communication interface 602, the user interface 603, and the memory 604 can be connected through a bus or other means. In the embodiments of the present invention, the connection through the bus 605 is taken as an example. The terminal device 60 further includes a multi-camera module (not shown in the figure). The multi-camera module includes a reference camera and m offset cameras. There is an angle between the imaging optical axis of each offset camera and the imaging optical axis of the reference camera, and m is a positive integer. Among them,
[0088] The processor 601 can be a general-purpose processor, such as a central processing unit (CPU).
[0089] The communication interface 602 can be a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless local area network interface) for communicating with other terminals or websites. In the embodiments of the present invention, the communication interface 602 is specifically used to obtain information such as images or distances.
[0090] The user interface 603 can specifically be a touch panel, including a touch screen and a touch screen, for detecting operation instructions on the touch panel. The user interface 603 can also be a physical button or a mouse. The user interface 603 can also be a display screen for outputting and displaying images or data.
[0091] The memory 604 can include volatile memory, such as random access memory
[0092] (Random Access Memory, RAM); the memory can also include non-volatile memory, such as read-only memory (Read-Only Memory, ROM), flash memory (Flash Memory), hard disk (Hard Disk Drive, HDD), or solid-state drive (Solid-State Drive, SSD); the memory 604 can also include a combination of the above types of memories. The memory 604 is used to store a set of program codes, and the processor 601 is used to call the program codes stored in the memory 604 to perform the following operations:
[0093] Determine a first distance between the reference camera and a pre-configured calibration template, where at the first distance, the center line of the preview image captured by the reference camera coincides with the center line of the calibration template in the preview image;
[0094] Rotate the target camera within a preset rotation accuracy range, and determine a second distance between a center marking line of a preview image captured by the rotated target camera and a center marking line of the calibration template in the preview image, where the target camera is a camera among the m offset cameras;
[0095] Calculate a deflection angle of the target camera relative to the reference camera according to the first distance and the second distance.
[0096] Optionally, the determining the first distance between the reference camera and a pre-configured calibration template includes:
[0097] Adjust the distance between the reference camera and the pre-configured calibration template so that a center marking line of a preview image captured by the adjusted reference camera coincides with the center marking line of the calibration template in the preview image, and record the first distance between the current reference camera and the calibration template.
[0098] Optionally, the rotating the target camera within a preset rotation accuracy range includes:
[0099] Rotate the target camera so that a center marking line of a preview image captured by the rotated target camera and a center marking line of the calibration template in the preview image are on the same straight line.
[0100] Optionally, the rotating the target camera within a preset rotation accuracy range includes:
[0101] Rotate the target camera according to a target angle, where the target angle is an angle between an imaging optical axis of the target camera and an imaging optical axis of the reference camera at the beginning.
[0102] Optionally, the calculating the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance includes:
[0103] Calculate a tangent value of the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance;
[0104] Calculate the deflection angle of the target camera relative to the reference camera according to the calculated tangent value.
[0105] Optionally, the method further includes:
[0106] Adjust the target camera according to the deflection angle to adjust the position of the target camera relative to the reference camera.
[0107] Optionally, the reference camera is arranged at a central position of all cameras in the multi-camera module.
[0108] Optionally, the m offset cameras include a first offset camera and a second offset camera arranged on the left and right sides of the reference camera, and there is the same included angle between the imaging optical axes of the first offset camera and the second offset camera and the imaging optical axis of the reference camera respectively.
[0109] Since the terminal device introduced in this embodiment is the terminal device used to implement the method in the embodiments of the present application, based on the method introduced in the embodiments of the present application, those skilled in the art can understand the specific implementation manners and various variations of the terminal device in this embodiment. Therefore, the specific implementation of how this terminal device implements the method in the embodiments of the present application will not be described in detail here. As long as the terminal device used by those skilled in the art to implement the information processing method in the embodiments of the present application belongs to the scope protected by the present application.
[0110] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: The present application determines a first distance between a reference camera in a multi-camera module and a pre-configured calibration template, where the center marking line of the preview image collected by the reference camera coincides with the center marking line of the calibration template in the preview image at the first distance; rotates a target camera within a preset rotation accuracy range, and determines a second distance between the center marking line of the preview image collected by the rotated target camera and the center marking line of the calibration template in the preview image, where the target camera is a camera among the m offset cameras; calculates a deflection angle of the target camera relative to the reference camera according to the first distance and the second distance. In the above solution, the present application obtains the first distance between the adjusted reference camera and the calibration template, and the second distance between the center marking line of the preview image collected by the adjusted target camera and the center marking line of the calibration template in this preview image, and then calculates the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance, that is, calibrates the included angle (deflection angle) between the imaging optical axis of the target camera and the imaging optical axis of the reference camera, thereby realizing the rapid and accurate calibration of the multi-camera module.
[0111] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0112] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general purpose computers, special purpose computers, embedded processors, or other programmable data processing devices to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices generate means for implementing the functions specified in the Figure 1 single flow or multiple flows and / or blocks Figure 1 single block or multiple blocks.
[0113] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the functions specified in the Figure 1 single flow or multiple flows and / or blocks Figure 1 single block or multiple blocks.
[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 single flow or multiple flows and / or blocks Figure 1 single block or multiple blocks.
[0115] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0116] Obviously, those skilled in the art can make various changes and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A calibration method for a multi-camera module, characterized in that, The multi-camera module includes a reference camera and m offset cameras, and there is an angle between the imaging optical axis of each offset camera and the imaging optical axis of the reference camera. m is a positive integer. The method includes: Determine a first distance between the reference camera and a pre-configured calibration template, where at the first distance, the center marking line of the preview image captured by the reference camera coincides with the center marking line of the calibration template in the preview image; Rotate a target camera within a preset rotation accuracy range, and determine a second distance between the center marking line of the preview image captured by the rotated target camera and the center marking line of the calibration template in the preview image. The target camera is one of the m offset cameras; Calculate the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance; The rotating the target camera within a preset rotation accuracy range includes: Rotate the target camera according to a target angle, where the target angle is the angle between the imaging optical axis of the target camera and the imaging optical axis of the reference camera at the initial time.
2. The method according to claim 1, wherein The determining the first distance between the reference camera and a pre-configured calibration template includes: Adjust the distance between the reference camera and the pre-configured calibration template so that the center marking line of the preview image captured by the adjusted reference camera coincides with the center marking line of the calibration template in the preview image, and record the current first distance between the reference camera and the calibration template.
3. The method according to claim 1, wherein The calculating the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance includes: Calculate the tangent value of the deflection angle of the target camera relative to the reference camera according to the first distance and the second distance; Calculate the deflection angle of the target camera relative to the reference camera according to the calculated tangent value.
4. The method according to claim 1, wherein The method further includes: Adjust the target camera according to the deflection angle to adjust the position of the target camera relative to the reference camera.
5. The method according to claim 1, wherein The reference camera is arranged at the center position of all the cameras in the multi-camera module.
6. The method according to any one of claims 1-5, characterized in that, The m offset cameras include a first offset camera and a second offset camera arranged on the left and right sides of the reference camera, and there is the same angle between the imaging optical axis of each of the first offset camera and the second offset camera and the imaging optical axis of the reference camera.
7. A calibration device for a multi-camera module, characterized in that, The multi-camera module includes a reference camera and m offset cameras, and there is an angle between the imaging optical axis of each offset camera and the imaging optical axis of the reference camera. m is a positive integer. The device includes a determination module, a rotation module, and a calculation module, where: The determination module is configured to determine a first distance between the reference camera and a pre-configured calibration template, where at the first distance, the center marking line of the preview image captured by the reference camera coincides with the center marking line of the calibration template in the preview image; The rotation module is configured to rotate the target camera within a preset rotation accuracy range, and determine a second distance between a center marking line of a preview image captured by the rotated target camera and a center marking line of the calibration template in the preview image, where the target camera is a camera among the m offset cameras; The rotation module is specifically configured to rotate the target camera according to a target angle, where the target angle is an angle between an imaging optical axis of the target camera and an imaging optical axis of the reference camera at an initial time; The calculation module is configured to calculate a deflection angle of the target camera relative to the reference camera according to the first distance and the second distance.
8. A terminal device, characterized in that, The terminal device includes: a processor, a memory, a communication interface, and a bus; the processor, the memory, and the communication interface are connected through the bus and complete communication with each other; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the calibration method of the multi-camera module according to any one of claims 1-6 above.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program, and when the program runs on a terminal device, it executes the calibration method of the multi-camera module according to any one of claims 1-6 above.
Citation Information
Patent Citations
Camera calibration method and device, electronic equipment and computer readable storage medium
CN109598763A
Terminal, and image capturing method and device
WO2016119301A1