stereolabs / zed-ros-wrapper

ROS wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros/
MIT License
447 stars 392 forks source link

[Question] Do I have to undistort the images obtained from Zed camera? #576

Closed ShrutheeshIR closed 4 years ago

ShrutheeshIR commented 4 years ago

Hello! I am fairly new to this sphere, so apologies in advance if the question is redundant.

I have taken a video sequence using the Zed camera.


fx=349.9
fy=349.9
cx=335.3375
cy=199.2915
k1=-0.177001
k2=0.0291024
k3=0
p1=-0.00192826
p2=0.000284981

These are my camera intrinsics parameters. In another comment, I read that the zed camera gives out rectified images. So what do rectified images mean?

Before processing, do I have to undistort the points using k1,k2,p1,p2 Or can I ignore the lens distortion parameters and continue? Note: I am trying to implement a custom SLAM algorithm and hence I need the correct parameters to go to and from pixels to 3D points

Myzhar commented 4 years ago

Hi @ShrutheeshIR it depends on the topics that you are subscribing. Topics with _raw must be rectified, topics without _raw are ready to be used: https://www.stereolabs.com/docs/ros/zed-node/#published-topics

ShrutheeshIR commented 4 years ago

Thanks @Myzhar I am subscribing to rgb/image_rect_color, and hence the rectified images. My query is: Can I just ignore the k1,k2,p1,p2 values and use the fx, fy, cx, cy directly, or should I make any changes?

Myzhar commented 4 years ago

fx, fy, cx and cy are required to extract 3D info. The distortion parameters are null for rectified images

ShrutheeshIR commented 4 years ago

@Myzhar Thanks! Just to confirm once again, the fx, fy, cx and cy values remain the same for both rectified and unrectified images right?

Myzhar commented 4 years ago

Exactly 👍

ShrutheeshIR commented 4 years ago

Thanks a ton!