Total station assisted ball machine attitude measurement and leveling method and device

文档序号:5530 发布日期:2021-09-17 浏览:63次 中文

1. A method for measuring and leveling the posture of a ball machine is characterized in that: the method comprises the following steps:

the method comprises the following steps: measuring object coordinates of the calibration board angular point by using a total station;

step two: controlling a camera on the dome camera to acquire a calibration plate image, and performing feature extraction on angular points to acquire image space coordinates of the angular points of the calibration plate;

step three: calculating the pose parameters of the ball machine according to the object space coordinates and the image space coordinates of the angular points, calculating the included angle between the vertical axis of the ball machine and the plumb line and displaying the included angle in real time;

step four: repeating the second step and the third step for multiple times, and adjusting the posture of the ball machine to enable the included angle between the vertical axis of the ball machine and the plumb line to be continuously close to 0 until the absolute value is smaller than the set threshold value;

step five: and controlling the ball machine to horizontally rotate by 90 degrees, and repeating the second step to the fourth step until the absolute value of the included angle between the vertical axis of the ball machine and the plumb line is smaller than a set threshold value, so as to finish leveling.

2. The ball machine attitude measurement and leveling method of claim 1, wherein: the specific method for measuring the object space coordinates of the calibration board angular point by using the total station comprises the following steps:

and measuring 4 edge angular points of the calibration board by using a total station, and calculating object coordinates of all angular points on the calibration board according to the size of the checkerboard on the calibration board.

3. The ball machine attitude measurement and leveling method of claim 1, wherein: the specific method for obtaining the image space coordinates of the angular point of the calibration plate by the camera on the control dome camera to obtain the image of the calibration plate and extracting the characteristics of the angular point comprises the following steps:

controlling a camera on a dome camera to obtain a calibration plate image, and extracting features of angular points in the image by using a Harris detection method to obtain image space coordinates of the angular points;

the Harris detection method comprises the following specific steps: when the window moves and the gray gradients of the images in the window in all directions are large, the center of the current small window is the checkerboard angular point, and the coordinate of the central point is the image square coordinate of the angular point of the calibration plate.

4. The ball machine attitude measurement and leveling method of claim 1, wherein: the specific method for calculating the pose parameters of the ball machine according to the object space coordinates and the image space coordinates of the angular points, calculating the included angle between the vertical axis of the ball machine and the plumb line and displaying the included angle in real time comprises the following steps:

calculating the pose parameters of the dome camera according to the object space coordinates and the image space coordinates of the angular points by using a Zhang-Zhengyou calibration method;

and converting the rotation parameters in the pose parameters into rotation angles by using Rodrigues transformation, wherein the rotation angles comprise included angles between vertical axes of the ball machine and plumb lines, and the included angles are displayed in real time.

5. The ball machine attitude measurement and leveling method of claim 1, wherein: the method comprises the following steps of calculating a pose parameter of the ball machine according to an object space coordinate and an image space coordinate of an angular point, calculating an included angle between a vertical axis and a plumb line of the ball machine, and displaying in real time, wherein the specific method for displaying in real time comprises the following steps:

the drawing simulation level is used for determining the position of a bubble in the simulation level according to the included angle value between the vertical axis of the ball machine and the plumb line and performing real-time drawing and displaying; the scale range of the water level is-0.1 degree to 0.1 degree;

the specific method for drawing the simulated level comprises the following steps: and drawing a rectangular image as a virtual level body by using an OpenCV image processing library, and drawing a virtual bubble on the virtual level body image, wherein the position of the bubble moves along with the change of the included angle value of the vertical axis and the plumb line of the dome camera.

6. The ball machine attitude measurement and leveling method of claim 5, wherein: repeating the second step and the third step for multiple times, and adjusting the posture of the ball machine to enable the included angle between the vertical axis of the ball machine and the plumb line to be continuously close to 0 until the absolute value is smaller than the set threshold value, wherein the specific method comprises the following steps:

controlling a camera of the dome camera to acquire a calibration plate image for multiple times, calibrating an angular point image space coordinate, calculating an included angle between a dome camera vertical axis and a plumb line, and displaying bubbles in the simulated level in real time;

manually adjusting the ball machine according to the real-time bubble position and the numerical value of the included angle between the vertical axis of the ball machine and the plumb line, wherein the posture of the ball machine is changed along with the adjustment, the included angle between the vertical axis of the ball machine and the plumb line is changed, and the bubbles move along with the change;

adjusting the posture of the ball machine according to the absolute value of the included angle between the vertical shaft of the ball machine and the plumb line and the dynamic change of the bubbles, so that the bubbles approach to the center of the simulated level until the absolute value of the included angle between the vertical shaft of the ball machine and the plumb line is smaller than a set threshold value; the set threshold is 0.01 °.

7. The utility model provides a ball machine leveling device for adjusting ball machine gesture, its characterized in that, includes foot spiral base (3) and connecting piece (2), connecting piece (2) are fixed in ball machine (1) top, foot spiral base (3) are fixed in connecting piece (2) top, include three foot spiral (31) and set up in last supporting seat (32) and under bracing seat (33) at three foot spiral (31) upper and lower both ends.

Background

The natural resource types cover various resources such as mountains, water, forests, fields, lakes, grasses and the like, how to effectively monitor and protect the natural resources, how to supervise the ecological environment during and after restoration, and guide the reasonable development and utilization of the natural resources are important work of natural resource management at present, and are an indispensable important ring for monitoring, managing and restoring the whole ecological environment. At present, the technical means of monitoring and supervision of natural resources are relatively laggard, the main technical means are still sanitary sheets, manual patrol and the like, and the monitoring and supervision are easy to be untimely and incomplete.

In order to solve the problems, a video comprehensive monitoring station is established by using high points such as a communication iron tower and a super high-rise building, a camera and pan-tilt integrated ball machine is used for acquiring all-weather real-time videos of 7 x 24 hours, illegal targets destroying natural resources are automatically identified, the targets are automatically positioned on video images through a photogrammetry principle, and positions are displayed on a map for rapid navigation, so that law enforcement personnel can rapidly arrive at the site and timely stop illegal behaviors.

In order to enable video monitoring to achieve full coverage of a monitoring area and save cost as much as possible, the comprehensive monitoring station adopts a camera and holder integrated ball machine capable of rotating horizontally by 360 degrees and vertically by 90 degrees. When the dome camera is installed at the high-point comprehensive monitoring station, the central vertical axis of the dome camera is required to be kept vertical (perpendicular to the horizontal plane) as much as possible, so that an initial value is provided for iterative calculation of subsequent camera attitude parameters, and accurate positioning of a target in a video image is performed. And the existing camera and holder combined product does not have a high-precision leveling system similar to a total station, and the included angle between the vertical axis of the system and the plumb line can be adjusted to enable the system to be vertical. Therefore, developing a method and a device for measuring and leveling the posture of a set of ball machine becomes a preposed key problem for target positioning.

Disclosure of Invention

In view of the above, the present invention aims to overcome the defects in the prior art, and provides a method for measuring and leveling the attitude of a dome camera assisted by a total station, which solves the problem that the dome camera cannot adjust the vertical axis to be vertical without a high-precision leveling system.

Another object of the present invention is to provide a ball machine leveling device.

In order to achieve the purpose, the technical scheme of the invention is realized as follows:

a method for measuring and leveling the posture of a ball machine comprises the following steps:

the method comprises the following steps: measuring object coordinates of the calibration board angular point by using a total station;

step two: controlling a camera on the dome camera to acquire a calibration plate image, and performing feature extraction on angular points to acquire image space coordinates of the angular points of the calibration plate;

step three: calculating the pose parameters of the ball machine according to the object space coordinates and the image space coordinates of the angular points, calculating the included angle between the vertical axis of the ball machine and the plumb line and displaying the included angle in real time;

step four: repeating the second step and the third step for multiple times, and adjusting the posture of the ball machine to enable the included angle between the vertical axis of the ball machine and the plumb line to be continuously close to 0 until the absolute value is smaller than the set threshold value;

step five: and controlling the ball machine to horizontally rotate by 90 degrees, and repeating the second step to the fourth step until the absolute value of the included angle between the vertical axis of the ball machine and the plumb line is smaller than a set threshold value, so as to finish leveling.

For convenience of description, an included angle between a vertical axis of the dome camera and a plumb line is decomposed into two-dimensional components α and β, where α is a component of the included angle between the vertical axis of the dome camera and the plumb line along a main optical axis direction of the dome camera, and β is a component of the included angle between the vertical axis of the dome camera and the plumb line along a direction of 90 ° counterclockwise horizontal rotation of the main optical axis of the dome camera. In the invention, the second to fourth steps are used for adjusting the alpha angle, and the fifth step is used for adjusting the beta angle.

Further, the specific method for measuring the object coordinates of the calibration board angle point by using the total station comprises the following steps:

and measuring 4 edge angular points of the calibration board by using a total station, and calculating object coordinates of all angular points on the calibration board according to the size of the checkerboard on the calibration board.

The calibration plate is an aluminum high-precision diffuse reflection calibration plate and comprises a glass substrate and an aluminum oxide panel: the glass substrate is about 3mm thick, is flat float glass, has high flatness and no water ripple, is not easy to deform, and meets the requirement that the angular points of a Zhangyingyou calibration method should be in the same plane in height; the alumina panel is white and grey, the surface is not reflective, the thickness is about 0.15mm, the panel pattern is a black-white chessboard square grid with 12 x 9 array, the side length of the square grid is 30mm, and the corner printing precision is high.

The calibration of the dome camera needs to maintain a horizontal object coordinate system, and the total station is the most widely used equipment for establishing the horizontal coordinate system in the surveying profession, is simple and quick and has high precision.

During operation, the total station is firstly utilized to measure 4 edge angular points of the calibration board, and because the printing precision of the calibration board is very high, the object coordinates of all the angular points can be calculated according to the size of the chessboard without one-to-one measurement. The method comprises the following specific steps:

corner point Pi·j(i 1,2., 8j 1,2., 11) are distributed into transverse 11 points and longitudinal 8 points, the distance between adjacent points is 3mm, and the four-point coordinates of the edge measured by the total station are respectively as follows: upper left corner point P1·1(x1·1,y1·1,z1·1) Lower left corner point P8·1(x8·1,y8·1,z8·1) The upper right corner point P1·11(x1·11,y1·11,z1·11) Lower right corner point P8·11(x8·11,y8·11,z8·11). First, a first column point P is calculatedi·1(i ═ 2,3,. 7) coordinates, calculated as:

calculate the 11 th column point Pi·11(i ═ 2,3,. 7) coordinates, calculated as:

calculating the point P from the 1 st row to the 8 th row according to the 1 st column and the 11 th column point coordinatesi·j(i 1,2.. 8j 2, 3.. 10) coordinates, the formula is calculated as:

further, the specific method for obtaining the image space coordinates of the angular point of the calibration plate by controlling the camera on the dome camera to obtain the image of the calibration plate and extracting the characteristics of the angular point comprises the following steps:

controlling a camera on a dome camera to obtain a calibration plate image, and extracting features of angular points in the image by using a Harris detection method to obtain image space coordinates of the angular points;

the Harris detection method comprises the following specific steps: when the window moves and the gray gradients of the images in the window in all directions are large, the center of the current small window is the checkerboard angular point, and the coordinate of the central point is the image square coordinate of the angular point of the calibration plate.

The formula for calculating the gradient E (u, v) is:

wherein, (u, v) is the size of the translation window, I (x, y) ] is the image gray value, I (x + u, y + v) is the translated gray value, w (x, y) is the window function, which is 0 outside the window and 1 inside the window.

Further, the specific method for calculating the pose parameters of the ball machine according to the object space coordinates and the image space coordinates of the angular points, calculating the included angle between the vertical axis of the ball machine and the plumb line and displaying the included angle in real time comprises the following steps:

calculating pose parameters of the dome camera according to the object space coordinates and the image space coordinates of the angular points by using a Zhang-Zhengyou calibration method, wherein the pose parameters comprise inner orientation elements (such as principal point coordinates and focal length) and outer orientation elements (rotation parameters and translation parameters);

converting the rotation parameters in the pose parameters into rotation angles by using Rodrigues transformation, wherein the rotation angles comprise a component alpha of an included angle between a vertical axis of the ball machine and a plumb line, and displaying the component alpha in real time;

the specific steps for calculating the rotation angle are as follows:

according to the coordinates of an object space and an image space of the angular point, resolving an attitude parameter R of the dome camera by using a Zhang-Yongyou calibration method, namely:

computing a three-dimensional vector r ═ r using a Rodrigues transformxryrz]:

rxNamely the component alpha of the included angle between the vertical axis of the ball machine and the plumb line.

Further, the pose parameters of the ball machine are calculated according to the object space coordinates and the image space coordinates of the angular points, the included angle between the vertical axis of the ball machine and the plumb line is calculated and displayed in real time, and the specific method for displaying in real time comprises the following steps: drawing the simulated level by utilizing an OpenCV image processing library, determining the position of a bubble in the simulated level according to the alpha value, and performing real-time drawing and displaying; the scale range of the level is-0.1 to 0.1.

The specific method for drawing the simulated level comprises the following steps: drawing a rectangular image as a virtual level body by utilizing an OpenCV image processing library, drawing a virtual bubble on the virtual level body image, wherein the scale position of the bubble is calculated by the following formula:

wherein k is the scale of the bubble, and alpha is the included angle value between the vertical axis of the ball machine and the plumb line.

When the novel water level is used, images are continuously drawn according to the included angle value alpha to form a dynamically-changed simulated water level, the alpha value is visually displayed, and the purpose of using the simulated water level is to ensure the levelness accuracy of the water level.

Further, the step two and the step three are repeated for multiple times, and the posture of the ball machine is adjusted, so that the included angle between the vertical axis of the ball machine and the plumb line is continuously close to 0, and the specific method until the absolute value is smaller than the set threshold value is as follows:

the camera of the dome camera is controlled for multiple times to obtain images of the calibration plate, calibration of corner point image space coordinates and calculation of an alpha value are carried out, and bubbles in the simulated level are displayed in real time;

manually adjusting the ball machine according to the position and the alpha value of the real-time bubbles, wherein the posture of the ball machine is changed along with the adjustment, the alpha value is changed, and the bubbles move along with the adjustment;

adjusting the posture of the ball machine according to the absolute value of the alpha value and the dynamic change of the air bubble to enable the air bubble to approach the center of the simulated level until the absolute value of the alpha value is smaller than a set threshold value; the set threshold is an empirical threshold of 0.01 °.

Further, in the fifth step, the ball machine is controlled to rotate horizontally by 90 degrees, the second step to the fourth step are repeated until the absolute value of the beta value is smaller than the empirical threshold value of 0.01 degree, and finally the vertical shaft is kept vertical to finish leveling.

The utility model provides a ball machine leveling device for adjusting ball machine gesture, includes foot spiral base and aluminium system connecting piece, the connecting piece is fixed in the ball machine top, and the camera is located the bottom of ball machine, foot spiral base is fixed in the connecting piece top, foot spiral base is prior art, and optional GDF22 type counter point base specifically includes three foot spiral and sets up in last supporting seat and the under bracing seat at three foot spiral upper and lower both ends, and the bottom of under bracing seat is equipped with the screw rod, and this screw rod is revolved in the threaded hole that the connecting piece top was established, connects base and connecting piece fixedly, and connecting piece and ball machine pass through a plurality of screw fixed connection. The upper connecting seat and the support frame body are assembled and fixed, and the whole device can be hoisted, so that the posture of the ball machine can be adjusted through rotating the feet in three directions in a spiral manner.

Compared with the prior art, the invention has the beneficial effects that:

(1) the total station assisted ball machine posture measuring and leveling method and device establish a high-precision horizontal object space coordinate system by using the total station, and calibrate and resolve the included angle between the vertical axis and the plumb line of the ball machine in real time through the camera of the ball machine.

(2) The total station assisted ball machine posture measuring and leveling method and device draw the simulation level gauge, visually reflect the size of the included angle between the vertical axis of the ball machine and the plumb line through the position of the real-time air bubbles, reduce the included angle through the posture of the ball machine, and finally level the ball machine in the two-dimensional direction.

(3) According to the method and the device for measuring and leveling the posture of the ball machine assisted by the total station, a set of ball machine leveling device is developed, a connecting piece is processed according to a foot spiral base and a ball machine structure, the base is fixedly connected with the ball machine, and the posture of the ball machine is adjusted through foot spiral.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention.

In the drawings:

FIG. 1 is a schematic diagram showing the overall structure of a ball machine and a leveling device of the ball machine according to the present invention;

FIG. 2 shows a physical diagram of an aluminum high-precision diffuse reflection calibration plate used in the method for measuring and leveling the attitude of a dome camera according to the present invention;

FIG. 3 shows a display of calibration board corner point detection results for the ball machine attitude measurement and leveling method of the present invention;

FIG. 4 shows a simulated level display of the dome camera pose measurement and leveling method of the present invention.

Description of reference numerals:

1-ball machine; 11-a camera; 2-a connector; 3-a foot screw base; 31-pronated; 32-upper support; 33-lower support seat.

Detailed Description

Unless defined otherwise, technical terms used in the following examples have the same meanings as commonly understood by one of ordinary skill in the art to which the present invention belongs.

For a better understanding of the technical solutions of the present invention, the following detailed description of the present invention is made with reference to the accompanying drawings and specific examples:

the operation process is as follows:

the first step is to place the calibration plate stably to ensure that the calibration plate is approximately opposite to the lens of the ball machine, and the calibration plate is completely contained in the image shot by the ball machine. The arrangement of the calibration board corner points is shown in attached table 1.

Erecting a total station in a nearby area, measuring four-point coordinates of the edge of the calibrated plate after leveling and centering, wherein the four-point coordinates are respectively as follows: upper left ofCorner point P1·1(x1·1,y1·1,z1·1) Lower left corner point P8·1(x8·1,y8·1,z8·1) The upper right corner point P1·11(x1·11,y1·11,z1·11) Lower right corner point P8·11(x8·11,y8·11,z8·11). The coordinates of all other corner points of the calibration plate are calculated as shown by the object coordinates in attached table 2.

And secondly, the software-controlled dome camera acquires the calibration plate image in real time, and performs feature extraction on the angular points in the image by using a Harris detection method, as shown in the attached figure 3, so as to obtain image-side coordinates of the angular points, which are the same as coordinate values shown by object-side coordinates in an attached table 2.

Thirdly, calculating the pose parameters of the dome camera according to the coordinates of the angular point object space and the image space by using a Zhang Zhengyou calibration method, wherein the internal orientation elements are as follows:

like principal point coordinates: 960 x, 540 y

Focal length: 5335 in weight ratio

The exterior orientation elements are as follows:

rotation parameters:

translation parameters: t ═ 498.965-148.286-929.056

The rotation parameter R is converted into a rotation angle using a rodrieger transform:

θ=[-69.127 -1.042 -0.515]

the component alpha of the included angle between the vertical axis of the ball machine and the plumb line is-0.515 deg. A simulated level is plotted and the bubble position is determined from the alpha value as shown in figure 4. The base feet are rotated to spiral and the air bubbles gradually move to the center.

And fourthly, repeating the second step and the third step until the absolute value of alpha is less than 0.01 degrees.

And fifthly, controlling the ball machine to horizontally rotate by 90 degrees, and repeating the second step to the fourth step until the absolute value of beta is less than the empirical threshold value of 0.01 degree. And finally, keeping the vertical shaft vertical to finish leveling.

TABLE 1

TABLE 2

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种九相机的倾斜摄影系统及其使用方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!