Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About projection. #19

Closed
calmelo opened this issue Jun 29, 2022 · 5 comments
Closed

About projection. #19

calmelo opened this issue Jun 29, 2022 · 5 comments

Comments

@calmelo
Copy link

calmelo commented Jun 29, 2022

In Mapper.py,
in get_mask_from_c2w:
cam_cord[:, 0] *= -1
why are x of cam_cord needed to multiply by -1?
Besides,
mask = mask & (0 <= -z[:, :, 0]) & (-z[:, :, 0] <= depths+0.5)
why do you use the -z[:, :, 0] rather than z[:, :, 0]?

in keyframe_selection_overlap:
mask = mask & (z[:, :, 0] < 0)
why (z[:, :, 0] < 0)?

@Zzh2000
Copy link
Collaborator

Zzh2000 commented Jun 29, 2022

We follow the nerf-pytorch code convention and define the z-axis as "front to back".

@Zzh2000 Zzh2000 closed this as completed Jun 29, 2022
@calmelo
Copy link
Author

calmelo commented Jun 30, 2022

We follow the nerf-pytorch code convention and define the z-axis as "front to back".

Why not cam_cord[:, 2] *= -1 but cam_cord[:, 0] *= -1?

@calmelo
Copy link
Author

calmelo commented Jun 30, 2022

We follow the nerf-pytorch code convention and define the z-axis as "front to back".

cam_cord[:, 0] *= -1是为了让计算得到的相机坐标的x, y, z在数据集的坐标系中均取反值吗?为什么不把cam_cord[:, 1] *= -1, cam_cord[:, 2] *= -1, 然后将计算得到的相机坐标转到数据集的坐标系中呢?
取反值之后, 因为u=x/z, v=y/z, 所以得到的uv最后就在数据集图片的坐标系内,然后z取反转到数据集图片坐标系中。
不知道我的理解正不正确,恳请大佬赐教!

@h8c2
Copy link

h8c2 commented Jun 30, 2022

I am also confused about c2w[:3, 1] *= -1 c2w[:3, 2] *= -1 in load_poses in datasets.py. What does it mean to multiply a column of positions by negative one?

@h8c2
Copy link

h8c2 commented Jun 30, 2022

我的理解是在代码相机(局部)坐标系下表达的坐标都是右上后的(正常相机坐标系为右下前,这里在load_pose就取反了),但是内参矩阵是右下前的,要变到像素坐标系就将第一列乘以负一,得到正常的像素坐标系取值范围

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants