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

Is the "Index" function implemented correctly? #152

Open
zhangxaochen opened this issue Jun 10, 2019 · 1 comment
Open

Is the "Index" function implemented correctly? #152

zhangxaochen opened this issue Jun 10, 2019 · 1 comment

Comments

@zhangxaochen
Copy link

zhangxaochen commented Jun 10, 2019

I'm testing the shape_from_shading example,

and getting confused about this line L22:

local posX,posY = Index(0),Index(1)

When I change it to the following line to see its effect:

local posX,posY = 0,0

it seems I get a better mesh result.

The original (left) and modified (right) codes output:

image image
image image
image image

Why is that?

@Mx7f
Copy link
Collaborator

Mx7f commented Jun 18, 2019

That code is supposed to implement Equation (10) in Real-time Shading-based Refinement for Consumer Depth Cameras; posX and posY should by the i and j from the equation, which are the pixel indices.

It's not entirely clear that its better from the image, but I will double check today whether there's a bug in the implementation of Index. It's also entirely possible that the SFS energy from the paper leads to worse results than a different (but related) energy; the authors had to hand-write the energy and its Jacobian terms in CUDA, and so likely didn't experiment with changing the energy much once it produced reasonable results in realtime. Being able to play around with the energy quickly and experiment is one of the main benefits of Opt.

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