Summary of the invention
The present invention mainly solve in prior art gather geography information time existing use GPS locate length consuming time, information acquisition efficiency is low, and use electronic chart collection position to require high technical matters to map and operator itself, provide a kind of geographical information collection method based on augmented reality and device.The method can gather the position that any camera can photograph, and does not need to come to anchor point personally, and does not rely on map datum, and user does not need to carry out consuming time to cut figure work, and equipment is also without the need to storing jumbo map datum.
In order to solve the problem, according to an aspect of the present invention, provide a kind of geographical information collection method based on augmented reality, comprising:
The camera of terminal is sighted collection target, obtains the reference point coordinate (Ax, Ay) of now terminal position; Utilize Digital Photogrammetric System sensor to obtain position angle Az and the roll angle Roll of impact point and reference point, obtained the distance L of impact point and mobile terminal by roll angle Roll and terminal camera high computational, and based on following formula:
Bx=Ax+L×sin(Az)
By=Ay+L×cos(Az)
Calculate coordinate of ground point (Bx, By).
Optimize, a kind of above-mentioned geographical information collection method based on augmented reality, described position angle Az is calculated by following formula:
Az=atan2(R
12,R
21)
In formula, R is the rotation matrix of the 3*3 measured by direction sensor, R
12, R
21be respectively the corresponding matrix element in rotation matrix R.
Optimize, a kind of above-mentioned geographical information collection method based on augmented reality, described roll angle Roll is calculated by following formula:
Roll=atan2(-R
31,R
33)
In formula, R is the rotation matrix of the 3*3 measured by direction sensor, R
31, R
33be respectively the corresponding matrix element in rotation matrix R.
Optimize, a kind of above-mentioned geographical information collection method based on augmented reality, described distance L is calculated by following formula:
L=H×tan(Roll)
In formula, H is camera height.
In order to solve the problem, according to another aspect of the present invention, provide a kind of geographical information collection device based on augmented reality, comprising:
Reference coordinate harvester, for the camera of terminal is sighted collection target, and obtains the reference point coordinate (Ax, Ay) of now terminal position;
Attitude parameter harvester, for the position angle Az and the roll angle Roll that utilize Digital Photogrammetric System sensor to obtain impact point and reference point;
Target range calculation element, for being obtained the distance L of impact point and mobile terminal by roll angle Roll and terminal camera high computational,
Coordinates of targets calculation element, for based on following formula:
Bx=Ax+L×sin(Az)
By=Ay+L×cos(Az)
Calculate coordinate of ground point (Bx, By).
Optimize, above-mentioned a kind of geographical information collection device based on augmented reality, described attitude parameter harvester calculates position angle Az by following formula:
Az=atan2(R
12,R
21)
In formula, R is the rotation matrix of the 3*3 measured by direction sensor, R
12, R
21be respectively the corresponding matrix element in rotation matrix R.
Optimize, above-mentioned a kind of geographical information collection device based on augmented reality, described attitude parameter harvester calculates roll angle Roll by following formula:
Roll=atan2(-R
31,R
33)
In formula, R is the rotation matrix of the 3*3 measured by direction sensor, R
31, R
33be respectively the corresponding matrix element in rotation matrix R.
Optimize, above-mentioned a kind of geographical information collection device based on augmented reality, described target range calculation element calculates distance L by following formula:
L=H×tan(Roll)
In formula, H is camera height.
Therefore, tool of the present invention has the following advantages:
1. information acquisition is not by place, position environmental restraint, as long as the position that camera can photograph, can directly gather its positional information, do not need to come to anchor point personally by this method;
2. information acquisition does not rely on map datum, does not need to carry out consuming time to cut figure work, and equipment is also without the need to storing jumbo map datum;
Embodiment:
The present embodiment comprises collection two parts of geography information.Introduce respectively below.
One, geographical information collection.
In geographical information collection method of the present invention and device, need a mobile device possessing GPS sensor, attitude sensor (direction sensor, gyroscope), motion sensor (direction sensor), and the application program having sensor coordinates and gather is installed.
When user's start sensor coordinate acquisition function, application program will be opened camera and start GPS positioning function; Arrange after camera height until user, application program enters sensor coordinates acquisition state, as shown in Figure 1.Accurate for crosshair in the screen heart (Fig. 1 middle arrow position) is sighted collection point by user, clicks lower right corner red button, can complete the collecting work of a coordinate points.
Introduce the concrete principle of the present embodiment below in detail.
1, coordinate derivation principle
As shown in Figure 2, when to determine in rectangular coordinate system the relative position of a coordinate points (B) relative to another one known coordinate point (A), need to provide two parameters: position angle (Az), distance (L).
According to triangle relation principle, the absolute coordinates prediction equation of B point is as follows:
Bx=Ax+L×sin(Az)
By=Ay+L×cos(Az)
Wherein, from West to East, y-axis is from south orientation north, Bx and By is respectively x coordinate and the y coordinate of B point, Ax and Ay is respectively x coordinate and the y coordinate of A point for x-axis.
Namely when the coordinate time of at least one reference point known, the coordinate of impact point calculates needs position angle (Az) and distance (L) to calculate.Calculate the coordinate time of multiple impact point, determine all coordinate points position angle (Az) and distance (L) after, settle accounts one by one, as shown in Figure 3.
According to above-mentioned, the absolute coordinates prediction equation of coordinate B and coordinate C is as follows:
Bx=Ax+L
1×sin(Az
1)
By=Ay+L
1×cos(Az
1)
Cx=Ax+L
2×sin(Az
2)
Cy=Ay+L
2×cos(Az
2)
2, mobile terminal realizes principle
Mobile terminal realizes sensor and adopts a some normal coordinate and calculate and be divided into three each and every one steps: the position angle (Az) determining impact point, determines that impact point is to the distance (L) of known point and determine reference point planimetric coordinates (A).
(Az) is directly obtained by mobile phone direction sensor at position angle; The camera of the roll angle (Roll) that distance (L) obtains in conjunction with mobile phone sensor and user's setting is high to be calculated; Reference point coordinate is drawn by AGPS technology.
2.1 mobile phone establishment of coordinate systems
First, for rectangular coordinate system in space set up by mobile phone, mobile phone screen is towards zenith, and mobile phone top is towards magnetic north.Wherein, x-axis from left to right; Y-axis bottom mobile phone to mobile phone top; Z-axis from cell phone back towards mobile phone front, as shown in Figure 4.
With reference to the representation of photogrammetric IMU system sensor attitude angle, the expression of mobile phone attitude angle position angle (Azimuth), roll angle (Roll), the angle of pitch (Pitch) and the appointment of positive dirction are as shown in Figure 5.
2.2 determine position angle Az
The position angle of mobile phone is directly obtained by direction sensor.Direction sensor is the virtual-sensor based on software, and its data are obtained jointly by acceleration transducer and magnetic field sensor.
The measurement result of direction sensor is one the 3 rotation matrix R being multiplied by 3.According to characteristic and the principle of computer vision of rotation matrix, when after acquisition rotation matrix R (3*3), position angle can be drawn by formulae discovery:
Az=atan2(R
12,R
21)
The result of calculation of Az is the position angle (Azimuth) in mobile phone attitude frame of reference.
The data of the direction sensor of mobile phone are obtained jointly by acceleration transducer and magnetic field sensor.The parameter that combination sensor exports is a length is the one-dimension array of 9, is referred to as in linear algebra field the rotation matrix that 3 are multiplied by 3.Rotation matrix be change when being multiplied by one and being vectorial vector direction but do not change the matrix of the effect of size, be when mobile phone camera sight direction change in reality scene time, application program realizes redrawing an important parameter in the algorithm that atural object label makes the position of atural object label in mobile phone three-dimensional scenic not change.The acquisition of rotation matrix is the common practise of this area, is not repeated at this.
2.3 determine distance L
Assuming that collection point (B) and reference point (A) are in same level, when user uses mobile phone camera to sight target, video camera (C), collection point (B) and the geometric relationship of reference point (A) in cross-directional are as shown in Figure 6.
Wherein, angle Roll is mobile phone roll angle, and H is that camera is high, and L is the plan range of A, B point-to-point transmission.
According to characteristic and the principle of computer vision of rotation matrix, when after acquisition rotation matrix R (3*3), roll angle can be drawn by formulae discovery:
Roll=atan2(-R
31,R
33)
According to triangle relation principle, the length computation formula of L is as follows:
L=H×tan(Roll)
2.4 determine reference point coordinate A
Mobile phone obtains mobile phone coordinate (C) by AGPS technology, and suppose that user is in standing upright state when sighting impact point, so camera coordinates (C) is identical with the planimetric coordinates value of reference point (A), draws in sum:
Ax=Cx
Ay=Cy。
2.5 solving target point coordinate
When mobile phone obtains position angle (Az) by sensor and solves distance (L), and obtained the coordinate figure of reference point (A) by AGPS technology after, the absolute coordinates prediction equation of coordinate of ground point B is as follows:
Bx=Ax+L×sin(Az)
By=Ay+L×cos(Az)。
3. error analysis
The error source of a method adopted by 3.1 sensors
Sensor adopts the source of error of a method in following key element: camera coordinates (C) GPS positioning error, reference point (A) reckon error, and user sets camera high level error, distance (L) resolution error.
(1) camera coordinates (C) GPS positioning error
Current mobile device no longer obtains spatial value by means of only GPS technology, but the AGPS technology general settlement spatial value using many location technologies to combine.
The pervasive positioning precision of AGPS is 10 meters; Be greater than the open area of 60 degree at elevation mask, positioning precision brings up to 5 meters; If be coated with WIFI signal or cellular network signals in positioning area, positioning precision brings up to 1 to 3 meter further.
By observing the actual conditions of numerous Map Services application on the market, and the actual service condition of my department's inspection system, GPS positioning precision meets the request for utilization of people completely, and precision median reaches 2 meters.Popular says, stand in one wide be the road north edge of 5 meters when carrying out GPS location, positioning result is stabilized in the scope of positive and negative 1 meter of road north edge always, rarely has and crosses the street center line and navigate to the road south.
Therefore, the error expression of camera coordinates (C) is as follows:
Cx
observation=Cx
very+ Δ GPSx
Cy
observation=Cy
very+ Δ GPSy
Wherein Δ GPSx and Δ GPSy is respectively the positioning error of GPS on x direction and y direction.Calculate according to actual service condition, desirable 2 meters of the maximum probability value of Δ GPSx and Δ GPSy.
(2) reference point (A) reckon error
The prerequisite of solving target point coordinate of the present invention is that reference point coordinate (A) overlaps with camera coordinates (C) in the vertical direction.And in actual use, user due to when progressively sighting different impact points the direction of camera be that the center of circle is constantly rotated with human body, and undertaken by handheld camera owing to sighting, the position that position and the user of camera stand does not overlap, differ one section of distance of bending arms between the two.
Therefore, the error range of reference point (A) reckon error as shown in Figure 7.
Wherein, A is reference point, and C1, C2, C3 are respectively camera coordinates when sighting for three times, vector C is the error of point-to-point transmission, because user is in the process of movement, the attitude of handheld camera is substantially constant, so think that the mould perseverance of the error vector in sighting for three times is for fixed value.
According to the handheld camera shooting style that people get used to,
rice.
(3) user sets camera high level error
User's specified camera high (H) is needed when resolving distance (L).If the value of user's specified camera high (H) is its height, so the geometric relationship of camera high level error and camera high true value as shown in Figure 8.
I.e. H
veryand the relational expression between the camera height H that user sets and camera high level error Δ H is:
H
very=H
arrange-Δ H
According to the handheld camera shooting style that people get used to, Δ H ≈ 0.1 meter.
(4) distance L resolution error
The value of H directly affects the result of L, when considering camera high level error Δ H, and distance resolution error Δ L and respectively settle accounts geometric relationship between parameter as shown in Figure 9.
According to triangle relation principle, the size prediction equation of Δ L is as follows:
ΔL=ΔH×tan(Roll)
According to the handheld camera shooting style that people get used to, Roll ≈ 70
o, Δ H ≈ 0.1 meter.So Δ L is about 0.27 meter.L
very=L+ Δ L.
The error amount of a method adopted by 3.2 sensors
Adopt the error source of a method and mobile terminal according to sensor as aforementioned to realize principle and draw system of equations:
Cx
observation=Cx
very+ Δ GPSx
Cy
observation=Cy
very+ Δ GPSy
Ax
observation=Cx
observation
Ay
observation=Cy
observation
Δ H=H
arrange-H
very
ΔL=ΔH×tan(Roll)
L
very=L
observation-Δ L
Bx=Ax+L×sin(Az)
By=Ay+L×cos(Az)
The error equation of unknown number coordinate of ground point (B) is:
ΔBx=ΔGPSx+ΔH×tan(Roll))×sin(Az)
ΔBy=ΔGPSy+ΔH×tan(Roll))×cos(Az)
The checkout result of unknown number coordinate of ground point (B) is:
In sum, to adopt the maximum probability value of impact point (B) error amount in the x and y direction of a method as follows for sensor:
3.3 error contrasts
At present in territory and the mobile terminal of planning industry applys, the means of coordinate collection have figure adopts a little and GPS locates and adopts a little two kinds, now these two kinds of methods of simple analysis error amount and adopt a method with sensor and compare.
(1) figure adopts point tolerance
The use-pattern of figure adopting a little directly on electronic chart, clicks screen capture coordinate data by finger, and precision depends on that finger tip follows the engineer's scale of the contact position of screen, mobile device screen resolution and electronic chart.
The finger tip supposing user is infinitely small with the overlapping area of screen, and screen resolution is infinitely great, and so touch point is in the electronic chart of different scale, offsets 1 millimeter and the error that causes is as shown in the table:
Table 1 figure adopts a method error
1:500 |
0.5 meter |
1:200 |
0.2 meter |
1:100 |
0.1 meter |
1:50 |
0.05 meter |
1:20 |
0.02 meter |
So, figure adopts point tolerance Δ Map_Col and the touch point error formula of offset distance Δ Touch in 1:500 electronic chart is:
Δ Map_Col=Δ Touch × 0.5 meter
Wherein, Δ Touch unit is millimeter.
According to the actual conditions of people's implementation figure adopting a little, user clicks screen and chooses the side-play amount of impact point on screen and be about 2 millimeters, and so figure adopting the maximum probability value of point tolerance Δ Map_Col when using 1:500 electronic chart is 1 meter.
(2) point tolerance is adopted in GPS location
GPS locates the mode of adopting a little and is placed on collection point for user by equipment, or handheld mobile device, stands on collection point, opens GPS positioning function immediately, gathers the coordinate information of impact point.
GPS locates the source of error adopted a little in two parts: the side-play amount between equipment and impact point and GPS positioning error.The relational expression that GPS adopts between point tolerance Δ GPS_Col and offset error Δ C and GPS error Δ GPS is as follows:
ΔGPS_Col=ΔC+ΔGPS
As error source one save in as described in reference point (A) reckon error, Δ C is about 0.4 meter; As 4.1 sensors are adopted in error source one joint of a method as described in camera coordinates (C) GPS positioning error herein, Δ GPS is about 2 meters.So the maximum probability value of point tolerance Δ GPS_Col is adopted in GPS location is 2.4 meters.
(3) Comprehensive Correlation
1:500 electronic chart figure adopts point tolerance, and GPS adopts point tolerance in location and sensor adopts a contrast of method error as following table:
Table 2 error contrasts
4. feasibility analysis
Consider from technological layer, a method adopted by sensor solid mathematical theory basis, is newly adopt a technology reliably.
Consider from realization condition aspect, current mobile device all possesses all the sensors related in method, can be realize sensor to adopt a method on nearly all territory and planning sector application.
Consider from error analysis aspect, although the error of error ratio both all the other that a method adopted by sensor is large, even on figure, adopt a method for 3 times, adopt point mode with another main flow, namely a method is adopted in GPS location, and compare, error is very close.Unexpectedly GPS location adopt a method error accept by industry, so sensor is adopted the situation that a method error ratio GPS adopts a method error slightly large 11% and also can be considered to be accepted by industry.
Consider from environment for use aspect, a method adopted by sensor unique superiority, even surmounts other two kinds of acquisition means.When using acquisition method on figure, the position of target in map determines by the object of reference of target proximity in map, if map version is old, the position gathering target in map is among a slice wasteland in map, so just cannot gather the position of target by figure adopting a method; And GPS positioning acquisition method is very time-consuming, need to arrive collection point one by one in person and position collection, some is difficult to the place of stopping, and such as, by the building site that sandy soil heap surrounds, puddles of water ground etc., cannot use GPS.
The present invention is when gathering multiple angle point in same plot, if intervisibility is normal between each angle point, then only need locate once.Classic method often locates a some t (s) consuming time, locates n the total T=nt (s) consuming time of point.This method positioning datum point t (s) consuming time, sets up m reference point, total T=mt (s) consuming time after sighting n anchor point.Namely always consuming timely count irrelevant with location, relevant with reference point number, if intervisibility is normal between aiming point, then only need set up reference point, i.e. a m=1.
Two, geography information display
In the present embodiment, utilize augmented reality, directly can accurately draw out atural object label in virtual three-dimensional space on screen according to the position coordinates of atural object, user can directly by direction and the distance of the position judgment atural object of label.
Augmented reality display data is based on 3 D stereo coordinate (latitude (B), longitude (L), elevation (H)), and electronic chart is based on two dimensional surface coordinate (latitude (B), longitude (L)), this method can show elevation information intuitively on screen, allows user learn elevation distribution situation between atural object.