Angle calibration method and device and camera
By using image matching processing in the gun-ball integrated camera to determine the rotation angle of the ball machine, calibrate the angular relationship between the bolt and the ball machine, the calibration problem is solved due to changes in the position and environmental changes of the bolt, and the camera is improved Accuracy and stability.
Patent Information
- Application Number
- CN202411375596.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-14
AI Technical Summary
When the existing gun-ball integrated camera is offset by the position of the bolt, it is difficult for the ball machine to achieve accurate tracking, and environmental changes lead to inaccurate image comparison calibration, affecting the accuracy of the calibration results.
By obtaining the adjustable angle range of the bolt and the ball machine, the ball machine is controlled to rotate to multiple positions to capture images, and the corresponding images are captured at the same position as the bolt, the rotation angle of the ball machine is determined through image matching processing, and the bolt and the ball are calibrated. The angle relationship between machines ensures that calibration accuracy is maintained in the event of environmental changes.
Improves the accuracy of camera calibration, avoids calibration inaccuracy caused by environmental changes after the bolt rotates, and ensures tracking and shooting accuracy.
Smart Images

Figure CN119316716A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of camera technology, and in particular to an angle calibration method, device and camera. Background Art
[0002] The integrated gun-ball camera has a fixed lens (i.e., the gun camera) and another lens (i.e., the ball camera) that can move up and down and left and right with the pan / tilt. The integrated gun-ball camera supports functions such as "point and see" and gun-ball linkage tracking. "Point and see" means that when the user clicks a point in the corresponding picture of the gun camera lens, the ball camera lens will rotate to the position corresponding to the point; gun-ball linkage tracking means that when a person appears in the gun camera picture, the ball camera will automatically rotate to the position of the human figure to achieve human tracking.
[0003] The above functions are all realized based on the preset coordinate conversion relationship between the gun camera and the ball camera. However, when the gun camera position is offset, it is difficult for the ball camera to accurately track the target. At this time, the corresponding coordinate relationship between the gun camera and the ball camera needs to be calibrated.
[0004] When comparing and calibrating images collected by a gun camera and a ball camera, there are some problems. If the environment around the camera changes during calibration, the comparison result will be inaccurate, and ultimately the calibration result will be inaccurate. Summary of the invention
[0005] The embodiments of the present application provide an angle calibration method, device and camera to solve the problem of low accuracy of camera calibration.
[0006] In a first aspect, an embodiment of the present application provides an angle calibration method, which is applied to a gun-ball integrated camera, wherein the gun-ball integrated camera includes a gun camera and a ball camera, wherein the gun camera is manually adjusted, and the ball camera is adjusted according to the rotation of the pan / tilt head, and the method includes:
[0007] In response to an angle calibration instruction, acquiring a first position of the bolt and a first adjustable angle range of the bolt;
[0008] According to the first adjustable angle range, the ball camera is controlled to rotate to a plurality of positions, and a first image captured by the ball camera at each position is acquired, and a second image corresponding to each first image captured by the gun camera at the first position is acquired, wherein the shooting time of the first image is the same as the shooting time of the second image corresponding to the first image;
[0009] Determine the rotation angle of the ball camera according to the multiple first images and the second image corresponding to each first image;
[0010] According to the rotation angle, the angle relationship between the gun camera and the ball camera is calibrated.
[0011] In a possible implementation, according to the adjustable angle range, controlling the ball camera to rotate to a plurality of positions, and acquiring a first image captured by the ball camera at each position, and acquiring a second image corresponding to each first image captured by the gun camera at the first position, comprises:
[0012] Determining a second adjustable angle range of the ball camera according to the first adjustable angle range;
[0013] Get the preset step size;
[0014] Determining at least one correction angle of the ball camera within the second adjustable angle range according to the preset step length;
[0015] Determine the multiple positions of the ball camera including a second position corresponding to each correction angle;
[0016] The ball camera is controlled to rotate to a second position corresponding to each correction angle to capture a first image corresponding to each correction angle, and the gun camera is controlled to capture a second image corresponding to each first image at the first position.
[0017] In a possible implementation, controlling the ball camera to rotate to a second position corresponding to each correction angle to capture a first image corresponding to each correction angle, and controlling the gun camera to capture a second image corresponding to each first image at the first position, includes:
[0018] For any correction angle, the ball camera is controlled to rotate to a second position corresponding to the correction angle to capture a first image corresponding to the correction angle, and the gun camera is controlled to capture a second image corresponding to the first image at the first position.
[0019] In a possible implementation, determining the rotation angle of the ball camera according to the multiple first images and the multiple second images corresponding to each first image includes:
[0020] Determine a plurality of image sets, wherein the image sets include the first image and a second image corresponding to the first image;
[0021] For any image set, matching processing is performed on a first image and a second image in the image set to obtain a matching result;
[0022] Determine the image set with successful matching results as the correction image set;
[0023] The rotation angle of the ball camera is determined according to the correction image set.
[0024] In a possible implementation, performing matching processing on the first image and the second image in the image set to obtain a matching result includes:
[0025] In a first image in the image set, a first area to be selected is determined, wherein a center position of the first area to be selected is a center position of the first image, and a size of the first area to be selected is a preset size;
[0026] In a second image in the image set, a second area to be selected is determined, wherein a center position of the second area to be selected is a center position of the second image, and a size of the second area to be selected is the preset size;
[0027] Matching is performed on the first candidate area and the second candidate area to obtain a matching result.
[0028] In a possible implementation manner, performing matching processing on the first candidate area and the second candidate area to obtain a matching result includes:
[0029] Get the preset similarity;
[0030] Obtaining a first similarity between the second candidate region and the first candidate region;
[0031] If the first similarity is greater than or equal to the preset similarity, determining the matching result as the matching success;
[0032] If the first similarity is less than the preset similarity, the matching result is determined to be a matching failure.
[0033] In a possible implementation manner, determining the rotation angle of the ball camera according to the correction image set includes:
[0034] Determining a correction angle corresponding to a first image in the correction image set;
[0035] The correction angle corresponding to the first image is determined as the rotation angle of the ball camera
[0036] In a possible implementation manner, calibrating the angle relationship between the gun camera and the ball camera according to the rotation angle includes:
[0037] Obtaining a preset angle corresponding to the bolt;
[0038] determining an angular offset between the preset angle and the rotation angle;
[0039] Determining a target angle corresponding to the bolt according to the preset angle and the angle offset;
[0040] Determining the angular relationship between the gun camera and the ball camera includes a rotation angle of the ball camera and a target angle corresponding to the rotation angle.
[0041] In a second aspect, an embodiment of the present application provides an angle calibration device, the device comprising:
[0042] An acquisition module, configured to acquire a first position of the bolt and a first adjustable angle range of the bolt in response to an angle calibration instruction;
[0043] A control module, configured to control the ball camera to rotate to a plurality of positions according to the first adjustable angle range, and obtain a first image captured by the ball camera at each position, and obtain a second image corresponding to the first image captured by the gun camera at the first position;
[0044] A determination module, used to determine the rotation angle of the ball camera according to the plurality of first images and a second image corresponding to each first image;
[0045] The calibration module is used to calibrate the angle relationship between the gun camera and the ball camera according to the rotation angle.
[0046] In a possible implementation manner, the control module is specifically used to:
[0047] Determining a second adjustable angle range of the ball camera according to the first adjustable angle range;
[0048] Get the preset step size;
[0049] Determining at least one correction angle of the ball camera within the second adjustable angle range according to the preset step length;
[0050] Determine the multiple positions of the ball camera including a second position corresponding to each correction angle;
[0051] The ball camera is controlled to rotate to a second position corresponding to each correction angle to capture a first image corresponding to each correction angle, and the gun camera is controlled to capture a second image corresponding to each first image at the first position.
[0052] In a possible implementation manner, the control module is specifically used to:
[0053] For any correction angle, the ball camera is controlled to rotate to a second position corresponding to the correction angle to capture a first image corresponding to the correction angle, and the gun camera is controlled to capture a second image corresponding to the first image at the first position.
[0054] In a possible implementation manner, the determining module is specifically configured to:
[0055] Determine a plurality of image sets, wherein the image sets include the first image and a second image corresponding to the first image;
[0056] For any image set, matching processing is performed on a first image and a second image in the image set to obtain a matching result;
[0057] Determine the image set with successful matching results as the correction image set;
[0058] The rotation angle of the ball camera is determined according to the correction image set.
[0059] In a possible implementation manner, the determining module is specifically configured to:
[0060] In a first image in the image set, a first area to be selected is determined, wherein a center position of the first area to be selected is a center position of the first image, and a size of the first area to be selected is a preset size;
[0061] In a second image in the image set, a second area to be selected is determined, wherein a center position of the second area to be selected is a center position of the second image, and a size of the second area to be selected is the preset size;
[0062] Matching is performed on the first candidate area and the second candidate area to obtain a matching result.
[0063] In a possible implementation manner, the determining module is specifically configured to:
[0064] Get the preset similarity;
[0065] Obtaining a first similarity between the second candidate region and the first candidate region;
[0066] If the first similarity is greater than or equal to the preset similarity, determining the matching result as the matching success;
[0067] If the first similarity is less than the preset similarity, the matching result is determined to be a matching failure.
[0068] In a possible implementation manner, the determining module is specifically configured to:
[0069] Determining a correction angle corresponding to a first image in the correction image set;
[0070] The correction angle corresponding to the first image is determined as the rotation angle of the ball camera.
[0071] In a possible implementation manner, the calibration module is specifically used to:
[0072] Obtaining a preset angle corresponding to the bolt;
[0073] determining an angular offset between the preset angle and the rotation angle;
[0074] Determining a target angle corresponding to the bolt according to the preset angle and the angle offset;
[0075] Determining the angular relationship between the gun camera and the ball camera includes a rotation angle of the ball camera and a target angle corresponding to the rotation angle.
[0076] In a third aspect, an embodiment of the present application provides a camera, including:
[0077] at least one processor; and
[0078] a memory communicatively connected to the at least one processor; wherein,
[0079] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform any method described in the first aspect.
[0080] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute any one of the methods described in the first aspect.
[0081] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any method in the first aspect when executed by a processor.
[0082] The angle calibration method, device and camera provided in the embodiments of the present application can control the ball camera to rotate to multiple positions according to the adjustable angle range, and obtain the corresponding first image taken by the ball camera at each position, and obtain the second image corresponding to each first image taken by the gun camera at the first position. The rotation angle of the ball camera is determined according to the multiple first images and the second image corresponding to each first image. According to the rotation angle, the angle relationship between the gun camera and the ball camera is calibrated. In this way, when the rotation angle of the gun camera changes, the rotation angle of the ball camera can be determined according to the multiple first images and the second image corresponding to each first image. And according to the rotation angle of the ball camera, the angle relationship between the gun camera and the ball camera is calibrated to determine the target angle of the ball camera. This avoids the situation where the environment around the camera changes during calibration after the rotation angle of the gun camera changes, which will lead to inaccurate comparison results, thereby improving the accuracy of camera calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1A schematic diagram of an application scenario provided by an embodiment of the present application;
[0084] Figure 2 A schematic diagram of a flow chart of an angle calibration method provided in an embodiment of the present application;
[0085] Figure 3 A schematic diagram of a process for calibrating the angle relationship between a gun camera and a ball camera provided in an embodiment of the present application;
[0086] Figure 4 A schematic diagram of a flow chart of another angle calibration method provided in an embodiment of the present application;
[0087] Figure 5 A schematic diagram of a process for determining a correction image set provided in an embodiment of the present application;
[0088] Figure 6 A schematic diagram of an angle calibration process provided in an embodiment of the present application;
[0089] Figure 7 A schematic diagram of the structure of an angle calibration device provided in an embodiment of the present application;
[0090] Figure 8 A schematic diagram of the structure of a camera provided in an embodiment of the present application. DETAILED DESCRIPTION
[0091] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0092] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0093] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0094] For ease of understanding, below, combined Figure 1 , the application scenarios to which the embodiments of the present application are applicable are described.
[0095] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 , including a camera 101 and a user 102. The camera 101 includes a gun camera and a ball camera. Among them, the gun camera shoots at a fixed angle to obtain an image, and the ball camera can shoot at different angles through the pan-tilt control to obtain an image. When the gun camera of the camera 101 shoots the user 102 at a rotating angle, the camera 101 can determine the pan-tilt angle corresponding to the camera head of the camera 101 according to the rotating angle. The camera 101 controls the pan-tilt to rotate according to the pan-tilt angle, and controls the ball camera to shoot and obtain an image at the pan-tilt angle. In this way, the camera 101 can track the user 102 within the shooting range. The camera 101 can also adjust the rotation angle of the gun camera according to the user setting. The camera 101 determines the pan-tilt angle corresponding to the camera head of the camera 101 according to the rotation angle. And control the pan-tilt to rotate to the pan-tilt angle, so that the gun camera and the ball camera of the camera 101 can be adjusted to the corresponding position for shooting according to the user setting.
[0096] In the above process, when comparing and calibrating the images collected by the gun camera and the ball camera, if the environment around the camera changes during calibration, the comparison result will be inaccurate, and ultimately the calibration result will be inaccurate.
[0097] In the embodiment of the present application, the camera can control the ball camera to rotate to multiple positions according to the adjustable angle range, and obtain the corresponding first image taken by the ball camera at each position, and obtain the second image corresponding to each first image taken by the gun camera at the first position. The rotation angle of the ball camera is determined according to the multiple first images and the second image corresponding to each first image. According to the rotation angle, the angular relationship between the gun camera and the ball camera is calibrated. In this way, when the rotation angle of the gun camera changes, the rotation angle of the ball camera can be determined according to the multiple first images and the second image corresponding to each first image. And according to the rotation angle of the ball camera, the angular relationship between the gun camera and the ball camera is calibrated to determine the target angle of the ball camera. This avoids the situation where the environment around the camera changes during calibration after the rotation angle of the gun camera changes, resulting in inaccurate comparison results, thereby improving the accuracy of camera calibration.
[0098] The method shown in the present application is described below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.
[0099] Figure 2 A flowchart of an angle calibration method provided in an embodiment of the present application. Figure 2 , the method may include:
[0100] S201. In response to an angle calibration instruction, obtain a first position of the gun and a first adjustable angle range of the gun.
[0101] The execution subject of the embodiment of the present application may be a camera, or an angle calibration device set in the camera, etc. The angle calibration device may be implemented by software, or by a combination of software and hardware. The camera may be a gun-ball integrated camera. The gun-ball integrated camera includes a gun camera and a ball camera. The gun camera is manually adjusted, and the ball camera is adjusted according to the rotation of the pan / tilt.
[0102] The angle calibration command can be set by the user in real time. The user can manually adjust the angle of the bolt within the first adjustable angle range. The angle of the bolt can also be adjusted through the terminal device.
[0103] Optionally, the angle calibration instruction may also be generated by the camera according to the shooting scene.
[0104] For example, if the camera detects object 1 within the shooting range and needs to track object 1, an angle calibration instruction may be generated according to the current moving position of object 1. After calibration according to the angle calibration instruction, the box camera and ball camera of the camera may accurately capture multiple images in the process of tracking object 1.
[0105] The terminal device and the camera are connected to the camera through wireless network, Bluetooth, etc. The application corresponding to the camera can be set in the terminal device. The terminal device can control the camera through the application corresponding to the camera.
[0106] The adjustable angle range can be set in advance and stored in the preset storage space of the camera.
[0107] For example, after the terminal device establishes a connection with camera A, the user can click the icon corresponding to the camera A application in the terminal device, and the terminal device displays the control page in response to the user's click operation. The user can set the first position of the gun to position A21 in the control page, and the terminal device generates an angle calibration instruction in response to the user's click operation. And send the angle calibration instruction to camera A. After receiving the angle calibration, camera A obtains the first position A21 of the gun, and obtains the first adjustable angle range of the gun in the preset storage space as 2° to 10°.
[0108] S202, according to the first adjustable angle range, control the ball camera to rotate to a plurality of positions, and obtain a first image captured by the ball camera at each position, and obtain a second image corresponding to each first image captured by the gun camera at the first position.
[0109] The multiple positions of the ball camera can be determined according to the adjustable angle range in the following manner: obtain a preset step length; determine the second adjustable angle range of the ball camera according to the first adjustable angle range; determine at least one correction angle of the ball camera within the adjustable angle range according to the preset step length; determine the multiple positions of the ball camera including the second position corresponding to each correction angle; control the ball camera to rotate to the second position corresponding to each correction angle to capture a first image corresponding to each correction angle, and control the gun to capture a second image corresponding to each first image at the first position.
[0110] For any correction angle, the ball camera is controlled to rotate to the second position corresponding to the correction angle to capture the first image corresponding to the correction angle, and the gun camera is controlled to capture the second image corresponding to the first image at the first position to obtain the second image corresponding to each first image.
[0111] The shooting time of the first image is the same as the shooting time of the second image corresponding to the first image.
[0112] The correspondence between the first adjustable angle range and the second adjustable angle range can be obtained, and the second adjustable angle range of the ball camera can be determined according to the correspondence between the first adjustable angle range and the second adjustable angle range.
[0113] The correspondence between the first adjustable angle range and the second adjustable angle range, and the preset step length can be set in advance, and the correspondence between the first adjustable angle range and the second adjustable angle range, and the preset step length are stored in the preset storage space of the camera.
[0114] The ratio of the value corresponding to the second adjustable angle range to the preset step length can be determined as the number of at least one correction angle. The i-th correction angle can be determined by the following formula 1:
[0115] α i =i*θ
[0116] Among them, α i is to determine the i-th correction angle; is the preset step length θ.
[0117] For example, according to the above example, the first adjustable angle range of the gun of camera A is determined to be 2° to 10°. The camera obtains the correspondence between the first adjustable angle range and the second adjustable angle range in the preset storage space, and determines the second adjustable angle range of the ball camera to be 2° to 10° according to the correspondence between the first adjustable angle range and the second adjustable angle range. Assuming that the preset step size is 2°, it can be determined that the ball camera includes 5 correction angles within the second adjustable angle range. According to the above formula 1, it can be determined that the first correction angle is 1*2°=2°, the second correction angle is 2*2°=4°, the third correction angle is 3*2°=6°, the fourth correction angle is 4*2°=8°, and the fifth correction angle is 5*2°=10°. According to the above example, the first position of the gun is determined to be position A21. According to the 5 correction angles and the first angle, the multiple positions of the gun and the ball can be determined as shown in Table 1:
[0118] Table 1
[0119]
[0120] For position A21, camera B controls the ball camera to shoot at position A21 to obtain the first image A11, and controls the bolt camera to shoot at position A21 to obtain the second image A21. According to this method, camera A controls the ball camera to rotate to multiple positions according to the multiple positions shown in Table 2 above, and obtains multiple first images shot by the ball camera at multiple positions, and controls the bolt camera to rotate to position A11, and obtains the second image corresponding to each first image shot by the bolt camera at position A11, which can be specifically shown in Table 2:
[0121] Table 2
[0122] Correction angle First Image Second Image 2° Image A11 Image A21 4° Image A12 Image A22 6° Image A13 Image A23 8° Image A14 Image A24 10° Image A15 Image A25
[0123] S203: Determine the rotation angle of the ball camera according to the multiple first images and the second image corresponding to each first image.
[0124] The rotation angle of the ball camera can be determined based on multiple first images and the second image corresponding to each first image in the following manner: multiple image sets are determined, and the image sets include first images and second images corresponding to the first images; for any image set, the first image and the second image in the image set are matched to obtain a matching result; the image set with a successful matching result is determined as a correction image set; and the rotation angle of the ball camera is determined based on the correction image set.
[0125] In the correction image set, the shooting time of the first image and the second image is the same. After determining the correction image set, the first rotation angle corresponding to the first image in the correction image set can be determined according to the adjustable angle range, thereby determining the rotation angle of the ball camera.
[0126] For example, according to the multiple first images and the multiple second images shown in Table 2 above, it can be determined that the multiple image sets can be specifically as shown in Table 3:
[0127] Table 3
[0128] Image Collection First Image Second Image Collection A1 Image A11 Image A21 Collection A2 Image A12 Image A22 Collection A3 Image A13 Image A23 Collection A4 Image A14 Image A24 Collection A5 Image A15 Image A25
[0129] For any image set shown in Table 3, camera A performs matching processing on the first image and the second image in the image set to obtain a matching result. The image set with a successful matching result is determined as the correction image set. The correction image set includes image A12 and image A22, and image A12 matches image A22. Camera A determines that the first rotation angle corresponding to image A12 in the correction image set is 4° based on the adjustable angle range. Therefore, it is determined that the correction angle corresponding to image Z11 is 4°, and then it can be determined that the rotation angle of the ball camera of camera A is 4°.
[0130] S204, calibrating the angle relationship between the gun camera and the ball camera according to the rotation angle.
[0131] The angle relationship between the gun camera and the ball camera can be calibrated according to the rotation angle in the following manner: obtain the preset angle corresponding to the gun camera; determine the angle offset between the preset angle and the rotation angle. According to the preset angle and the angle offset, determine the target angle corresponding to the gun camera; determine the angle relationship between the gun camera and the ball camera including the rotation angle of the ball camera and the target angle corresponding to the rotation angle.
[0132] The preset angle can be any rotation angle of the bolt camera within the adjustable angle range. The preset angle can be set in advance and stored in the preset storage space of the camera.
[0133] For example, assuming that the adjustable angle range of the bolt is 2° to 10°, and at least one rotation angle within the adjustable angle range includes 2°, 4°, 6°, 8° and 10°, it can be determined that the preset angle is 2°.
[0134] Next, combine Figure 3 , the process of calibrating the angle relationship between the gun camera and the ball camera is explained. Figure 3 This is a schematic diagram of the process of calibrating the angle relationship between the gun camera and the ball camera provided in the embodiment of the present application. Figure 3 , including camera 301. Camera 301 includes a gun camera and a ball camera. The dotted line is used to indicate the central viewing angle of the images captured by the gun camera and the ball camera. When the gun camera is at the minimum correction angle, the center of the captured image is located at position A1. When the center of the image captured by the ball camera is parallel to the center position A1 of the image captured by the gun camera, it can be determined that the center of the image captured by the ball camera is located at position A2. Since the distance between the gun camera and the ball camera is small (for example, within 10 cm), when they are farther away (for example, more than 3 m), it can be considered that position A1 and position A2 are located at the same point, namely point A.
[0135] When the user manually adjusts the gun camera upward, the center of the image captured by the gun camera is located at position B1. When the center of the image captured by the ball camera is parallel to the center position A1 of the image captured by the gun camera, it can be determined that the center of the image captured by the ball camera is located at position B2. Since the distance between the two lenses is very small (for example, within 10 cm), at a farther distance (for example, more than 3 m), it can be considered that position B1 and position B2 are located at the same point, namely point B. According to Figure 3, it can be determined that when the gun camera is adjusted by X° to point B, the coordinate transformation of the ball camera relative to the gun camera is offset by X°. Therefore, the preset angle corresponding to the gun camera can be the same as the rotation angle of the ball camera at the corresponding position.
[0136] For example, according to the above example, the rotation angle of the ball camera is determined to be 4°. Assuming that the preset angle is 2°, the angle offset between the preset angle and the rotation angle can be determined to be 2°. Therefore, it can be determined that the target angle corresponding to the rotation angle is 2°+2°=4°. It can be determined that the angular relationship between the gun camera and the ball camera includes that the rotation angle of the ball camera is 4° and the target angle of the gun camera is 4°.
[0137] The angle calibration method provided in the embodiment of the present application obtains the first position of the gun camera and the first adjustable angle range of the gun camera in response to the angle calibration instruction. According to the adjustable angle range, the ball camera is controlled to rotate to multiple positions, and the first image taken by the ball camera at each position and the second image corresponding to each first image taken by the gun camera at the first position are obtained. The rotation angle of the ball camera is determined according to the multiple first images and the second image corresponding to each first image. According to the rotation angle, the angle relationship between the gun camera and the ball camera is calibrated. In the above process, when the rotation angle of the gun camera changes, the rotation angle of the ball camera can be determined according to the multiple first images and the second image corresponding to each first image. And according to the rotation angle of the ball camera, the angle relationship between the gun camera and the ball camera is calibrated to determine the target angle of the gun camera. This avoids the situation where the environment around the camera changes during calibration after the rotation angle of the gun camera changes, resulting in inaccurate comparison results, thereby improving the accuracy of camera calibration.
[0138] Based on any of the above embodiments, Figure 4 , the detailed process of angle calibration is explained.
[0139] Figure 4 This is a flow chart of another angle calibration method provided in an embodiment of the present application. Figure 4 , the method comprising:
[0140] S401. In response to an angle calibration instruction, obtain a first position of the gun and a first adjustable angle range of the gun.
[0141] It should be noted that the execution process of S401 can refer to S201 and will not be repeated here.
[0142] S402, according to the first adjustable angle range, control the ball camera to rotate to multiple positions, and obtain a first image taken by the ball camera at each position, and obtain a second image corresponding to each first image taken by the gun camera at the first position.
[0143] For example, camera B obtains the first adjustable angle range of the gun as 0°~10°, and the first position of the gun is position B11. Camera B determines that the second adjustable angle range of the ball camera is 0°~10° based on the first adjustable angle range. Camera B determines that the preset step size is 2°, then it can be determined that within the second adjustable angle range, the ball camera includes 6 correction angles, namely 0°, 2°, 4°, 6°, 8° and 10°. The camera controls the ball camera to rotate to multiple positions based on the 6 correction angles, and obtains multiple first images taken by the ball camera at multiple positions, and controls the gun camera to rotate to position B11, and obtains the second image corresponding to each first image taken by the gun camera at position B11, which can be specifically shown in Table 4:
[0144] Table 4
[0145] Correction angle First Image Second Image 0° Image B11 Image B21 2° Image B12 Image B22 4° Image B13 Image B23 6° Image B14 Image B24 8° Image B15 Image B25 10° Image B16 Image B26
[0146] S403: Determine multiple image sets.
[0147] The image set includes a first image and a second image corresponding to the first image.
[0148] For example, according to the multiple first images and the multiple second images shown in Table 4 above, the multiple image sets may be determined as shown in Table 5:
[0149] Table 5
[0150] Image Collection First Image Second Image Image Collection 1 Image B11 Image B21 Image Collection 2 Image B12 Image B22 Image Collection 3 Image B13 Image B23 Image Collection 4 Image B14 Image B24 Image Collection 5 Image B15 Image B25 Image Collection 6 Image B16 Image B26
[0151] S404: For any image set, determine a first to-be-selected region in a first image in the image set.
[0152] The center position of the first area to be selected is the center position of the first image, and the size of the first area to be selected is a preset size.
[0153] The preset size can be set in advance and stored in the preset storage space of the camera.
[0154] For example, according to Table 5, determining the first candidate region of each first image as a region may be specifically as shown in Table 6:
[0155] Table 6
[0156] Image Collection First Image The first candidate area Image Collection 1 Image B11 Area B21 Image Collection 2 Image B12 Area B22 Image Collection 3 Image B13 Area B23 Image Collection 4 Image B14 Area B24 Image Collection 5 Image B15 Area B25 Image Collection 6 Image B16 Area B26
[0157] S405: Determine a second region to be selected in a second image in the image set.
[0158] The center position of the second area to be selected is the center position of the second image, and the size of the second area to be selected is a preset size.
[0159] For example, according to Table 5, determining the second candidate region of each second image as a region may be specifically as shown in Table 7:
[0160] Table 7
[0161] Image Collection Second Image The second candidate area Image Collection 1 Image B21 Area B11 Image Collection 2 Image B22 Area B12 Image Collection 3 Image B23 Area B13 Image Collection 4 Image B24 Area B14 Image Collection 5 Image B25 Area B15 Image Collection 6 Image B26 Area B16
[0162] S406: Perform matching processing on the first candidate area and the second candidate area to obtain a matching result.
[0163] The first candidate area and the second candidate area can be matched to obtain a matching result in the following manner: obtaining a preset similarity; obtaining a first similarity between the second candidate area and the first candidate area; if the first similarity is greater than or equal to the preset similarity, determining the matching result to be a successful match; if the first similarity is less than the preset similarity, determining the matching result to be a failed match.
[0164] The first similarity between the second candidate region and the first candidate region may be determined by a preset similarity algorithm.
[0165] The preset similarity and the preset similarity algorithm may be set in advance, and the preset similarity and the preset similarity algorithm may be stored in a preset storage space of the camera. The preset similarity may be 0.9.
[0166] For example, according to Table 6 and Table 7, for the first candidate area B11 and the second candidate area B21 of the image set 1, the camera B determines that the first similarity between the second candidate area and the first candidate area is 0.3 through a preset similarity algorithm. By this method, the first similarity between the first candidate area and the first candidate area in each image set can be specifically determined as shown in Table 8:
[0167] Table 8
[0168] Image Collection The first candidate area The second candidate area First similarity Image Collection 1 Area B21 Area B11 0.3 Image Collection 2 Area B22 Area B12 0.93 Image Collection 3 Area B23 Area B13 0.8 Image Collection 4 Area B24 Area B14 0.65 Image Collection 5 Area B25 Area B15 0.2 Image Collection 6 Area B26 Area B16 0.45
[0169] Assuming that the preset similarity is 0.9, according to Table 8, it can be determined that the first similarity corresponding to image set 2 is greater than the preset similarity, and the similarities corresponding to image set 1, image set 3 to image set 6 are less than the preset similarity. Therefore, it can be determined that the matching results corresponding to each image set can be specifically shown in Table 9:
[0170] Table 9
[0171] Image Collection First similarity Matching results Image Collection 1 0.3 Matching failed Image Collection 2 0.93 Matching success Image Collection 3 0.8 Matching failed Image Collection 4 0.65 Matching failed Image Collection 5 0.2 Matching failed Image Collection 6 0.45 Matching failed
[0172] S407: Determine the image set with successful matching results as the correction image set.
[0173] For example, according to the above example, it is determined that the image set with the matching result being successfully matched is image set 2. Therefore, camera B determines that the correction image set is image set 2.
[0174] Next, combine Figure 5 , the process of determining the correction image set is explained. Figure 5 This is a schematic diagram of the process of determining a correction image set provided in an embodiment of the present application. Figure 5, including image set 1 to image set 6. Each image set includes three large solid rectangular frames, and the leftmost large rectangular frame area is a schematic diagram of the shooting range of the gun camera and the ball camera in the shooting scene. The middle large rectangular frame area is the first image captured by the gun camera of the camera in the shooting scene, and the right large rectangular frame area is the second image captured by the ball camera of the camera in the shooting scene. In the 6 image sets, it can be determined that the central area of the first image in image set 2 is the same as the central area of the second image (both are object C). Therefore, it can be determined that the central area of the first image in image set 2 matches the central area of the second image, and then it can be determined that the corrected image is image set 2.
[0175] S408: Determine the rotation angle of the ball camera according to the calibration image set.
[0176] The rotation angle of the ball camera can be determined according to the correction image set in the following manner: determining the correction angle corresponding to the first image in the correction image set; and determining the correction angle corresponding to the first image as the rotation angle of the ball camera.
[0177] For example, according to the above example, the correction image set is determined to be image set 2. Camera B determines that the first image in image set 2 is image B12. Camera B determines that the correction angle corresponding to image B12 is 2° according to Table 5. Therefore, camera B determines that the rotation angle of the ball camera is 2°.
[0178] S409, calibrating the angle relationship between the gun camera and the ball camera according to the rotation angle.
[0179] The angular relationship between the gun camera and the ball camera can be calibrated according to the rotation angle in the following manner: obtain a preset angle corresponding to the gun camera; determine the angular offset between the preset angle and the rotation angle; determine the target angle corresponding to the gun camera according to the preset angle and the angle offset; determine the angular relationship between the gun camera and the ball camera including the rotation angle of the ball camera and the target angle corresponding to the rotation angle.
[0180] If the angle offset is less than or equal to the preset angle, the target angle corresponding to the gun is determined to be the difference between the angle offset and the preset angle. If the angle offset is greater than the preset angle, the target angle corresponding to the gun is determined to be the sum of the angle offset and the preset angle.
[0181] For example, according to the above example, the rotation angle of the ball camera is determined to be 2°. Assuming the preset angle is 0°, the angle offset can be determined to be 2°. Since the angle offset is greater than the preset angle, the target angle corresponding to the gun camera can be determined to be the sum of the angle offset and the preset angle, 2°. Therefore, the angle relationship between the gun camera and the ball camera determined by camera B includes the rotation angle of the ball camera, 2°, and the target angle 2° corresponding to the rotation angle.
[0182] For example, according to the above example, the rotation angle of the ball camera is determined to be 2°. Assuming the preset angle is 4°, the angle offset can be determined to be 2°. Since the angle offset is less than the preset angle, the target angle corresponding to the gun camera can be determined to be the difference between the angle offset and the preset angle, 2°. Therefore, the angle relationship between the gun camera and the ball camera determined by camera B includes the rotation angle of the ball camera, 2°, and the target angle 2° corresponding to the rotation angle.
[0183] When the angle is calibrated, each time the ball camera captures the second image, the gun camera also captures the first image. In this way, real-time images captured by the ball camera and the gun camera can be obtained, thus avoiding the situation in which the shooting scene changes during the angle calibration process, resulting in inaccurate angles.
[0184] The angle calibration method provided in the embodiment of the present application obtains the first position of the gun and the first adjustable angle range of the gun in response to the angle calibration instruction. According to the first adjustable angle range, the ball camera is controlled to rotate to multiple positions, and the first image taken by the ball camera at each position is obtained, and the second image corresponding to each first image taken by the gun camera at the first position is obtained. According to the multiple first images and the second image corresponding to each first image, multiple image sets are determined. For any image set, a first candidate area is determined in the first image in the image set. A second candidate area is determined in the second image in the image set. Matching processing is performed on the first candidate area and the second candidate area to obtain a matching result. The image set with a matching result of successful matching is determined as a correction image set. According to the correction image set, the rotation angle of the ball camera is determined. According to the rotation angle, the angle relationship between the gun camera and the ball camera is calibrated. In the above process, when the rotation angle of the gun camera changes, the rotation angle of the ball camera can be determined according to the multiple first images and the second image corresponding to each first image. And according to the rotation angle of the ball camera, the angle relationship between the gun camera and the ball camera is calibrated to determine the target angle of the gun camera. This improves the accuracy of camera calibration by avoiding the situation where the environment around the camera changes during calibration due to changes in the rotation angle of the gun, resulting in inaccurate comparison results.
[0185] Based on any of the above embodiments, Figure 6 , the process of angle calibration is illustrated with an example.
[0186] Figure 6 This is a schematic diagram of the angle calibration process provided by the embodiment of the present application. Figure 6, including a camera 601. The camera 601 may be a gun-ball integrated camera, and the camera 601 includes a gun camera and a ball camera. The user may manually adjust the gun camera position of the camera 601, and the camera 601 generates an angle calibration instruction in response to the user's adjustment operation. The angle calibration instruction is sent to the camera 601. After receiving the angle calibration, the camera 601 obtains a first position C11, and obtains a first adjustable angle range of 0° to 9° of the gun camera in the preset storage space.
[0187] The camera 601 obtains the correspondence between the first adjustable angle range and the second adjustable angle range in the preset storage space, and determines that the second adjustable angle range of the ball camera is 0° to 9° based on the correspondence between the first adjustable angle range and the second adjustable angle range. The camera 601 determines that the preset step size is 3°, and it can be determined that the ball camera includes 6 correction angles within the second adjustable angle range, which are 0°, 3°, 6° and 9°. According to the 4 correction angles, the camera controls the pan / tilt to drive the ball camera to rotate to multiple positions, and obtains the first image taken by the ball camera at each position, and controls the gun to take the second image corresponding to each first image at position C11. According to the multiple first images and the second image corresponding to each first image, the camera 601 determines that the multiple image sets can be specifically as shown in Table 10:
[0188] Table 10
[0189] Image Collection First Image Second Image Image collection C1 Image C11 Image C21 Image Collection C2 Image C12 Image C22 Image Collection C3 Image C13 Image C23 Image Collection C4 Image C14 Image C24
[0190] The camera 601 determines the first candidate region of each first image as a region according to Table 10, and the second candidate region of each second image as shown in Table 11:
[0191] Table 11
[0192] Image Collection The first candidate area The second candidate area Image collection C1 Area C21 Area C11 Image Collection C2 Area C22 Area C12 Image Collection C3 Area C23 Area C13 Image Collection C4 Area C24 Area C14
[0193] The camera 601 performs matching processing on the first candidate area and the second candidate area in each image set, and obtains the matching result corresponding to each image set, which can be specifically shown in Table 12:
[0194] Table 12
[0195] Image Collection The first candidate area The second candidate area Matching results Image collection C1 Area C21 Area C11 Matching failed Image Collection C2 Area C22 Area C12 Matching failed Image Collection C3 Area C23 Area C13 Matching success Image Collection C4 Area C24 Area C14 Matching failed
[0196] According to Table 12, the camera 601 determines that the image set with the matching result as a successful match is the image set C3. Therefore, the camera 601 determines that the correction image set is the image set C3. The camera 601 determines that the first image in the image set C3 is the image C13, and determines that the correction angle corresponding to the image C13 is 6°. The camera 601 obtains the preset angle corresponding to the gun camera as 0°. The camera 601 determines that the angle offset is 6°. Since the angle offset is greater than the preset angle, the camera 601 can determine that the target angle corresponding to the gun camera is the sum of the angle offset and the preset angle, 6°. Therefore, the camera 601 determines that the angular relationship between the gun camera and the ball camera includes the rotation angle of the ball camera, 6°, and the target angle 6° corresponding to the rotation angle.
[0197] The angle calibration process provided in the embodiment of the present application obtains the first position of the gun and the first adjustable angle range of the gun in response to the angle calibration instruction. According to the first adjustable angle range, the ball camera is controlled to rotate to multiple positions, and the first image taken by the ball camera at each position is obtained, and the second image corresponding to each first image taken by the gun camera at the first position is obtained. According to the multiple first images and the second image corresponding to each first image, multiple image sets are determined. For any image set, a first candidate area is determined in the first image in the image set. A second candidate area is determined in the second image in the image set. Matching processing is performed on the first candidate area and the second candidate area to obtain a matching result. The image set with a matching result of successful matching is determined as a correction image set. According to the correction image set, the rotation angle of the ball camera is determined. According to the rotation angle, the angle relationship between the gun camera and the ball camera is calibrated. In the above process, when the rotation angle of the gun camera changes, the rotation angle of the ball camera can be determined according to the multiple first images and the second image corresponding to each first image. And according to the rotation angle of the ball camera, the angle relationship between the gun camera and the ball camera is calibrated to determine the target angle of the gun camera. This improves the accuracy of camera calibration by avoiding the situation where the environment around the camera changes during calibration due to changes in the rotation angle of the gun, resulting in inaccurate comparison results.
[0198] Figure 7 This is a schematic diagram of the structure of the angle calibration device provided in the embodiment of the present application. Figure 7 , the angle calibration device 10 may include:
[0199] An acquisition module 11 is used to acquire a first position of the bolt and a first adjustable angle range of the bolt in response to an angle calibration instruction;
[0200] The control module 12 is used to control the ball camera to rotate to a plurality of positions according to the first adjustable angle range, and obtain a first image captured by the ball camera at each position, and obtain a second image corresponding to each first image captured by the gun camera at the first position, wherein the shooting time of the first image is the same as the shooting time of the second image corresponding to the first image;
[0201] A determination module 13, configured to determine a rotation angle of the ball camera according to the plurality of first images and a second image corresponding to each first image;
[0202] The calibration module 14 is used to calibrate the angle relationship between the gun camera and the ball camera according to the rotation angle.
[0203] In a possible implementation manner, the control module 12 is specifically configured to:
[0204] Determining a second adjustable angle range of the ball camera according to the first adjustable angle range;
[0205] Get the preset step size;
[0206] Determining at least one correction angle of the ball camera within the second adjustable angle range according to the preset step length;
[0207] Determine the multiple positions of the ball camera including a second position corresponding to each correction angle;
[0208] The ball camera is controlled to rotate to a second position corresponding to each correction angle to capture a first image corresponding to each correction angle, and the gun camera is controlled to capture a second image corresponding to each first image at the first position.
[0209] In a possible implementation manner, the control module 12 is specifically configured to:
[0210] For any correction angle, the ball camera is controlled to rotate to a second position corresponding to the correction angle to capture a first image corresponding to the correction angle, and the gun camera is controlled to capture a second image corresponding to the first image at the first position.
[0211] In a possible implementation manner, the determining module 13 is specifically configured to:
[0212] Determine a plurality of image sets, wherein the image sets include the first image and the second image, and the shooting time of the first image is the same as the shooting time of the second image;
[0213] For any image set, matching processing is performed on a first image and a second image in the image set to obtain a matching result;
[0214] Determine the image set with successful matching results as the correction image set;
[0215] The rotation angle of the ball camera is determined according to the correction image set.
[0216] In a possible implementation manner, the determining module 13 is specifically configured to:
[0217] In a first image in the image set, a first area to be selected is determined, wherein a center position of the first area to be selected is a center position of the first image, and a size of the first area to be selected is a preset size;
[0218] In a second image in the image set, a second area to be selected is determined, wherein a center position of the second area to be selected is a center position of the second image, and a size of the second area to be selected is the preset size;
[0219] Matching is performed on the first candidate area and the second candidate area to obtain a matching result.
[0220] In a possible implementation manner, the determining module 13 is specifically configured to:
[0221] Get the preset similarity;
[0222] Obtaining a first similarity between the second candidate region and the first candidate region;
[0223] If the first similarity is greater than or equal to the preset similarity, determining the matching result as the matching success;
[0224] If the first similarity is less than the preset similarity, the matching result is determined to be a matching failure.
[0225] In a possible implementation manner, the determining module 13 is specifically configured to:
[0226] Determining a correction angle corresponding to a first image in the correction image set;
[0227] The correction angle corresponding to the first image is determined as the rotation angle of the ball camera.
[0228] In a possible implementation manner, the calibration module 14 is specifically used to:
[0229] Obtaining a preset angle corresponding to the bolt;
[0230] determining an angular offset between the preset angle and the rotation angle;
[0231] Determining a target angle corresponding to the bolt according to the preset angle and the angle offset;
[0232] Determining the angular relationship between the gun camera and the ball camera includes a rotation angle of the ball camera and a target angle corresponding to the rotation angle.
[0233] The angle calibration device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0234] Figure 8 This is a schematic diagram of the structure of the camera provided in the embodiment of the present application. Figure 8 The camera 20 may include: a memory 21 and a processor 22. Exemplarily, the memory 21 and the processor 22 are interconnected via a bus 23.
[0235] The memory 21 is used to store program instructions;
[0236] The processor 22 is used to execute the program instructions stored in the memory, so as to enable the camera 20 to execute the method shown in the above method embodiment.
[0237] The camera provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0238] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above method.
[0239] The embodiment of the present application may also provide a computer program product, including a computer program, which can implement the above method when executed by a processor.
[0240] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc and any combination thereof.
[0241] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0242] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0243] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0244] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0245] In the present application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". The terms "first", "second", etc. in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the present application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.
Claims
1. An angle calibration method, characterized in that: Applied to a gun-ball integrated camera, the gun-ball integrated camera includes a gun camera and a ball camera, the gun camera is manually adjusted, and the ball camera is adjusted according to the rotation of the pan / tilt head, the method includes: In response to an angle calibration instruction, acquiring a first position of the bolt and a first adjustable angle range of the bolt; According to the first adjustable angle range, the ball camera is controlled to rotate to a plurality of positions, and a first image captured by the ball camera at each position is acquired, and a second image corresponding to each first image captured by the gun camera at the first position is acquired, wherein the shooting time of the first image is the same as the shooting time of the second image corresponding to the first image; Determine the rotation angle of the ball camera according to the multiple first images and the second image corresponding to each first image; According to the rotation angle, the angle relationship between the gun camera and the ball camera is calibrated.
2. The method according to claim 1, characterized in that According to the first adjustable angle range, controlling the ball camera to rotate to a plurality of positions, and acquiring a first image captured by the ball camera at each position, and acquiring a second image corresponding to each first image captured by the gun camera at the first position, including: Determining a second adjustable angle range of the ball camera according to the first adjustable angle range; Get the preset step size; Determining at least one correction angle of the ball camera within the second adjustable angle range according to the preset step length; Determine the multiple positions of the ball camera including a second position corresponding to each correction angle; The ball camera is controlled to rotate to a second position corresponding to each correction angle to capture a first image corresponding to each correction angle, and the gun camera is controlled to capture a second image corresponding to each first image at the first position.
3. The method according to claim 2, characterized in that Controlling the ball camera to rotate to a second position corresponding to each correction angle to obtain a first image corresponding to each correction angle, and controlling the gun camera to obtain a second image corresponding to each first image at the first position, including: For any correction angle, the ball camera is controlled to rotate to a second position corresponding to the correction angle to capture a first image corresponding to the correction angle, and the gun camera is controlled to capture a second image corresponding to the first image at the first position.
4. The method according to any one of claims 1 to 3, characterized in that: Determining the rotation angle of the ball camera according to the plurality of first images and the second image corresponding to each first image includes: Determine a plurality of image sets, wherein the image sets include the first image and a second image corresponding to the first image; For any image set, matching processing is performed on a first image and a second image in the image set to obtain a matching result; Determine the image set with successful matching results as the correction image set; The rotation angle of the ball camera is determined according to the correction image set.
5. The method according to claim 4, characterized in that Performing matching processing on the first image and the second image in the image set to obtain a matching result includes: In a first image in the image set, a first area to be selected is determined, wherein a center position of the first area to be selected is a center position of the first image, and a size of the first area to be selected is a preset size; In a second image in the image set, a second area to be selected is determined, wherein a center position of the second area to be selected is a center position of the second image, and a size of the second area to be selected is the preset size; Matching is performed on the first candidate area and the second candidate area to obtain a matching result.
6. The method according to claim 5, characterized in that Performing matching processing on the first candidate area and the second candidate area to obtain a matching result includes: Get the preset similarity; Obtaining a first similarity between the second candidate region and the first candidate region; If the first similarity is greater than or equal to the preset similarity, determining the matching result as the matching success; If the first similarity is less than the preset similarity, the matching result is determined to be a matching failure.
7. The method according to any one of claims 4 to 6, characterized in that: Determining the rotation angle of the ball camera according to the correction image set includes: Determining a correction angle corresponding to a first image in the correction image set; The correction angle corresponding to the first image is determined as the rotation angle of the ball camera.
8. The method according to any one of claims 1 to 7, characterized in that: According to the rotation angle, calibrating the angle relationship between the gun camera and the ball camera includes: Obtaining a preset angle corresponding to the bolt; determining an angular offset between the preset angle and the rotation angle; Determining a target angle corresponding to the bolt according to the preset angle and the angle offset; Determining the angular relationship between the gun camera and the ball camera includes a rotation angle of the ball camera and a target angle corresponding to the rotation angle.
9. An angle calibration device, characterized in that: The device comprises: An acquisition module, configured to acquire a first position of the bolt and a first adjustable angle range of the bolt in response to an angle calibration instruction; A control module, configured to control the ball camera to rotate to a plurality of positions according to the first adjustable angle range, and obtain a first image captured by the ball camera at each position, and obtain a second image corresponding to the first image captured by the gun camera at the first position; A determination module, used to determine the rotation angle of the ball camera according to the plurality of first images and a second image corresponding to each first image; The calibration module is used to calibrate the angle relationship between the gun camera and the ball camera according to the rotation angle.
10. A camera, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to make a computer execute the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.