Zero position calibration method and device of camera, electronic equipment and storage medium
By determining the target position in the image from the main camera and controlling the preset position difference, the zero-point position calibration of the auxiliary camera in a multi-camera system is achieved. This solves the problem of increased hardware failure probability caused by the optical interrupter, saves costs, and improves calibration efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, multi-camera cameras require two light interruptors in each camera, which increases the probability of hardware failure.
The main camera captures an image at the zero point of the first target to determine the target position, and controls the auxiliary camera to rotate to the zero point of the second target based on a preset position difference. There is no need to set a light interruptor in the auxiliary camera, and the zero point position calibration of the auxiliary camera is achieved by software.
This reduces the probability of hardware failure, saves costs, and improves the efficiency and accuracy of camera zero-point calibration.
Smart Images

Figure CN115760998B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of camera, and in particular to a zero point position calibration method and device of a camera, an electronic device and a storage medium. BACKGROUND
[0002] The camera with integrated multiple cameras is increasingly popular with customers at present. The camera can not only see a scene with a large field of view, but also use other cameras on the integrated multiple cameras to observe details and track and finely shoot a small field of view. The camera with integrated multiple cameras usually adopts a mode of integrating three cameras, such as one spherical camera with two cylindrical cameras, one spherical camera with two hemispheres, one spherical camera with two small spheres, etc. In order to cooperate with automatic cruising, each camera in the camera needs to realize calibration of a respective zero point position.
[0003] In the related art, one horizontal light interrupter 1 and one vertical light interrupter 2 are arranged in each camera. When the camera rotates through the light interrupter 1 each time, the level signal of the light interrupter 1 changes, and at this time, it is determined that the camera is at the zero point position in the horizontal direction. When the camera rotates through the light interrupter 2 each time, the level signal of the light interrupter 2 changes, and at this time, it is determined that the camera is at the zero point position in the vertical direction, thereby realizing calibration of the zero point position of each camera.
[0004] However, in the above related art, two light interrupters need to be arranged in each camera, and the number of light interrupters is large, thereby increasing the probability of hardware failure. SUMMARY
[0005] In view of the problems in the prior art, the present application provides a zero point position calibration method and device of a camera, an electronic device and a storage medium.
[0006] The present application provides a zero point position calibration method of a camera, the camera comprising a main camera and at least one auxiliary camera; the method comprising:
[0007] controlling the main camera to capture a first image when the main camera is at a first target zero point position;
[0008] determining a first target position in the first image;
[0009] for each auxiliary camera, controlling the auxiliary camera to rotate to a second target zero point position based on the first target position and a preset position difference value corresponding to the auxiliary camera; the preset position difference value is a coordinate difference value between the first target position and a second target position; the second target position is a target position in a second image captured by the auxiliary camera, and the second target position is located in the first image.
[0010] The application provides a zero position calibration method of a camera, the first target zero position comprises a horizontal zero position and a vertical zero position; a first light interrupter in a horizontal direction and a second light interrupter in a vertical direction are arranged in the main camera;
[0011] Before the main camera shoots a first image when the main camera is in a first target zero position, the method further comprises the following steps:
[0012] The main camera is controlled to rotate to the horizontal zero position through the first light interrupter, and the main camera is controlled to rotate to the vertical zero position through the second light interrupter.
[0013] The application provides a zero position calibration method of a camera, before the auxiliary camera is controlled to rotate to a second target zero position based on the first target position and a preset position difference value corresponding to the auxiliary camera, the method further comprises the following steps:
[0014] The auxiliary camera is controlled to rotate in the direction of the first target position;
[0015] The auxiliary camera after rotation shoots a third image;
[0016] When the target position in the third image is determined to be located in the first image, the third image is determined as the second image;
[0017] The coordinate difference value between the first target position and the target position in the second image is determined as the preset position difference value.
[0018] The application provides a zero position calibration method of a camera, the method further comprises the following steps:
[0019] When the target position in the third image is determined not to be located in the first image, the step of controlling the auxiliary camera to rotate in the direction of the first target position is returned to until the target position in the third image is located in the first image.
[0020] The application provides a zero position calibration method of a camera, the step of controlling the main camera to shoot a first image comprises the following steps:
[0021] When the shooting direction of the main camera is a target direction, the main camera is controlled to shoot the first image;
[0022] The step of controlling the auxiliary camera after rotation to shoot a third image comprises the following steps:
[0023] When the shooting direction of the auxiliary camera is the target direction, the auxiliary camera after rotation is controlled to shoot the third image.
[0024] According to the zero position calibration method of the camera provided by the application, the first target position is the center position of the first image, and the second target position is the center position of the second image.
[0025] The application further provides a zero position calibration device of a camera, the camera comprising a main camera and at least one auxiliary camera; the device comprising:
[0026] a first control unit configured to control the main camera to capture a first image when the main camera is at a first target zero position;
[0027] a first determination unit configured to determine a first target position in the first image;
[0028] a second control unit configured to, for each auxiliary camera, control the auxiliary camera to rotate to a second target zero position based on the first target position and a preset position difference value corresponding to the auxiliary camera; the preset position difference value being a coordinate difference value between the first target position and a second target position; the second target position being a target position in a second image captured by the auxiliary camera, and the second target position being located in the first image.
[0029] The application further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the zero position calibration method of the camera according to any one of the above when executing the program.
[0030] The application further provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the zero position calibration method of the camera according to any one of the above.
[0031] The application further provides a computer program product comprising a computer program, wherein the computer program is executable by a processor to implement the zero position calibration method of the camera according to any one of the above.
[0032] The application provides a camera zero position calibration method and device, electronic equipment and a storage medium. When a main camera is at a first target zero position, the main camera is controlled to capture a first image, and a first target position in the first image is determined. Then, for each auxiliary camera, the auxiliary camera is controlled to rotate to a second target zero position based on the first target position and a preset position difference value stored in advance. The preset position difference value is a coordinate difference value between the first target position and a second target position in a second image captured by the auxiliary camera, and the second target position and the first target position are both in the first image. It can be known that the calibration of the second target zero position of each auxiliary camera is realized based on the first target zero position of the main camera, and the calibration of the zero position of each auxiliary camera does not need the participation of a light interrupter, thereby saving the cost and reducing the probability of hardware failure. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0034] Figure 1 is one of the flowcharts of the camera zero position calibration method provided by the embodiments of the application;
[0035] Figure 2 is a structural diagram of the camera provided by the embodiments of the application;
[0036] Figure 3 is a diagram of the first image provided by the embodiments of the application;
[0037] Figure 4 is another flowchart of the camera zero position calibration method provided by the embodiments of the application;
[0038] Figure 5 is a third flowchart of the camera zero position calibration method provided by the embodiments of the application;
[0039] Figure 6 is a diagram of the third image provided by the embodiments of the application;
[0040] Figure 7 is a fourth flowchart of the camera zero position calibration method provided by the embodiments of the application;
[0041] Figure 8 is a structural diagram of the camera zero position calibration device provided by the embodiments of the application;
[0042] Figure 9 is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the present application will be described below in connection with the drawings in the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0044] The camera zero position calibration method of the present application will be described below in connection with Figures 1-7
[0045] Figure 1 is one of the flowcharts of the camera zero position calibration method provided by an embodiment of the present application, the camera comprising a main camera and at least one auxiliary camera; as shown in Figure 1 the camera zero position calibration method comprises the following steps:
[0046] Step 101: When the main camera is at a first target zero position, control the main camera to capture a first image.
[0047] Wherein, the auxiliary camera of the camera can be one, or more than two, and the present application does not limit the shape of each camera in the camera. Taking a camera with three cameras as an example, the camera can comprise one sphere camera and two cylinder cameras, taking the sphere camera as the main camera; or one cylinder camera and two sphere cameras, taking the cylinder camera as the main camera; or one sphere camera and two hemispheres, taking the sphere camera as the main camera; or one large sphere camera and two small sphere cameras, taking the large sphere camera as the main camera. Figure 2 is a schematic diagram of the structure of the camera provided by an embodiment of the present application, as shown in Figure 2 the camera comprises a large sphere camera 201, a small sphere camera 202, and a small sphere camera 203, the small sphere camera 202 and the small sphere camera 203 being located on both sides of the large sphere camera 201, wherein the large sphere camera is the main camera, and the small sphere camera 202 and the small sphere camera 203 are two auxiliary cameras.
[0048] For example, when the camera is powered on, the lens of the main camera can be rotated to the front position A shown in Figure 2 by means of a light interrupter when the main camera is at the horizontal zero position and the vertical zero position, completing the initial position action, and then controlling the main camera to capture a first image.
[0049] It should be noted that the above barrel machine can be a barrel machine with rotation function or a barrel machine without rotation function, when the barrel machine does not have rotation function, the horizontal position and the vertical position of the barrel machine do not change, that is, the zero position is fixed, when the barrel machine has rotation function, the horizontal position and the vertical position of the barrel machine change, and the zero position of the barrel machine needs to be calibrated.
[0050] Step 102, determining a first target position in the first image.
[0051] For example, when the main camera shoots the first image, the first image is sent to the processor of the camera, the coordinate position of each pixel point in the first image is determined by the processor of the camera, and the first target position is determined based on the coordinate position of each pixel point. The first target position can be a center coordinate position or a position with a preset value from the center coordinate position. Figure 3 is a schematic diagram of the first image provided by the embodiment of the application, as Figure 3 shown, the Z point position in the figure represents the first target position in the first image, that is, the center coordinate position of the first image.
[0052] Step 103, for each auxiliary camera, based on the first target position and the preset position difference value corresponding to the auxiliary camera, the auxiliary camera is controlled to rotate to a second target zero position, the second target zero position includes a horizontal zero position and a vertical zero position; the preset position difference value is the coordinate difference value between the first target position and the second target position; the second target position is a target position in a second image shot by the auxiliary camera, and the second target position is located in the first image.
[0053] Wherein, the preset position difference value corresponding to each auxiliary camera is pre-stored in the camera, the preset position difference value is determined based on the first target position in the first image shot by the main camera, and the preset position difference value is equal to the coordinate difference value between the first target position and the second target position in the second image. The condition that the second target position needs to meet is that the second target position is located in the first image, that is, the first target position and the second target position are located in the same image.
[0054] For example, after each power-on, for each auxiliary camera, the auxiliary camera is controlled to rotate to a second target position which is different from the first target position by a preset position difference value, that is, to rotate to a horizontal zero position and a vertical zero position.
[0055] It should be noted that each camera in the camera needs to have the function of rotating a certain angle range in the horizontal and vertical directions and the function of lens zooming, wherein the certain angle range can be 360 degrees, for example, so as to realize the case that all cameras can overlap pictures.
[0056] The zero position calibration method of the camera provided by the application comprises the following steps: when a main camera is at a first target zero position, controlling the main camera to shoot a first image, and determining a first target position in the first image; then for each auxiliary camera, controlling the auxiliary camera to rotate to a second target zero position based on the first target position and a preset position difference value stored in advance, the preset position difference value being a coordinate difference value between the first target position and a second target position in a second image shot by the auxiliary camera, and the second target position and the first target position both being located in the first image.
[0057] In an embodiment, the first target zero position comprises a horizontal zero position and a vertical zero position; the main camera is provided with a first optical interrupter in the horizontal direction and a second optical interrupter in the vertical direction. Figure 4 is a flowchart of the zero position calibration method of the camera provided by the embodiment of the application, as shown in Figure 4 Before the step 101, the zero position calibration method of the camera further comprises the following steps:
[0058] Step 104: controlling the main camera to rotate to the horizontal zero position through the first optical interrupter, and controlling the main camera to rotate to the vertical zero position through the second optical interrupter.
[0059] For example, the main camera of the camera is provided with a first optical interrupter in the horizontal direction and a second optical interrupter in the vertical direction; when the main camera rotates through the first optical interrupter, the level signal of the first optical interrupter changes, at which time it is determined that the main camera is at the zero position in the horizontal direction, that is, at the horizontal zero position; when the main camera rotates through the second optical interrupter, the level signal of the second optical interrupter changes, at which time it is determined that the main camera is at the zero position in the vertical direction, that is, at the vertical zero position, thereby realizing the calibration of the zero position of the main camera.
[0060] The zero position calibration method of the camera provided by the embodiment of the application comprises the following steps: when a main camera is at a first target zero position, controlling the main camera to shoot a first image, and determining a first target position in the first image; then for each auxiliary camera, controlling the auxiliary camera to rotate to a second target zero position based on the first target position and a preset position difference value stored in advance, the preset position difference value being a coordinate difference value between the first target position and a second target position in a second image shot by the auxiliary camera, and the second target position and the first target position both being located in the first image.
[0061] In an embodiment,Figure 5 This is the third flowchart illustrating the zero-point position calibration method for a camera provided in this embodiment of the invention. Figure 5 As shown, prior to step 103 above, the zero-point calibration method for this camera further includes the following steps:
[0062] Step 105: Control the auxiliary camera to rotate towards the first target position.
[0063] For example, when determining the first target position of the first image captured by the main camera, the first target position of the first image is sent to each auxiliary camera. At this time, each auxiliary camera is controlled to start calibrating the zero point position. That is, for each auxiliary camera, the auxiliary camera is controlled to rotate left and right and up and down at a certain speed to find the first target position, and then rotate in the direction of the first target position.
[0064] Step 106: Control the rotated auxiliary camera to capture a third image.
[0065] For example, after controlling the auxiliary camera to rotate a preset angle towards the first target position, the lens of the auxiliary camera is rotated to the same direction as the lens of the main camera. At this time, the rotated auxiliary camera is controlled to take a picture to obtain the third image.
[0066] Step 107: When it is determined that the target position in the third image is located in the first image, the third image is determined as the second image.
[0067] For example, when the auxiliary camera captures the third image, the third image is sent to the camera's processor. The camera's processor determines the coordinate position of each pixel in the third image and determines the target position in the third image based on the coordinate position of each pixel. The target position in the third image can be the center coordinate position of the third image or a position at a preset distance from the center coordinate position. Then, it is determined whether there is a pixel in the first image whose coordinate value is equal to the coordinate value of the target position in the third image. When it is determined that there is a pixel in the first image whose coordinate value is equal to the coordinate value of the target position in the third image, it means that the target position of the third image captured by the auxiliary camera appears in the first image captured by the main camera. At this time, the third image is determined to be the second image. Figure 6 This is a schematic diagram of the third image provided in an embodiment of the present invention, such as... Figure 6 As shown, point X represents the location of the second target in the third image; in comparison... Figure 3 and Figure 6 It can be seen that the location of the second target in the third image is located at... Figure 3 The location of point Y in the middle determines that the target position in the third image is located in the first image.
[0068] Step 108, determining the coordinate difference value between the first target position and the target position in the second image as the preset position difference value.
[0069] For example, when it is determined that the target position in the third image is located in the first image, the coordinate difference value between the first target position and the target position in the third image is determined as the preset position difference value, that is, the coordinate difference value between the first target position and the target position in the second image is determined as the preset position difference value, and the preset position difference value is stored in correspondence with the identifier of the auxiliary camera, so as to facilitate the calibration of the zero position of the auxiliary camera next time based on the preset position difference value stored in advance.
[0070] It should be noted that the zero position calibration method of each auxiliary camera is the same, and the zero position calibration of each auxiliary camera in the camera can be completed by using the above-mentioned zero position calibration method of the auxiliary camera, which will not be described herein again.
[0071] It should be noted that when the first-time zero position calibration of each auxiliary camera is completed, the preset position difference value corresponding to each auxiliary camera and the identifier of the auxiliary camera are stored correspondingly, so as to facilitate the calibration of the zero position of the auxiliary camera next time based on the preset position difference value stored in advance.
[0072] The zero position calibration method of the camera provided by the embodiment of the present application can realize the calibration of the zero position of each auxiliary camera by means of the image relationship with the main camera, the zero position of the main camera, and a software mode, without the need to set an optical interrupter in the auxiliary camera, and the preset position difference value obtained after the calibration is stored, thereby providing convenience for the subsequent calibration of the zero position of the auxiliary camera.
[0073] In an embodiment, Figure 7 is a fourth flowchart of the zero position calibration method of the camera provided by the embodiment of the present application, as shown in the figure, Figure 7 The zero position calibration method of the camera further includes the following steps:
[0074] Step 109, when it is determined that the target position in the third image is not located in the first image, returning to the step of controlling the auxiliary camera to rotate to the direction of the first target position until the target position in the third image is located in the first image.
[0075] For example, when it is determined that the coordinate value of no pixel point in the first image is equal to the coordinate value of the target position in the third image, it indicates that the target position of the third image captured by the auxiliary camera does not appear in the first image captured by the main camera, at this time, the auxiliary camera is continuously controlled to rotate towards the direction close to the first target position until the target position in the third image captured by the auxiliary camera is located in the first image, at this time, the coordinate difference value between the first target position and the target position in the third image is determined as the preset position difference value, and the preset position difference value is stored in correspondence with the identifier of the auxiliary camera, so as to facilitate the next zero point position calibration of the auxiliary camera based on the preset position difference value stored in advance.
[0076] In summary, two conditions need to be met for each auxiliary camera to complete the zero point position calibration: the first condition is that the second target position of the image captured by the auxiliary camera and the first target position of the image captured by the main camera appear in the same image; for example, the target position is the center coordinate position, the center position of the image captured by the auxiliary camera and the center position of the image captured by the main camera appear in the same image, that is, both appear in the first image; the second condition is to determine the coordinate difference value between the first target position and the second target position, that is, the preset position difference value, when the two conditions are met, it can be determined that the auxiliary camera completes the zero point position calibration.
[0077] The zero point position calibration method of the camera provided by the embodiment of the application can ensure that each auxiliary camera can form the calibration of the positioning and the zero point position through the image relationship with the main camera.
[0078] In an embodiment, the step 101 can be implemented by the following manner:
[0079] When the shooting direction of the main camera is the target direction, the main camera is controlled to capture the first image.
[0080] The step 106 can be implemented by the following manner:
[0081] When the shooting direction of the auxiliary camera is the target direction, the auxiliary camera after rotation is controlled to capture the third image.
[0082] For example, in order to ensure that the main camera and each auxiliary camera are located in the same plane, when the main camera and each auxiliary camera capture, the shooting direction of the lens of each camera needs to be rotated to the target direction, if the scene in front of the lens is to be captured, the target direction can be a direction parallel to the ground and facing forward.
[0083] The zero position calibration method of the camera provided by the embodiment of the present application can ensure that the main camera and each auxiliary camera are located on the same plane by rotating the shooting direction of the lens of each camera to the target direction when the main camera and each auxiliary camera are shooting.
[0084] In an embodiment, the first target position is the center position of the first image, and the second target position is the center position of the second image.
[0085] For example, the first target position and the second target position are both the center positions of the corresponding images, which facilitates the processor of the camera to quickly determine the target position and also facilitates the processor to quickly determine whether the target position of the image shot by the auxiliary camera is located in the image shot by the main camera, thereby further improving the calibration efficiency of the zero position of the camera.
[0086] The zero position calibration device of the camera provided by the present application is described below, and the zero position calibration device of the camera described below can be correspondingly referred to the zero position calibration method of the camera described above.
[0087] Figure 8 The zero position calibration device of the camera provided by the present application is described below, and the zero position calibration device of the camera described below can be correspondingly referred to the zero position calibration method of the camera described above. Figure 8 As shown in the figure, the camera comprises a main camera and at least one auxiliary camera; the zero position calibration device 800 of the camera comprises a first control unit 801, a first determination unit 802 and a second control unit 803; wherein:
[0088] The first control unit 801 is configured to control the main camera to shoot a first image when the main camera is at a first target zero position.
[0089] The first determination unit 802 is configured to determine a first target position in the first image.
[0090] The second control unit 803 is configured to, for each auxiliary camera, control the auxiliary camera to rotate to a second target zero position based on the first target position and a preset position difference value corresponding to the auxiliary camera; the preset position difference value is the coordinate difference value between the first target position and a second target position; the second target position is a target position in a second image shot by the auxiliary camera, and the second target position is located in the first image.
[0091] The zero position calibration device of the camera provided by the application controls the main camera to shoot a first image when the main camera is at a first target zero position, and determines a first target position in the first image, and then controls each auxiliary camera to rotate to a second target zero position based on the first target position and a preset position difference value stored in advance, the preset position difference value being a coordinate difference value between the first target position and a second target position in a second image shot by the auxiliary camera, and the second target position and the first target position both being in the first image. It can be seen that the calibration of the second target zero position of each auxiliary camera is realized based on the first target zero position of the main camera, and the calibration of the zero position of each auxiliary camera does not need the participation of the optical interrupter, thereby saving resources and reducing the probability of hardware failure.
[0092] According to any one of the above embodiments, the first target zero position comprises a horizontal zero position and a vertical zero position; the main camera is provided with a first optical interrupter in the horizontal direction and a second optical interrupter in the vertical direction; and the device further comprises:
[0093] A third control unit is configured to control the main camera to rotate to the horizontal zero position through the first optical interrupter, and control the main camera to rotate to the vertical zero position through the second optical interrupter.
[0094] According to any one of the above embodiments, the device further comprises:
[0095] A fourth control unit is configured to control the auxiliary camera to rotate in the direction of the first target position.
[0096] A fifth control unit is configured to control the auxiliary camera after rotation to shoot a third image.
[0097] A second determination unit is configured to determine the third image as the second image when determining that the target position in the third image is in the first image.
[0098] A third determination unit is configured to determine a coordinate difference value between the first target position and the target position in the second image as the preset position difference value.
[0099] According to any one of the above embodiments, the device further comprises:
[0100] A fourth determination unit is configured to return to the step of controlling the auxiliary camera to rotate in the direction of the first target position when determining that the target position in the third image is not in the first image, until the target position in the third image is in the first image.
[0101] According to any one of the above embodiments, the first control unit 801 is specifically configured to:
[0102] When the shooting direction of the main camera is the target direction, control the main camera to capture the first image;
[0103] The fifth control unit is specifically used for:
[0104] When the shooting direction of the auxiliary camera is the target direction, the rotated auxiliary camera is controlled to capture the third image.
[0105] Based on any of the above embodiments, the first target position is the center position of the first image, and the second target position is the center position of the second image.
[0106] Figure 9 This is a schematic diagram of the physical structure of the electronic device provided in the embodiments of the present invention, such as... Figure 9 As shown, the electronic device may include a processor 910, a communication interface 920, a memory 930, and a communication bus 940, wherein the processor 910, the communication interface 920, and the memory 930 communicate with each other via the communication bus 940. The processor 910 can call logical instructions in the memory 930 to execute a zero-point calibration method for a camera, wherein the camera includes a main camera and at least one auxiliary camera; the method includes: when the main camera is at a first target zero-point position, controlling the main camera to capture a first image;
[0107] Determine the location of the first target in the first image;
[0108] For each auxiliary camera, the auxiliary camera is controlled to rotate to the second target zero point position based on the first target position and the preset position difference corresponding to the auxiliary camera; the preset position difference is the coordinate difference between the first target position and the second target position; the second target position is the target position in the second image captured by the auxiliary camera, and the second target position is located in the first image.
[0109] Moreover, the logic instructions in the memory 930 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0110] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to perform the zero point position calibration method of the camera provided by the above-mentioned methods, the camera comprising a main camera and at least one auxiliary camera; the method comprises: controlling the main camera to capture a first image when the main camera is at a first target zero point position;
[0111] determining a first target position in the first image;
[0112] For each auxiliary camera, based on the first target position and a preset position difference value corresponding to the auxiliary camera, the auxiliary camera is controlled to rotate to a second target zero point position; the preset position difference value is a coordinate difference value between the first target position and a second target position; the second target position is a target position in a second image captured by the auxiliary camera, and the second target position is located in the first image.
[0113] In another aspect, the present application also provides a non-transitory computer readable storage medium, which stores a computer program, the computer program is executed by a processor to implement the zero point position calibration method of the camera provided by the above-mentioned methods, the camera comprising a main camera and at least one auxiliary camera; the method comprises: controlling the main camera to capture a first image when the main camera is at a first target zero point position;
[0114] determining a first target position in the first image;
[0115] For each auxiliary camera, based on the first target position and the preset position difference value corresponding to the auxiliary camera, the auxiliary camera is controlled to rotate to a second target zero position; the preset position difference value is a coordinate difference value between the first target position and a second target position; the second target position is a target position in a second image captured by the auxiliary camera, and the second target position is located in the first image.
[0116] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0117] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and the necessary general hardware platform, and of course, it can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0118] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for calibrating the zero point position of a camera, characterized in that, The camera includes a main camera and at least one auxiliary camera; the method includes: When the main camera is at the first target zero point position, the main camera is controlled to capture a first image. The first target zero point position includes a horizontal zero point position and a vertical zero point position. Determine the first target position in the first image, wherein the first target position is the center coordinate position in the first image or a position at a preset distance from the center coordinate position; For each auxiliary camera, the auxiliary camera is controlled to rotate to the second target zero point position based on the first target position and the preset position difference corresponding to the auxiliary camera; the preset position difference is the coordinate difference between the first target position and the second target position; the second target position is the target position in the second image captured by the auxiliary camera, and the second target position is located in the first image, and the second target position is the center position of the second image.
2. The zero-point position calibration method for a camera according to claim 1, characterized in that, The main camera is equipped with a first light interrupter in the horizontal direction and a second light interrupter in the vertical direction; Before controlling the main camera to capture the first image when the main camera is at the first target zero point position, the method further includes: The main camera is controlled to rotate to the horizontal zero point position by the first light interrupter, and to rotate to the vertical zero point position by the second light interrupter.
3. The zero-point position calibration method for a camera according to claim 1, characterized in that, Before controlling the auxiliary camera to rotate to the second target zero point position based on the preset position difference between the first target position and the auxiliary camera, the method further includes: Control the auxiliary camera to rotate towards the first target position; The auxiliary camera, after being rotated, captures a third image; When it is determined that the target position in the third image is located in the first image, the third image is determined as the second image; The coordinate difference between the first target location and the target location in the second image is determined as the preset position difference.
4. The zero-point position calibration method for a camera according to claim 3, characterized in that, The method further includes: When it is determined that the target position in the third image is not located in the first image, the process returns to the step of controlling the auxiliary camera to rotate in the direction of the first target position until the target position in the third image is located in the first image.
5. The zero-point position calibration method for a camera according to claim 3, characterized in that, The control of the main camera to capture the first image includes: When the shooting direction of the main camera is the target direction, control the main camera to capture the first image; The auxiliary camera, after being rotated under control, captures a third image, including: When the shooting direction of the auxiliary camera is the target direction, the rotated auxiliary camera is controlled to capture the third image.
6. A zero-point calibration device for a camera, characterized in that, The camera includes a main camera and at least one auxiliary camera; the device includes: A first control unit is configured to control the main camera to capture a first image when the main camera is at a first target zero point position, wherein the first target zero point position includes a horizontal zero point position and a vertical zero point position. The first determining unit is used to determine the first target position in the first image, wherein the first target position is the center coordinate position in the first image or a position at a preset distance from the center coordinate position. The second control unit is used to control each auxiliary camera to rotate to the second target zero point position based on the first target position and the preset position difference corresponding to the auxiliary camera; the preset position difference is the coordinate difference between the first target position and the second target position; the second target position is the target position in the second image captured by the auxiliary camera, and the second target position is located in the first image, and the second target position is the center position of the second image.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the zero-point position calibration method for the camera as described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the zero-point position calibration method for the camera as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the zero-point position calibration method for the camera as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Shooting method and mobile terminal
CN109413324A
Device imaging method and apparatus, storage medium, and electronic device
WO2020259445A1