How to get distortion coefficients from fisheye calibration result?

8 vues (au cours des 30 derniers jours)
ZHENZHONG XIE
ZHENZHONG XIE le 26 Jan 2022
Commenté : Jie le 18 Fév 2025
I am really confused how to get distortion coefficients and intrinsic matrix from fishey calibration result.
I've no idea how to use the fisheye cameraParams.Intrinsics consisting of MappingCoefficients ,ImageSize ,DistortionCenter and StretchMatrix.
Need help, thx!
  1 commentaire
ZHENZHONG XIE
ZHENZHONG XIE le 26 Jan 2022
The intrinsic Matrix and distortion coefficients are needed by cpp program which use OpenCV to undistort the fisheye images.

Connectez-vous pour commenter.

Réponses (1)

xingxingcui
xingxingcui le 27 Sep 2022
Modifié(e) : xingxingcui le 27 Avr 2024
The matlab fisheye camera model uses the "Scaramuzza fisheye model", which is different from OpenCV. However, you can still use the aberration parameters from the MATLAB fisheye calibration in opencv, and it is recommended generate C/C++ code for them. Attached are a couple of files(support C code generation) that I have implemented to behave consistently with the functions built into matlab.
load testdata.mat
[J1,K] = undistortFisheyeImageFcn(I,intrinsics);
K
K = 3×3
376.0000 0 376.4016 0 376.0000 373.0798 0 0 1.0000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
imshowpair(I,J1,'montage')
-------------------------Off-topic interlude, 2024-------------------------------
I am currently looking for a job in the field of CV algorithm development, based in Shenzhen, Guangdong, China,or a remote support position. I would be very grateful if anyone is willing to offer me a job or make a recommendation. My preliminary resume can be found at: https://cuixing158.github.io/about/ . Thank you!
Email: cuixingxing150@gmail.com
  1 commentaire
Jie
Jie le 18 Fév 2025
Thanks your reply~ I don't understand the code in undistortFisheyeImageFcn:fx, fy = min(imageSize)/2. Can you help me explain how it works?

Connectez-vous pour commenter.

Produits


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by