-
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
Get world depth instead of FOV depth [C++] [RealSense] #7279
Comments
Hi @Jethrootje The 3D origin (0,0,0) of the camera is at the center of the physical left IR imager component. As described by the Projection documentation (see the link below), the positive x-axis points to the right, the positive y-axis points down, and the positive z-axis points forward. So if a point is in the top left area of the image, it could have negative x and negative y values (because it is to the left of the imager center (minus X axis) and above the imager center (minus Y axis). Therefore, a minus X and positive Y result would refer to a coordinate that is to the left and below the imager's center. |
So basically a minus X and positive Y result is normal? Then how about the distance? |
So now i've found this, but my code looks the exact same (with C++ instead of Python) but the depth from the FOV isn't different from the depth if i'd like to view it with "World Depth" He also says
Now i'm kinda confused about how he translates the Z Coordinate to a World Coordinate, because right now it still looks at the FOV of the camera.. |
Could you clarify please what you mean when you say "The distance doesn't seem to change". Do you mean that the distance does not update when you move the camera when using rs2_deproject_pixel_to_point? Or that the depth reading is the same when using rs2_deproject_pixel_to_point and when using get_distance()? |
The above question is one that is suited to RealSense team member @ev-mp as an expert on stereo depth. @ev-mp could you kindly provide advice to @Jethrootje on the question above, please? |
@Jethrootje , I added some details for clarification: The terms "FOV Depths" and "World Depth" are subjective and can mean different things to different people. So to clarify the terms:
The call to
|
Been trying alot of stuff, but i really can't get it to work, basically i want the blue arrows that you've drawn in meters, on the picture you're saying that's 1.30M but that only happens in the FOV, if you'd check it from straight up it'd be different. How would i calculate that distance, like, how can i pretend the camera to be facing straight up instead a FOV degrees. Because basically if you'd put the camera more to the side, it'd give the same distance in the middle but if you check the X and Y of the middle that it was placed in before it'd be different.
Edit: But basically if the depth isn't the same height, this would happen: |
Hi @Jethrootje Do you still require assistance with this case please? Thanks! |
No not really, i tried a few new methods, thanks for both of your help! |
You're very welcome @Jethrootje - thanks for the update! |
Issue Description
So currently i have made a small project to test some things with rs2_deproject_pixel_to_point, seen some issue threads but wasn't able to find any useful information. Right now i'm working on a detection in zones, now the problem is that the camera looks in it's own Field Of View perspective instead of the actual depth. Now i was going to work on a pythagorean method myself to calculate it, but then i found out about the deproject method, now my problem is that it's returning the exact same depth and the x seems to be a negative number, which shouldn't be happening if i'm correct.
Output:
As you can see the first depth stays the same as the second depth after using the method and the
x
sometimes is a negative number.The text was updated successfully, but these errors were encountered: