Google street view: Alternative way to getting street view data
Asked Answered
G

1

7

I've been trying to get data from Google street view for quite some time. For research purposes, I need to be able to estimate the sky area at some particular map location. That's why I need an estimation of the spherical view and I thought that using Google street view would be a good idea. What I actually need is given a 3d direction I should be able to tell what is the color of the pixel in this direction.

What I have come up is the following. I am downloading 6 images using Google Street View Image API to use them as cube textures (particularly I submit 6 queries with parameters:

(heading, pitch) = {(0, 0), (90, 0), (180, 0), (270, 0), (0, 90), (0, -90)}

When I map those 6 images to a cube what I get is the following:

corner example

The problem is that it seems there is some numerical error and the corners mismatch. I have an idea how to fix it but the complexity grows by a lot.

I've also looked at the JavaScript API but could not find a way to access the data from there. There is a mention of UV mapping on the offcial guide page

enter image description here

but it seems this is directed just for user generated content.

Am I missing something? Are there any alternative methods for doing this?

Gigantic answered 11/4, 2016 at 15:16 Comment(3)
You only posted one image... can you show me the other 5 images you got?Wolffish
@SariAlalem there is a mistake in the wording. sorry about thatGigantic
Did you try the 360 degree video footage instead? There are a whole bunch of spherical frames on youtube: youtube.com/channel/UCzuqhhs6NWbgTzMuM09WKDQDock
W
1

Basically you want to do what google is already doing but you need the 3d representation of it.

Using the following method (and its not easy), you can get better results but not perfect. The basic theory is this:

  1. Get a list of images (6 or more, some use 8; 6 for horizontal views and 2 for top and bottom).
  2. Stitch the images together using your preffered method, you can find help on stitching images here.
  3. After stitching you will end up with a single image, this will be your texture
  4. Construct a 3D Shape (Sphere, a hexagon or cylinder)
  5. Apply the texture to the 3D shape
  6. Keep experimenting with: a) Images downladed. b) Stitching. c) Texture Mapping. to get better results

This is the process that (probably) google follows so that you can see a 360 view in their service, and you need to do the same to get the 3D representation in your code, but it won't be perfect since the images you get are not the raw images taken by google (which makes stitching them harder).

Readmore about it here and here

Wolffish answered 21/4, 2016 at 8:38 Comment(2)
Thank you for your the advice. When I mentioned: "I have an idea how to fix it" this is exactly what I had in mind. The problem is that I've been experimenting with this method for a while and I'm not getting good results. I was looking for simpler approaches. If there no other responses I would reward your effort.Gigantic
On a second thought, If you just want the color of the pixel, you don't need to map it to a 3D shape... just use the final stiched image pixelsWolffish

© 2022 - 2024 — McMap. All rights reserved.