等距圆柱投影

1 理论部分

符号说明

符号含义
λ \lambda λ经度
ϕ \phi ϕ纬度
ϕ 1 \phi_1 ϕ1标准纬线
ϕ 0 \phi_0 ϕ0中心经线
λ 0 \lambda_0 λ0中心纬线
x x x平面横坐标
y y y平面纵坐标
R R R球体半径

1.1 Forward 投影

从球的表面投影到平面。

x = R ( λ − λ 0 ) c o s ϕ 1 y = R ( ϕ − ϕ 0 ) \begin{aligned} x&=R(\lambda-\lambda_0)cos\phi_1 \\ y&=R(\phi-\phi_0) \end{aligned} xy=R(λλ0)cosϕ1=R(ϕϕ0)

1.2 Reverse 投影

从平面投影到球表面。
λ = x R c o s ϕ 1 + λ 0 ϕ = y R + ϕ 0 \begin{aligned} \lambda&=\frac{x}{Rcos\phi_1}+\lambda_0 \\ \phi&=\frac{y}{R}+\phi_0 \end{aligned} λϕ=Rcosϕ1x+λ0=Ry+ϕ0

1.3 标准纬线

标准纬线是圆柱与球体相切或相割的纬线。

StandardParallelSecantCylindrical

对于全景图片(视频)来说,标准纬线为赤道。此时 c o s ϕ 1 = 1 cos\phi_1=1 cosϕ1=1

幻灯片1

1.4 极坐标转直角坐标

1.4.1 表示图

tmp

1.4.2 Python 代码
import numpy as np
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d as p3d
import math
from PIL import Image

fig = plt.figure()
ax = p3d.Axes3D(fig, auto_add_to_figure=False)
fig.add_axes(ax)

z = []
x = []
y = []
c = []
img = Image.open('000.png')
img_array = np.array(img, dtype=np.float) / 255.0
N, M, C = img_array.shape

r = (N / math.pi + M / (2 * math.pi)) / 2
for j in range(N):
    for i in range(M):
        theta = j / N * math.pi
        phi = (i - (M - 1) / 2) / M * 2 * math.pi
        x.append(r * math.sin(theta) * math.cos(phi))
        y.append(r * math.sin(theta) * math.sin(phi))
        z.append(r * math.cos(theta))
        c.append((img_array[j, i, 0], img_array[j, i, 1], img_array[j, i, 2]))

ax.scatter(x, y, z, c=c)
plt.show()

2 效果展示

2.1 原图

2.2 效果图

为展示方便,绘制在了球体外表面。

000_360_1
000_360_2

2.3 稀疏图

外表面。
000_360_1
000_360_2

2.3 稀疏图

Figure_1

  • 1
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值