A self-calibration method of a gimbal camera, a storage medium and an electronic device
By rotating the gimbal camera multiple times, the Pan value, tilt value, and latitude and longitude coordinates of the center point of the image are obtained. The initial tilt error of the gimbal and the deflection angle of the camera are calculated, which solves the problem of poor attitude angle accuracy of the gimbal camera and achieves more accurate attitude measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU FANTE TECH CO LTD
- Filing Date
- 2023-08-28
- Publication Date
- 2026-05-08
AI Technical Summary
The poor attitude angle accuracy of gimbal cameras in existing technologies leads to inaccurate measurements.
By rotating the gimbal camera multiple times, the camera's Pan value, tilt value, and latitude and longitude coordinates of the center point of the image are obtained. The initial tilt error of the gimbal, the height and deflection angle of the camera are calculated. The camera's position and attitude information are determined using the camera's height and the latitude and longitude of the gimbal camera.
The attitude angle accuracy of the gimbal camera has been improved, enabling more precise attitude measurement.
Smart Images

Figure CN117274394B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of shooting equipment technology, and in particular to a self-calibration method, storage medium, and electronic device for a gimbal camera. Background Technology
[0002] Nowadays, the use of cameras and other shooting devices mounted on gimbals for shooting has been widely applied in various fields such as aerial photography and inspection.
[0003] Furthermore, the attitude of a gimbal camera can currently be measured by installing an attitude measurement gyroscope. However, due to limitations in size, weight, and cost, the performance of the attitude measurement element is limited, resulting in poor accuracy of the measured attitude angle of the gimbal camera. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a self-calibration method, storage medium and electronic device for a gimbal camera, which solves the technical problem of poor attitude angle accuracy of the gimbal camera in the prior art.
[0006] (II) Technical Solution
[0007] To achieve the above objectives, the main technical solutions adopted by the present invention include:
[0008] In a first aspect, embodiments of the present invention provide a self-calibration method for a gimbal camera. The self-calibration method includes: a first data recording step, controlling a selected gimbal camera to rotate three times, wherein the center point of the gimbal camera's image is the ground area each time the rotation stops during the three rotations, and recording the PT value of the gimbal camera after each rotation and the latitude and longitude of the center point of the gimbal camera's image after each rotation during the three rotations; wherein the PT value includes the Pan value and the tilt value;
[0009] The error calculation steps are as follows: based on the PT value of the gimbal camera after each of the three rotations and the latitude and longitude of the center point of the gimbal camera's image after each of the three rotations, the initial tilt error of the gimbal is calculated.
[0010] Repeat the first data recording step and the error calculation step until the preset number of executions is reached, then stop the loop and select the median from multiple initial tilt errors of the gimbal as the final initial tilt error of the gimbal.
[0011] The second data recording step involves controlling the gimbal camera to rotate twice more after determining the final initial tilt error of the gimbal. During each of the two rotations, the center point of the gimbal camera's image is always the ground area when the camera stops rotating. The PT value of the gimbal camera after each rotation and the latitude and longitude of the center point of the gimbal camera's image after each rotation are also recorded.
[0012] The height calculation step calculates the camera's height based on the PT value of the gimbal camera after each of the two rotations and the latitude and longitude of the center point of the gimbal camera's image after each of the two rotations.
[0013] Repeat the second data recording step and the height calculation step until the preset number of executions is reached, then stop the loop, select the median of the heights of multiple cameras as the final camera height, and record the parameters corresponding to the final camera height;
[0014] Based on the parameters corresponding to the final camera height, calculate the latitude and longitude of the gimbal camera and the camera deflection angle in the gimbal camera when the Pan value is equal to 0; where the deflection angle is the angle between the camera and the due north direction.
[0015] The camera's position information is determined by using the camera's altitude and the latitude and longitude of the gimbal camera, and the camera's attitude information is determined by using the final initial tilt error and deflection angle of the gimbal.
[0016] In one possible embodiment, the latitude and longitude of the center point of the gimbal camera's image after each of the three rotations are obtained using the Baidu coordinate system.
[0017] In one possible embodiment, the initial tilt error of the gimbal is obtained by the following formula:
[0018]
[0019] Where O represents the projection point of the camera on the ground; A represents the center point of the gimbal camera's image after one of the three rotations; L represents the position of the gimbal camera; tilt_error represents the initial tilt error of the gimbal; and tilt_A represents the tilt value corresponding to the center point A.
[0020] In one possible embodiment, the difference in the Pan value corresponding to the two rotations is controlled between 45 degrees and 135 degrees.
[0021] In one possible embodiment, the height of the camera is obtained by the following formula:
[0022]
[0023] Where O represents the projection point of the camera on the ground; L represents the position of the gimbal camera; and C represents the center point of the gimbal camera's image after one of the two rotations.
[0024] In one possible embodiment, the deflection angle is obtained by the following formula:
[0025]
[0026] Where θ represents the deflection angle; the coordinates of the projection point O are (x, y); and pan_C represents the Pan value corresponding to the center point C of the gimbal camera's image after one of the two rotations.
[0027] Secondly, embodiments of this application provide a storage medium storing a computer program, which, when executed by a processor, performs the method described in the first aspect or any optional implementation thereof.
[0028] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the method described in the first aspect or any optional implementation of the first aspect.
[0029] (III) Beneficial Effects
[0030] The beneficial effects of this invention are:
[0031] This application provides a self-calibration method, storage medium, and electronic device for a gimbal camera. By rotating the gimbal camera multiple times and directly acquiring the pan value, tilt value, and latitude and longitude coordinates of the camera's center point after rotation, the method calculates the initial tilt error, camera height, camera latitude and longitude, and camera deflection angle when the pan value is equal to 0 using the pan value, tilt value, and latitude and longitude coordinates of the camera's center point. The method also determines the camera's position information using the camera height and the gimbal camera's latitude and longitude, and determines the camera's attitude information using the final initial tilt error and deflection angle. This method improves attitude angle accuracy compared to existing methods that measure gimbal camera attitude using attitude measurement gyroscopes.
[0032] To make the above-mentioned objectives, features and advantages to be achieved by the embodiments of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0033] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 A flowchart of a self-calibration method for a gimbal camera provided in an embodiment of this application is shown;
[0035] Figure 2 This illustration shows a diagram of a graphic composed of line points in the image after three rotations, camera projection, and camera position, provided by an embodiment of this application.
[0036] Figure 3 A schematic diagram of the OLB triangle provided in an embodiment of this application is shown;
[0037] Figure 4 This illustration shows a diagram of a graphic composed of line points in the image after two rotations, camera projection, and camera position, provided by an embodiment of this application.
[0038] Figure 5 A schematic diagram of a two-dimensional rectangular coordinate system provided in an embodiment of this application is shown. Detailed Implementation
[0039] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] Gimbal cameras have a wide range of applications in the security field, mainly in the following aspects:
[0041] Surveillance: Pan-tilt cameras can be used for comprehensive monitoring of a location, covering a wide area and offering a broad field of view, capturing more details and anomalies. Simultaneously, pan-tilt cameras can achieve functions such as automatic cruise, preset displacement, and automatic tracking, improving monitoring efficiency and accuracy.
[0042] Anti-theft: PTZ cameras can be used for real-time monitoring of important areas, promptly detecting and alerting to illegal intrusions, theft, and other similar incidents. The PTZ camera's automatic tracking function provides relevant evidence.
[0043] Fire monitoring: Pan-tilt cameras can be used for fire monitoring. Through technologies such as infrared and thermal imaging, they can monitor the temperature changes of the fire source and its surrounding environment in real time and issue timely alarms to effectively prevent fire accidents.
[0044] Security checks: Pan-tilt cameras can be used for security checks in locations such as airports and train stations. Through their high-definition images and omnidirectional monitoring, pan-tilt cameras can effectively identify dangerous items and suspicious individuals, improving the efficiency and accuracy of security checks.
[0045] Intelligent analysis: Gimbal cameras can use technologies such as deep learning to achieve intelligent analysis functions such as face recognition, license plate recognition, and behavior recognition, thereby improving security efficiency and accuracy.
[0046] In conclusion, the role of PTZ cameras in the security field is irreplaceable. They can provide comprehensive, high-definition, real-time monitoring and intelligent analysis, helping users achieve safer and more intelligent monitoring and management.
[0047] However, existing technologies suffer from poor accuracy in measuring the attitude angle of gimbal cameras.
[0048] Based on this, embodiments of this application provide a self-calibration method, storage medium, and electronic device for a gimbal camera. By rotating the gimbal camera multiple times and directly acquiring the pan value, tilt value, and latitude and longitude coordinates of the camera's center point after rotation, the method calculates the initial tilt error, camera height, camera latitude and longitude, and camera deflection angle when the pan value is equal to 0 using the aforementioned pan value, tilt value, and latitude and longitude coordinates of the camera's center point. Furthermore, the method determines the camera's position information using the camera height and the gimbal camera's latitude and longitude, and determines the camera's attitude information using the final initial tilt error and deflection angle. Therefore, compared to existing methods that measure the gimbal camera's attitude using a gyroscope, this method can improve attitude angle accuracy (i.e., obtain more precise attitude information).
[0049] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.
[0050] Please see Figure 1 , Figure 1 A flowchart illustrating a self-calibration method for a gimbal camera provided in an embodiment of this application is shown. Figure 1 As shown, this self-calibration method can be executed by an electronic device, and the specific device can be configured according to actual needs; the embodiments of this application are not limited thereto. For example, the electronic device can be a computer or a server, etc. Specifically, the self-calibration method includes:
[0051] Step S110: Control the selected gimbal camera to rotate three times. Each time the gimbal camera stops rotating, the center point of the camera's image is the ground area. Record the PT value of the gimbal camera after each of the three rotations and the latitude and longitude of the center point of the camera's image after each of the three rotations. The PT value includes the Pan value and the tilt value, where Pan represents the pan / tilt movement of the camera / camcorder gimbal, and tilt represents the pitch movement of the camera / camcorder gimbal.
[0052] Specifically, a pan-tilt camera that has been installed can be selected, and the backend can control the camera's rotation, as well as acquire the camera's real-time image, Pan value, and tilt value.
[0053] Furthermore, the gimbal camera can then be controlled to rotate three times, with each rotation requiring a different Pan and tilt value. For example, the first rotation could be to Pan = 10 and tilt = 80; the second to Pan = 90 and tilt = 60; and the third to Pan = 150 and tilt = 30. Additionally, it is required that after each rotation, the center point of the camera's image remains on the ground.
[0054] It should also be noted that the PT value after three rotations can be directly output from the gimbal data, and the latitude and longitude of the camera's center point can be obtained manually or automatically. For example, the latitude and longitude of the camera's center point can be obtained from the Baidu coordinate system.
[0055] Step S120: Calculate the initial tilt error of the gimbal based on the PT value of the gimbal camera after each of the three rotations and the latitude and longitude of the center point of the gimbal camera's image after each of the three rotations.
[0056] It should be understood that the specific calculation process for the initial tilt error of the gimbal can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0057] Optionally, such as Figure 2 As shown, point L is the position of the gimbal camera, point O is the projection of the camera onto the ground, and points A, B, and C are the center points of the camera's image after three rotations (according to the above rotation requirements, points A, B, and C are also on the ground). Therefore, points O, A, B, and C are coplanar in the above figure, and the plane they lie on represents the horizontal plane of the earth, and line segment LO is perpendicular to plane OABC.
[0058] Furthermore, this application also records the latitude and longitude information of points A, B, and C, denoted as (longitude_A, latitude_A), (longitude_B, latitude_B), and (longitude_C, latitude_C), respectively. Additionally, this application records the camera PT values corresponding to points A, B, and C, denoted as (pan_A, tilt_A), (pan_B, tilt_B), and (pan_C, tilt_C), respectively.
[0059] Furthermore, this application may assume that the initial tilt error (or initial tilt error angle) of the gimbal that is currently being solved is denoted as tilt_error. Then, the above variables and the geometric model in the figure above have the following direct relationship:
[0060]
[0061]
[0062]
[0063] EarthRadius represents the Earth's radius. For example, EarthRadius equals 6,371,004 meters.
[0064] ∠AOB = |pan_A - pan_B|;
[0065] ∠AOC = |pan_A - pan_C|;
[0066] ∠BOC = |pan_B - pan_C|;
[0067] ∠OLA=90+tilt_error-tilt_A;
[0068] ∠OLB=90+tilt_error-tilt_B;
[0069] ∠OLC=90+tilt_error-tilt_C;
[0070] At this point, the lengths of the three sides AB, AC, and BC, and the three angles ∠AOB, ∠AOC, and ∠BOC are all known variables, and tilt_error exists in ∠OLA, ∠OLB, and ∠OLC. Furthermore, we can first solve for the side lengths OL, OA, OB, and OC by establishing a system of equations.
[0071] First, in ΔOAB, we can obtain equation one:
[0072] AB 2 =OA 2+OB 2 -2*OA*OB*Cos∠AOB;
[0073] Similarly, in ΔOAC, we can obtain equation two:
[0074] AC 2 =OA 2 +OC 2 -2*OA*OC*Cos∠AOC;
[0075] Then, line segment OA can be rotated about OL in plane OABC until point A falls on ray OB (which yields...). Figure 3 Let A' be the point. And, it can be focused into ΔOLB:
[0076] ∠OLB-∠OLA′=∠OLB-∠OLA=(90+tilt_error-tilt_B)-(90+tilt_error-tilt_A)=tilt_A-tilt_B;
[0077]
[0078] Combining the two equations above, we can obtain equation three:
[0079]
[0080] Similarly, we can rotate line segment OA around OL in plane OABC until point A falls on ray OC, thus obtaining equation four:
[0081]
[0082] Thus, this application yields a system of equations consisting of four equations:
[0083] AB 2 =OA 2 +OB 2 -2*OA*OB*cos∠AOB;
[0084] AC 2 =OA 2 +OC 2 -2*OA*OC*cos∠AOC;
[0085]
[0086]
[0087] Therefore, the four unknown variables OL, OA, OB, and OC can be calculated using the above four equations. The solution methods can be implemented using classical numerical methods, such as Newton's method and quasi-Newton methods.
[0088] Furthermore, after obtaining OL, OA, OB, and OC, the initial tilt error of the gimbal can be solved using the following equation:
[0089]
[0090] Where O represents the projection point of the camera on the ground; A represents the center point of the gimbal camera's image after one of the three rotations; L represents the position of the gimbal camera; tilt_error represents the initial tilt error of the gimbal; and tilt_A represents the tilt value corresponding to the center point A.
[0091] Step S130: Repeat steps S110 and S120 until the preset number of executions is reached, then stop the loop and select the median from multiple initial tilt errors as the final initial tilt error.
[0092] Specifically, since there are systematic errors in recording the PT value and picking the latitude and longitude of the center point each time, it is generally done 3 to 5 times (of course, it should be understood that the preset number of executions can be set according to actual needs in addition to 3 to 5 times, and the embodiments of this application are not limited to this), multiple sets of tilt_error are obtained, and the median is selected from multiple gimbal initial tilt errors as the final gimbal initial tilt error.
[0093] Step S140: After determining the final initial tilt error of the gimbal, control the gimbal camera to rotate twice more. During each of the two rotations, when the gimbal camera stops rotating, the center point of the gimbal camera's image is also the ground area. Record the PT value of the gimbal camera after each of the two rotations and the latitude and longitude of the center point of the gimbal camera's image after each of the two rotations.
[0094] Specifically, the camera is controlled to rotate twice, with different Pan and Tilt values for each rotation. Furthermore, the center point of the camera's image must remain on the ground after each rotation. The difference between the two Pan values must be controlled between 45 and 135 degrees.
[0095] Furthermore, the PT value after two rotations (e.g., the PT value includes the Pan value and the tilt value) can be directly output from the gimbal data, and the latitude and longitude of the camera's center point can be obtained manually or automatically. For example, the latitude and longitude of the camera's center point can be obtained from the Baidu coordinate system.
[0096] It should be noted that the two rotations in step S140 and any two rotations in the three rotations in step S110 can be different.
[0097] Step S150: Calculate the camera height based on the PT value of the gimbal camera after each of the two rotations and the latitude and longitude of the center point of the gimbal camera's image after each of the two rotations.
[0098] It should be understood that the specific process of calculating the camera height based on the PT value of the gimbal camera after each of the two rotations and the latitude and longitude of the center point of the gimbal camera's image after each of the two rotations can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0099] Optionally, such as Figure 4 As shown, point L is the position of the gimbal camera, point O is the camera's projection on the ground, and points C and D are the center points of the image during the two rotations (according to the requirements of the previous two rotations, points C and D are also on the ground). Therefore, points O, C, and D are coplanar in the above figure, and the plane they lie on represents the horizontal plane of the earth. Line segment LO is perpendicular to plane OCD.
[0100] Furthermore, this application also records the latitude and longitude information of points C and D, denoted as (longitude_C, latitude_C) and (longitude_D, latitude_D) respectively. Additionally, it records the corresponding camera PT values for these two points, denoted as (pan_C, tilt_D) and (pan_D, tilt_D) respectively. And, through step S120, tilt_error has been calculated.
[0101] The variables mentioned above and the geometric model in the diagram above have the following direct relationship:
[0102]
[0103] EarthRadius represents the Earth's radius. For example, EarthRadius equals 6,371,004 meters.
[0104] ∠COD = |pan_C - pan_D|;
[0105] ∠OLC=90+tilt_error-tilt_C;
[0106] ∠OLD=90+tilt_error-tilt_D;
[0107] Next, we can solve for the side lengths OL, OC, and OD by establishing a system of equations, where OL is the camera height.
[0108] Firstly, within triangle OCD, we can obtain equation one:
[0109] CD 2 =OC 2 +OD 2 -2*OC*OD*cos∠COD;
[0110] Furthermore, in triangle OLC, equation two can be obtained:
[0111]
[0112] Furthermore, in triangle OLD, equation three can be obtained:
[0113]
[0114] Furthermore, the three equations above can be used to calculate the three unknown variables OL, OC, and OD. Moreover, the solution method can be implemented using classical numerical computation methods, such as Newton's method and quasi-Newton methods.
[0115] Wherein, the camera height is equal to OL.
[0116] Step S160: Repeat steps S140 and S150 until the preset number of executions is reached, then stop the loop, select the median from the heights of multiple cameras as the final camera height, and record the parameters corresponding to the final camera height.
[0117] It should be understood that the specific number of times the preset execution count and the parameters corresponding to the height can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0118] Optionally, due to systematic errors in the PT value recorded during each rotation and in the latitude and longitude of the center point, the process is usually repeated 3 to 5 times to obtain multiple sets of OLs, and the median of the multiple OLs is selected as the final camera height.
[0119] Furthermore, the geometric parameters (i.e., OC, OD, CD) corresponding to the median of the final camera height, as well as the measurement parameters including (longitude_C, latitude_C), (longitude_D, latitude_D), (pan_C, tilt_C), and (pan_D, tilt_D) are all recorded.
[0120] At this point, this application has calculated the initial camera tilt error (tilt_error) and camera height (OL), and also recorded the geometric and measurement parameters at the optimal solution.
[0121] Step S170: Based on the parameters corresponding to the final camera height, calculate the latitude and longitude of the gimbal camera and the camera's deflection angle when the Pan value is equal to 0. The deflection angle is the angle between the camera and true north.
[0122] It should be understood that the specific process of calculating the latitude and longitude of the gimbal camera and the camera deflection angle in the gimbal camera when the Pan value is equal to 0, based on the parameters corresponding to the final camera height, can be set according to actual needs, and the embodiments of this application are not limited thereto.
[0123] Optionally, one can first establish, such as Figure 5 The two-dimensional rectangular coordinate system shown has point C as the origin, east as the x-axis, and north as the y-axis. The unit is meters.
[0124] The coordinates of point C are (0,0);
[0125] The coordinates of point D are:
[0126]
[0127] EarthRadius represents the Earth's radius. For example, EarthRadius equals 6,371,004 meters.
[0128] Assuming the coordinates of point O are (x, y), then based on the known side lengths of OC and OD, we obtain the following system of equations:
[0129] x 2 +y 2 =OA 2 ;
[0130]
[0131] Therefore, the two unknown variables x and y can be derived using the above two equations. Furthermore, the solution method can be implemented using classical numerical computation methods, such as Newton's method and quasi-Newton methods.
[0132] Furthermore, based on the coordinates (x, y) of point O, the latitude and longitude of point O (that is, the latitude and longitude of the camera in the gimbal camera) can be calculated:
[0133]
[0134] Latitude = latitude_C + y / (2 * π * Earth Radius);
[0135] EarthRadius represents the Earth's radius. For example, EarthRadius equals 6,371,004 meters.
[0136] Furthermore, based on the coordinates (x, y) of point O, the angle between the camera and true north when Pan = 0 can also be calculated:
[0137]
[0138] Step S180: Use the camera's altitude and the latitude and longitude of the gimbal camera to determine the camera's position information, and use the final initial tilt error and deflection angle of the gimbal to determine the camera's attitude information.
[0139] Specifically, the camera's height and the latitude and longitude of the gimbal camera are used as the camera's position information, and the final initial tilt error and deflection angle of the gimbal are used as the camera's attitude information.
[0140] It should be noted that determining the latitude, longitude, altitude, and attitude information of the gimbal camera is crucial for achieving more accurate monitoring, tracking, and positioning functions. The specific reasons are as follows:
[0141] Precise monitoring: The PTZ camera can achieve more accurate positioning and monitoring by using precise latitude and longitude coordinates and altitude information, avoiding misjudgment or omission.
[0142] Automatic tracking: By calculating the attitude of the gimbal camera, the function of automatically tracking target objects can be realized, making the camera more intelligent and automated, and improving tracking efficiency and accuracy;
[0143] Scene restoration: Latitude and longitude coordinates and altitude information can help restore and overlay scenes taken at different times, achieving comprehensive and multi-angle scene restoration;
[0144] Safety Management: By using the attitude information of the gimbal camera, the location and height of the target object can be quickly determined, which facilitates safety management, emergency response and other measures.
[0145] Therefore, by means of the above technical solution, the embodiments of this application rotate the gimbal camera multiple times and directly obtain the Pan value, tilt value, and latitude and longitude coordinates of the camera's center point after rotation. Then, the final initial tilt error of the gimbal and the deflection angle of the camera in the gimbal camera are calculated using the Pan value, tilt value, and latitude and longitude coordinates of the camera's center point. Based on the final initial tilt error of the gimbal and the deflection angle of the camera in the gimbal camera, the attitude information of the camera is determined. Therefore, compared with the existing method of measuring the attitude of the gimbal camera by using an attitude measurement gyroscope, it can improve the attitude angle accuracy.
[0146] It should be understood that the above-described self-calibration method for gimbal cameras is merely exemplary, and those skilled in the art can make various modifications based on the above method, and the modified solutions also fall within the protection scope of this application.
[0147] This application provides a storage medium storing a computer program, which is executed by a processor to perform the methods described in the embodiments.
[0148] This application also provides a computer program product that, when run on a computer, causes the computer to perform the method described in the method embodiment.
[0149] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.
[0150] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0151] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0152] It should be understood, in the several embodiments provided in this application, that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0153] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0154] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. It should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0155] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0156] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A self-calibration method for a gimbal camera, characterized in that, include: The first data recording step involves controlling the selected gimbal camera to rotate three times, and ensuring that the center point of the gimbal camera's image is the ground area each time the camera stops rotating during the three rotations. The step also involves recording the PT value of the gimbal camera after each of the three rotations and the latitude and longitude of the center point of the gimbal camera's image after each of the three rotations; wherein the PT value includes the Pan value and the tilt value. The error calculation step involves calculating the initial tilt error of the gimbal based on the PT value of the gimbal camera after each of the three rotations and the latitude and longitude of the center point of the gimbal camera's image after each of the three rotations. Repeat the first data recording step and the error calculation step until the preset number of executions is reached, then stop the loop, and select the median from the multiple initial tilt errors of the gimbal as the final initial tilt error of the gimbal. The second data recording step involves, after determining the final initial tilt error of the gimbal, controlling the gimbal camera to rotate twice more, and ensuring that the center point of the gimbal camera's image is on the ground area each time it stops rotating during the two rotations, and recording the PT value of the gimbal camera after each rotation and the latitude and longitude of the center point of the gimbal camera's image after each rotation during the two rotations. The height calculation step calculates the camera's height based on the final initial tilt error of the gimbal, the PT value of the gimbal camera after each of the two rotations, and the latitude and longitude of the center point of the gimbal camera's image after each of the two rotations. Repeat the second data recording step and the height calculation step until the preset number of executions is reached, then stop the loop, select the median from the heights of the multiple cameras as the final camera height, and record the parameters corresponding to the final camera height; Based on the parameters corresponding to the final camera height, calculate the latitude and longitude of the gimbal camera and the deflection angle of the camera in the gimbal camera when the Pan value is equal to 0; wherein, the deflection angle is the angle between the camera and the due north direction; The camera's position information is determined using the final camera height and the latitude and longitude of the gimbal camera, and the camera's attitude information is determined using the final initial tilt error of the gimbal and the deflection angle.
2. The self-calibration method according to claim 1, characterized in that, The latitude and longitude of the center point of the gimbal camera's image after each of the three rotations were obtained using the Baidu coordinate system.
3. The self-calibration method according to claim 1 or 2, characterized in that, The initial tilt error of the gimbal is obtained by the following formula: ; in, O A represents the projection point of the camera on the ground; A represents the center point of the image of the gimbal camera after one of the three rotations; L represents the position of the gimbal camera; This indicates the initial tilt error of the gimbal; This represents the tilt value corresponding to the center point A.
4. The self-calibration method according to claim 1, characterized in that, The difference in the Pan value corresponding to the two rotations is controlled between 45 degrees and 135 degrees.
5. The self-calibration method according to claim 4, characterized in that, The height of the camera is obtained using the following formula: ; in, O L represents the projection point of the camera on the ground; C represents the position of the gimbal camera; and C represents the center point of the gimbal camera's image after one of the two rotations.
6. The self-calibration method according to claim 5, characterized in that, The deflection angle is obtained by the following formula: ; in, Indicates the deflection angle; the projection point O The coordinates are (x, y); pan _C represents the Pan value corresponding to the center point C of the gimbal camera's image after one of the two rotations.
7. A storage medium having a computer program stored thereon, characterized in that, The computer program is executed by the processor to perform the self-calibration method of the gimbal camera as described in any one of claims 1-6.
8. An electronic device comprising a processor, a memory, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the self-calibration method for the gimbal camera as described in any one of claims 1-6.
Citation Information
Patent Citations
Remote range finding based target positioning method, device, and unmanned plane
CN108680143A
Positioning deviation correction method, monitoring equipment and computer readable storage medium
CN114565677A