- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
For one color pixel, how to get its 3D coordinate?
In RealSense SDK, the 3D coordinate is referred to the depth camera.
But I want to find 3D coordinate in the color camera space.
How to do this?
Thanks a lot.
YL
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to project one into the other to match them.
Have a look here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
I checked the Projection interface, which can map a pixel in the color image to the 3D coordinate.
But I think it is the 3D coordinate in the depth camera coordinate system rather than in the color camera coordinate system.
I think my original question can be:
Does the SDK provide the transform between the depth and the color camera?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Yixun L.:
You're right. You can use PXCProjection::ProjectColorToCamera() to map color pixels to 3D coordinates in the world coordinate system (in millimeters). But, as you said, the world coordinate system "coincides with the depth camera coordinate system".
To transform that into a coordinate system based on the color camera, you need to get the Calibration interface from the Projection, and then use PXCCalibration::QueryStreamProjectionParameters() to get the PXCCalibration::StreamTransform struct of the color camera. The rotation is most likely the identity matrix, but the translation denotes distance (in millimeter) of the color camera to the depth camera (and therefore to the world coordinate system).
So just apply the translation to your 3D points and you should have the points in a coordinate system based on the color camera.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page