-
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
Getting accurate depth value after converting both color and depth images to OpenCV matrices #7925
Comments
Hi @prantoran As a starting point in investigating your case, may I ask whether your cv-generated image resembles the depth-color aligned one in the link below, please? |
My aligned colour image is not mosaic but noisy and grainy. But the main problem for me to get depth values of pixel locations in the colour image as accurately as possible. I checked the depth map by showing grayscale and by applying rgb colour filter. The grayscale version seemed more unstable and flickering than the colour version of the depth map. Thanks for linking the related issue, I will try out and inform if there is any improvement Another thing, is the coordinate system of RealSense's Depth_Frame same as OpenCV's Matrices, as in the top-left position is (0, 0)? |
I look forward to hearing about your test results. In the RealSense coordinate system, the origin point is the center of the left IR sensor. Information about how values are positive or minus depending on whether they are left / right or above / below the center-point of the left IR sensor can be found in the link below. |
@MartyG-RealSense I was able to run the I did apply align with respect to the colour image and I figure that this caused down-sampling of the depth frame. Is there a way to project positions of the colour frame to unaligned depth frame? |
If depth to color alignment of the entire image is not ideal for you then the instruction rs2_project_color_pixel_to_depth_pixel may be helpful. |
Hi @prantoran Do you require further assistance with this case, please? Thanks! |
I could not project colour pixel to depth pixel but continuing to try out the depdemo.mp4 |
Hi @prantoran Do you require further assistance with this case, please? Thanks! |
@MartyG-RealSense Thank you so much for the help and linking relevant previous issues. I will go through them and closing this issue. |
Thanks very much for the update! |
Which is the left IR? Is it the one closer to the color camera or the one farther away? |
Yes, the left IR is next to the color camera on the right side of the camera when looking at the camera from the front. The data sheet document for the 400 Series cameras provides the following description. From the perspective of the stereo camera looking out at the world, the left imager is on the left side of the camera module. |
Thanks for your reply. I get it. |
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
I am trying to integrate depth input into my project, which mainly uses OpenCV matrices to represent images. I was able to align the colour image with the depth image and convert both of them to OpenCV matrices. However, the corresponding depth values in the depth image for the queried positions in the aligned colour image are not stable (changes dramatically from frame to frame). Also, there is noise in the colour image (due to alignment maybe).
I am looking for the best way to align both the depth and colour images while minimizing noise, convert the colour image to an OpenCV matrix and get reliable depth values from the depth image for the corresponding positions in the colour image.
The text was updated successfully, but these errors were encountered: