- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
This may be a silly question, but I've been trying to figure out how to extract the depth data from my SR300 real sense depth frames. I've seen some people say that you need to extract the depth at a certain point (using OpenCV by the way), such as: image.at(i,j); however this was in relation to getting values from a kinect, where the output was in millimeters.
So basically, do I still use an unsigned integer, or something else (and I suppose moreover why?), as well as what does the output mean (ie is it millimeters, some relative depth info, or something else?)
Thanks in advance, I'm having a hard time finding this information online.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are using the RealSense SDK 2.0 software with your SR300, there is a simple OpenCV example script for getting the depth.
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv/imshow librealsense/wrappers/opencv/imshow at master · IntelRealSense/librealsense · GitHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah yes I'm aware of how to get the depth frames, but how to I get the depth value at a certain point? Like how deep something is at a certain pixel or region?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Like you, I researched the internet thoroughly about finding the pixel depth in OpenCV. The best I could locate was this one, which doesn't relate specifically to RealSense cameras:
https://answers.ros.org/question/243901/the-pixel-depth-value-opencv-image-coming-out-of-zed/ https://answers.ros.org/question/243901/the-pixel-depth-value-opencv-image-coming-out-of-zed/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah gotchu. Well just so it's on the internet I think the kind of image in open c.f. for the sr300 series is a CV_8UC3 meaning it has an 8 bit unassigned integer type and has 3 channels. Not 100% sure but that's what your earlier link implies. Thank you for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're very welcome. I'm sorry I could not provide a more definite answer. When it comes to the mysteries of OpenCV, I am always learning as I go with each new case. Good luck!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page