A method for measuring and correcting the initial angle of the pan / tilt
By developing correction tools and using three-dimensional computing models and feature recognition technology to automatically calculate the true north PAN value of the gimbal, the problem of the initial angle error of the gimbal has been solved, the measurement accuracy and correction efficiency have been improved, and a high-precision initial angle of the gimbal has been achieved. Correction.
Patent Information
- Application Number
- CN202110574458.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-25
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-05-25
AI Technical Summary
The initial angle of the pan/tilt system has a large error due to the aging of the transmission structure and interference from the environment or human factors, which affects monitoring and positioning accuracy.
Develop a correction tool that automatically corrects the initial angle of the gimbal by calculating the PAN value of the true north of the gimbal and using three-dimensional computing models and feature recognition technology to obtain the gimbal coordinates and target object coordinates.
It effectively reduces the gimbal error, improves the measurement accuracy and correction efficiency, is simple to operate, and improves the sensitivity of the gimbal.
Smart Images

Figure CN113223156B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of pan / tilt control, and in particular to a method for measuring and correcting an initial angle of a pan / tilt. Background Art
[0002] With the continuous development of the security industry, video surveillance cameras based on the pan-tilt system have been more and more widely used. At present, most pan-tilt systems include two degrees of freedom, horizontal and vertical, and use an open-loop control method based on a motor to drive the pan-tilt. Due to the aging of the transmission structure, interference from the environment or human factors, the actual rotation resistance of the pan-tilt may exceed the load capacity of the motor, causing the pan-tilt to lose step, and the initial angle of the pan-tilt to deviate, resulting in large errors in the pan-tilt monitoring and positioning results. Therefore, it is necessary to propose a method for measuring and correcting the initial angle of the pan-tilt to improve the accuracy and sensitivity of the pan-tilt measurement. Summary of the invention
[0003] The present invention develops a correction tool, inputs the pan head coordinates, the pan head lens height and the target object coordinates into the correction tool, and can calculate the pan head true north PAN value, thereby correcting the initial angle of the pan head. The operation is simple and the error of the pan head can be effectively reduced.
[0004] The technical solution of the present invention is:
[0005] A method for measuring and correcting an initial angle of a gimbal, comprising:
[0006] Step 1: Develop a calibration tool to calculate the PAN value of the PTZ.
[0007] Step 2: Obtain the air pressure and temperature values at sea level and at the bottom of the PTZ tower, and calculate the absolute height of the PTZ observation lens;
[0008] Step 3: Get the longitude and latitude of the base of the gimbal, search for the location of the gimbal on the satellite map based on the longitude and latitude, and determine the longitude and latitude coordinates of the gimbal through feature recognition;
[0009] Step 4: Select the target object that the gimbal can observe and obtain its longitude and latitude coordinates;
[0010] Step 5. Input the gimbal coordinates, absolute height and target coordinates into the calibration tool, output the gimbal true north PAN value, and correct the gimbal initial angle according to the true north PAN value.
[0011] Preferably, the correction tool comprises:
[0012] A calculation module, which is used to establish a three-dimensional calculation model;
[0013] Initialization module, which is used to configure global variables and initialize;
[0014] An access loader module capable of providing a three-dimensional computational model and recording access information;
[0015] The lower computer interaction module is used to interact with the PTZ controller to obtain the PTZ rotation angle;
[0016] The control module can record the execution status of the loader and output the calculation results of the three-dimensional calculation model.
[0017] Preferably, establishing the three-dimensional computational model comprises:
[0018] Analyze the correlation between the correction parameters and the PAN value of the PTZ;
[0019] Based on the response surface methodology, a fitting relationship model between the true north PAN value and the correction parameters was established;
[0020] The fitting relationship model is optimized and solved to obtain the optimal fitting parameters and generate a three-dimensional calculation model.
[0021] Preferably, the calculation formula of the PAN value of the PTZ is:
[0022]
[0023]
[0024]
[0025] Among them, P represents the true north PAN value, r represents the gimbal position vector, r′ represents the target position vector, v represents the distance between the gimbal and the target, θ represents the deviation angle between the gimbal and the target, μ0 represents the gimbal observation error, h represents the absolute height of the gimbal observation lens, i represents the variable, ω i represents the model distance parameter, k i Represents the model angle parameter, L a Indicates the coordinate longitude, B n Indicates the coordinate latitude, R r represents the coordinate transformation matrix, T r Represents the coordinate transformation coefficient.
[0026] Preferably, developing the calibration tool further comprises establishing an application operation interface, which is associated with the controller to filter and export the PAN value of the PTZ.
[0027] Preferably, the correction process includes:
[0028] Get the actual rotation angle of the PTZ in the interactive module and convert it into the actual north PAN value of the PTZ;
[0029] Calculate the difference between the actual true north PAN value and the PTZ true north PAN value output by the calibration tool;
[0030] Correct the gimbal initialization angle based on the difference.
[0031] Preferably, the calculation formula for the absolute height is:
[0032]
[0033] Where, h represents the absolute height of the pan / tilt observation lens, represents the average temperature at the bottom of the tower and at sea level, P s represents the sea level pressure, P t represents the gas pressure at the bottom of the tower, h t Indicates the relative height of the observation tower.
[0034] Preferably, feature recognition includes:
[0035] Capture the location area image of the PTZ on the satellite map;
[0036] Binarize the regional image and output it;
[0037] The binary image is segmented by pixels, and then inverted and histogram equalized to obtain a preprocessed image;
[0038] Slide the window pixel by pixel in the preprocessed image to calculate the local contrast of each pixel, and then calculate the weighted local contrast of the whole image;
[0039] The gimbal outline can be extracted by performing threshold segmentation on the weighted local contrast;
[0040] The longitude and latitude coordinates of the center point of the gimbal outline are used as the longitude and latitude coordinates of the gimbal.
[0041] Preferably, the calculation process of the true north PAN value includes:
[0042] Turn the gimbal to aim at the target object and zoom in the lens;
[0043] Open the calibration tool to log in to the gimbal and obtain the real-time rotation angle of the gimbal;
[0044] Input the gimbal coordinates, absolute height and target coordinates;
[0045] Click Calculate to automatically obtain the true north PAN value of the gimbal.
[0046] Preferably, the corners include horizontal corners and vertical corners.
[0047] The beneficial effects of the present invention are:
[0048] 1. The method for measuring and correcting the initial angle of the gimbal provided by the present invention develops a correction tool, inputs the gimbal coordinates, the gimbal lens height and the target object coordinates into the correction tool, and then calculates the gimbal true north PAN value, thereby correcting the initial angle of the gimbal. The operation is simple and can effectively reduce the error of the gimbal.
[0049] 2. The method for measuring and correcting the initial angle of the gimbal provided by the present invention establishes a fitting relationship model by correcting parameters and correlations, and further optimizes the model through the response surface method, and the model fitting accuracy is high.
[0050] 3. The method for measuring and correcting the initial angle of the pan / tilt provided by the present invention has developed a pan / tilt initial angle correction tool, which can realize the automatic calculation of the true north PAN value, and can effectively improve the efficiency of measurement and correction. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A flow chart of a method for measuring and correcting the initial angle of a pan / tilt platform provided by the present invention.
[0052] Figure 2 The present invention is a flowchart of a method for establishing a three-dimensional computing model in one embodiment of the present invention.
[0053] Figure 3 The figure is a flow chart of a method for feature recognition in one embodiment of the present invention.
[0054] Figure 4 The figure is a flow chart of a method for calculating and correcting the true north PAN value in one embodiment of the present invention.
[0055] Figure 5 A schematic diagram of a pan / tilt position searched on a satellite map in an embodiment of the present invention.
[0056] Figure 6 The figure is a schematic diagram of an observation target object selected on a satellite map in one embodiment of the present invention.
[0057] Figure 7 This is an image observed by a pan / tilt camera in an embodiment of the present invention.
[0058] Figure 8 This is an image observed (enlarged) by a pan / tilt lens in one embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] It should be noted that in the description of the present invention, the terms "middle", "upper", "lower", "lateral", "inner", etc. indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings, which are only for the convenience of description, and do not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0061] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0062] like Figure 1 As shown, a method for measuring and correcting the initial angle of the gimbal includes:
[0063] S110. Develop a calibration tool to calculate the PAN value of the PTZ.
[0064] S120, obtaining the air pressure and temperature values at the sea level and the bottom of the PTZ tower, and obtaining the absolute height of the PTZ observation lens through calculation.
[0065] As a preferred method, the calculation formula of absolute height is:
[0066]
[0067] Where, h represents the absolute height of the pan / tilt observation lens, represents the average temperature at the bottom of the tower and at sea level, P s represents the sea level pressure, P t represents the gas pressure at the bottom of the tower, h t Indicates the relative height of the observation tower.
[0068] S130, obtaining the longitude and latitude of the base of the gimbal tower, searching for the location of the gimbal on the satellite map according to the longitude and latitude, and determining the longitude and latitude coordinates of the gimbal through feature recognition.
[0069] S140, selecting a target object observable by the gimbal, and obtaining its longitude and latitude coordinates.
[0070] S150, input the gimbal coordinates, absolute height and target coordinates into the calibration tool, output the gimbal true north PAN value, and correct the gimbal initial angle according to the true north PAN value.
[0071] By developing a correction tool, the gimbal coordinates, gimbal lens height and target object coordinates are input into the correction tool to calculate the gimbal's true north PAN value, and then the initial angle of the gimbal is corrected. The operation is simple and can effectively reduce the error of the gimbal.
[0072] Further, the correction tools include:
[0073] A computing module is used to establish a three-dimensional computing model.
[0074] Initialization module, which is used to configure global variables and initialize them.
[0075] An access loader module is provided, which can provide a three-dimensional computing model and record access information.
[0076] The lower computer interaction module is used to interact with the gimbal controller to obtain the gimbal rotation angle.
[0077] The control module can record the execution status of the loader and output the calculation results of the three-dimensional calculation model.
[0078] As a preference, the corners include horizontal corners and vertical corners.
[0079] As a preferred embodiment, developing the correction tool also includes establishing an application operation interface, which is associated with the controller to filter and export the pan-tilt north PAN value.
[0080] Further, such as Figure 2 As shown, establishing a three-dimensional calculation model includes:
[0081] S111, analyzing the correlation between the correction parameters and the PAN value of the PTZ;
[0082] S112. Based on the response surface methodology, a fitting relationship model between the true north PAN value and the correction parameters is established;
[0083] S113, optimizing and solving the fitting relationship model, obtaining optimal fitting parameters, and generating a three-dimensional calculation model.
[0084] As a preferred method, the calculation formula of the PAN value of the PTZ is:
[0085]
[0086]
[0087]
[0088] Among them, P represents the true north PAN value, r represents the gimbal position vector, r′ represents the target position vector, v represents the distance between the gimbal and the target, θ represents the deviation angle between the gimbal and the target, μ0 represents the gimbal observation error, h represents the absolute height of the gimbal observation lens, i represents the variable, ω i represents the model distance parameter, k i Represents the model angle parameter, L a Indicates the coordinate longitude, B n Indicates the coordinate latitude, R r represents the coordinate transformation matrix, T r Represents the coordinate transformation coefficient.
[0089] By correcting the parameters and correlations, a fitting relationship model was established, and the model was further optimized using the response surface methodology, with high model fitting accuracy.
[0090] Further, such as Figure 3 As shown, feature recognition includes:
[0091] S131. Capture an image of the location area of the PTZ on the satellite map.
[0092] S132, binarize the regional image and output it.
[0093] S133, performing pixel segmentation on the binary image, and performing inversion and histogram equalization operations to obtain a preprocessed image.
[0094] S134, performing pixel-by-pixel sliding window operation on the pixels in the preprocessed image, calculating the local contrast of each pixel, and then calculating the weighted local contrast of the entire image.
[0095] S135, the gimbal contour can be extracted by performing threshold segmentation on the weighted local contrast.
[0096] S136. Using the longitude and latitude coordinates of the center point of the gimbal contour as the longitude and latitude coordinates of the gimbal.
[0097] Further, such as Figure 4 As shown, step S150 includes:
[0098] S151. Turn the gimbal to aim at the target object and zoom in the lens.
[0099] S152, open the calibration tool to log in to the PTZ and obtain the real-time rotation angle of the PTZ.
[0100] S153, input the gimbal coordinates, absolute height and target object coordinates.
[0101] S154. Click Calculate to automatically obtain the true north PAN value of the gimbal.
[0102] S155, obtaining the actual rotation angle of the PTZ in the interactive module, and converting it into the actual north PAN value of the PTZ.
[0103] S156. Calculate the difference between the actual true north PAN value and the true north PAN value of the gimbal output by the calibration tool.
[0104] S157. Correct the gimbal initialization angle according to the difference.
[0105] In a specific embodiment, the longitude and latitude of the base of the PTZ tower are obtained, and the location of the PTZ is searched on a satellite map according to the longitude and latitude. Figure 5 As shown, the image of the gimbal position area is intercepted, the gimbal outline is extracted through feature recognition, and the longitude and latitude coordinates of the center point of the gimbal outline are used as the longitude and latitude coordinates of the gimbal, and the coordinates of the gimbal are obtained as 29.863683 degrees north latitude and 122.368167 degrees east longitude.
[0106] Select a target object that the PTZ can observe, such as Figure 6 As shown in the figure, through actual observation, the gimbal is zoomed in, aimed at the target object, and then kept still, and the observation lens is as follows Figure 7-8 As shown, use the gimbal login calibration tool, input the gimbal coordinates, target coordinates and absolute height into the calibration tool, automatically obtain the gimbal rotation angle, click calculate to get the gimbal true north PAN value, and then correct the gimbal initial angle.
[0107] In the above-described embodiments, the various technical features can be arbitrarily combined. To make the description concise, not all possible combinations of the various technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0108] The above contents are only embodiments of the present invention. The common sense such as the known specific structures and characteristics in the scheme is not described in detail here. It is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific implementations. Without departing from the present invention, several modifications and improvements can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent.
Claims
1. A method for measuring and correcting the initial angle of a pan / tilt head, characterized in that: include: Step 1: Develop a calibration tool to calculate the PAN value of the PTZ. Step 2: Obtain the air pressure and temperature values at sea level and at the bottom of the PTZ tower, and calculate the absolute height of the PTZ observation lens; Step 3: Obtain the longitude and latitude of the base of the gimbal tower, search for the location of the gimbal on a satellite map based on the longitude and latitude, and determine the longitude and latitude coordinates of the gimbal through feature recognition; Step 4: Select a target object observable by the gimbal and obtain its longitude and latitude coordinates; Step 5: input the gimbal coordinates, absolute height and target coordinates into the calibration tool, output the true north PAN value of the gimbal, and correct the initial angle of the gimbal according to the true north PAN value; Wherein, the correction tool comprises: A calculation module, which is used to establish a three-dimensional calculation model; Initialization module, which is used to configure global variables and initialize; An access loader module capable of providing a three-dimensional computational model and recording access information; A lower computer interaction module, which is used to interact with the pan / tilt controller information to obtain the pan / tilt angle; A control module capable of recording the execution status of the loader and outputting the calculation result of the three-dimensional calculation model; The calculation formula of the PAN value of the PTZ is: Among them, P represents the true north PAN value, r represents the gimbal position vector, r′ represents the target position vector, v represents the distance between the gimbal and the target, θ represents the deviation angle between the gimbal and the target, μ0 represents the gimbal observation error, h represents the absolute height of the gimbal observation lens, i represents the variable, ω i represents the model distance parameter, k i Represents the model angle parameter, L a Indicates the coordinate longitude, B n Indicates the coordinate latitude, R r represents the coordinate transformation matrix, T r Represents the coordinate transformation coefficient.
2. The method for measuring and correcting the initial angle of the pan / tilt head according to claim 1, characterized in that: The three-dimensional computing model is established as follows: Analyze the correlation between the correction parameters and the PAN value of the PTZ; Based on the response surface methodology, a fitting relationship model between the true north PAN value and the correction parameter is established; The fitting relationship model is optimized and solved to obtain the optimal fitting parameters and generate a three-dimensional calculation model.
3. The method for measuring and correcting the initial angle of the pan / tilt head according to claim 1, characterized in that: The development and correction tool also includes establishing an application operation interface, which is associated with the controller to filter and export the PAN value of the pan-tilt platform.
4. The method for measuring and correcting the initial angle of the pan / tilt head according to claim 3, characterized in that: The correction process includes: Obtain the actual rotation angle of the PTZ in the interactive module and convert it into the actual true north PAN value of the PTZ; Calculating the difference between the actual true north PAN value and the PTZ true north PAN value output by the calibration tool; The initialization angle of the gimbal is corrected according to the difference.
5. The method for measuring and correcting the initial angle of the pan / tilt head according to claim 4, characterized in that: The calculation formula of the absolute height is: Where, h represents the absolute height of the pan / tilt observation lens, represents the average temperature at the bottom of the tower and at sea level, P s represents the sea level pressure, P t represents the gas pressure at the bottom of the tower, h t Indicates the relative height of the observation tower.
6. The method for measuring and correcting the initial angle of the pan / tilt head according to claim 5, characterized in that: The feature recognition includes: Intercepting an image of the location area of the PTZ on a satellite map; Binarizing the region image and outputting it; Performing pixel segmentation on the binary image, and performing inversion and histogram equalization operations to obtain a preprocessed image; Perform pixel-by-pixel sliding on the pixels in the preprocessed image to calculate the local contrast of each pixel, and then calculate the weighted local contrast of the whole image; The gimbal contour can be extracted by performing threshold segmentation on the weighted local contrast; The longitude and latitude coordinates of the center point of the gimbal outline are used as the longitude and latitude coordinates of the gimbal.
7. The method for measuring and correcting the initial angle of the pan / tilt head according to claim 6, characterized in that: The calculation process of the true north PAN value includes: Rotate the pan / tilt head to aim at the target object and zoom in the lens; Open the calibration tool to log in to the gimbal and obtain the real-time rotation angle of the gimbal; Input the gimbal coordinates, the absolute height and the target object coordinates; Click Calculate to automatically obtain the true north PAN value of the gimbal.
8. The method for measuring and correcting the initial angle of the pan / tilt head according to claim 7, characterized in that: The turning angle includes a horizontal turning angle and a vertical turning angle.
