-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
How to change depth units in python #1905
Comments
Options are set on a sensor level. Therefore, options are set on sensor objects. The procedure is outlined in a script I wrote: https://github.com/0xLeon/StereoImageProcessing/blob/master/Lab/GetDepthFrames.py#L55 |
Hi @0xLeon. Thanks for answering my question. I've tried what you said and got an error. This is the code:
And this is the error: If I try to change the depth units in realsense-viewer it works. Do you have some suggestion? |
I think the example is not up-to-date (can't say if it was ever true, I'm not that long into RealSense development). If you have a look at I'm not completely sure if this is actually true, I didn't dive into the C++ code so far, only worked with the higher level Python bindings. And I haven't checked on the outcome of changing |
It worked! Exactly as you described it. Thanks a lot @0xLeon ! If you have the time, please see if you could help me with another issue I submitted - Transforming pixel from a depth image to world coordinates |
Got an error when trying to set this option: |
Please open a new issue with a full description of what didn't work
|
Just a heads up to everyone, for me the solution was much simpler, the cable I was using was not good enough, switching to a higher quality cable improved performance massively. Also make sure the the camera is at least 20cm away from everything your measuring or all the depth information will be wrong! |
Hi,
As explained here, I am trying to change the depth units from millimeter (depth_units = 1000) to a tenth of that (depth_units = 100).
I couldn't find how to use 'rs2_set_option' in python.
Could you please send some example?
Also, will the minimum distance of depth images be affected by this change?
Thank you!
The text was updated successfully, but these errors were encountered: