Height/Elevation of a pixel from ground in Google Street View

一曲冷凌霜 提交于 2019-12-22 04:59:28

问题


I am looking to find the height of every pixel from ground in the google street view.

Couple of things I know can be calculated are:

  1. Pitch of a pixel

  2. Depth map of every pixel from camera

    There is a javascript library to fetch depth map too.

Is it possible to put the two together to calculate actual height of a pixel from ground?


回答1:


If we know the height of the camera then this becomes a simple matter of trigonometry.

tan(angle) = height-above-camera / depth

so

height-above-camera = depth * tan(angle)

If the camera is known to be 8ft above ground then we can get the actual height of a pixel as

height = 8ft + depth * tan(angle)

The whole calculation depends on the quality of the depth map.

Another thing you could exploit is assuming the blocks in the depth map end at ground level. Then run an edge detection on the image.

Here I've used an online Canny Edge detection which is picking out the base of the block on the right-hand side. A bit of trig should get the height.

Better than using image processing if you allow interactive use, get the user to click on the base of the object and the top of the object. Knowing the pitch of the point at the base allows the distance to be calculated.



来源:https://stackoverflow.com/questions/48219613/height-elevation-of-a-pixel-from-ground-in-google-street-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!