如何创建用于创建自定义街景的自定义全景图块 [英] how to Create Custom Panorama Tiles for Creating of custom Street view

查看:223
本文介绍了如何创建用于创建自定义街景的自定义全景图块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些有关如何创建用于创建自定义街道视图的创建自定义全景图块"的建议

i need some advise on how do i create Creating Custom Panorama Tiles for creating the custom street view

我能够创建10000x5000的等矩形全景图,但是我看到我需要将它们切成小块.

i am able to create equirectange panorama of 10000x5000 but i saw that i need to slice them into tiles.

我也对如何标记它们感到困惑.

i am also confuse over how should i label them.

[返回'images/panoReception1024-'+缩放+'-'+ tileX +'-'+ tileY +'.jpg']

[return 'images/panoReception1024-' + zoom + '-' + tileX + '-' +tileY +'.jpg']

这是我从Google街景文档帮助中获得的示例.

this is the example i got from the google street view document help.

但是,假设我有3000x1500,并且我将图块大小设置为512,我需要创建12X6吗?我说的对吗?

but , assume i have a 3000x1500, and i set the tile size to 512, i need to create 12X6? am i right?

那我该如何创建不同的缩放级别?

then how do i create the different zoom level?

  1. 缩放0是原始文件吗?

  1. Zoom 0 is the original file?

缩放1/2/3/4,如何为其创建图块以及如何对其进行标记?

Zoom 1/2/3/4, how do i create the tiles for them and how do i label them?

希望可以得到一些建议

感谢您的阅读和帮助

干杯.

推荐答案

  • 理想情况下,图块的尺寸应为:256 x 256像素
  • 将全景图调整为以下尺寸:8192 x 4096像素
  • 图像以各种缩放级别作为金字塔加载
  • 缩放级别为0、1、2、3、4.您也可以选择使用5级.

    • Ideally the tiles should be of dimensions: 256 x 256 pixels
    • Resize your panoramic to this size: 8192 x 4096 pixels
    • The images get loaded as a pyramid, at various zoom levels
    • The zoom levels are 0,1,2,3,4. Optionally you may also use a level 5.

      
        
          var heightY = Math.pow(2, zoom - 1);
          var widthX = 2 * heightY;
        
      

    • 上面的JavaScript代码显示了各种金字塔(缩放)级别的图像尺寸

    • The above JavaScript code shows the image dimensions at various pyramid (zoom) levels

      将您的代码切成薄片.以下是您的x和y轴计数器.

      Loop your code to slice images. Following is your counter for x and y axis.

      
        
          var xCount = widthX / 256;
          var yCount = heightY / 256;
        
      

    • 图块格式为 pano_z_x_y.jpeg ,其中z为缩放. x是所需图块图片的水平计数,y是垂直计数

    • The tile format is pano_z_x_y.jpeg, where z is zoom. x is horizontal count, and y is vertical count for the required tile image

      将这些图像传递给您的JavaScript函数,如下所示:

      Pass over these images to your JavaScript function as below:

      function getCustomPanoramaTileUrl(pano, zoom, tileX, tileY) 
      {
            return 'pano' + '_' + zoom + '_' + tileX + '_' + tileY + '.jpeg';
      }
      

      这篇关于如何创建用于创建自定义街景的自定义全景图块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆