A kind of world and indoor and outdoor panorama auto-associating analysis method
Technical field
The present invention relates to 3-dimensional image process fields, and in particular to a kind of world and indoor and outdoor panorama auto-associating analysis side
Method.
Background technology
Three-dimensional panorama technology is current rapid development and a kind of gradually popular virtual reality technology, can be widely applied to net
Network three-dimensional service.Three-dimensional panorama has merged panoramic technique and geographical information technology, by it is a kind of it is completely true in a manner of show space
Information.In the world of full-view image expression, comprising a large amount of geography, environment, economic, social, humane information with
And the knowledge for excavation, there are strong three-dimensional sense and feeling of immersion, feeling on the spot in person can be given.
Existing panorama service both at home and abroad has Google's streetscape, Microsoft's streetscape, Tencent's SOSO streetscapes at present, in addition, domestic
City, love still Chongqing etc. also provide the street view service of urban.Panoramic technique enters the golden period of development, using streetscape as generation
The application product of table, development prospect have prodigious imagination space.
However, on the one hand, the service of existing panorama only provides outdoor streetscape mostly both at home and abroad, to the world and indoor and outdoor panorama
Integrally exhibiting research it is less.On the other hand, streetscape data volume is bigger, when carrying out streetscape data automatic roaming, tradition
Way be by manual intervention increase Roam Path, to realize that the association between scene, this method will greatly reduce street
The production efficiency of scape data.
Invention content
In order to overcome above-mentioned defect existing in the prior art, the object of the present invention is to provide a kind of quickly and accurately real
The analysis method of the existing world and indoor and outdoor panorama auto-associating.
To achieve the goals above, the present invention provides a kind of world and indoor and outdoor panorama auto-associating analysis method, packets
Include following steps:
S1 acquires panoramic pictures information, including panoramic pictures and position point coordinates p when acquiring the panoramic pictures0(x0,
y0,z0);
S2, according to the acquisition position of current panorama picture point p0(x0,y0,z0) obtain and be associated in appointed buffer
It is associated with panoramic pictures;
S3 selects an assigned direction as direction is referred to, and arbitrarily chooses auxiliary magnet p in panorama sketch1, space is sat
It is designated as p1(x1,y1,z1), coordinate is p in panoramic pictures1(m1,n1), according to the acquisition position of current panorama picture point p0(x0,
y0,z0) and auxiliary magnet p1Obtain corresponding position of the reference direction point in the panoramic pictures;
S4 calculates the acquisition of association panoramic pictures according to the corresponding position of the reference direction point in current panorama picture
The correspondence of location point and current panorama picture realizes association panoramic pictures and current panorama figure according to corresponding correspondence
The association of piece obtains the world and indoor and outdoor integral panoramic map.
On the basis of the acquisition of panoramic pictures, pretreatment and splicing, the present invention carries out spatialization first to panoramic pictures,
According to the orientation of panoramic pictures, centered on current panorama picture, panoramic pictures in a certain buffering area radius with it is current
Panoramic pictures carry out auto-associating.
Reference direction in the step S3 of this method can be arbitrarily selected, by the acquisition position point p of current panorama picture0(x0,
y0,z0) and auxiliary magnet p1Obtain in the horizontal plane reference direction withAngular relationship, joined according to this angular relationship
Examine corresponding position of the point in the panoramic pictures on direction.
This method is simple, directly effective, quickly can complete to be associated with panoramic pictures are associated with by current panorama picture, obtain
The world and indoor and outdoor integral panoramic map, improve the production efficiency of streetscape data.
The associated efficiency of panoramic pictures is improved by association results obtained above, but there are certain error, is needed
The full-view image larger to association error, which is modified, is modified association results, to ensure the correctness of auto-associating, because
This further includes step S5, is modified to association results, and the revised world and indoor and outdoor integral panoramic map are obtained.Finally
The world and indoor and outdoor integral panoramic map obtained to association is issued.
Further, step S2 includes the following steps:
S2-1, if buffering area radius is r, if a certain panoramic pictures acquisition position point coordinates is p in the buffering area3(x3,y3,
z3), calculate panoramic pictures acquisition position point p3(x3,y3,z3) arrive current panorama picture collection location point p0(x0,y0,z0) away from
From computational methods are as follows:
S2-2, judges whether the panoramic pictures are associated with current panorama picture, and judgment method is:
S2-3 repeats step S2-1 to S2-2, until whole panoramic pictures in the buffering area be judged whether
It is associated, finally obtain all in the buffering area and associated association panoramic pictures of current panorama picture.
This method can rapidly, completely obtain panoramic pictures associated with current panorama picture in appointed buffer, carry
The high accuracy of association results.
Preferential, the reference direction in step S3 is positive north orientation.Select positive north orientation as direction is referred to, more convenient for we
The analysis and calculating of method, can improve the accuracy of result of calculation, to improve current panorama picture and be associated with panoramic pictures association
Accuracy.
Further, step S3 includes the following steps:
S3-1, the arbitrary selected point p in current panorama picture1As auxiliary magnet, if auxiliary magnet p1Coordinate be p1(x1,y1,
z1), coordinate is p in panoramic pictures1(m1,n1);
S3-2, if auxiliary magnet p1(x1,y1,z1) with the acquisition position point p of current panorama picture0(x0,y0,z0) in horizontal plane
Subpoint be respectively p1′(x1,y1) and p0′(x0,y0), on calculated level face positive north orientation withAngle α, calculation formula
For:Then angle α is determined according to the following formula:
S3-3 determines position coordinates p of the positive north orientation point in current panorama picture by angle αN(xN,yN), it calculates
Formula is:Wherein n indicates the width of current panorama image, current panorama
The length of image is 2n.
In order to carry out the association on spatial position to current panorama picture, it is thus necessary to determine that the orientation that every width panoramic pictures indicate
Information.It is difficult that panoramic pictures are oriented only according to the spatial positional information of the panoramic pictures is acquired, passes through addition in this step
Auxiliary magnet p1Panoramic pictures are oriented, therefore auxiliary magnet p1Coordinate be known, obtain auxiliary magnet p first1With due north
To angle α in the horizontal plane, position coordinates p of the positive north orientation point in current panorama picture is then obtained by angle αN
(xN,yN), it provides the foundation for the association calculating of follow-up panoramic pictures, plays the role of place mat.
Preferably, the auxiliary magnet p1Coordinate in current panorama pictureIt is located at current
The central point of panoramic pictures.This calculating point pNCoordinate when, more fast, be easy to calculate.
Preferably, in step S3-3,This to calculate in association more efficient and convenient.
Further, step S4 includes the following steps:
S4-1, if the acquisition position point of an association panoramic pictures is p2(x2,y2,z2), calculate the position and due north
To angle β in the horizontal plane, calculation formula is:
Then angle β is determined according to the following formula:
S4-2 is calculatedWith the angle theta of horizontal plane, calculation formula is:
S4-3 calculates point p2(x2,y2,z2) arrive current panorama picture corresponding pixel points p2′(x2′,y2') transformational relation,
Realize being associated with for the association panoramic pictures and current panorama picture, the calculation formula of transformational relation is as follows:
S4-4 calculates being associated with for other association panoramic pictures and current panorama picture according to step S4-1 to S4-3
System, realizes the auto-associating of panoramic pictures.
This method quickly directly obtained relevant panoramic pictures and current panorama picture transformational relation, complete
Association between them.
The additional aspect and advantage of the present invention will be set forth in part in the description, and will partly become from the following description
Obviously, or practice through the invention is recognized.
Description of the drawings
The above-mentioned and/or additional aspect and advantage of the present invention will become in the description from combination following accompanying drawings to embodiment
Obviously and it is readily appreciated that, wherein:
Fig. 1 is the flow chart of the present invention;
Fig. 2 is that panoramic pictures orient schematic diagram.
Specific implementation mode
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, and is only used for explaining the present invention, and is not considered as limiting the invention.
In the description of the present invention, unless otherwise specified and limited, it should be noted that term " installation ", " connected ",
" connection " shall be understood in a broad sense, for example, it may be mechanical connection or electrical connection, can also be the connection inside two elements, it can
, can also indirectly connected through an intermediary, for the ordinary skill in the art to be to be connected directly, it can basis
Concrete condition understands the concrete meaning of above-mentioned term.
The present invention provides a kind of world and indoor and outdoor panorama auto-associating analysis methods, as shown in Figure 1, including following step
Suddenly:
The first step acquires panoramic pictures information, including panoramic pictures and position point coordinates p when acquiring the panoramic pictures0
(x0,y0,z0)。
In the acquisition to panoramic pictures, the work for carrying out panoramic pictures acquisition, picture pretreatment and picture splicing is needed,
Every Zhang Quanjing picture is required for record its acquisition position point coordinates.
Second step, according to the acquisition position of current panorama picture point p0(x0,y0,z0) obtain and closed therewith in appointed buffer
The association panoramic pictures of connection.
Here the method for obtaining association panoramic pictures is as follows:
First, if buffering area radius is r, if a certain panoramic pictures acquisition position point coordinates is p in the buffering area3(x3,y3,
z3), calculate panoramic pictures acquisition position point p3(x3,y3,z3) arrive current panorama picture collection location point p0(x0,y0,z0) away from
From computational methods are as follows:
Then, judge whether the panoramic pictures are associated with current panorama picture, judgment method is:
By repeating above-mentioned two step, whether closed until whole panoramic pictures in the buffering area are judged
Connection finally obtains all in the buffering area and associated association panoramic pictures of current panorama picture.
Third walks, and select one assigned direction as with reference to direction, and arbitrarily choose auxiliary magnet p in panorama sketch1, empty
Between coordinate be p1(x1,y1,z1), coordinate is p in panoramic pictures1(m1,n1), according to the acquisition position of current panorama picture point p0
(x0,y0,z0) and auxiliary magnet p1Obtain corresponding position of the reference direction point in the panoramic pictures.
Here reference direction can be arbitrarily selected, by the acquisition position point p of current panorama picture0(x0,y0,z0) and auxiliary
Point p1Obtain in the horizontal plane reference direction withAngular relationship, one in reference direction is obtained according to this angular relationship
Corresponding position of a point in the panoramic pictures.
Preferably positive north orientation, which is used as, in the present embodiment refers to direction, specifically there is following steps:
First, as shown in Fig. 2, in current panorama picture arbitrary selected point p1As auxiliary magnet, if auxiliary magnet p1Space
Coordinate is p1(x1,y1,z1), coordinate is p in panoramic pictures1(m1,n1)。
Then, if auxiliary magnet p1(x1,y1,z1) with the acquisition position point p of current panorama picture0(x0,y0,z0) in horizontal plane
Subpoint be respectively p1′(x1,y1) and p0′(x0,y0), on calculated level face positive north orientation withAngle α, calculation formula
For:Then angle α is determined according to the following formula:
Finally, position coordinates p of the positive north orientation point in current panorama picture is determined by angle αN(xN,yN), it calculates public
Formula is as follows:
Wherein n indicates the width of current panorama image, and the length of current panorama image is 2n, and Aspect Ratio is usual in panoramic pictures
All it is 2:1.
4th step calculates association panoramic pictures according to the corresponding position of the reference direction point in current panorama picture
The correspondence of acquisition position point and current panorama picture, according to corresponding correspondence realize association panoramic pictures with it is current complete
The association of scape picture.
It is specific that there are four steps:
1) the acquisition position point of an association panoramic pictures, is set as p2(x2,y2,z2), calculate the position and positive north orientation
Angle β in the horizontal plane, calculation formula are:
Then angle β is determined according to the following formula:
2) it, calculatesWith the angle theta of horizontal plane, calculation formula is:
3) point p, is calculated2(x2,y2,z2) arrive current panorama picture corresponding pixel points p2′(x2′,y2') transformational relation, it is real
Now the association panoramic pictures and current panorama picture are associated with, and the calculation formula of transformational relation is as follows:
4) incidence relation of other association panoramic pictures and current panorama picture, is calculated according to three steps above, it is real
The auto-associating of existing panoramic pictures, obtains the world and indoor and outdoor integral panoramic map.
Certainly in the present embodiment, other directions can also be selected as with reference to direction, such as due south, due west or due east
Deng, computational theory is consistent with above-mentioned positive north orientation, only calculation formula need to be adjusted accordingly.
Association results derived above improve the associated efficiency of panoramic pictures, but there are certain error, need pair
The larger full-view image of association error is modified, to meet the needs of correlation accuracy.
So also the 5th step, is modified association results, the revised world and indoor and outdoor integral panoramic are obtained
Map.Specifically such as:When sky panorama image is associated with indoor full-view image, it is believed that it is the larger association of error, it can be by room
The direct correlation relationship of interior full-view image and sky panorama image is deleted, and be changed to by first by sky panorama image with
The association of ground full-view image by ground full-view image realizes sky to ground again to indoor with being associated with for indoor full-view image again
Integral panoramic displaying, and sky panorama is avoided to arrive the direct jump of indoor panorama, the authenticity that enhancing three-dimensional panorama is shown.
In another example certain building produces the panorama sketch of the position auto-associating and blocks on panorama sketch, in order to meet the true of three-dimensional scenic
Reality needs the incidence relation of the full-view image blocked to generation to release.
The obtained world and indoor and outdoor integral panoramic map are issued finally by network, with for users to use.
As the preferred embodiment of the present embodiment, auxiliary magnet p is being chosen1When, so that it is met it in current panorama picture
CoordinateThat is the central point of current panorama picture, and then a positive north orientation point is obtained in current panorama figure
Position coordinates p in pieceN(xN,yN) calculation formula it is as follows:
Since the positive north orientation point obtained at this time is the set of the upward series of points of due north in current panorama picture, if at this
It arbitrarily selects a positive north point to calculate in set, necessarily affects the speed and accuracy of calculating, so calculating for convenience, choosing
It takesWhen positive north orientation point come the transformational relation that calculates current panorama picture be associated with panoramic pictures so that the present invention is counting
Count in it is more simple and fast, can quickly by current panorama picture be associated with panoramic pictures complete be associated with, improve streetscape data
Production efficiency.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not
Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any
One or more embodiments or example in can be combined in any suitable manner.
Although an embodiment of the present invention has been shown and described, it will be understood by those skilled in the art that:Not
In the case of being detached from the principle of the present invention and objective a variety of change, modification, replacement and modification can be carried out to these embodiments, this
The range of invention is limited by claim and its equivalent.