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

Camera parameter acquisition D435i #8689

Closed
987428377 opened this issue Mar 29, 2021 · 2 comments
Closed

Camera parameter acquisition D435i #8689

987428377 opened this issue Mar 29, 2021 · 2 comments
Labels

Comments

@987428377
Copy link

987428377 commented Mar 29, 2021

OK ,thank you read my problems!
I input command
roslaunch realsense2_camera rs_camera.launch
rostopic echo /camera/color/camera_info
and then I got some imformation as follows:

Camera.width: 640
Camera.height: 480

header:
seq: 1009
stamp:
secs: 1616939816
nsecs: 37440538
frame_id: "camera_color_optical_frame"
height: 480
width: 640
distortion_model: "plumb_bob"
D: [0.0, 0.0, 0.0, 0.0, 0.0]
K: [607.324462890625, 0.0, 320.5830383300781, 0.0, 607.5777587890625, 241.2068328857422, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [607.324462890625, 0.0, 320.5830383300781, 0.0, 0.0, 607.5777587890625, 241.2068328857422, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: False

Xdistorted=x(1+k1r^2+k2r^4+k3r^6)+2p1x*y+p2(r^2+2x^2)

and I need Camera.fx ; Camera.fy; Camera.cx; Camera.cy; Camera.k1; Camera.k2; Camera.p1; Camera.p2;Camera.width;
Camera.height how can I get them.

@MartyG-RealSense
Copy link
Collaborator

Hello, a simple method for retrieving the intrinsics of the camera is to use the '-c' calibration information command of the librealsense rs-enumerate-devices tool:

rs-enumerate-devices -c

When this command is input into the Windows command prompt or the Ubuntu terminal then a long list of the detected camera's calibration information is generated in the terminal window. You can then scroll upwards from the bottom of the list until you find the information relating to a particular stream profile (for example, shown below is the Depth 848x480 profile from a D435i).

image

Please note from the above image that the coefficients on the 400 Series cameras are set to zero for reasons described in the link below.

#1430 (comment)

These five distortion coefficients are k1, k2, p1, p2, k3.

More information about these intrinsic values can be found at the following documentation links:

https://intelrealsense.github.io/librealsense/doxygen/structrs2__intrinsics.html

https://github.com/IntelRealSense/librealsense/wiki/Projection-in-RealSense-SDK-2.0#intrinsic-camera-parameters

ppx and ppy are equivalent to the cx and cy values that you are seeking as both sets of terms describe the principal point.

Whilst rs-enumerate-devices provides an easy way to retrieve the calibration information, you can also do so with program scripting, as described in the discussion linked to below:

#2930

@987428377
Copy link
Author

When this command is input into the Windows command prompt or the Ubuntu terminal then a long list of the detected camera's calibration information is generated in the terminal window. You can then scroll upwards from the bottom of the list until you find the information relating to a particular stream profile (for example, shown below is the Depth 848x480 profile from a D435i).

Thank you very much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants