Open monajalal opened 3 days ago
Hi @monajalal RealSense cameras do not support a depth resolution of 1920x1080 - it is only supported for RGB. This is why the error RuntimeError: Couldn't resolve requests occurs, because the requested depth resolution cannot be provided. The maximum depth resolution available is 1280x720 or 1280x800. So there is no solution available that will provide 1920x1080 depth, unfortunately.
Is it possible for you to use 1280x720 for RGB, please?
That works but for my application I need 1920x1080 for color (I only need to match depth so that I know if a person is far away or too close).
I don't think this part of code is correct still but I was using
for result in results:
for box in result.boxes:
x1 = int(box.xyxy[0][0])
y1 = int(box.xyxy[0][1])
x2 = int(box.xyxy[0][2])
y2 = int(box.xyxy[0][3])
# x1, y1, x2, y2 = map(int, box.xyxy)
# Grab depth information from the center of the bounding box
depth_value = depth_image[(y2 + y1) // 2, (x2 + x1) // 2]
print(f"Detected object at depth: {depth_value}")
Hence if the resolutions are not same it throws error.
Is there any other options you would suggest?
box is coming from yolov10x from ultralytics
Would using a single combined image generated with depth to color alignment instead of having separate depth and color images be an option for you?
@MartyG-RealSense I am not sure what that means, can you please show an example?
I need to show the color image to user. I only need the depth feed to tell how far the person is
Here are some example programs demonstrating depth to color alignment.
C++ https://github.com/IntelRealSense/librealsense/tree/master/examples/align
If you installed the librealsense SDK on Linux with the example programs included in the installation then you should be able to find a pre-built executable version of rs-align in the folder usr/local/bin
When I change the resolution of depth camera, I get this error, however, I need the resolution of my depth camera to match resolution of my color camera. Could you please provide a fix?
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..>