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

depth image is very imprecise #25

Closed
eric-wieser opened this issue Mar 4, 2016 · 7 comments
Closed

depth image is very imprecise #25

eric-wieser opened this issue Mar 4, 2016 · 7 comments

Comments

@eric-wieser
Copy link
Contributor

In my testing, I only ever get integers in [0, 10] for the pixels of the depth image. Is this measured in meters?

Is the issue that this is being incorrectly rounded in this line?

@P-yver
Copy link
Member

P-yver commented Mar 4, 2016

Hi Eric,
We convert the baseline from millimeter to meter, see this line. So yes the depth values we publish are in meters.

@P-yver
Copy link
Member

P-yver commented Mar 4, 2016

It is not an issue, it is due to the conversion from float to short.
We use it in meter for display purpose. If you want you can apply a scale factor during the conversion function.

@eric-wieser
Copy link
Contributor Author

This is an issue, because when converting to short you throw away all the fractional meter information. There's nothing i can do in my code to recover this infomeation. Why not just leave the data as a float, as suggested by REP 118?

@eric-wieser
Copy link
Contributor Author

Also, I don't see how that line shows you publish meters. All you're doing there is changing the baseline that's reported to ROS. I don't see how that relates to the calculations done by the zed sdk

@eric-wieser
Copy link
Contributor Author

Fixed in #26

@eric-wieser
Copy link
Contributor Author

@P-yver: your comments are wrong, and this patch is incorrect. The zed camera returns distances in the same units as the distance between cameras is measured. By default, this is 120mm. Therefore, the depth measurements are returned in mm.

In a previous version of the readme, there were instructions to manually set this baseline to 0.12. This instruction should no longer apply. Then everything works correctly, and is published to the nearest mm (which is fine).

@syamprasadkr
Copy link

syamprasadkr commented Sep 16, 2016

I am trying to obtain depth value of each pixel from the zed camera. I am trying to convert the ros image published in the topic

/camera/depth/image_rect_color

to OpenCV image using this.

I am interested in knowing what other approach is possible by just using the zed-ros-wrapper. Can you pls elaborate your method if not inconvenient for you? Thank You.

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

No branches or pull requests

4 participants