谷歌街景原理

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
谷歌街景原理
Creating Custom Panoramas
• Each Street View panorama is an image or set of images that provides a full 360 degree view from a single location. The Street View Panorama object uses images that conform to the equirectangular (Plate Carrée) projection. Such a projection contains 360 degrees of horizontal view (a full wrap-around) and 180 degrees of vertical view (from straight up to straight down). These fields of view result in an image with an aspect ratio of 2:1. A full wrap-around panorama is shown below.
• 每一个谷歌街景(Street View)全景照片其实是一 张或一组提供了从一个地点360度全景视角的照片。 街景全景照片是用了遵循“等矩形投影” (equirectangular (Plate Carrée) projection)的图片。 这样的一个投影包括了一个360度的水平视野(完 整地绕一周)和一个180度的垂直视野(从正上方 到正下方)。这样的视野(fields of view)形成了 一张宽高比为2:1的图片。
一张完整的环绕一周的全景照片
• Panorama images are generally obtained by taking multiple photos from one position and stitching them together using panorama software. Such images should share a single "camera" locus, from which each of the panorama images are taken. The resulting 360 degree panorama can then define a projection on a sphere with the image wrapped to the two-dimensional surface of the sphere.
• 把全景图当成是在球体上的投影,并用一个 直角坐标系来描述。当需要把图片分割成直 角瓦片,并通过计算瓦片坐标提供相对应的 图片时,这样做是很有好处的。
Creating Custom Panorama Tiles
• Street View also supports different levels of image detail throu百度文库h the use of a zoom control, which allows you to zoom in and out from the default view. Generally, Street View provides five levels of zoom resolution for any given panorama image. If you were to rely on a single panorama image to serve all zoom levels, such an image would either necessarily be quite large and significantly slow down your application, or be of such poor resolution at higher zoom levels that you would serve a poorly pixellated image. Luckily, however, we can use a similar design pattern used to serve Google's map tiles at different zoom levels to provide appropriate resolution imagery for panoramas at each zoom level.
• 因为一个全景图片是由一个“等矩形投影”组成, 这样创建全景图像瓦片就会相对简单。尽管正方形 的图像瓦片可能会在正方形的地图上提供更好的表 现(因为视野将是正方形),但因为投影的图像的 长宽比为2:1,所以2:1比例的图像瓦片用起来就会 更简单。
• For 2:1 tiles, a single image encompassing the entire panorama represents the entire panorama "world" (the base image) at zoom level 0, with each increasing zoom level offering 4zoomLevel tiles. (E.g. at zoom level 2, the entire panorama consists of 16 tiles.) Note: zoom levels in Street View tiling do not match directly to zoom levels as provided using the Street View control; instead the Street View control zoom levels select a Field of View (FoV), from which appropriate tiles are selected.
• 全景照片通常是通过从一个位置拍多张照片并用 全景图片软件将它们拼接在一起制作而成的。要 拍摄这一组全景照片应当让相机安放在一个固定 的点上。这样产生的360度全景照片就可以定义成 是一个包裹在球体二维表面上的投影。
360度全景照片在球体二维表面上的投影
• Treating the panorama as a projection on a sphere with a rectilinear coordinate system is advantageous when dividing up the image into rectilinear tiles, and serving images based on computed tile coordinates.
• 谷歌街景全景图自动为所选择的缩放级别计算合 适的视野,然后通过选择一系列大致匹配当前水 平视野尺寸的对应的图像瓦片,来选择最适合该 分辨率的图片。
视野与街景地图缩放级别的对照表
街景缩放级别 Street View zoom level
0 1 (默认级别) 2 3 4
视野(角度) Field of View (degrees)
180 90 45 22.5 11.25
• Note that the size of the image shown within Street View is entirely dependent on the screen size (width) of the Street View container. If you provide a wider container, the service will still provide the same field of view for any given zoom level, though it may select tiles more appropriate for that resolution instead.
• 当一个谷歌街景图像初次载入,默认情况下,它 处在缩放等级1,这时显示了整张全景照片25%的 水平宽度(90度的水平视野)。这个视野大致符 合一个正常人的视野。从这个默认视野进行“缩 小”本质上是提供一个更广的视角,而“放大” 则是将视角压窄,视角变小。
• The Street View Panorama automatically calculates the appropriate field of view for the selected zoom level, and then selects imagery most appropriate for that resolution by selecting a tile set that roughly matches the dimensions of the horizontal field of view. The following fields of view map to Street View zoom levels:
• 谷歌街景也支持不同级别的图片细节。这样就允许你 从默认视野进行缩放控制。通常来说,谷歌街景为每 一处全景照片提供了5个级别的缩放分辨率。要是你 想通过用单独一张全景图片就完成所有级别的缩放, 这样的一张图片要么需要相当大,而这会明显让你的 程序变慢;要么这图片的分辨率就很低,致使当放大 时就变成了一个糟糕的马赛克图像。然而,幸运的是, 我们可以用一种类似用在谷歌地图瓦片上的设计模式 来为各个缩放级别的全景图片提供合适的分辨率图像。
• 用2:1比例的图像瓦片的情况下,一个单张环绕整 个全景的图片就展现全部的全景“世界”(即源 图片),这样的缩放级别(zoomLevel)为0级。 随着缩放的增大,将需要4zoomLevel 块图像瓦片。 (例如,在2级,整张全景图就要由16块图像瓦片 组成。)注意:在铺瓦片时用的缩放等级并不直 接对应控制街景视野的缩放等级;而是街景通过 哪些瓦块适合被选择,来控制缩放级别来选择一 个视野(Field of View (FoV))。
• 要注意,在街景中图片所显示的尺寸完全依赖 于屏幕用来展示街景的容器的尺寸(宽度)。 如果你用一个比原先更宽的容器来显示街景, 服务将仍然提供在某个缩放等级下相同的视野, 尽管它可能会换用更适合当前分辨率的一些图 像瓦片。
• Because each panorama consists of an equirectangular projection, creating panorama tiles is relatively easy. As the projection provides an image with an aspect ratio of 2:1, tiles with 2:1 ratios are easier to use, though square tiles may provide better performance on square maps (since the field of view will be square).
• When a Street View Panorama first loads, by default it displays an image consisting of 25% (90 degrees of arc) of the horizontal breadth of the panorama at zoom level 1. This view corresponds roughly with a normal human field of view. Zooming "out" from this default view essentially provides a wider arc, while zooming in narrows the field of a view to a smaller arc.
相关文档
最新文档