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 about the DepthCamera.plane2xyz #70

Closed
bravelywangexocr opened this issue Aug 29, 2017 · 1 comment
Closed

Question about the DepthCamera.plane2xyz #70

bravelywangexocr opened this issue Aug 29, 2017 · 1 comment

Comments

@bravelywangexocr
Copy link

Hi Ankush,

I am wondering the formula in DepthCamera.plane2xyz() for computing "z" by using x, y points and the plane coeffs. The computation is as below:

z = -plane[3]/(xy_ray.dot(plane[:2])+plane[2])

My understanding is that following the plane formula (ax + by + cz = d), the placement of plane[3] (coeff 'd') and plane[2] (coeff 'c') should be exchanged, that means,

z = -plane[2]/(xy_ray.dot(plane[:2])+plane[3])

I did experiments for both cases and plotted the result masks applied by this formula, it appears that sometimes the former works but sometimes the latter does, so I am confused with this.

Can you help confirm this and elaborate more? Or any useful docs for this, please help share.

Thanks.

@ankush-me
Copy link
Owner

@bravelywangexocr Thank you, you are correct. I think this is a bug, and the code should be updated as you have pointed out. The coefficients [a,b,c,d] correspond to:
ax+ by + cz + d = 0
(you can check here: https://github.com/ankush-me/SynthText/blob/master/ransac.py#L14 )

Did you plot the "depth-image" so obtained?
How did you evaluate which one works better?

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