-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hi, thanks for your excellent work and repo. Question for you -- how are you defining your spherical coordinate system? From the code below, it seems you have a reflection about the y axis, since u is not negated in get_uni_sphere_xyz()
(image unwraps from left to right clockwise, but theta unwraps right to left counterclockwise).
A more traditional spherical coordinate system is the one below:
where:
I noted that you were using r = \rho cos(\phi)
, if \phi=v and \rho=1, which you call c = np.cos(v)
. But this doesn't match the traditional spherical coordinate system. Could you explain a bit more about your derivation? Thanks.
https://github.com/sunset1995/HoHoNet/blob/master/vis_depth.py#L7
def get_uni_sphere_xyz(H, W):
j, i = np.meshgrid(np.arange(H), np.arange(W), indexing='ij')
u = (i+0.5) / W * 2 * np.pi
v = ((j+0.5) / H - 0.5) * np.pi
z = -np.sin(v)
c = np.cos(v)
y = c * np.sin(u)
x = c * np.cos(u)
sphere_xyz = np.stack([x, y, z], -1)
return sphere_xyz
Metadata
Metadata
Assignees
Labels
No labels