valeoai / RADIal

147 stars 50 forks source link

Undistortion of image doesn't look right #33

Open shubh-agrawal opened 1 year ago

shubh-agrawal commented 1 year ago

Hey,

Thank you for providing a great dataset. I have been using this RADial dataset for past couple of days. I wanted to use the undistorted images from this dataset for my computer vision task, however, I am met with a weird aberration.

So, the repository provides the distortion coefficients and camera matrix for this dataset, which can be used by cv2.undistort() function to produce undistorted image. (I was able to figure it out that the raw images provided in the dataset are not corrected for distortion) Reference: https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga69f2545a8b62a6b0fc2ee060dc30559d

Here is the sample image as input. (With close inspection, it looks like barrel distortion) image

And here is the output undistorted image, image

Is it expected that the edges of images are further distorted? Yes, the center of output image does look undistorted, but edge doesn't look any good. I am worried if the distortion coefficients are not accurate.

Experiment data: Image - RECORD@2020-11-21_11.54.31/0000000004.jpg Distortion Coeffs - [ 2.51771602e-01 -1.32561698e+01 4.33607564e-03 -6.94637533e-03 5.95513933e+01]

Code Snippet: image

Am I doing anything wrong here or is this already known issue?

Thank you.