Position searching method and apparatus based on electronic map
View Patent ↗The present invention relates to electronic maps, and provides a position searching method and apparatus based on an electronic map. The method includes: receiving a keyword of a searching object; searching the electronic map with the keyword to obtain a current geographical position; acquiring panoramic images of a plurality of scenes that are located within a geographical area around the current geographical position and of a predetermined size; calculating coordinates of the searching object in one of the panoramic images according to position-related information of each scene; generating an image from an image area of the one of the panoramic images and outputting the image, wherein the image area is centered on the coordinates and of a predetermined size. The present invention can accurately position an image associated with the searching object, and has the advantages of low cost and less amount of data.
1. A method for generating an image of an object on an electronic map, the method comprising:
at an electronic device having one or more processors and a display;
receiving a search keyword from an end user;
identifying, on the electronic map, a geographical position of an object that matches the search keyword;
selecting, among a plurality of street-view images captured within a predefined distance from the geographical position of the object, each street-view image having associated camera location and camera orientation, a desired street-view image whose associated camera location and camera orientation satisfy a predefined spatial relationship relative to the geographical position of the object;
extracting a portion of the desired street-view image as an image of the object, wherein the extracted portion has a size inversely proportional to a distance between the camera location of the desired street-view image and the geographical position of the object; and
outputting the object image adjacent the geographical position of the object on the display.
2. The method of claim 1 , further comprising:
removing distortions in the extracted portion of the desired street-view image caused by a panoramic algorithm before outputting the object image.
3. The method of claim 1 , wherein selecting, among a plurality of street-view images captured within a predefined distance from the geographical position of the object, each street-view image having associated camera location and camera orientation, a desired street-view image whose associated camera location and camera orientation satisfy a predefined spatial relationship relative to the geographical position of the object further comprises:
estimating a heading angle θ of the object relative to the camera location of each of the plurality of street-view images and then determining whether the object is within the street-view image by comparing the heading angle θ of the object with the camera orientation of the street-view image; and
selecting, among a subset of the plurality of street-view images including the object, a street-view image whose associated camera location is nearest to the geographical position of the object.
4. The method of claim 1 , wherein the extracted portion is centered on the geographical position of the object.
5. An apparatus, comprising:
a display;
one or more processors; and
memory storing one or more programs including instructions that, when executed by the one or more processors, cause the apparatus to perform operations including:
receiving a search keyword from an end user;
identifying, on the electronic map, a geographical position of an object that matches the search keyword;
selecting, among a plurality of street-view images captured within a predefined distance from the geographical position of the object, each street-view image having associated camera location and camera orientation, a desired street-view image whose associated camera location and camera orientation satisfy a predefined spatial relationship relative to the geographical position of the object;
extracting a portion of the desired street-view image as an image of the object, wherein the extracted portion has a size inversely proportional to a distance between the camera location of the desired street-view image and the geographical position of the object; and
outputting the object image adjacent the geographical position of the object on the display.
6. The apparatus of claim 5 , wherein the operations further comprise:
removing distortions in the extracted portion of the desired street-view image caused by a panoramic algorithm before outputting the object image.
7. The apparatus of claim 5 , wherein the operation of selecting, among a plurality of street-view images captured within a predefined distance from the geographical position of the object, each street-view image having associated camera location and camera orientation, a desired street-view image whose associated camera location and camera orientation satisfy a predefined spatial relationship relative to the geographical position of the object further comprises:
estimating a heading angle θ of the object relative to the camera location of each of the plurality of street-view images and then determining whether the object is within the street-view image by comparing the heading angle θ of the object with the camera orientation of the street-view image; and
selecting, among a subset of the plurality of street-view images including the object, a street-view image whose associated camera location is nearest to the geographical position of the object.
8. The apparatus of claim 5 , wherein the extracted portion is centered on the geographical position of the object.
9. A non-transitory computer readable storage medium storing one or more programs configured to be executed by a computer system, the one or more programs comprising instructions to perform operations including:
receiving a search keyword from an end user;
identifying, on the electronic map, a geographical position of an object that matches the search keyword;
selecting, among a plurality of street-view images captured within a predefined distance from the geographical position of the object, each street-view image having associated camera location and camera orientation, a desired street-view image whose associated camera location and camera orientation satisfy a predefined spatial relationship relative to the geographical position of the object;
extracting a portion of the desired street-view image as an image of the object, wherein the extracted portion has a size inversely proportional to a distance between the camera location of the desired street-view image and the geographical position of the object; and
outputting the object image adjacent the geographical position of the object on the display.
10. The non-transitory computer readable storage medium of claim 9 , wherein the operations further comprise:
removing distortions in the extracted portion of the desired street-view image caused by a panoramic algorithm before outputting the object image.
11. The non-transitory computer readable storage medium of claim 9 , wherein the operation of selecting, among a plurality of street-view images captured within a predefined distance from the geographical position of the object, each street-view image having associated camera location and camera orientation, a desired street-view image whose associated camera location and camera orientation satisfy a predefined spatial relationship relative to the geographical position of the object further comprises:
estimating a heading angle θ of the object relative to the camera location of each of the plurality of street-view images and then determining whether the object is within the street-view image by comparing the heading angle θ of the object with the camera orientation of the street-view image; and
selecting, among a subset of the plurality of street-view images including the object, a street-view image whose associated camera location is nearest to the geographical position of the object.
12. The non-transitory computer readable storage medium of claim 9 , wherein the extracted portion is centered on the geographical position of the object.