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

x-axis coordinate warped shifts #14

Open
FrancsXiang opened this issue Aug 26, 2020 · 2 comments
Open

x-axis coordinate warped shifts #14

FrancsXiang opened this issue Aug 26, 2020 · 2 comments

Comments

@FrancsXiang
Copy link

x_t_flat = x_t_flat + tf.reshape(x_offset, [-1]) * _width_f

as i konw the offset should be pixel-level shifts for each pixel of x-axis,but what puzzles me is the meaning of ops "* width_f" back in the formula above.
could you explain it for any spare time ? :)

@jahaniam
Copy link
Owner

jahaniam commented Sep 21, 2020

The way we are using it for every scale:
bilinear_sampler_1d_h(img, -disp) note that disp is not the offset disparity. It actually is offset disparity divided by the width of that in that scale to make it between 0-1.
That being said, to convert it to the normal offset pixel shifting known, you will need to multiply by the width.

disp = baseline * focal_length / (D * width) -> offset pixels = disp * width

Hope it helps.

@FrancsXiang
Copy link
Author

Strike the key point! Thanks for answering my question.

disp = 0.54*tf.multiply(focal_length,invDepth)

Like you said before the disp is the normalized disparity.The baseline and depth should be in meters.
On the other side,the focal length should be in pixel_length,so i infer the disp should be the pixel shifts too.

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