-
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
Depth Information in python code with camera d435i doesn't match with Intel Realsense View #12676
Comments
Hi @nokey93 Are you using the 2D mode of the RealSense Viewer to check the corners of the depth image and get the distance in meters of the corner from the image like in the picture below, please? With the color image that you are using, the most appropriate way to obtain a real-world depth value for a specific color pixel would likely be to use the rs2_project_color_pixel_to_depth_pixel instruction to convert a color pixel to a depth pixel. A Python example of using this instruction is at #5603 (comment) |
Hi @MartyG-RealSense ! |
The depth and RGB sensors on the D435i camera model have different field of view sizes, with the RGB sensor having a smaller view than depth. This means that the corner pixels on the RGB image will not correspond to where the corners are on the depth image. Because the depth image has a larger field of view, its corners will be further out beyond the edges of the RGB image. If rs2_project_color_pixel_to_depth_pixel is not used to obtain a depth coordinate then the other main approach is to perform depth to color alignment to map the depth and color images together and then obtain the 3D coordinate. This can be done with rs2_deproject_pixel_to_point |
Thank you for your suggestion! I will try to apply that and response with result in next week! 👍 |
@MartyG-RealSense thanks for your help, it works now! |
You are very welcome. I'm pleased to hear that you were successful. Thanks very much for the update! |
thanks guys running into exactly this issue |
@MartyG-RealSense can I align depth to color like this file. |
Hi @wesboyt You can align color to depth by changing align_to = rs.stream.color to Does your problem with artifacts when aligning resemble the case at #10768 Accuracy increases as resolution increases, so 1280x720 would be more accurate than 640x480. |
it worked, thanks! |
I'm pleased to hear that you were successful. Thanks very much for the update! |
Hi @nokey93 Do you require further assistance with this case, please? Thanks! |
@MartyG-RealSense no, currently I don't have any questions more! |
You are very welcome, @nokey93 - thanks very much for the update. As you do not require further assistance, I will close this case. Thanks again! |
I am using Camera d435i for my research and trying to find the box corners with opencv, then use the information of pixel corners to find the depth of that point.
I could find the corners and which pixel of that corners (not exactly the corners, but acceptable). But when I try to find the depth with scrpit "realsense_depth", it showed me the like this Corner depths: [661, 613, 703, 878]
obviously that depth informations aren't right, it could be different, but not too far away like that. Specially when I use Intel Realsense View to check the corners, it showed me the other result. Anyone can help me with this problem?
here is my code:
The text was updated successfully, but these errors were encountered: