toinsson / pyrealsense

Cross-platform ctypes/Cython wrapper to the librealsense library (v1.x)
http://pyrealsense.readthedocs.io
Apache License 2.0
121 stars 46 forks source link

Closest object detection using R200 #73

Closed MathiasDePaepe closed 6 years ago

MathiasDePaepe commented 6 years ago
Required Info
Camera Model R200
Firmware Version 1.0.71.06
Operating System & Version Ubuntu 16.04
pyrealsense version 2.2

How to detect the closest object when taking a frame with the R200? I guess you take a frame, get the depth information from the pixels and look at the smallest value?

Thanks on advance

toinsson commented 6 years ago

Hello @MathiasDePaepe, your question is not an issue with pyrealsense. I'll close it then. I am not sure which forum you should address to get a proper answer though.

As pointer, I can suggest that if you know where the object is (in RGB for example, see this) you could then estimate the distance based on the depth image by choosing the corresponding pixel in depth (or using the mean over the object.)