谷歌街景原理.pptx_第1页
谷歌街景原理.pptx_第2页
谷歌街景原理.pptx_第3页
谷歌街景原理.pptx_第4页
谷歌街景原理.pptx_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

谷歌街景原理 CreatingCustomPanoramas EachStreetViewpanoramaisanimageorsetofimagesthatprovidesafull360degreeviewfromasinglelocation TheStreetViewPanoramaobjectusesimagesthatconformtotheequirectangular PlateCarr e projection Suchaprojectioncontains360degreesofhorizontalview afullwrap around and180degreesofverticalview fromstraightuptostraightdown Thesefieldsofviewresultinanimagewithanaspectratioof2 1 Afullwrap aroundpanoramaisshownbelow 每一个谷歌街景 StreetView 全景照片其实是一张或一组提供了从一个地点360度全景视角的照片 街景全景照片是用了遵循 等矩形投影 equirectangular PlateCarr e projection 的图片 这样的一个投影包括了一个360度的水平视野 完整地绕一周 和一个180度的垂直视野 从正上方到正下方 这样的视野 fieldsofview 形成了一张宽高比为2 1的图片 一张完整的环绕一周的全景照片 Panoramaimagesaregenerallyobtainedbytakingmultiplephotosfromonepositionandstitchingthemtogetherusingpanoramasoftware Suchimagesshouldshareasingle camera locus fromwhicheachofthepanoramaimagesaretaken Theresulting360degreepanoramacanthendefineaprojectiononaspherewiththeimagewrappedtothetwo dimensionalsurfaceofthesphere 全景照片通常是通过从一个位置拍多张照片并用全景图片软件将它们拼接在一起制作而成的 要拍摄这一组全景照片应当让相机安放在一个固定的点上 这样产生的360度全景照片就可以定义成是一个包裹在球体二维表面上的投影 360度全景照片在球体二维表面上的投影 Treatingthepanoramaasaprojectiononaspherewitharectilinearcoordinatesystemisadvantageouswhendividinguptheimageintorectilineartiles andservingimagesbasedoncomputedtilecoordinates 把全景图当成是在球体上的投影 并用一个直角坐标系来描述 当需要把图片分割成直角瓦片 并通过计算瓦片坐标提供相对应的图片时 这样做是很有好处的 CreatingCustomPanoramaTiles StreetViewalsosupportsdifferentlevelsofimagedetailthroughtheuseofazoomcontrol whichallowsyoutozoominandoutfromthedefaultview Generally StreetViewprovidesfivelevelsofzoomresolutionforanygivenpanoramaimage Ifyouweretorelyonasinglepanoramaimagetoserveallzoomlevels suchanimagewouldeithernecessarilybequitelargeandsignificantlyslowdownyourapplication orbeofsuchpoorresolutionathigherzoomlevelsthatyouwouldserveapoorlypixellatedimage Luckily however wecanuseasimilardesignpatternusedtoserveGoogle smaptilesatdifferentzoomlevelstoprovideappropriateresolutionimageryforpanoramasateachzoomlevel 谷歌街景也支持不同级别的图片细节 这样就允许你从默认视野进行缩放控制 通常来说 谷歌街景为每一处全景照片提供了5个级别的缩放分辨率 要是你想通过用单独一张全景图片就完成所有级别的缩放 这样的一张图片要么需要相当大 而这会明显让你的程序变慢 要么这图片的分辨率就很低 致使当放大时就变成了一个糟糕的马赛克图像 然而 幸运的是 我们可以用一种类似用在谷歌地图瓦片上的设计模式来为各个缩放级别的全景图片提供合适的分辨率图像 WhenaStreetViewPanoramafirstloads bydefaultitdisplaysanimageconsistingof25 90degreesofarc ofthehorizontalbreadthofthepanoramaatzoomlevel1 Thisviewcorrespondsroughlywithanormalhumanfieldofview Zooming out fromthisdefaultviewessentiallyprovidesawiderarc whilezoominginnarrowsthefieldofaviewtoasmallerarc 当一个谷歌街景图像初次载入 默认情况下 它处在缩放等级1 这时显示了整张全景照片25 的水平宽度 90度的水平视野 这个视野大致符合一个正常人的视野 从这个默认视野进行 缩小 本质上是提供一个更广的视角 而 放大 则是将视角压窄 视角变小 TheStreetViewPanoramaautomaticallycalculatestheappropriatefieldofviewfortheselectedzoomlevel andthenselectsimagerymostappropriateforthatresolutionbyselectingatilesetthatroughlymatchesthedimensionsofthehorizontalfieldofview ThefollowingfieldsofviewmaptoStreetViewzoomlevels 谷歌街景全景图自动为所选择的缩放级别计算合适的视野 然后通过选择一系列大致匹配当前水平视野尺寸的对应的图像瓦片 来选择最适合该分辨率的图片 视野与街景地图缩放级别的对照表 NotethatthesizeoftheimageshownwithinStreetViewisentirelydependentonthescreensize width oftheStreetViewcontainer Ifyouprovideawidercontainer theservicewillstillprovidethesamefieldofviewforanygivenzoomlevel thoughitmayselecttilesmoreappropriateforthatresolutioninstead 要注意 在街景中图片所显示的尺寸完全依赖于屏幕用来展示街景的容器的尺寸 宽度 如果你用一个比原先更宽的容器来显示街景 服务将仍然提供在某个缩放等级下相同的视野 尽管它可能会换用更适合当前分辨率的一些图像瓦片 Becauseeachpanoramaconsistsofanequirectangularprojection creatingpanoramatilesisrelativelyeasy Astheprojectionprovidesanimagewithanaspectratioof2 1 tileswith2 1ratiosareeasiertouse thoughsquaretilesmayprovidebetterperformanceonsquaremaps sincethefieldofviewwillbesquare 因为一个全景图片是由一个 等矩形投影 组成 这样创建全景图像瓦片就会相对简单 尽管正方形的图像瓦片可能会在正方形的地图上提供更好的表现 因为视野将是正方形 但因为投影的图像的长宽比为2 1 所以2 1比例的图像瓦片用起来就会更简单 For2 1tiles asingleimageencompassingtheentirepanoramarepresentstheentirepanorama world thebaseimage atzoomlevel0 witheachincreasingzoomleveloffering4zoomLeveltiles E g atzoomlevel2 theentirepanoramaconsistsof16tiles Note zoomlevelsinStreetViewtilingdonotmatchdirectlytozoomlevelsasprovidedusingtheStreetViewcontrol insteadtheStreetViewcontrolzoomlevelsselectaFieldofView FoV fromwhichappropriatetilesareselected 用2 1比例的图像瓦片的情况下 一个单张环绕整个全景的图片就展现全部的全景 世界 即源图片 这样的缩放级别 zoomLevel 为0级 随着缩放的增大 将需要4zoomLevel块图像瓦片 例如

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论