将360x180图像投影到立方体上的类
three60cube的Python项目详细描述
360立方
将360 x 180图像投影到立方体上的软件包。在
安装
pip install three60cube
使用
创建投影模板:
^{pr2}$使用保存的转换模板,您可以执行新的投影,而无需 计算转换:
# create instance with transformation template
transf = Three60Cube("/Users/casperkaandorp/Desktop/streetview/templ.pickle")
# open image
transf.open_image("/Users/casperkaandorp/Desktop/streetview/Abstede_2.JPG")
# perform projection, write image to HDD
transf.save_pane("/Users/casperkaandorp/proj_2.JPG", pane=2, dim=512)
窗格0到3从360图像的左侧到右侧拍摄。窗格4是立方体的顶部,窗格5是底部。dim
参数表示输出图像的尺寸;500的dim
将生成一个500x500px的图像。在
要做的事情:当文件路径不正确时测试和有意义的消息
- 项目
标签: