-
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 can I check the depth information of D410 received through rtps? #11993
Comments
Hi @gustn6591 There are a few RealSense compatible plugins for GStreamer that are available. C++ Python Python and C++ If your depth map from the camera is monochrome then it sounds as though it is because pyrealsense2's colorizer is not applied to it in order to color-shade the coordinates according to their distance values. The RealSense SDK's opencv_pointcloud_viewer.py pyrealsense2 example demonstrates setting up a colorizer. The color shading is not based on the RGB sensor's color and so a colorizer will work on the RGB-less D410 depth module. |
I apologize for the lack of explanation. I got is not a depth map, just a 1D gray scale image |
Another user of a Kinova arm at #10662 (comment) tried to access an RTSP stream in RealSense but gave up eventually, unfortunately. You would probably have to convert OpenCV cv2 data to RealSense's rs2_frame format to obtain depth values. At #2634 (comment) a RealSense team member provides a method of doing this with C++ but there is not an equivalent cv2 to rs2_frame demonstration script available for Python. |
Is there a calculation method for estimating depth information through a 1D gray image in uint8 format? |
The above question is outside of my OpenCV programming knowledge, but there is an example of a RealSense script at #8150 of obtaining a depth value in meters for uint16_t that you could try adapting for uint8. The depth scale value of a D410 will be 0.001 |
I was able to get a value similar to uint16 through (pixel/255)*65535, but a lot of errors occurred because I had already brought the value of uint8. In the process of streaming through rtsp, I think we need to find a way to get depth information of uint16. |
A RealSense pyrealsense2 script at the link below for GStreamer and an RTSP server looks interesting. https://github.com/thien94/vision_to_mavros/blob/master/scripts/d4xx_to_mavlink.py |
Is there an example of a pipeline in pyrealsense2 that gets depth information from realsense connected via ethernet? |
The RealSense SDK has a pyrealsense2 script called net-viewer.py that is used with the SDK's 'rs-server' ethernet RTSP network tool. The networking tool was removed from SDK 2.54.1 but I recovered the script code of net-viewer.py from the source code of 2.53.1. It is planned that Intel will be introducing a new networking interface in the next SDK version after 2.54.1.
|
Can't import pyrealsense2_net on windows 10? Thanks for the nice examples. |
As mentioned above at #11993 (comment) the networking tool was removed from SDK 2.54.1 and is planned to be replaced by a new networking interface in the next SDK release after 2.54.1. The existing networking tool should still be available in the previous SDK version 2.53.1. |
Sorry, I checked and my pyrealsense version is 2.54.1. Downgrade the version and try. |
Hi @gustn6591 Do you require further assistance with this case, please? Thanks! |
Case closed due to no further comments received. |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
<Describe your issue / question / feature request / etc..>
cap_depth = cv2.VideoCapture("rtsp://192.168.1.10/depth", cv2.CAP_GSTREAMER)
while(cap_depth.isOpened()):
ret2, frame_depth = cap_depth.read()
cv2.namedWindow('kinova_depth', cv2.WINDOW_AUTOSIZE)
cv2.imshow('kinova_depth',frame_depth)
if cv2.waitKey(20) & 0xFF == ord('q'):
break
cap_depth.release()
cv2.destroyAllWindows()
Through the code above, we succeeded in forming a depthmap from the D410 attached to the kinova gen3 model. However, only gray pixel values are known from that map.
I would like to know how to get distance information.
Or I want to know how to connect the information of cap_depth = cv2.VideoCapture("rtsp://192.168.1.10/depth", cv2.CAP_GSTREAMER) to the pipeline of pyrealsense2.
Thank you
cap_depth = cv2.VideoCapture("rtsp://192.168.1.10/depth", cv2.CAP_GSTREAMER)
while(cap_depth.isOpened()):
ret2, frame_depth = cap_depth.read()
cv2.namedWindow('kinova_depth', cv2.WINDOW_AUTOSIZE)
cv2.imshow('kinova_depth',frame_depth)
if cv2.waitKey(20) & 0xFF == ord('q'):
break
cap_depth.release()
cv2.destroyAllWindows()
Through the code above, we succeeded in forming a depthmap from the D410 attached to the kinova gen3 model. However, only gray pixel values are known from that map.
I would like to know how to get distance information.
Or I want to know how to connect the information of cap_depth = cv2.VideoCapture("rtsp://192.168.1.10/depth", cv2.CAP_GSTREAMER) to the pipeline of pyrealsense2.
Thank you
The text was updated successfully, but these errors were encountered: