Summary of the invention
The present invention provides the method, apparatus and user equipment of a kind of determining location information, can be in both sides of the road
Pedestrian is accurately positioned.
The technical solution adopted by the present invention are as follows:
In a first aspect, the present invention provides a kind of method of determining location information, comprising:
The wagon flow direction in image information is obtained, and obtains the location information of user equipment;
The wagon flow direction is matched with the road direction after view transformation, and is believed according to the position of the user equipment
Breath, determines the location information of pedestrian, and the road direction after the view transformation is by map Central Plains road direction according to the use
The shooting visual angle of family equipment carries out the road direction that view transformation obtains, the corresponding road of map Central Plains road direction and institute
The distance between user equipment is stated less than or equal to preset distance.
With reference to first aspect, in the first possible implementation of the first aspect, in the acquisition image information
Before wagon flow direction, further includes:
Obtain the moving region in described image information;
Wagon flow direction in the acquisition image information includes:
According to the moving region in described image information, the wagon flow direction in described image information is obtained.
The possible implementation of with reference to first aspect the first, in second of possible implementation of first aspect
In, before the moving region obtained in described image information, further includes:
According to the corner information of the user equipment, the letter of parameter corresponding to the displacement of the user equipment is eliminated
Breath, the angle when corner information is the user equipment the first image information of acquisition and angle when the second image information of acquisition
Angle difference between degree, at the time of the user equipment obtains the first image information with obtain second image information
At the time of it is different;
The moving region obtained in described image information includes:
The first image information after parameter information corresponding to the displacement will be eliminated and the second image information makes the difference
Point, obtain the moving region.
The possible implementation of second with reference to first aspect, in the third possible implementation of first aspect
In, the corner information according to the user equipment eliminates parameter information corresponding to the displacement of the user equipment
Include:
According to formulaObtain itself fortune of the user equipment
Dynamic deviant, and according to the displacement deviant of the user equipment, corresponding to the displacement for eliminating the user equipment
Parameter information, wherein shiftxAnd shiftyThe respectively described user equipment is in x-axis and y weeks displacement deviant, αx
And αyThe respectively described user equipment is in x-axis and the corner information of y-axis, t1And t2Respectively the user equipment obtains described the
At the time of one image information and at the time of obtaining second image information, focallength is the focal length of the user equipment,
Pixelsize is the pixel value of the user equipment.
Second of possible realization side of the possible implementation of with reference to first aspect the first or first aspect
The possible implementation of the third of formula or first aspect, it is in a fourth possible implementation of the first aspect, described
According to the moving region in described image information, the wagon flow direction obtained in described image information includes:
In the moving region, the wagon flow direction for meeting the first preset condition is obtained, first preset condition is used for
Obtain the wagon flow direction in the moving region;
It is described in the moving region, obtain meet the first preset condition wagon flow direction after, further includes:
Straight line fitting is carried out to the wagon flow direction for meeting the first preset condition, obtains xcamerasinβj+ycameracosβj
+Cj=0, wherein xcameraAnd ycameraFor characterizing the coordinate points information under user equipment coordinate system, βjTo meet described first
The straight line inclination angle in j-th of wagon flow direction of preset condition, CjFor the parameter in the corresponding linear equation in wagon flow direction.
The 4th kind of possible implementation with reference to first aspect, in the 5th kind of possible implementation of first aspect
In, described in the moving region, the wagon flow direction for obtaining the first preset condition of satisfaction includes:
In the moving region, the maximum light stream direction of acquisition probability density is the first wagon flow direction, and in the fortune
Outside the presetting range in first wagon flow direction in dynamic region, the maximum light stream direction of acquisition probability density is the second wagon flow side
To;
If the corresponding probability density in first wagon flow direction is more than or equal to preset threshold value, by first wagon flow
Direction is as the wagon flow direction for meeting the first preset condition;
If the corresponding probability density in second wagon flow direction is more than or equal to the preset threshold value, by described second
Wagon flow direction is as the wagon flow direction for meeting the first preset condition.
Perhaps second of the first possible implementation of first aspect or first aspect can with reference to first aspect
Can implementation perhaps the 4th kind of possible reality of the third possible implementation of first aspect or first aspect
5th kind of possible implementation of existing mode or first aspect, in the sixth possible implementation of the first aspect,
It is described that the wagon flow direction matches with the road direction after view transformation, and according to the location information of the user equipment,
Before the location information for determining pedestrian, further includes:
According to the azimuth and inclination angle of the user equipment, view transformation is carried out to map Central Plains road direction.
The 6th kind of possible implementation with reference to first aspect, in the 7th kind of possible implementation of first aspect
In, the azimuth and inclination angle according to the user equipment carries out view transformation packet to map Central Plains road direction
It includes:
According to formulaVisual angle change is carried out to map Central Plains road direction
It changes, the road direction after obtaining view transformation, wherein xcameraAnd ycameraFor characterizing the coordinate points under user equipment coordinate system
Information, xmapAnd ymapFor characterizing the coordinate points information under map coordinates system, txAnd tyIt is set for the pedestrian relative to the user
Standby location information, tzElevation information for the user equipment relative to ground, R3x3For the spin moment of the user equipment
Battle array, passes through formulaIt obtaining, α is the azimuth of the user equipment,
γ is the inclination angle of the user equipment, C3x3For the parameter matrix of the user equipment;
It is described according to formulaMap Central Plains road direction is regarded
Angular transformation, after the road direction after obtaining view transformation, further includes:
Straight line fitting is carried out to the road direction after the view transformation, obtains xcamerasinβ′j+ycameracosβ′j+C′j
=0, wherein β 'jFor the straight line inclination angle of the road direction after the view transformation, C 'jFor in the corresponding linear equation of road direction
Parameter.
Perhaps second of the first possible implementation of first aspect or first aspect can with reference to first aspect
Can implementation perhaps the 4th kind of possible reality of the third possible implementation of first aspect or first aspect
Existing mode perhaps the 5th kind of possible implementation of first aspect or the 6th kind of possible implementation of first aspect,
Or the 7th kind of possible implementation of first aspect, it is described to incite somebody to action in the 8th kind of possible implementation of first aspect
The wagon flow direction matches with the road direction after view transformation, and according to the location information of the user equipment, determines row
The location information of people includes:
By the straight line inclination angle difference between the road direction after the minimum wagon flow direction and the view transformation, and
According to the location information of the user equipment, the location information of the pedestrian is determined.
The 8th kind of possible implementation with reference to first aspect, in the 9th kind of possible implementation of first aspect
In, the straight line inclination angle difference between the road direction by after the minimum wagon flow direction and the view transformation, and
According to the location information of the user equipment, determine that the location information of the pedestrian includes:
By minimizing objective functionDetermine txAnd ty, wherein βjStraight line for the wagon flow direction inclines
Angle, β ' are the straight line inclination angle of the road direction after the view transformation, txAnd tyIt is the pedestrian relative to the user equipment
Location information;
If meeting the second preset condition, according to the pedestrian relative to the location information of the user equipment and described
The location information of user equipment, determines the location information of the pedestrian, and second preset condition is location error condition, inclination angle
Any one or any combination of error condition and range error condition.
The 9th kind of possible implementation with reference to first aspect, in the tenth kind of possible implementation of first aspect
In, the location error condition is | tx| < 10, | ty| < 10;
The error of tilt condition is | βj-β′j| 5 ° of <;
The range error condition isWherein,
Dist is the distance between the user equipment and road, and h is the bodywork height upper limit, and ViewAngle is the user equipment
Visual angle, image_height are the picture altitude of the user equipment.
Tenth kind of possible realization side of the 9th kind of possible implementation or first aspect with reference to first aspect
Formula, in a kind of the tenth possible implementation of first aspect, described pass through minimizes objective functionIt determines
txAnd tyLater, further includes:
If being unsatisfactory for the second preset condition, the position that the location information of the user equipment is determined as the pedestrian is believed
Breath;Or
If being unsatisfactory for the second preset condition, by the history pedestrian position information in preset time, it is determined as the pedestrian
Location information.
Perhaps second of the first possible implementation of first aspect or first aspect can with reference to first aspect
Can implementation perhaps the 4th kind of possible reality of the third possible implementation of first aspect or first aspect
Existing mode perhaps the 5th kind of possible implementation of first aspect or the 6th kind of possible implementation of first aspect,
Perhaps the 7th kind of possible implementation of first aspect or the 8th kind of possible implementation of first aspect, Huo Zhe
Tenth kind of possible implementation or first aspect of the 9th kind of possible implementation of one side perhaps first aspect
A kind of the tenth possible implementation, it is described by the wagon flow in the 12nd kind of possible implementation of first aspect
Direction matches with the road direction after view transformation, and according to the location information of the user equipment, determines the position of pedestrian
After information, further includes:
According to the location information of the pedestrian, corresponding navigation routine is provided for the pedestrian.
Second aspect, the present invention provide a kind of device of determining location information, comprising:
Acquiring unit for obtaining the wagon flow direction in image information, and obtains the location information of user equipment;
Determination unit, the wagon flow direction for obtaining the acquiring unit and the road direction phase after view transformation
Matching, and the location information of the user equipment obtained according to the acquiring unit, determine the location information of pedestrian, the view
Road direction after angular transformation is that map Central Plains road direction is carried out view transformation according to the shooting visual angle of the user equipment
Obtained road direction, the distance between the corresponding road of map Central Plains road direction and the user equipment are less than or wait
In preset distance.
In conjunction with second aspect, in the first possible implementation of the second aspect,
The acquiring unit is also used to obtain the moving region in described image information;
The acquiring unit, specifically for obtaining in described image information according to the moving region in described image information
Wagon flow direction.
In conjunction with the first possible implementation of second aspect, in second of possible implementation of second aspect
In, described device further include: eliminate unit;
The elimination unit eliminates itself fortune of the user equipment for the corner information according to the user equipment
Move corresponding parameter information, the corner information is angle when the user equipment obtains the first image information and obtains the
The angle difference between angle when two image informations at the time of the user equipment obtains the first image information and obtains
It is different at the time of second image information;
The acquiring unit, after the elimination unit is eliminated parameter information corresponding to the displacement
The first image information and the second image information do difference, obtain the moving region.
In conjunction with second of possible implementation of second aspect, in the third possible implementation of second aspect
In,
The elimination unit is specifically used for according to formulaIt obtains
The displacement deviant of the user equipment, and according to the displacement deviant of the user equipment, eliminate the user
Parameter information corresponding to the displacement of equipment, wherein shiftxAnd shiftyThe respectively described user equipment was x-axis and y weeks
Displacement deviant, αxAnd αyThe respectively described user equipment is in x-axis and the corner information of y-axis, t1And t2It is respectively described
At the time of user equipment acquisition the first image information and at the time of obtaining second image information, focallength is
The focal length of the user equipment, pixelsize are the pixel value of the user equipment.
In conjunction with the first possible implementation of second aspect or second of possible realization side of second aspect
The possible implementation of the third of formula or second aspect, in the fourth possible implementation of the second aspect,
The acquiring unit is specifically used in the moving region, obtains the wagon flow direction for meeting the first preset condition,
First preset condition is used to obtain the wagon flow direction in the moving region;
Described device further include: fitting unit;
The fitting unit, the wagon flow direction of the first preset condition of the satisfaction for being obtained to the acquiring unit into
Row straight line fitting, obtains xcamerasinβj+ycameracosβj+Cj=0, wherein xcameraAnd ycameraIt is sat for characterizing user equipment
Coordinate points information under mark system, βjFor meet first preset condition j-th of wagon flow direction straight line inclination angle, CjFor wagon flow
Parameter in the corresponding linear equation in direction.
In conjunction with the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect
In,
The acquiring unit is specifically used in the moving region, and the maximum light stream direction of acquisition probability density is the
One wagon flow direction, and outside the presetting range in first wagon flow direction in the moving region, acquisition probability density is maximum
Light stream direction be the second wagon flow direction;
The acquiring unit is specifically also used to be more than or equal in advance when the corresponding probability density in first wagon flow direction
When setting threshold value, using first wagon flow direction as the wagon flow direction for meeting the first preset condition;
The acquiring unit is specifically also used to be more than or equal to institute when the corresponding probability density in second wagon flow direction
When stating preset threshold value, using second wagon flow direction as the wagon flow direction for meeting the first preset condition.
Second in conjunction with second aspect perhaps the first possible implementation of second aspect or second aspect can
Can implementation perhaps the 4th kind of possible reality of the third possible implementation of second aspect or second aspect
5th kind of possible implementation of existing mode or second aspect, in the sixth possible implementation of the second aspect,
Described device further include: converter unit;
The converter unit, for the azimuth and inclination angle according to the user equipment, to original path in the map
Direction carries out view transformation.
In conjunction with the 6th kind of possible implementation of second aspect, in the 7th kind of possible implementation of second aspect
In,
The converter unit is specifically used for according to formulaTo the map
Central Plains road direction carries out view transformation, the road direction after obtaining view transformation, wherein xcameraAnd ycameraIt is used for characterizing
Coordinate points information under the device coordinate system of family, xmapAnd ymapFor characterizing the coordinate points information under map coordinates system, txAnd tyFor institute
State location information of the pedestrian relative to the user equipment, tzElevation information for the user equipment relative to ground, R3x3For
The spin matrix of the user equipment, passes through formulaIt obtains, α is
The azimuth of the user equipment, γ are the inclination angle of the user equipment, C3x3For the parameter matrix of the user equipment;
The fitting unit, the road side after the view transformation for being also used to obtain the converter unit view transformation
To straight line fitting is carried out, x is obtainedcamerasinβ′j+ycameracosβ′j+C′j=0, wherein β 'jFor the road after the view transformation
The straight line inclination angle in road direction, C 'jFor the parameter in the corresponding linear equation of road direction.
Second in conjunction with second aspect perhaps the first possible implementation of second aspect or second aspect can
Can implementation perhaps the 4th kind of possible reality of the third possible implementation of second aspect or second aspect
Existing mode perhaps the 5th kind of possible implementation of second aspect or the 6th kind of possible implementation of second aspect,
Or the 7th kind of possible implementation of second aspect, in the 8th kind of possible implementation of second aspect,
The determination unit, specifically for by minimizing the wagon flow direction and the change that the acquiring unit obtains
Straight line inclination angle difference between road direction after changing unit view transformation, and according to the location information of the user equipment, really
The location information of the fixed pedestrian.
In conjunction with the 8th kind of possible implementation of second aspect, in the 9th kind of possible implementation of second aspect
In,
The determination unit is specifically used for by minimizing objective functionDetermine txAnd ty, wherein βjFor
The straight line inclination angle in the wagon flow direction, β 'jFor the straight line inclination angle of the road direction after the view transformation, txAnd tyFor the row
Location information of the people relative to the user equipment;
The determination unit is specifically also used to when meeting the second preset condition, according to the pedestrian relative to the use
The location information of the location information of family equipment and the user equipment determines the location information of the pedestrian, and described second is default
Condition is any one or any combination of location error condition, error of tilt condition and range error condition.
In conjunction with the 9th kind of possible implementation of second aspect, in the tenth kind of possible implementation of second aspect
In,
The location error condition is | tx| < 10, | ty| < 10;
The error of tilt condition is | βj-β′j| 5 ° of <;
The range error condition isWherein,
Dist is the distance between the user equipment and road, and h is the bodywork height upper limit, and ViewAngle is the user equipment
Visual angle, image_height are the picture altitude of the user equipment.
In conjunction with the 9th kind of possible implementation of second aspect or the tenth kind of possible realization side of second aspect
Formula, in a kind of the tenth possible implementation of second aspect,
The determination unit is also used to when being unsatisfactory for the second preset condition, and the location information of the user equipment is true
It is set to the location information of the pedestrian;
The determination unit is also used to when being unsatisfactory for the second preset condition, by the history pedestrian position in preset time
Information is determined as the location information of the pedestrian.
Second in conjunction with second aspect perhaps the first possible implementation of second aspect or second aspect can
Can implementation perhaps the 4th kind of possible reality of the third possible implementation of second aspect or second aspect
Existing mode perhaps the 5th kind of possible implementation of second aspect or the 6th kind of possible implementation of second aspect,
Perhaps the 7th kind of possible implementation of second aspect or the 8th kind of possible implementation of second aspect, Huo Zhe
Tenth kind of possible implementation or second aspect of the 9th kind of possible implementation perhaps second aspect of two aspects
A kind of the tenth possible implementation, in the 12nd kind of possible implementation of second aspect, described device further include:
Navigation elements;
The navigation elements, the location information of the pedestrian for being determined according to the determination unit are the pedestrian
Corresponding navigation routine is provided.
The third aspect, the present invention provide a kind of user equipment, comprising:
Processor for obtaining the wagon flow direction in image information, and obtains the location information of user equipment;
The processor is also used to match the wagon flow direction with the road direction after view transformation, and according to institute
The location information for stating user equipment determines the location information of pedestrian, and the road direction after the view transformation is by map Central Plains
Road direction carries out the road direction that view transformation obtains, original path in the map according to the shooting visual angle of the user equipment
The distance between the corresponding road in direction and the user equipment are less than or equal to preset distance.
In conjunction with the third aspect, in the first possible implementation of the third aspect,
The processor is also used to obtain the moving region in described image information;
The processor, specifically for obtaining in described image information according to the moving region in described image information
Wagon flow direction.
In conjunction with the first possible implementation of the third aspect, in second of possible implementation of the third aspect
In,
The processor is also used to the corner information according to the user equipment, eliminates itself institute of the user equipment
Corresponding movement parameter information, the corner information are angle when the user equipment obtains the first image information and obtain the
The angle difference between angle when two image informations at the time of the user equipment obtains the first image information and obtains
It is different at the time of second image information;
The processor, specifically for the first image information after parameter information corresponding to the displacement will be eliminated
And second image information do difference, obtain the moving region.
In conjunction with second of possible implementation of the third aspect, in the third possible implementation of the third aspect
In,
The processor is specifically used for according to formulaObtain institute
The displacement deviant of user equipment is stated, and according to the displacement deviant of the user equipment, eliminates the user and sets
Parameter information corresponding to standby displacement, wherein shiftxAnd shiftyThe respectively described user equipment was x-axis and y weeks
Displacement deviant, αxAnd αyThe respectively described user equipment is in x-axis and the corner information of y-axis, t1And t2The respectively described use
At the time of family equipment acquisition the first image information and at the time of obtaining second image information, focallength is institute
The focal length of user equipment is stated, pixelsize is the pixel value of the user equipment.
In conjunction with the first possible implementation of the third aspect or second of possible realization side of the third aspect
The possible implementation of the third of formula or the third aspect, in the fourth possible implementation of the third aspect,
The processor is specifically used in the moving region, obtains the wagon flow direction for meeting the first preset condition, institute
The first preset condition is stated for obtaining the wagon flow direction in the moving region;
The processor is also used to carry out straight line fitting to the wagon flow direction for meeting the first preset condition, obtain
xcamerasinβj+ycameracosβj+Cj=0, wherein xcameraAnd ycameraFor characterizing the coordinate points under user equipment coordinate system
Information, βjFor meet first preset condition j-th of wagon flow direction straight line inclination angle, CjFor the corresponding straight line in wagon flow direction
Parameter in equation.
In conjunction with the 4th kind of possible implementation of the third aspect, in the 5th kind of possible implementation of the third aspect
In,
The processor is specifically used in the moving region, and the maximum light stream direction of acquisition probability density is first
Wagon flow direction, and outside the presetting range in first wagon flow direction in the moving region, acquisition probability density is maximum
Light stream direction is the second wagon flow direction;
The processor is specifically also used to when the corresponding probability density in first wagon flow direction is more than or equal to preset
When threshold value, using first wagon flow direction as the wagon flow direction for meeting the first preset condition;
The processor is specifically also used to when the corresponding probability density in second wagon flow direction is more than or equal to described
When preset threshold value, using second wagon flow direction as the wagon flow direction for meeting the first preset condition.
Second in conjunction with the third aspect perhaps the first possible implementation of the third aspect or the third aspect can
Can implementation perhaps the 4th kind of possible reality of the third possible implementation of the third aspect or the third aspect
5th kind of possible implementation of existing mode or the third aspect, in the 6th kind of possible implementation of the third aspect,
The processor is also used to azimuth and inclination angle according to the user equipment, to original path in the map
Direction carries out view transformation.
In conjunction with the 6th kind of possible implementation of the third aspect, in the 7th kind of possible implementation of the third aspect
In,
The processor is specifically used for according to formulaTo in the map
Original path direction carries out view transformation, the road direction after obtaining view transformation, wherein xcameraAnd ycameraFor characterizing user
Coordinate points information under device coordinate system, xmapAnd ymapFor characterizing the coordinate points information under map coordinates system, txAnd tyIt is described
Location information of the pedestrian relative to the user equipment, tzElevation information for the user equipment relative to ground, R3x3For institute
The spin matrix for stating user equipment, passes through formulaIt obtains, α is institute
The azimuth of user equipment is stated, γ is the inclination angle of the user equipment, C3x3For the parameter matrix of the user equipment;
The processor is also used to carry out straight line fitting to the road direction after the view transformation, obtains xcamerasin
β′j+ycameracosβ′j+C′j=0, wherein β 'jFor the straight line inclination angle of the road direction after the view transformation, C 'jFor road side
Parameter into corresponding linear equation.
Second in conjunction with the third aspect perhaps the first possible implementation of the third aspect or the third aspect can
Can implementation perhaps the 4th kind of possible reality of the third possible implementation of the third aspect or the third aspect
Existing mode perhaps the 5th kind of possible implementation of the third aspect or the 6th kind of possible implementation of the third aspect,
Or the 7th kind of possible implementation of the third aspect, in the 8th kind of possible implementation of the third aspect,
The processor, specifically for by between the road direction after the minimum wagon flow direction and view transformation
Straight line inclination angle difference, and according to the location information of the user equipment, determine the location information of the pedestrian.
In conjunction with the 8th kind of possible implementation of the third aspect, in the 9th kind of possible implementation of the third aspect
In,
The processor is specifically used for by minimizing objective functionDetermine txAnd ty, wherein βjFor institute
State the straight line inclination angle in wagon flow direction, β 'jFor the straight line inclination angle of the road direction after the view transformation, txAnd tyFor the pedestrian
Location information relative to the user equipment;
The processor is specifically also used to when meeting the second preset condition, according to the pedestrian relative to the user
The location information of the location information of equipment and the user equipment determines the location information of the pedestrian, the second default item
Part is any one or any combination of location error condition, error of tilt condition and range error condition.
In conjunction with the 9th kind of possible implementation of the third aspect, in the tenth kind of possible implementation of the third aspect
In,
The location error condition is | tx| < 10, | ty| < 10;
The error of tilt condition is | βj-β′j| 5 ° of <;
The range error condition isWherein,
Dist is the distance between the user equipment and road, and h is the bodywork height upper limit, and ViewAngle is the user equipment
Visual angle, image_height are the picture altitude of the user equipment.
In conjunction with the 9th kind of possible implementation of the third aspect or the tenth kind of possible realization side of the third aspect
Formula, in a kind of the tenth possible implementation of the third aspect,
The processor is also used to when being unsatisfactory for the second preset condition, and the location information of the user equipment is determined
For the location information of the pedestrian;
The processor is also used to when being unsatisfactory for the second preset condition, and the history pedestrian position in preset time is believed
Breath, is determined as the location information of the pedestrian.
Second in conjunction with the third aspect perhaps the first possible implementation of the third aspect or the third aspect can
Can implementation perhaps the 4th kind of possible reality of the third possible implementation of the third aspect or the third aspect
Existing mode perhaps the 5th kind of possible implementation of the third aspect or the 6th kind of possible implementation of the third aspect,
Perhaps the 7th kind of possible implementation of the third aspect or the 8th kind of possible implementation of the third aspect, Huo Zhe
Tenth kind of possible implementation or the third aspect of the 9th kind of possible implementation perhaps third aspect of three aspects
A kind of the tenth possible implementation, in the 12nd kind of possible implementation of the third aspect,
The processor is also used to the location information according to the pedestrian, provides corresponding navigation routine for the pedestrian.
The method, apparatus and user equipment of determining location information provided by the invention, the first vehicle in acquisition image information
Direction is flowed, and obtains the location information of user equipment, then will be less than or equal to preset distance with the distance between user equipment
Map Central Plains road direction, carry out view transformation according to the shooting visual angle of user equipment, finally become wagon flow direction and visual angle
Road direction after changing matches, and according to the location information of user equipment, determines the location information of pedestrian.With pass through at present
Way line and edge carry out identification to road and compare, and the present invention is by becoming the wagon flow direction of user equipment captured in real-time and visual angle
The Roads in Maps direction for shifting to current shooting visual angle is matched, and can determine the physical location of pedestrian and the ground of user equipment
Deviation between figure position can determine the physical location of pedestrian in combination with the map location of user equipment, so as to
Pedestrian in both sides of the road is accurately positioned, and then accurate navigation routine can be provided for pedestrian.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts all other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the present invention provides a kind of method of determining location information, can determine the essence of the pedestrian in both sides of the road
True location information, as shown in Figure 1, which comprises
101, user equipment obtains the wagon flow direction in image information, and obtains the location information of user equipment.
Wherein, image information is user equipment by camera function, carries out captured in real-time acquisition.In the embodiment of the present invention
In, wagon flow direction is the corresponding direction of the wagon flow moved on road in the image information of user equipment shooting.
For the embodiment of the present invention, user equipment can specifically be positioned in real time by GPS, be set to get user
Standby location information.In embodiments of the present invention, user equipment is generally 10 meters or so by the precision that GPS is positioned.
102, user equipment matches wagon flow direction and the road direction after view transformation, and according to the position of user equipment
Confidence breath, determines the location information of pedestrian.
Wherein, the road direction after view transformation be by map Central Plains road direction according to user equipment shooting visual angle into
The road direction that row view transformation obtains, the distance between the corresponding road of map Central Plains road direction and user equipment be less than or
Equal to preset distance.In embodiments of the present invention, preset distance can be configured in advance by user equipment, for example, it is preset away from
From can be 10 meters, 12 meters or 20 meters etc..
For the embodiment of the present invention, by obtaining road of the distance between the user equipment less than or equal to preset distance
Road can be avoided the case where excessive meaningless road is shown in map, and the road letter needed for only user provides may be implemented
Breath, so as to improve user experience.
Compared with current airmanship, the embodiment of the present invention is by by the road direction after wagon flow direction and view transformation
Match, can determine that pedestrian is in the specific orientation of road, so as to provide reasonable navigation routine for pedestrian.Wherein,
The specific orientation that pedestrian is in road refers to that pedestrian is in the left side of road or pedestrian is in the right side of road.
Such as shown in Fig. 2, it is attached that pedestrian is in the crossroad being made of the road of the road of east-west direction and North and South direction
Closely, when pedestrian needs to walk to destination locations B from current location A, it can not determine that pedestrian is in by current airmanship
The specific orientation of road, the navigation routine provided for pedestrian is as shown in phantom in FIG., at this point, pedestrian and not knowing itself and being in road
The left side or right side on road, therefore do not know specifically how to reach destination locations behind pedestrian's arrival crossing.Due to current navigation
The positioning accuracy of technology is 10 meters or so, therefore by current airmanship, can not determine that pedestrian is in the specific side of road
Position so as to cause can only provide rough navigation routine for user, and can not provide accurate reasonable navigation routine for pedestrian.
Further, as shown in figure 3, pedestrian is in the cross being made of the road of the road of east-west direction and North and South direction
Near crossing, when pedestrian need walk to destination locations B from current location A when, the embodiment of the present invention by by wagon flow direction with
Road direction matches, and can determine that pedestrian is in the specific orientation of road, and the navigation routine provided for pedestrian is as dashed lines
Shown, place gives the specific location that pedestrian needs to go across the road at the parting of the ways in figure, at this point, pedestrian is believed by the navigation provided
Breath can determine the left side for itself being in road or right side, while how reach destination locations after can determining arrival crossing.
Since the embodiment of the present invention can determine the precise position information of pedestrian, accurate reasonable navigation road can be provided for user
Line.
Specifically, the wagon flow direction pair in above-mentioned Fig. 3, in the image information that pedestrian passes through user equipment captured in real-time
When the road answered is North and South direction road, if wagon flow direction is by Nan Zhibei, pedestrian is in the west side of North and South direction road;If
Wagon flow direction is by north to south, then pedestrian is in the east side of North and South direction road.
The method of determining location information provided in an embodiment of the present invention, first the wagon flow direction in acquisition image information, and
The location information of user equipment is obtained, the map Central Plains of preset distance then will be less than or equal to the distance between user equipment
Road direction carries out view transformation according to the shooting visual angle of user equipment, finally by the road behind wagon flow direction and view transformation
Direction matches, and according to the location information of user equipment, determines the location information of pedestrian.Pass through road diatom and side with current
Compared along identification is carried out to road, the embodiment of the present invention by by the wagon flow direction of user equipment captured in real-time and view transformation extremely
The Roads in Maps direction at current shooting visual angle is matched, and can determine the physical location of pedestrian and the map position of user equipment
Deviation between setting can determine the physical location of pedestrian, in combination with the map location of user equipment so as to place
Pedestrian in both sides of the road is accurately positioned, and then accurate navigation routine can be provided for pedestrian.
It being illustrated as to method shown in Fig. 1, the embodiment of the present invention provides another method for determining location information,
As shown in Figure 4, which comprises
401, user equipment obtains the moving region in image information.
Wherein, image information is user equipment by camera function, carries out captured in real-time acquisition.
Optionally, it can also include: corner information of the user equipment according to user equipment before step 401, eliminate user
Parameter information corresponding to the displacement of equipment.Replacement as step 401: user equipment will be eliminated corresponding to displacement
Parameter information after the first image information and the second image information do difference, obtain moving region.
Wherein, corner information be user equipment obtain the first image information when angle and obtain the second image information when
Angle difference between angle, user equipment obtain the first image information at the time of with obtain the second image information at the time of not
Together.For example, the first image information and the second image information that user equipment obtains can be two adjacent picture frames.Example again
Such as, the first image information and the second image information that user equipment obtains can be the two of interval preset time or default frame number
A picture frame.
For the embodiment of the present invention, parameter information corresponding to the displacement of user equipment refer to due to pedestrian movement or
The factors such as hand shaking, the difference between the first image information and the second image information for causing user equipment to get.In the present invention
In embodiment, when by the parameter information corresponding to the displacement there are user equipment, eliminate corresponding to the displacement
Parameter information, can be avoided when executing step 401, directly using the difference generated by the displacement of user equipment as fortune
The case where dynamic region, so as to improve the accuracy for obtaining moving region.
Optionally, user equipment can be according to formulaIt is used
The displacement deviant of family equipment, and according to the displacement deviant of user equipment, eliminate the displacement of user equipment
Corresponding parameter information.Wherein, shiftxAnd shiftyRespectively user equipment in x-axis and y weeks displacement deviant,
αxAnd αyRespectively user equipment is in x-axis and the corner information of y-axis, t1And t2Respectively user equipment obtains the first image information
At the time of and at the time of obtaining the second image information, focallength is the focal length of user equipment, and pixelsize sets for user
Standby pixel value.
For the embodiment of the present invention, the corner information of user equipment can be obtained directly by aspect sensor,
It can be obtained by the rotary speed information of user equipment.In embodiments of the present invention, corner information αxAnd αyIt can pass through respectively
FormulaAndIt obtains, wherein ωxAnd ωyRespectively user equipment x-axis and y-axis rotary speed information,
It can be obtained by gyroscope.
402, user equipment obtains the wagon flow direction in image information according to the moving region in image information.
Optionally, step 402 can be that user equipment obtains the wagon flow for meeting the first preset condition in moving region
Direction.Wherein, the first preset condition is used to obtain the wagon flow direction in moving region.
Specifically, for user equipment in moving region, the maximum wagon flow direction of acquisition probability density is the first wagon flow direction,
And outside the presetting range in the first wagon flow direction in moving region, the maximum wagon flow direction of acquisition probability density is the second wagon flow
Direction;If the corresponding probability density in the first wagon flow direction is more than or equal to preset threshold value, using the first wagon flow direction as full
The wagon flow direction of the first preset condition of foot;If the corresponding probability density in the second wagon flow direction is more than or equal to preset threshold value,
Using the second wagon flow direction as the wagon flow direction for meeting the first preset condition.
Wherein, presetting range can be configured in advance by user equipment.For example, presetting range can for 3 degree, 5 degree or
10 degree etc..When presetting range is 5 degree, user equipment is in β1Outside ± 5 degree of range, the maximum wagon flow direction of acquisition probability density
For the second wagon flow direction, wherein β1For the corresponding straight line inclination angle in the first wagon flow direction.In embodiments of the present invention, by
The second wagon flow direction is obtained outside the presetting range in the first wagon flow direction in moving region, can be avoided due to the first wagon flow direction
And second direct current direction it is close, lead to not the case where getting effective wagon flow direction.
For the embodiment of the present invention, above-mentioned preset threshold value can be fixed value, or be counted according to the actual situation
It obtains.For example, preset threshold value can be fixed value 20%, 25% or 28% etc..For another example preset threshold value can be third vehicle
Flow the sum of the probability density in direction and the 4th wagon flow direction, wherein third wagon flow direction can be in the pre- of the second wagon flow direction
It sets outside range, the maximum wagon flow direction of probability density;4th wagon flow direction can for outside the presetting range in third wagon flow direction,
The maximum wagon flow direction of probability density.
For example, user equipment is first in moving region, the maximum vehicle of acquisition probability density if presetting range is 5 degree
Stream direction is the first wagon flow direction, and the straight line inclination angle in the first wagon flow direction is β1;Then in β1Outside ± 5 ° of range, obtain general
The maximum wagon flow direction of rate density is the second wagon flow direction, and the straight line inclination angle in the second wagon flow direction is β2;Then in β2± 5 °
Outside range, the maximum wagon flow direction of acquisition probability density is third wagon flow direction, and the straight line inclination angle in the third wagon flow direction is β3;
In β3Outside ± 5 ° of range, the maximum wagon flow direction of acquisition probability density be the 4th wagon flow direction, the 4th wagon flow direction it is straight
Line inclination angle is β4.At this point, the sum of the probability density in the third wagon flow direction and the 4th wagon flow direction that will acquire, as above-mentioned pre-
Set threshold value.
For the embodiment of the present invention, user equipment specifically can obtain wagon flow direction by optical flow method;It can also pass through
Harris Corner Detection Algorithm obtains wagon flow direction.In embodiments of the present invention, optical flow method and Harris Corner Detection Algorithm are equal
For the common knowledge of those skilled in the art, details are not described herein again.
For the embodiment of the present invention, a wagon flow direction for meeting the first preset condition can be got by step 402
Or two wagon flow directions, the situation near crossroad is in suitable for pedestrian.In embodiments of the present invention, when pedestrian is in
When the shape crossing " * ", step 402 is specifically as follows: user equipment is first in moving region, the maximum wagon flow of acquisition probability density
Direction is the first wagon flow direction, then outside the presetting range in the first wagon flow direction, the maximum wagon flow direction of acquisition probability density
For the second wagon flow direction, finally outside the presetting range in the second wagon flow direction, the maximum wagon flow direction of acquisition probability density is the
Three wagon flow directions;If the corresponding probability density in the first wagon flow direction is more than or equal to preset threshold value, by the first wagon flow direction
As the wagon flow direction for meeting the first preset condition;If the corresponding probability density in the second wagon flow direction is more than or equal to preset threshold
Value, then using the second wagon flow direction as the wagon flow direction for meeting the first preset condition;If the corresponding probability in third wagon flow direction is close
Degree is more than or equal to preset threshold value, then using third wagon flow direction as the wagon flow direction for meeting the first preset condition.
It should be noted that the embodiment of the present invention is not limited to and above-mentioned crossroad or above-mentioned " * " shape crossing, other
The crossing of what shape is equally applicable to the embodiment of the present invention.
Optionally, after step 402, can also include: user equipment to meet the wagon flow direction of the first preset condition into
Row straight line fitting, obtains xcamerasinβj+ycameracosβj+Cj=0.Wherein, xcameraAnd ycameraIt is sat for characterizing user equipment
Coordinate points information under mark system, βjFor the straight line inclination angle in j-th of wagon flow direction of the first preset condition of satisfaction, CjFor wagon flow direction
Parameter in corresponding linear equation.
Wherein, for straight line angle of inclination betajThere is corresponding C in corresponding wagon flow direction, each point that point is concentratedjk, k=
1 ..., n, to CjkAfter doing probability distribution statistical, the value for finding out maximum probability is denoted as Cj。
403, user equipment obtains the location information of user equipment.
Wherein, user equipment can specifically be positioned in real time by GPS technology, to get the position of user equipment
Information.In embodiments of the present invention, user equipment is generally 10 meters or so by the precision that GPS is positioned.
404, azimuth and inclination angle of the user equipment according to user equipment, the progress visual angle change of to map Central Plains road direction
It changes.
Specifically, step 404 can be that user equipment is according to formulaIt is right
Map Central Plains road direction carries out view transformation, the road direction after obtaining view transformation.Wherein, xcameraAnd ycameraFor table
Take over the coordinate points information under the device coordinate system of family, x for usemapAnd ymapFor characterizing the coordinate points information under map coordinates system, txAnd ty
Location information for pedestrian relative to user equipment, tzElevation information for user equipment relative to ground, R3x3For user equipment
Spin matrix, pass through formulaIt obtains, α is the side of user equipment
Parallactic angle, γ are the inclination angle of user equipment, C3x3For the parameter matrix of user equipment.
Wherein, tzIt can be configured, can also be configured by pedestrian, the embodiment of the present invention is not in advance for user equipment
It limits.For example, when pedestrian does not configure, tzIt can be the preconfigured default value of user equipment;When pedestrian is according to certainly
Body is to the use habit and height of user equipment, to tzWhen being configured, tzIt can be the value of user configuration.For example, tzCan be
1.7 rice.In embodiments of the present invention, by pedestrian to tzIt is configured, it can be according to pedestrian to the use habit of user equipment
And the height of pedestrian, reasonable t is providedzValue, so as to improve user experience.
It can also include: user equipment to the road side after view transformation after step 404 for the embodiment of the present invention
To straight line fitting is carried out, x is obtainedcamerasinβ′j+ycameracosβ′j+C′j=0.Wherein, β 'jFor the road side after view transformation
To straight line inclination angle, C 'jFor the parameter in the corresponding linear equation of road direction.
405, user equipment is poor by the straight line inclination angle between the road direction after minimizing wagon flow direction and view transformation
Value, and according to the location information of user equipment, determine the location information of pedestrian.
Wherein, the road direction after view transformation be by map Central Plains road direction according to user equipment shooting visual angle into
The road direction that row view transformation obtains, the distance between the corresponding road of map Central Plains road direction and user equipment be less than or
Equal to preset distance.In embodiments of the present invention, preset distance can be configured in advance by user equipment, for example, it is preset away from
From can be 10 meters, 12 meters or 20 meters etc..
For the embodiment of the present invention, by obtaining road of the distance between the user equipment less than or equal to preset distance
Road can be avoided the case where excessive meaningless road is shown in map, and the road letter needed for only user provides may be implemented
Breath, so as to improve user experience.
For the embodiment of the present invention, inclined by the straight line between the road direction after minimum wagon flow direction and view transformation
Angular difference value can be improved farthest to the precision for determining location information.
Optionally, step 405 can be that user equipment is by minimizing objective functionDetermine txAnd ty,
If meeting the second preset condition, user equipment is according to pedestrian relative to the location information of user equipment and the position of user equipment
Confidence breath, determines the location information of pedestrian.Wherein, βjFor the straight line inclination angle in wagon flow direction, β ' is the road side after view transformation
To straight line inclination angle.
Specifically, user equipment can determine the location information of pedestrian are as follows: x=x0+tx, y=y0+ty.Wherein, x and y are
The location information of pedestrian, x0And y0For the location information of user equipment, txAnd tyBelieve for pedestrian relative to the position of user equipment
Breath.
For the embodiment of the present invention, the second preset condition is location error condition, error of tilt condition and range error item
Any one or any combination of part.Wherein, location error condition can be | tx| < 10, | ty| < 10;Error of tilt condition can
Think | βj-β′j| 5 ° of <;Range error condition can be
Wherein, dist is the distance between user equipment and road, and h is the bodywork height upper limit, and ViewAngle is the view of user equipment
Angle, image_height are the picture altitude of user equipment.Optionally, h is 2 meters.
Alternatively, if being unsatisfactory for the second preset condition, the location information of user equipment is determined as going by user equipment
The location information of people.In embodiments of the present invention, by by xmapAnd ymapIt is determined as the location information of pedestrian, can reduce to true
Determine the complexity of location information.
Alternatively, if being unsatisfactory for the second preset condition, user equipment believes the history pedestrian position in preset time
Breath, is determined as the location information of pedestrian.In embodiments of the present invention, by the way that history pedestrian position information to be determined as to the position of pedestrian
Confidence breath, can reduce to the complexity for determining location information.
Wherein, preset time can be configured in advance by user equipment, can also have pedestrian to configure, and the present invention is real
Apply example without limitation.For example, preset time can be 2 seconds, 3 seconds or 5 seconds etc..In embodiments of the present invention, history pedestrian position
For the location information for the second preset condition of satisfaction that user equipment has determined.
406, user equipment provides corresponding navigation routine according to the location information of pedestrian for pedestrian.
Compared with current airmanship, the embodiment of the present invention is by by the road direction after wagon flow direction and view transformation
Match, can determine that pedestrian is in the specific orientation of road, so as to provide reasonable navigation routine for pedestrian.Wherein,
The specific orientation that pedestrian is in road refers to that pedestrian is in the left side of road or pedestrian is in the right side of road.
Such as shown in Fig. 2, it is attached that pedestrian is in the crossroad being made of the road of the road of east-west direction and North and South direction
Closely, when pedestrian needs to walk to destination locations B from current location A, it can not determine that pedestrian is in by current airmanship
The specific orientation of road, the navigation routine provided for pedestrian is as shown in phantom in FIG., at this point, pedestrian and not knowing itself and being in road
The left side or right side on road, therefore do not know specifically how to reach destination locations behind pedestrian's arrival crossing.Due to current navigation
The positioning accuracy of technology is 10 meters or so, therefore by current airmanship, can not determine that pedestrian is in the specific side of road
Position so as to cause can only provide rough navigation routine for user, and can not provide accurate reasonable navigation routine for pedestrian.
Further, as shown in figure 3, pedestrian is in the cross being made of the road of the road of east-west direction and North and South direction
Near crossing, when pedestrian need walk to destination locations B from current location A when, the embodiment of the present invention by by wagon flow direction with
Road direction matches, and can determine that pedestrian is in the specific orientation of road, and the navigation routine provided for pedestrian is as dashed lines
Shown, place gives the specific location that pedestrian needs to go across the road at the parting of the ways in figure, at this point, pedestrian is believed by the navigation provided
Breath can determine the left side for itself being in road or right side, while how reach destination locations after can determining arrival crossing.
Since the embodiment of the present invention can determine the precise position information of pedestrian, accurate reasonable navigation road can be provided for user
Line.
Specifically, the wagon flow direction pair in above-mentioned Fig. 3, in the image information that pedestrian passes through user equipment captured in real-time
When the road answered is North and South direction road, if wagon flow direction is by Nan Zhibei, pedestrian is in the west side of North and South direction road;If
Wagon flow direction is by north to south, then pedestrian is in the east side of North and South direction road.
The method of determining location information provided in an embodiment of the present invention, first the wagon flow direction in acquisition image information, and
The location information of user equipment is obtained, the map Central Plains of preset distance then will be less than or equal to the distance between user equipment
Road direction carries out view transformation according to the shooting visual angle of user equipment, finally by the road behind wagon flow direction and view transformation
Direction matches, and according to the location information of user equipment, determines the location information of pedestrian.Pass through road diatom and side with current
Compared along identification is carried out to road, the embodiment of the present invention by by the wagon flow direction of user equipment captured in real-time and view transformation extremely
The Roads in Maps direction at current shooting visual angle is matched, and can determine the physical location of pedestrian and the map position of user equipment
Deviation between setting can determine the physical location of pedestrian, in combination with the map location of user equipment so as to place
Pedestrian in both sides of the road is accurately positioned, and then accurate navigation routine can be provided for pedestrian.
Further, the method for determining location information provided in an embodiment of the present invention, passes through first in moving region
The second wagon flow direction is obtained outside the presetting range in wagon flow direction, can be avoided due to the first wagon flow direction and the second direct current direction phase
Closely, lead to not the case where getting effective wagon flow direction;By pedestrian to tzIt is configured, user can be set according to pedestrian
The height of standby use habit and pedestrian, provides reasonable tzValue, so as to improve user experience;By minimizing wagon flow side
To and view transformation after road direction between straight line inclination angle difference, can farthest improve to determining location information
Precision;By the way that the location information of user equipment to be determined as to the location information of pedestrian, can reduce to determining location information
Complexity;By the way that history pedestrian position information to be determined as to the location information of pedestrian, it can reduce and determining location information is answered
Miscellaneous degree;By the way that wagon flow direction and the road direction after view transformation match, it can determine that pedestrian is in the specific side of road
Position, so as to provide reasonable navigation routine for pedestrian.
Further, as the realization to method shown in Fig. 1 and Fig. 4, the embodiment of the invention also provides a kind of determining positions
The device of confidence breath, the device can be located in the user equipmenies such as mobile phone, computer, can also be located in network side server, use
It is accurately positioned in the pedestrian in both sides of the road, as shown in figure 5, described device includes: acquiring unit 51, determination unit
52。
Acquiring unit 51 for obtaining the wagon flow direction in image information, and obtains the location information of user equipment.
Wherein, image information is user equipment by camera function, carries out captured in real-time acquisition.In the embodiment of the present invention
In, wagon flow direction is the corresponding direction of the wagon flow moved on road in the image information of user equipment shooting.
For the embodiment of the present invention, user equipment can specifically be positioned in real time by GPS, be set to get user
Standby location information.In embodiments of the present invention, user equipment is generally 10 meters or so by the precision that GPS is positioned.
Determination unit 52, the wagon flow direction for will acquire the acquisition of unit 51 and the road direction phase after view transformation
The location information for the user equipment matched, and obtained according to acquiring unit 51, determines the location information of pedestrian.
Wherein, the road direction after view transformation be by map Central Plains road direction according to user equipment shooting visual angle into
The road direction that row view transformation obtains, the distance between the corresponding road of map Central Plains road direction and user equipment be less than or
Equal to preset distance.In embodiments of the present invention, preset distance can be configured in advance by user equipment, for example, it is preset away from
From can be 10 meters, 12 meters or 20 meters etc..
For the embodiment of the present invention, by obtaining road of the distance between the user equipment less than or equal to preset distance
Road can be avoided the case where excessive meaningless road is shown in map, and the road letter needed for only user provides may be implemented
Breath, so as to improve user experience.
Acquiring unit 51 is also used to obtain the moving region in image information.
Acquiring unit 51, specifically for obtaining the wagon flow direction in image information according to the moving region in image information.
Further, as shown in fig. 6, described device further include: eliminate unit 61.
Unit 61 is eliminated to eliminate corresponding to the displacement of user equipment for the corner information according to user equipment
Parameter information.
Wherein, corner information be user equipment obtain the first image information when angle and obtain the second image information when
Angle difference between angle, user equipment obtain the first image information at the time of with obtain the second image information at the time of not
Together.For example, the first image information and the second image information that user equipment obtains can be two adjacent picture frames.Example again
Such as, the first image information and the second image information that user equipment obtains can be the two of interval preset time or default frame number
A picture frame.
For the embodiment of the present invention, parameter information corresponding to the displacement of user equipment refer to due to pedestrian movement or
The factors such as hand shaking, the difference between the first image information and the second image information for causing user equipment to get.
Acquiring unit 51, specifically for the first figure after unit 61 eliminates parameter information corresponding to displacement will be eliminated
As information and the second image information do difference, moving region is obtained.
Unit 61 is eliminated, is specifically used for according to formulaIt is used
The displacement deviant of family equipment, and according to the displacement deviant of user equipment, eliminate the displacement of user equipment
Corresponding parameter information.
Wherein, shiftxAnd shiftyRespectively user equipment is in x-axis and y weeks displacement deviant, αxAnd αyRespectively
It is user equipment in x-axis and the corner information of y-axis, t1And t2At the time of respectively user equipment obtains the first image information and obtain
At the time of taking the second image information, focallength is the focal length of user equipment, and pixelsize is the pixel value of user equipment.
For the embodiment of the present invention, the corner information of user equipment can be obtained directly by aspect sensor,
It can be obtained by the rotary speed information of user equipment.In embodiments of the present invention, corner information αxAnd αyIt can pass through respectively
FormulaAndIt obtains, wherein ωxAnd ωyRespectively user equipment x-axis and y-axis rotary speed information,
It can be obtained by gyroscope.
Acquiring unit 51 is specifically used in moving region, obtains the wagon flow direction for meeting the first preset condition.
Wherein, the first preset condition is used to obtain the wagon flow direction in moving region.
Optionally, described device further include: fitting unit 62.
Fitting unit 62, it is quasi- that the wagon flow direction of the first preset condition of satisfaction for obtaining to acquiring unit 51 carries out straight line
It closes, obtains xcamerasinβj+ycameracosβj+Cj=0.
Wherein, xcameraAnd ycameraFor characterizing the coordinate points information under user equipment coordinate system, βjIt is pre- to meet first
If the straight line inclination angle in j-th of wagon flow direction of condition, CjFor the parameter in the corresponding linear equation in wagon flow direction.
Acquiring unit 51 is specifically used in moving region, and the maximum light stream direction of acquisition probability density is the first wagon flow
Direction, and outside the presetting range in the first wagon flow direction in moving region, the maximum light stream direction of acquisition probability density are the
Two wagon flow directions.
Wherein, presetting range can be configured in advance by user equipment.For example, presetting range can for 3 degree, 5 degree or
10 degree etc..When presetting range is 5 degree, user equipment is in β1Outside ± 5 degree of range, the maximum wagon flow direction of acquisition probability density
For the second wagon flow direction, wherein β1For the corresponding straight line inclination angle in the first wagon flow direction.In embodiments of the present invention, by
The second wagon flow direction is obtained outside the presetting range in the first wagon flow direction in moving region, can be avoided due to the first wagon flow direction
And second direct current direction it is close, lead to not the case where getting effective wagon flow direction.
For the embodiment of the present invention, user equipment specifically can obtain wagon flow direction by optical flow method;It can also pass through
Harris Corner Detection Algorithm obtains wagon flow direction.In embodiments of the present invention, optical flow method and Harris Corner Detection Algorithm are equal
For the common knowledge of those skilled in the art, details are not described herein again.
Acquiring unit 51 is specifically also used to be more than or equal to preset threshold value when the corresponding probability density in the first wagon flow direction
When, using the first wagon flow direction as the wagon flow direction for meeting the first preset condition.
Acquiring unit 51 is specifically also used to be more than or equal to preset threshold value when the corresponding probability density in the second wagon flow direction
When, using the second wagon flow direction as the wagon flow direction for meeting the first preset condition.
For the embodiment of the present invention, a wagon flow side for meeting the first preset condition can be got by acquiring unit 51
To or two wagon flow directions, be in the situation near crossroad suitable for pedestrian.In embodiments of the present invention, at pedestrian
When the shape crossing " * ", acquiring unit 51 specifically can be used for: first in moving region, the maximum wagon flow of acquisition probability density
Direction is the first wagon flow direction, then outside the presetting range in the first wagon flow direction, the maximum wagon flow direction of acquisition probability density
For the second wagon flow direction, finally outside the presetting range in the second wagon flow direction, the maximum wagon flow direction of acquisition probability density is the
Three wagon flow directions;If the corresponding probability density in the first wagon flow direction is more than or equal to preset threshold value, by the first wagon flow direction
As the wagon flow direction for meeting the first preset condition;If the corresponding probability density in the second wagon flow direction is more than or equal to preset threshold
Value, then using the second wagon flow direction as the wagon flow direction for meeting the first preset condition;If the corresponding probability in third wagon flow direction is close
Degree is more than or equal to preset threshold value, then using third wagon flow direction as the wagon flow direction for meeting the first preset condition.
It should be noted that the embodiment of the present invention is not limited to and above-mentioned crossroad or above-mentioned " * " shape crossing, other
The crossing of what shape is equally applicable to the embodiment of the present invention.
Optionally, described device further include: converter unit 63.
Converter unit 63, for the azimuth and inclination angle according to user equipment, to map Central Plains road direction is regarded
Angular transformation.
Converter unit 63 is specifically used for according to formulaTo map Central Plains road
Road direction carries out view transformation, the road direction after obtaining view transformation.
Wherein, xcameraAnd ycameraFor characterizing the coordinate points information under user equipment coordinate system, xmapAnd ymapFor table
Levy the coordinate points information under map coordinates system, txAnd tyLocation information for pedestrian relative to user equipment, tzFor user equipment phase
For the elevation information on ground, R3x3For the spin matrix of user equipment, pass through formulaIt obtains, α is the azimuth of user equipment, and γ is user equipment
Inclination angle, C3x3For the parameter matrix of user equipment.
For the embodiment of the present invention, tzIt can be configured, can also be configured by pedestrian in advance for user equipment, this
Inventive embodiments are without limitation.For example, when pedestrian does not configure, tzIt can be the preconfigured default value of user equipment;
When pedestrian is according to itself use habit and height to user equipment, to tzWhen being configured, tzIt can be the value of user configuration.
For example, tzIt can be 1.7 meters.In embodiments of the present invention, by pedestrian to tzIt is configured, user can be set according to pedestrian
The height of standby use habit and pedestrian, provides reasonable tzValue, so as to improve user experience.
Fitting unit 62, the road direction after the view transformation for being also used to obtain 63 view transformation of converter unit carry out straight
Line fitting, obtains xcamerasinβ′j+ycameracosβ′j+C′j=0.
Wherein, β 'jFor the straight line inclination angle of the road direction after view transformation, C 'jFor in the corresponding linear equation of road direction
Parameter.
Determination unit 52, specifically for 63 visual angle of wagon flow direction and converter unit obtained by minimizing acquiring unit 51
Straight line inclination angle difference between transformed road direction, and according to the location information of user equipment, determine the position letter of pedestrian
Breath.
Determination unit 52 is specifically used for by minimizing objective functionDetermine txAnd ty。
Wherein, βjFor the straight line inclination angle in wagon flow direction, β 'jFor the straight line inclination angle of the road direction after view transformation, txAnd ty
Location information for pedestrian relative to user equipment.
Determination unit 52 is specifically also used to the position when meeting the second preset condition, according to pedestrian relative to user equipment
The location information of confidence breath and user equipment, determines the location information of pedestrian.
Specifically, user equipment can determine the location information of pedestrian are as follows: x=x0+tx, y=y0+ty.Wherein, x and y are
The location information of pedestrian, x0And y0For the location information of user equipment, txAnd tyBelieve for pedestrian relative to the position of user equipment
Breath.
Wherein, the second preset condition be location error condition, any one of error of tilt condition and range error condition or
Person's any combination.
Specifically, location error condition can be | tx| < 10, | ty| < 10;Error of tilt condition can be | βj-β′j|
5 ° of <;Range error condition can beWherein, dist is
The distance between user equipment and road, h are the bodywork height upper limit, and ViewAngle is the visual angle of user equipment, image_
Height is the picture altitude of user equipment.
Determination unit 52 is also used to when being unsatisfactory for the second preset condition, and the location information of user equipment is determined as going
The location information of people.
Determination unit 52 is also used to when being unsatisfactory for the second preset condition, and the history pedestrian position in preset time is believed
Breath, is determined as the location information of pedestrian.
Optionally, described device further include: navigation elements 64.
Navigation elements 64, the location information of the pedestrian for being determined according to determination unit 52, provide corresponding lead for pedestrian
Air route line.
The device of determining location information provided in an embodiment of the present invention, first acquiring unit obtain the wagon flow in image information
Direction, and obtain the location information of user equipment, then converter unit will be less than or equal to pre- with the distance between user equipment
The map Central Plains road direction for setting distance carries out view transformation according to the shooting visual angle of user equipment, and last determination unit is by vehicle
Stream direction matches with the road direction after view transformation, and according to the location information of user equipment, determines the position letter of pedestrian
Breath.Compared with being identified at present by road diatom and edge to road, the embodiment of the present invention passes through user equipment is real-time
The wagon flow direction of shooting and the Roads in Maps direction at view transformation to current shooting visual angle are matched, and can determine pedestrian's
Deviation between physical location and the map location of user equipment can determine in combination with the map location of user equipment
The physical location of pedestrian so as to be accurately positioned to the pedestrian in both sides of the road, and then can provide essence for pedestrian
True navigation routine.
Further, the device of determining location information provided in an embodiment of the present invention, by the pre- of the first wagon flow direction
It sets and obtains the second wagon flow direction outside range, can be avoided since the first wagon flow direction and the second direct current direction are close, lead to not
The case where getting effective wagon flow direction;By pedestrian to tzIt is configured, the use of user equipment can be practised according to pedestrian
Used and pedestrian height, provides reasonable tzValue, so as to improve user experience;Become by minimizing wagon flow direction and visual angle
Straight line inclination angle difference between road direction after changing can be improved farthest to the precision for determining location information;It is logical
The location information that the location information of user equipment is determined as to pedestrian is crossed, can reduce to the complexity for determining location information;It is logical
The location information that history pedestrian position information is determined as to pedestrian is crossed, can reduce to the complexity for determining location information;Pass through
Wagon flow direction and the road direction after view transformation are matched, can determine that pedestrian is in the specific orientation of road, so as to
To provide reasonable navigation routine for pedestrian.
It should be noted that in the device of the determination location information provided in the embodiment of the present invention corresponding to each unit its
He accordingly describes, can be with reference to the corresponding description in Fig. 1 and Fig. 4, and details are not described herein.
Still further, the embodiment of the invention also provides a kind of user equipment, as shown in fig. 7, the user equipment packet
Include: processor 71, transmitter 72, receiver 73, memory 74, the transmitter 72, receiver 73, memory 74 respectively with institute
Processor 71 is stated to be connected.
Processor 71 for obtaining the wagon flow direction in image information, and obtains the location information of user equipment.
Wherein, image information is user equipment by camera function, carries out captured in real-time acquisition.In the embodiment of the present invention
In, wagon flow direction is the corresponding direction of the wagon flow moved on road in the image information of user equipment shooting.
For the embodiment of the present invention, user equipment can specifically be positioned in real time by GPS, be set to get user
Standby location information.In embodiments of the present invention, user equipment is generally 10 meters or so by the precision that GPS is positioned.
Processor 71 is also used to match in wagon flow direction and the road direction after view transformation, and according to user equipment
Location information, determine the location information of pedestrian.
Wherein, the road direction after view transformation be by map Central Plains road direction according to user equipment shooting visual angle into
The road direction that row view transformation obtains, the distance between the corresponding road of map Central Plains road direction and user equipment be less than or
Equal to preset distance.In embodiments of the present invention, preset distance can be configured in advance by user equipment, for example, it is preset away from
From can be 10 meters, 12 meters or 20 meters etc..
For the embodiment of the present invention, by obtaining road of the distance between the user equipment less than or equal to preset distance
Road can be avoided the case where excessive meaningless road is shown in map, and the road letter needed for only user provides may be implemented
Breath, so as to improve user experience.
Processor 71 is also used to obtain the moving region in image information.
Processor 71, specifically for obtaining the wagon flow direction in image information according to the moving region in image information.
Processor 71 is also used to the corner information according to user equipment, eliminates corresponding to the displacement of user equipment
Parameter information.
Wherein, corner information be user equipment obtain the first image information when angle and obtain the second image information when
Angle difference between angle, user equipment obtain the first image information at the time of with obtain the second image information at the time of not
Together.For example, the first image information and the second image information that user equipment obtains can be two adjacent picture frames.Example again
Such as, the first image information and the second image information that user equipment obtains can be the two of interval preset time or default frame number
A picture frame.
For the embodiment of the present invention, parameter information corresponding to the displacement of user equipment refer to due to pedestrian movement or
The factors such as hand shaking, the difference between the first image information and the second image information for causing user equipment to get.
Processor 71, specifically for the first image information and second after parameter information corresponding to displacement will be eliminated
Image information does difference, obtains moving region.
Processor 71 is specifically used for according to formulaObtain user
The displacement deviant of equipment, and according to the displacement deviant of user equipment, eliminate the displacement institute of user equipment
Corresponding parameter information.
Wherein, shiftxAnd shiftyRespectively user equipment is in x-axis and y weeks displacement deviant, αxAnd αyRespectively
It is user equipment in x-axis and the corner information of y-axis, t1And t2At the time of respectively user equipment obtains the first image information and obtain
At the time of taking the second image information, focallength is the focal length of user equipment, and pixelsize is the pixel value of user equipment.
For the embodiment of the present invention, the corner information of user equipment can be obtained directly by aspect sensor,
It can be obtained by the rotary speed information of user equipment.In embodiments of the present invention, corner information αxAnd αyIt can pass through respectively
FormulaAndIt obtains, wherein ωxAnd ωyRespectively user equipment x-axis and y-axis rotary speed information,
It can be obtained by gyroscope.
Processor 71 is specifically used in moving region, obtains the wagon flow direction for meeting the first preset condition.
Wherein, the first preset condition is used to obtain the wagon flow direction in moving region.
Processor 71 is also used to carry out straight line fitting to the wagon flow direction for meeting the first preset condition, obtains xcamerasin
βj+ycameracosβj+Cj=0.
Wherein, xcameraAnd ycameraFor characterizing the coordinate points information under user equipment coordinate system, βjIt is pre- to meet first
If the straight line inclination angle in j-th of wagon flow direction of condition, CjFor the parameter in the corresponding linear equation in wagon flow direction.
Processor 71 is specifically used in moving region, and the maximum light stream direction of acquisition probability density is the first wagon flow side
To, and outside the presetting range in the first wagon flow direction in moving region, the maximum light stream direction of acquisition probability density is second
Wagon flow direction.
Wherein, presetting range can be configured in advance by user equipment.For example, presetting range can for 3 degree, 5 degree or
10 degree etc..When presetting range is 5 degree, user equipment is in β1Outside ± 5 degree of range, the maximum wagon flow direction of acquisition probability density
For the second wagon flow direction, wherein β1For the corresponding straight line inclination angle in the first wagon flow direction.In embodiments of the present invention, by
The second wagon flow direction is obtained outside the presetting range in the first wagon flow direction in moving region, can be avoided due to the first wagon flow direction
And second direct current direction it is close, lead to not the case where getting effective wagon flow direction.
For the embodiment of the present invention, user equipment specifically can obtain wagon flow direction by optical flow method;It can also pass through
Harris Corner Detection Algorithm obtains wagon flow direction.In embodiments of the present invention, optical flow method and Harris Corner Detection Algorithm are equal
For the common knowledge of those skilled in the art, details are not described herein again.
Processor 71 is specifically also used to be more than or equal to preset threshold value when the corresponding probability density in the first wagon flow direction
When, using the first wagon flow direction as the wagon flow direction for meeting the first preset condition.
Processor 71 is specifically also used to be more than or equal to preset threshold value when the corresponding probability density in the second wagon flow direction
When, using the second wagon flow direction as the wagon flow direction for meeting the first preset condition.
For the embodiment of the present invention, a wagon flow side for meeting the first preset condition can be got by acquiring unit 51
To or two wagon flow directions, be in the situation near crossroad suitable for pedestrian.In embodiments of the present invention, at pedestrian
When the shape crossing " * ", acquiring unit 51 specifically can be used for: first in moving region, the maximum wagon flow of acquisition probability density
Direction is the first wagon flow direction, then outside the presetting range in the first wagon flow direction, the maximum wagon flow direction of acquisition probability density
For the second wagon flow direction, finally outside the presetting range in the second wagon flow direction, the maximum wagon flow direction of acquisition probability density is the
Three wagon flow directions;If the corresponding probability density in the first wagon flow direction is more than or equal to preset threshold value, by the first wagon flow direction
As the wagon flow direction for meeting the first preset condition;If the corresponding probability density in the second wagon flow direction is more than or equal to preset threshold
Value, then using the second wagon flow direction as the wagon flow direction for meeting the first preset condition;If the corresponding probability in third wagon flow direction is close
Degree is more than or equal to preset threshold value, then using third wagon flow direction as the wagon flow direction for meeting the first preset condition.
It should be noted that the embodiment of the present invention is not limited to and above-mentioned crossroad or above-mentioned " * " shape crossing, other
The crossing of what shape is equally applicable to the embodiment of the present invention.
Processor 71, is also used to azimuth and inclination angle according to user equipment, and to map Central Plains road direction is regarded
Angular transformation.
Processor 71 is specifically used for according to formulaOriginal path in map
Direction carries out view transformation, the road direction after obtaining view transformation.
Wherein, xcameraAnd ycameraFor characterizing the coordinate points information under user equipment coordinate system, xmapAnd ymapFor table
Levy the coordinate points information under map coordinates system, txAnd tyLocation information for pedestrian relative to user equipment, tzFor user equipment phase
For the elevation information on ground, R3x3For the spin matrix of user equipment, pass through formulaIt obtains, α is the azimuth of user equipment, and γ is user equipment
Inclination angle.
For the embodiment of the present invention, tzIt can be configured, can also be configured by pedestrian in advance for user equipment, this
Inventive embodiments are without limitation.For example, when pedestrian does not configure, tzIt can be the preconfigured default value of user equipment;
When pedestrian is according to itself use habit and height to user equipment, to tzWhen being configured, tzIt can be the value of user configuration.
For example, tzIt can be 1.7 meters.In embodiments of the present invention, by pedestrian to tzIt is configured, user can be set according to pedestrian
The height of standby use habit and pedestrian, provides reasonable tzValue, so as to improve user experience.
Processor 71 is also used to carry out straight line fitting to the road direction after view transformation, obtains xcamerasinβ′j+
ycameracosβ′j+C′j=0.
Wherein, β 'jFor the straight line inclination angle of the road direction after view transformation, C 'jFor in the corresponding linear equation of road direction
Parameter.
Processor 71, specifically for being inclined by the straight line between the road direction after minimum wagon flow direction and view transformation
Angular difference value, and according to the location information of user equipment, determine the location information of pedestrian.
Processor 71 is specifically used for by minimizing objective functionDetermine txAnd ty。
Wherein, βjFor the straight line inclination angle in wagon flow direction, β 'jFor the straight line inclination angle of the road direction after view transformation, txAnd ty
Location information for pedestrian relative to user equipment.
Processor 71 is specifically also used to the position when meeting the second preset condition, according to pedestrian relative to user equipment
The location information of information and user equipment determines the location information of pedestrian.
Specifically, user equipment can determine the location information of pedestrian are as follows: x=x0+tx, y=y0+ty.Wherein, x and y are
The location information of pedestrian, x0And y0For the location information of user equipment, txAnd tyBelieve for pedestrian relative to the position of user equipment
Breath.
Wherein, the second preset condition be location error condition, any one of error of tilt condition and range error condition or
Person's any combination.
Specifically, location error condition can be | tx| < 10, | ty| < 10;Error of tilt condition can be | βj-β′j|
5 ° of <;Range error condition can beWherein, dist is
The distance between user equipment and road, h are the bodywork height upper limit, and ViewAngle is the visual angle of user equipment, image_
Height is the picture altitude of user equipment.
Processor 71 is also used to when being unsatisfactory for the second preset condition, and the location information of user equipment is determined as pedestrian
Location information.
Processor 71 is also used to when being unsatisfactory for the second preset condition, by the history pedestrian position information in preset time,
It is determined as the location information of pedestrian.
Processor 71 is also used to the location information according to pedestrian, provides corresponding navigation routine for pedestrian.
User equipment provided in an embodiment of the present invention, processor obtains the wagon flow direction in image information first, and obtains
Then the location information of user equipment will be less than or equal to original path in the map of preset distance with the distance between user equipment
Direction carries out view transformation according to the shooting visual angle of user equipment, finally by the road direction behind wagon flow direction and view transformation
Match, and according to the location information of user equipment, determines the location information of pedestrian.Pass through road diatom and edge pair with current
Road carries out identification and compares, the embodiment of the present invention by by the wagon flow direction of user equipment captured in real-time and view transformation to current
The Roads in Maps direction of shooting visual angle is matched, can determine pedestrian physical location and user equipment map location it
Between deviation can determine the physical location of pedestrian in combination with the map location of user equipment, so as to be in road
The pedestrian of road two sides is accurately positioned, and then accurate navigation routine can be provided for pedestrian.
Further, user equipment provided in an embodiment of the present invention, by being obtained outside the presetting range in the first wagon flow direction
The second wagon flow direction is taken, can be avoided since the first wagon flow direction and the second direct current direction are close, leads to not get effectively
The case where wagon flow direction;By pedestrian to tzIt is configured, it can be according to pedestrian to the use habit of user equipment and pedestrian
Height provides reasonable tzValue, so as to improve user experience;Pass through the road after minimum wagon flow direction and view transformation
Straight line inclination angle difference between direction can be improved farthest to the precision for determining location information;By the way that user is set
Standby location information is determined as the location information of pedestrian, can reduce to the complexity for determining location information;By by history row
People's location information is determined as the location information of pedestrian, can reduce to the complexity for determining location information;By by wagon flow direction
Match with the road direction after view transformation, can determine that pedestrian is in the specific orientation of road, so as to mention for pedestrian
For reasonable navigation routine.
It should be noted that other are accordingly retouched corresponding to each equipment in the user equipment provided in the embodiment of the present invention
It states, can be with reference to the corresponding description in Fig. 1 or Fig. 4, details are not described herein.
The method, apparatus and user equipment of determining location information provided in an embodiment of the present invention can be adapted for in road
The pedestrian of road two sides provides navigation routine, but is not limited only to this.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those familiar with the art, all answers
It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.