Camera installation and correction method, device, electronic equipment and storage medium

By shooting and splicing the logo line planes and splicing images on the multi-camera modules, determining the optical axis deviation for installation correction, the problem of single installation accuracy analysis angle in the prior art is solved, and a more efficient installation and splicing effect of multi-camera modules is achieved.

CN114187366BActive Publication Date: 2025-04-29BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111505504.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-04-29
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

When installing multi-camera modules, it is difficult for the prior art to comprehensively analyze the installation accuracy from the application perspective, resulting in errors in the stitching image.

Method used

By acquiring images to be stitched on planes where the mark lines are provided by multiple cameras to be corrected, the image stitching is stitched using the camera's internal and external parameters, the stitching error data of the mark lines in the stitching image is determined, and the optical axis deviation between the camera is calculated based on the error data and the distance between the camera and the plane, for installation correction.

Benefits of technology

The installation accuracy of multiple camera modules is improved, thereby improving the image quality after stitching and achieving better stitching effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114187366B_ABST
    Figure CN114187366B_ABST
Patent Text Reader

Abstract

The disclosed embodiments disclose a camera installation and correction method, device, electronic device and storage medium, wherein the method includes: obtaining images to be stitched taken by multiple cameras to be calibrated on a plane provided with a marking line; stitching each image to be stitched to obtain a target stitched image based on the internal and external parameters of the multiple cameras to be calibrated, and determining the stitching error data of the position of the marking line in the stitching line of the target stitched image; determining the optical axis deviation between the multiple cameras to be calibrated according to the stitching error data and the distance between the multiple cameras to be calibrated and the plane, so that the optical axis deviation is used to perform installation and correction on the multiple cameras to be calibrated. The technical solution of the disclosed embodiments solves the problem that the analysis angle of the installation accuracy of multiple camera modules is single and the installation accuracy needs to be improved, and realizes the determination of the installation accuracy of multiple groups of camera structures from the application perspective to guide the installation and correction of the cameras, so that the images taken by each camera have a better stitching effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of machine vision technology, and in particular to a camera installation and correction method, device, electronic device, and storage medium. Background Art

[0002] When shooting images at a wide viewing angle, such as in the process of implementing virtual reality or augmented reality technology, it is usually necessary to combine multiple cameras and stitch the images taken by each camera to expand the field of view (FoV). The realization of the above function has high requirements on the shooting hardware, and it is necessary to keep a fixed and precise position relationship between multiple cameras.

[0003] When installing a structure with multiple cameras, the installation accuracy is determined through common tolerance analysis, control and other methods. However, such methods focus on the installation accuracy of the camera structure itself, but fail to analyze the installation accuracy from the application perspective, resulting in errors in the captured images after stitching, even when the installation accuracy of the camera structure meets the requirements. Summary of the invention

[0004] The embodiments of the present disclosure provide a camera installation and correction method, device, electronic device and storage medium, which can further determine the installation accuracy of multiple camera structures from the application perspective to guide the installation and correction of the cameras so that the images taken by each camera have a better stitching effect.

[0005] In a first aspect, an embodiment of the present disclosure provides a camera installation calibration method, comprising:

[0006] Acquire images to be stitched that are taken by multiple cameras to be calibrated on a plane provided with a marking line, wherein the viewing angles of the multiple cameras to be calibrated are different and the width of the marking line is known;

[0007] Based on the internal parameters and external parameters of the multiple cameras to be calibrated, stitching the images to be stitched together to obtain a target stitched image, and determining stitching error data of the marker line at the stitching line position of the target stitched image;

[0008] According to the stitching error data and the distances between the multiple cameras to be calibrated and the plane, the optical axis deviations between the multiple cameras to be calibrated are determined, so that the optical axis deviations are used to perform installation calibration on the multiple cameras to be calibrated.

[0009] In a second aspect, the present disclosure also provides a camera installation and correction device, including:

[0010] An image acquisition module, used for acquiring images to be stitched, which are taken by a plurality of cameras to be calibrated on a plane provided with a marking line, wherein the viewing angles of the plurality of cameras to be calibrated are different and the width of the marking line is known;

[0011] An image analysis module, configured to stitch the images to be stitched together to obtain a target stitched image based on the internal parameters and external parameters of the multiple cameras to be calibrated, and determine stitching error data of the marker line at the stitching line position of the target stitched image;

[0012] The camera correction module is used to determine the optical axis deviation between the multiple cameras to be corrected according to the stitching error data and the distance between the multiple cameras to be corrected and the plane, so that the optical axis deviation is used to perform installation correction on the multiple cameras to be corrected.

[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the camera installation correction method as described in any of the embodiments of the present disclosure.

[0017] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the camera installation correction method as described in any one of the embodiments of the present disclosure.

[0018] The technical solution of the embodiment of the present disclosure is to make multiple cameras to be calibrated with different viewing angles simultaneously shoot a plane with a marker line, obtain images to be stitched corresponding to the number of cameras, then stitch the images to be stitched according to the internal and external parameters of the multiple cameras to be calibrated to obtain a target stitched image, and analyze and determine the stitching error data of the marker line position in the target stitched image; according to the stitching error data and the distance between the multiple cameras to be calibrated and the plane, determine the optical axis deviation between the multiple cameras to be calibrated, so that the optical axis deviation is used to install and calibrate the multiple cameras to be calibrated. That is, the installation accuracy of the multi-camera module is analyzed from the perspective of the shooting image effect to improve the shooting effect of the multi-camera module. The technical solution of the embodiment of the present disclosure solves the problem that the installation accuracy analysis angle is single when installing the multi-camera module in the prior art, and the installation accuracy needs to be improved, and realizes the further determination of the installation accuracy of the multiple camera structures from the application perspective to guide the installation correction of the camera, so that the images shot by each camera have a better stitching effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 A schematic diagram of a flow chart of a camera installation and calibration method provided in the first embodiment of the present disclosure;

[0021] Figure 2 A schematic diagram of a plane provided with a marking line provided in the first embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of an image stitching result provided in the first embodiment of the present disclosure;

[0023] Figure 4 A schematic diagram of a flow chart of a camera installation and calibration method provided in the second embodiment of the present disclosure;

[0024] Figure 5 A schematic diagram of the structure of a triple camera module provided in the second embodiment of the present disclosure;

[0025] Figure 6 A first camera module for capturing images provided in the second embodiment of the present disclosure;

[0026] Figure 7 A second camera module for capturing images provided in the second embodiment of the present disclosure;

[0027] Figure 8 A third camera module for capturing images provided in the second embodiment of the present disclosure;

[0028] Fig. 9 The stitching result of images taken by a triple camera module provided in the second embodiment of the present disclosure;

[0029] Fig.10 A stitching result of images taken by a second camera module and a third camera module provided in the second embodiment of the present disclosure;

[0030] Fig.11 A stitching result of images taken by a second camera module and a first camera module provided in the second embodiment of the present disclosure;

[0031] Fig.12 A schematic diagram of the structure of a camera installation and correction device provided in Embodiment 3 of the present disclosure;

[0032] Fig.13A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present disclosure. DETAILED DESCRIPTION

[0033] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0035] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0036] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0037] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0038] Embodiment 1

[0039] Figure 1 This is a flow chart of a camera installation calibration method provided by the first embodiment of the present disclosure. The present embodiment of the present disclosure is applicable to the scenario of calibrating the installation of multiple camera modules. The method can be executed by a camera installation calibration device, which can be implemented in the form of software and / or hardware, and can be configured in an electronic device, such as a mobile terminal, a server device, or a camera control device.

[0040] like Figure 1 As shown, the camera installation and calibration method provided in this embodiment includes:

[0041] S110, obtaining images to be stitched that are taken by multiple cameras to be calibrated on a plane provided with a marking line, wherein the viewing angles of the multiple cameras to be calibrated are different, and the width of the marking line is known.

[0042] Specifically, the multiple cameras to be calibrated can be multiple camera modules that are combined to obtain a larger shooting angle of view. By stitching the images taken by the multiple camera modules at the same time, a target image with a sufficiently large angle of view can be obtained. Usually, when a multi-camera module is installed, the installation result of the camera is calibrated according to strict mechanical installation standards. However, the shooting results of each camera calibrated on the installation structure, and the final stitched image obtained by stitching may not meet higher requirements and standards. In this embodiment, the joint installation and use of the multi-camera module is further calibrated from the perspective of application.

[0043] The plane with marking lines can be a wall with marking lines in the shooting space, or a plane board with marking lines. The size of the board can be adjusted according to the needs of the calibration process. The marking line can be a straight line, a combination of multiple straight lines, a continuous curve, or other patterns. The width of the marking line refers to the horizontal size of a marking line. Figure 2 As shown, in a rectangular plane, there is a vertically placed marking line (marking line filled in black), and the size in the horizontal direction is the width of the marking line.

[0044] When shooting with a multi-camera module, the camera will be adjusted to a position with a suitable distance from the plane where the marker line is set. Suitable distance means that at the current position, the pictures taken by each camera in the multi-camera module can capture the preset marker line, thereby capturing the corresponding image to be stitched.

[0045] S120 , stitching the images to be stitched together to obtain a target stitched image based on the internal parameters and external parameters of the multiple cameras to be calibrated, and determining stitching error data of the marker line at a stitching line position of the target stitched image.

[0046] After obtaining the images to be stitched, the image stitching work is performed. According to the internal parameters and external parameters of the multiple cameras to be calibrated, the homography transformation is performed on the images to be stitched, and the transformation results are mapped to the preset equidistant columnar graph to obtain the target stitched image. Alternatively, other image panoramic stitching algorithms can be used to obtain the target stitched image.

[0047] Furthermore, the stitching error data can be analyzed according to the stitching result of the target stitching image. Specifically, for each stitching line in the target stitching image (i.e., a line where two images to be stitched intersect after stitching), the current stitching line (e.g., Figure 3 Then, the position deviation distance is determined according to the width of the marking line and the ratio of the second number of pixels corresponding to the width to the first number of pixels, that is, Figure 3 The length of the dashed line segment L is used as the stitching error data between the two images to be stitched connected by the current stitching line. For example, if the width of the marking line is 1 cm, it corresponds to 100 pixels in the image, and the position deviation distance corresponds to 300 pixels, the ratio of the second number of pixels to the first number of pixels is 300 / 100, then it can be determined that the position deviation is 3 cm. Through the above process, a stitching error data can be obtained for each stitching line.

[0048] S130, determining the optical axis deviations between the multiple cameras to be calibrated according to the stitching error data and the distances between the multiple cameras to be calibrated and the plane, so that the optical axis deviations are used to perform installation calibration on the multiple cameras to be calibrated.

[0049] Specifically, for each stitching error data, a trigonometric function relationship between the current stitching error data and the distances between the multiple cameras to be calibrated and the plane is established; and the trigonometric function is solved to obtain an optical axis deviation angle between two cameras to be calibrated corresponding to the current stitching error data.

[0050] In this embodiment, the distances between the multiple cameras to be calibrated and the plane with the marking line are uniform, and the distance between the multiple cameras to be calibrated as a whole and the plane is used as the standard. The optical axis deviation angle between two cameras to be calibrated can be expressed as θ=arctan(splicing error data / distance between the multi-camera module as a whole and the plane).

[0051] The technical solution of the disclosed embodiment can obtain images to be stitched corresponding to the number of cameras by making multiple cameras to be calibrated with different viewing angles simultaneously shoot a plane with a marker line, then stitch the images to be stitched according to the internal and external parameters of the multiple cameras to be calibrated to obtain a target stitched image, and analyze and determine the stitching error data of the marker line position in the target stitched image; according to the stitching error data and the distance between the multiple cameras to be calibrated and the plane, determine the optical axis deviation between the multiple cameras to be calibrated, so that the optical axis deviation is used to install and calibrate the multiple cameras to be calibrated. That is, the installation accuracy of the multi-camera module is analyzed from the perspective of the image shooting effect to improve the shooting effect of the multi-camera module. The technical solution of the disclosed embodiment solves the problem that the installation accuracy analysis angle is single when installing the multi-camera module in the prior art, and the installation accuracy needs to be improved, and realizes the further determination of the installation accuracy of the multiple camera structures from the application perspective to guide the installation correction of the camera, so that the images shot by each camera have a better stitching effect.

[0052] Embodiment 2

[0053] The embodiments of the present disclosure can be combined with the various optional solutions in the camera installation calibration method provided in the above embodiments. The camera installation calibration method provided in this embodiment further describes the entire process of camera installation calibration by taking a triple camera module as an example.

[0054] Figure 4 This is a flow chart of a camera installation and calibration method provided in the second embodiment of the present disclosure. Figure 4 As shown, the camera installation and calibration method provided in this embodiment includes:

[0055] S210: According to the preview images of the triple camera module to be calibrated, adjust the distance between the triple camera module and the shooting plane so that the preset mark line in the shooting plane fills the preview images of the triple camera module.

[0056] For example, the triple camera module to be calibrated can refer to Figure 5 The structure shown includes a first camera module, a second camera module and a third camera module, each of which has a different field of view. The triple camera module can be fixed on a camera frame, which is also set on a track and can slide on the track, so that the distance between the camera and the photographed plane can be adjusted. Furthermore, the distance between the triple camera module and the shooting plane can be adjusted so that the preset mark line in the shooting plane fills each preview image of the triple camera module.

[0057] In a specific example, a flat wall can be used as the shooting plane, and red tape can be pasted on the wall as a marking line. The marking line is perpendicular to the ground, and the high point of the marking line should be no less than 2.5m from the ground, and the low point should be no higher than 20cm. Place a triple camera module 2m away from the wall, and adjust the camera position so that the red marking line is in the center of the camera imaging, and the part is captured by all three cameras. Among them. The width of the preset marking line, that is, the tape, is known.

[0058] S220, obtaining the images to be stitched taken by the triple camera module on the shooting plane, wherein the viewing angles of the cameras in the triple camera module are different. In a specific example, three images to be stitched are obtained after shooting by the triple camera module. Figure 6 is the image to be stitched taken by the first camera module, Figure 7 is the image to be stitched taken by the second camera module, Figure 8 The image to be stitched is taken by the third camera module.

[0059] S230, stitching the images to be stitched together to obtain a target stitched image based on the internal parameters and external parameters of each camera in the triple camera module, and determining stitching error data of the marker line at the stitching line position of the target stitched image.

[0060] According to the internal and external parameters of the triple camera module, Figure 6 , Figure 7 and Figure 8 The image to be stitched is transformed homographically, and the transformation result is mapped to the preset equidistant column map to obtain the target stitching image. Fig. 9 .exist Figure 6-9 In the embodiment, the image contents other than the marking line in the captured image are irrelevant to the content of the present technical solution and can be used as a spatial reference for the marking line.

[0061] Through Fig. 9 By analyzing the marker lines in the image, we can see that the marker lines are misaligned at the image splicing position and are not a complete marker line. Fig. 9 By zooming in on the two joint positions of the middle marking line, we can get Fig.10 and Fig.11 There are two locations with splicing errors (circled locations). Fig.10 yes Figure 7 and Figure 8 The result of splicing, Fig.11 yes Figure 7 and Figure 6 The result of splicing. Fig.10 and Fig.11The stitching line in the image can be respectively identified by identifying the number of pixels corresponding to the position deviation distance of the marker lines in the two images to be stitched connected by the two stitching lines; then, the width of the marker line and the number of pixels corresponding to the width are determined. Fig.10 and Fig.11 The splicing position deviation distance in is Fig.10 and Fig.11 S240: Determine the optical axis deviation between the cameras in the triple camera module according to the stitching error data and the distance between each camera in the triple camera module and the shooting plane, so that the optical axis deviation is used to perform installation correction on each camera in the triple camera module.

[0062] Specifically, for each stitching error data, a trigonometric function relationship between the current stitching error data and the distances between the multiple cameras to be calibrated and the plane is established; and the trigonometric function is solved to obtain an optical axis deviation angle between two cameras to be calibrated corresponding to the current stitching error data.

[0063] based on Fig.10 The splicing error data in can be determined to obtain Figure 7 and Figure 8 The optical axis deviation between the second camera module and the third camera module is based on Fig.11 The splicing error data in can be determined to obtain Figure 7 and Figure 6 Then, taking the second camera module as a reference camera, the first camera module and the third camera module can be corrected, or the installation angles of the three camera modules can be adjusted respectively, so that the optical axis deviations of the three camera modules can be corrected.

[0064] The technical solution of the disclosed embodiment is to pre-adjust the distance between the camera module and the shooting plane so that the triple camera modules with different viewing angles can simultaneously shoot the plane with the marker line, obtain the image to be stitched corresponding to the number of cameras, and then stitch the images to be stitched according to the internal and external parameters of the multiple cameras to be calibrated to obtain the target stitched image, and analyze and determine the stitching error data of the marker line position in the target stitched image; according to the stitching error data and the distance between the multiple cameras to be calibrated and the plane, determine the optical axis deviation between the multiple cameras to be calibrated, so that the optical axis deviation is used to install and calibrate the multiple cameras to be calibrated. That is, the installation accuracy of the multi-camera module is analyzed from the perspective of the shooting image effect to improve the shooting effect of the multi-camera module. The technical solution of the disclosed embodiment solves the problem that the installation accuracy analysis angle is single when installing the multi-camera module in the prior art, and the installation accuracy needs to be improved, and realizes the further determination of the installation accuracy of the multiple camera structures from the application perspective to guide the installation correction of the camera, so that the images shot by each camera have a better stitching effect.

[0065] Embodiment 3

[0066] Fig.12 This is a schematic diagram of the structure of a camera installation calibration device provided in Embodiment 3 of the present disclosure. The camera installation calibration device provided in this embodiment is suitable for calibrating the installation of multiple camera modules.

[0067] like Fig.12 As shown, the camera installation and correction device includes: an image acquisition module 310, an image analysis module 320 and a camera correction module 330.

[0068] Among them, the image acquisition module 310 is used to obtain the images to be stitched that are photographed by multiple cameras to be calibrated on a plane with a mark line, wherein the viewing angles of the multiple cameras to be calibrated are different and the width of the mark line is known; the image analysis module 320 is used to stitch the images to be stitched based on the internal parameters and external parameters of the multiple cameras to be calibrated to obtain a target stitched image, and determine the stitching error data of the mark line position on the stitching line of the target stitched image; the camera correction module 330 is used to determine the optical axis deviation between the multiple cameras to be calibrated based on the stitching error data and the distances between the multiple cameras to be calibrated and the plane, so that the optical axis deviation is used to install and calibrate the multiple cameras to be calibrated.

[0069] The technical solution of the embodiment of the present disclosure is to make multiple cameras to be calibrated with different viewing angles simultaneously shoot a plane with a marker line, obtain images to be stitched corresponding to the number of cameras, then stitch the images to be stitched according to the internal and external parameters of the multiple cameras to be calibrated to obtain a target stitched image, and analyze and determine the stitching error data of the marker line position in the target stitched image; according to the stitching error data and the distance between the multiple cameras to be calibrated and the plane, determine the optical axis deviation between the multiple cameras to be calibrated, so that the optical axis deviation is used to install and calibrate the multiple cameras to be calibrated. That is, the installation accuracy of the multi-camera module is analyzed from the perspective of the shooting image effect to improve the shooting effect of the multi-camera module. The technical solution of the embodiment of the present disclosure solves the problem that the installation accuracy analysis angle is single when installing the multi-camera module in the prior art, and the installation accuracy needs to be improved, and realizes the further determination of the installation accuracy of the multiple camera structures from the application perspective to guide the installation correction of the camera, so that the images shot by each camera have a better stitching effect.

[0070] In some optional implementations, the image analysis module 320 includes an image stitching submodule, which is used to:

[0071] According to the intrinsic parameters and extrinsic parameters of the multiple cameras to be calibrated, a homography transformation is performed on each of the images to be stitched, and the transformation result is mapped to a preset equidistant column chart to obtain the target stitched image.

[0072] In some optional implementations, the image analysis module 320 includes an image stitching error data analysis submodule, which is used to:

[0073] For each stitching line in the target stitching image, identifying a first number of pixels corresponding to a position deviation distance of marker lines in two to-be-stitched images connected by the current stitching line;

[0074] The position deviation distance is determined according to the width of the marking line and the ratio of the second number of pixels corresponding to the width to the first number of pixels as the stitching error data between the two images to be stitched connected by the current stitching line.

[0075] In some optional implementations, the camera correction module 330 is specifically used to:

[0076] For each stitching error data, establishing a trigonometric function relationship between the current stitching error data and the distances between the plurality of cameras to be corrected and the plane;

[0077] The trigonometric function is solved to obtain the optical axis deviation angle between the two cameras to be corrected corresponding to the current stitching error data.

[0078] In some optional implementations, the camera installation and correction device also includes a shooting distance adjustment module, which is used to adjust the distance between the multiple cameras to be calibrated and the plane according to the preview images of the multiple cameras to be calibrated before obtaining the images to be stitched in which the multiple cameras to be calibrated shoot the plane with the mark line, so that the mark line fills the preview screen of the multiple cameras to be calibrated.

[0079] In some optional implementations, the multiple cameras to be calibrated are a triple camera module.

[0080] The camera installation correction device provided in the embodiments of the present disclosure can execute the camera installation correction method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0081] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0082] Embodiment 4

[0083] Reference below Fig.13 , which shows an electronic device (eg, Fig.13 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.13 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0084] like Fig.13 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 to a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0085] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.13 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0086] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the camera installation correction method of the embodiment of the present disclosure are executed.

[0087] The electronic device provided in the embodiment of the present disclosure and the camera installation correction method provided in the above embodiment belong to the same disclosed concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0088] Embodiment 5

[0089] The embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the camera installation correction method provided in the above embodiment is implemented.

[0090] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory (FLASH), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0091] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0092] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0093] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0094] Acquire images to be stitched that are taken by multiple cameras to be calibrated on a plane provided with a marking line, wherein the viewing angles of the multiple cameras to be calibrated are different and the width of the marking line is known;

[0095] Based on the internal parameters and external parameters of the multiple cameras to be calibrated, stitching the images to be stitched together to obtain a target stitched image, and determining stitching error data of the marker line at the stitching line position of the target stitched image;

[0096] According to the stitching error data and the distances between the multiple cameras to be calibrated and the plane, the optical axis deviations between the multiple cameras to be calibrated are determined, so that the optical axis deviations are used to perform installation calibration on the multiple cameras to be calibrated.

[0097] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0098] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0099] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The names of the units and modules do not, in some cases, limit the units and modules themselves. For example, the data generation module may also be described as a "video data generation module".

[0100] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.

[0101] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] According to one or more embodiments of the present disclosure, [Example 1] provides a camera installation correction method, the method comprising:

[0103] Acquire images to be stitched that are taken by multiple cameras to be calibrated on a plane provided with a marking line, wherein the viewing angles of the multiple cameras to be calibrated are different and the width of the marking line is known;

[0104] Based on the internal parameters and external parameters of the multiple cameras to be calibrated, stitching the images to be stitched together to obtain a target stitched image, and determining stitching error data of the marker line at the stitching line position of the target stitched image;

[0105] According to the stitching error data and the distances between the multiple cameras to be calibrated and the plane, the optical axis deviations between the multiple cameras to be calibrated are determined, so that the optical axis deviations are used to perform installation calibration on the multiple cameras to be calibrated.

[0106] According to one or more embodiments of the present disclosure, [Example 2] provides a camera installation calibration method, further comprising:

[0107] In some optional implementations, stitching the images to be stitched together to obtain a target stitched image based on the intrinsic parameters and extrinsic parameters of the multiple cameras to be calibrated includes:

[0108] According to the intrinsic parameters and extrinsic parameters of the multiple cameras to be calibrated, a homography transformation is performed on each of the images to be stitched, and the transformation result is mapped to a preset equidistant column chart to obtain the target stitched image.

[0109] According to one or more embodiments of the present disclosure, [Example 3] provides a camera installation calibration method, further comprising:

[0110] In some optional implementations, determining the stitching error data of the marker line at the stitching line position of the target stitched image includes:

[0111] For each stitching line in the target stitching image, identifying a first number of pixels corresponding to a position deviation distance of marker lines in two to-be-stitched images connected by the current stitching line;

[0112] The position deviation distance is determined according to the width of the marking line and the ratio of the second number of pixels corresponding to the width to the first number of pixels as the stitching error data between the two images to be stitched connected by the current stitching line.

[0113] According to one or more embodiments of the present disclosure, [Example 4] provides a camera installation correction method, further comprising:

[0114] In some optional implementations, determining the optical axis deviations between the multiple cameras to be calibrated according to the stitching error data and the distances between the multiple cameras to be calibrated and the plane includes:

[0115] For each stitching error data, establishing a trigonometric function relationship between the current stitching error data and the distances between the plurality of cameras to be corrected and the plane;

[0116] The trigonometric function is solved to obtain the optical axis deviation angle between the two cameras to be corrected corresponding to the current stitching error data.

[0117] According to one or more embodiments of the present disclosure, [Example 5] provides a camera installation calibration method, further comprising:

[0118] In some optional implementations, before acquiring the images to be stitched that are photographed by multiple cameras to be calibrated on a plane provided with a marking line, the method further includes:

[0119] According to the preview images of the multiple cameras to be calibrated, the distances between the multiple cameras to be calibrated and the plane are adjusted so that the marking line fills the preview images of the multiple cameras to be calibrated.

[0120] According to one or more embodiments of the present disclosure, [Example 6] provides a camera installation correction method, further comprising:

[0121] In some optional implementations, the multiple cameras to be calibrated are a triple camera module.

[0122] According to one or more embodiments of the present disclosure, [Example 7] provides a camera installation correction device, further comprising:

[0123] An image acquisition module, used for acquiring images to be stitched, which are taken by a plurality of cameras to be calibrated on a plane provided with a marking line, wherein the viewing angles of the plurality of cameras to be calibrated are different and the width of the marking line is known;

[0124] An image analysis module, configured to stitch the images to be stitched together to obtain a target stitched image based on the internal parameters and external parameters of the multiple cameras to be calibrated, and determine stitching error data of the marker line at the stitching line position of the target stitched image;

[0125] The camera correction module is used to determine the optical axis deviation between the multiple cameras to be corrected according to the stitching error data and the distance between the multiple cameras to be corrected and the plane, so that the optical axis deviation is used to perform installation correction on the multiple cameras to be corrected.

[0126] According to one or more embodiments of the present disclosure, [Example 8] provides a camera installation correction device, further comprising:

[0127] In some optional implementations, the image analysis module includes an image stitching submodule, which is used to:

[0128] According to the intrinsic parameters and extrinsic parameters of the multiple cameras to be calibrated, a homography transformation is performed on each of the images to be stitched, and the transformation result is mapped to a preset equidistant column chart to obtain the target stitched image.

[0129] According to one or more embodiments of the present disclosure, [Example 9] provides a camera installation correction device, further comprising:

[0130] In some optional implementations, the image analysis module includes an image stitching error data analysis submodule, which is used to:

[0131] For each stitching line in the target stitching image, identifying a first number of pixels corresponding to a position deviation distance of marker lines in two to-be-stitched images connected by the current stitching line;

[0132] The position deviation distance is determined according to the width of the marking line and the ratio of the second number of pixels corresponding to the width to the first number of pixels as the stitching error data between the two images to be stitched connected by the current stitching line.

[0133] According to one or more embodiments of the present disclosure, [Example 10] provides a camera installation and correction device, further comprising:

[0134] In some optional implementations, the camera correction module is specifically used to:

[0135] For each stitching error data, establishing a trigonometric function relationship between the current stitching error data and the distances between the plurality of cameras to be corrected and the plane;

[0136] The trigonometric function is solved to obtain the optical axis deviation angle between the two cameras to be corrected corresponding to the current stitching error data.

[0137] According to one or more embodiments of the present disclosure, [Example 11] provides a camera installation and correction device, further comprising:

[0138] In some optional implementations, the camera installation and correction device also includes a shooting distance adjustment module, which is used to adjust the distance between the multiple cameras to be calibrated and the plane according to the preview images of the multiple cameras to be calibrated before obtaining the images to be stitched in which the multiple cameras to be calibrated shoot the plane with the mark line, so that the mark line fills the preview screen of the multiple cameras to be calibrated.

[0139] According to one or more embodiments of the present disclosure, [Example 12] provides a camera installation and correction device, further comprising:

[0140] In some optional implementations, the multiple cameras to be calibrated are a triple camera module.

[0141] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0142] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0143] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A camera installation and correction method, characterized in that: include: Acquire images to be stitched that are taken by multiple cameras to be calibrated on a plane provided with a marking line, wherein the viewing angles of the multiple cameras to be calibrated are different and the width of the marking line is known; Based on the internal parameters and external parameters of the multiple cameras to be calibrated, stitching the images to be stitched together to obtain a target stitched image, and determining stitching error data of the marker line at the stitching line position of the target stitched image; Determine the optical axis deviation between the multiple cameras to be calibrated according to the stitching error data and the distances between the multiple cameras to be calibrated and the plane, so that the optical axis deviation is used to perform installation calibration on the multiple cameras to be calibrated; The determining of the stitching error data of the marker line at the stitching line position of the target stitching image includes: For each stitching line in the target stitching image, identifying a first number of pixels corresponding to a position deviation distance of marker lines in two to-be-stitched images connected by the current stitching line; Determine the position deviation distance according to the width of the marking line and the ratio of the second number of pixels corresponding to the width to the first number of pixels as the stitching error data between the two images to be stitched connected by the current stitching line; The step of determining the optical axis deviations between the plurality of cameras to be calibrated according to the stitching error data and the distances between the plurality of cameras to be calibrated and the plane comprises: For each stitching error data, establishing a trigonometric function relationship between the current stitching error data and the distances between the plurality of cameras to be corrected and the plane; The trigonometric function is solved to obtain the optical axis deviation angle between the two cameras to be corrected corresponding to the current stitching error data.

2. The method according to claim 1, characterized in that The step of stitching the images to be stitched together to obtain a target stitched image based on the internal parameters and external parameters of the multiple cameras to be calibrated includes: According to the intrinsic parameters and extrinsic parameters of the multiple cameras to be calibrated, a homography transformation is performed on each of the images to be stitched, and the transformation result is mapped to a preset equidistant column chart to obtain the target stitched image.

3. The method according to any one of claims 1-2, characterized in that: Before acquiring the images to be stitched that are photographed by multiple cameras to be calibrated on a plane provided with marking lines, the method further includes: According to the preview images of the multiple cameras to be calibrated, the distances between the multiple cameras to be calibrated and the plane are adjusted so that the marking line fills the preview images of the multiple cameras to be calibrated.

4. The method according to any one of claims 1-2, characterized in that: The multiple cameras to be calibrated are a triple camera module.

5. A camera installation and correction device, characterized in that: include: An image acquisition module, used for acquiring images to be stitched, which are taken by a plurality of cameras to be calibrated on a plane provided with a marking line, wherein the viewing angles of the plurality of cameras to be calibrated are different and the width of the marking line is known; An image analysis module, configured to stitch the images to be stitched together to obtain a target stitched image based on the internal parameters and external parameters of the multiple cameras to be calibrated, and determine stitching error data of the marker line at the stitching line position of the target stitched image; A camera calibration module, configured to determine an optical axis deviation between the plurality of cameras to be calibrated according to the stitching error data and the distances between the plurality of cameras to be calibrated and the plane, so that the optical axis deviation is used to perform installation calibration on the plurality of cameras to be calibrated; The image analysis module includes an image stitching error data analysis submodule, which is used to: for each stitching line in the target stitching image, identify the first number of pixels corresponding to the position deviation distance of the marker lines in the two images to be stitched connected by the current stitching line; determine the position deviation distance according to the width of the marker line and the ratio of the second number of pixels corresponding to the width to the first number of pixels, as the stitching error data between the two images to be stitched connected by the current stitching line; The camera correction module is specifically used to: for each stitching error data, establish a trigonometric function relationship between the current stitching error data and the distances between the multiple cameras to be corrected and the plane; solve the trigonometric function to obtain the optical axis deviation angle between the two cameras to be corrected corresponding to the current stitching error data.

6. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the camera installation correction method as described in any one of claims 1-4.

7. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the camera installation correction method as described in any one of claims 1 to 4 when executed by a computer processor.

Citation Information

Patent Citations

  • Image stitching parameter correction method for double fish-eye lens and camera equipment

    CN109118425A

  • Projection method and system based on horizontal correction of distance sensor, and storage medium

    CN113163186A