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

question of digitize function #8

Closed
zhangjian94cn opened this issue Jun 22, 2022 · 2 comments
Closed

question of digitize function #8

zhangjian94cn opened this issue Jun 22, 2022 · 2 comments

Comments

@zhangjian94cn
Copy link

Hello, I cannot understand this function clearly. I know that digitize is used to convert p's location to voxel index. But why do you add rsize to p ?p+rsize.

Rsize is half value of far-near, which will change p's location. Then, you limit voxelized p to [0, vsize-1], but in real world coordinator(e.g. llff), voxelized p in range [0, vsize-1] may not contain object.

Or rsize here is just an empirical offset?

@partial(jit, static_argnums=(1,2,))
def digitize(p, rsize, vsize):
    p = jnp.round((p+rsize) * (vsize/(rsize*2)))
    return jnp.clip(p.astype(jnp.uint16), 0, vsize-1)\
@naruya
Copy link
Owner

naruya commented Jun 22, 2022

Sorry, I don't remember much about my these codes, but I think the position xyz of p takes -r ~ r, so I added r so that it goes 0 ~ 2r (or something like that). And..., VaxNeRF only supports inward facing datasets and cannot be used with llff, etc. 😱

@zhangjian94cn
Copy link
Author

Thank you! I got it.

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

2 participants