Skip to content
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

Realsense Camera directly get depth and dx , dy information #2

Open
portgasray opened this issue Aug 28, 2019 · 12 comments
Open

Realsense Camera directly get depth and dx , dy information #2

portgasray opened this issue Aug 28, 2019 · 12 comments
Assignees
Labels
enhancement New feature or request P1 priority Realsense

Comments

@portgasray
Copy link
Owner

No description provided.

@portgasray portgasray added the enhancement New feature or request label Aug 28, 2019
@portgasray portgasray self-assigned this Aug 28, 2019
@portgasray portgasray added the P1 priority label Sep 3, 2019
@portgasray
Copy link
Owner Author

portgasray commented Sep 5, 2019

@portgasray
Copy link
Owner Author

get depth from realsense camera IntelRealSense/librealsense#3460 (comment)

@portgasray
Copy link
Owner Author

portgasray commented Sep 5, 2019

@portgasray
Copy link
Owner Author

portgasray commented Sep 5, 2019

intrinsic camera Parameters from rs-enumerate-devices -c

while color image is Width * Height = 640 * 480

PPX: 314.059814453125
PPY: 248.703369140625
Fx: 613.410034179688
Fy: 613.709289550781

intrinsic matrix (mm):

   613.41003     0.00000   314.05981
   0.00000   613.70928   248.70336
   0.00000     0.00000     1.00000

@portgasray
Copy link
Owner Author

portgasray commented Sep 6, 2019

Transforming pixel from a depth image to world coordinates

Intrinsics & Extrinsics demo

IntelRealSense/librealsense#1904 (comment)

@portgasray
Copy link
Owner Author

portgasray commented Sep 7, 2019

ros-realsense

How to get RGBD Depth Image Stream in ROS-realsense IntelRealSense/realsense-ros#861

what's the difference brtween depth raw and aligned depth? #573

  • CV Bridge
    is this the correct way to get depth at (x,y) using cv_bridge? #807

@portgasray
Copy link
Owner Author

portgasray commented Sep 9, 2019

Aligned Frame

Align Depth to Color get depth distance #4021

How to convert a pixel to x, y in meters? IntelRealSense/librealsense#2481 (comment)

@portgasray
Copy link
Owner Author

portgasray commented Sep 9, 2019

Deprojection

realsense deproject pixel to point

dx_dy

How to convert a pixel to x, y in meters? #2481

@EmilyJrxx
Copy link
Collaborator

use message_filters.ApproximateTimeSynchronizer() to synchronize the messages from different topics (in our case , depth_msg and color_msg)

how to use approximate TimeSynchronizer in Python

@EmilyJrxx
Copy link
Collaborator

Subscribe to camera_info to get intrinsics along with other properties of the camera.
( and Dont forget to Synchronize)

use image_geometry.projectPixelTo3dRay((u,v)) API to perform deprojection in realsense-ros env.

rs::deproject_pixel_to_meters : from the source code we know that dealing with different distortions (which is included in camra's info) is part of the deprojection despite the direct calculation of x, y.

image_geometry.projectPixelTo3dRay((u, v)) : source code

@EmilyJrxx
Copy link
Collaborator

The key point of getting depth at the exact (x, y) is to align the depth_frame to the color_frame, which can be done by adding align_depth:=true when launching rs_camera.launch and subscribing to camera/aligned_depth_to_color/image_raw instead of camera/depth/image_rect_raw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 priority Realsense
Projects
None yet
Development

No branches or pull requests

2 participants