Image Distortion Correction: Using "undistortImage" Function Knowing GoProHero 6 Angle of View

9 views (last 30 days)
Hi All!
I am developing a video acquisition method for vibration analysis w/ a colleague.
We are currently trying to tackle the distortion issue.
Here are our problem features:
  1. Camera is a GoPro Hero6, settings being Wide Field of View, 2.7k and 120 fps
  2. I don’t have access to the camera and can only suggest settings to him, and rely on the information he gives me for analysis
  3. We can’t work on an Arduino/GoPro system at the moment, since our experimental situation is quite complicated. Note that this is something we’d like to work on but it requires time & skills we don’t have at the moment.
  • Basically those last two points means that the quickest solution is to work directly on the resulting images for distortion correction.
  • GoPro's website gives the equivalent focal length and the horizontal, vertical and diagonal degrees for all Field of View Settings.
  • I wanted to use the following Matlab Script, which requires an Intrinsic Matrix and a Radial Distortion Matrix as inputs for distortion correction.
IntrinsicMatrix = [715.2699 0 0; 0 711.5281 0; 565.6995 355.3466 1];
radialDistortion = [-0.3361 0.0921];
cameraParams = cameraParameters('IntrinsicMatrix',IntrinsicMatrix,'RadialDistortion',radialDistortion);
I = imread(fullfile(matlabroot,'toolbox','vision','visiondata','calibration','mono','image01.jpg'));
J = undistortImage(I,cameraParams);
figure;
imshowpair(imresize(I,0.5),imresize(J,0.5),'montage');
title('Original Image (left) vs. Corrected Image (right)');
My question is:
Can I go from the focal length and horizontal, vertical and diagonal degrees given by GoPro to build an Intrinsic Matrix & a Radial Distortion Matrix?
Based on what I have, I can directly use the GoPro focal length, but what about the principle point offset & skew? Can I measure them from the image?
In my case I am tempted to set skew=0 and my principle point offset directly in the middle of my image.
What I have trouble figuring out is what to do with the angles given by GoPro & the radial distortion matrix.
At the moment do you think we are missing something to correctly undistort our images? Do you have other suggestions?
Thank you for your help.
I’ll keep this topic updated with whatever info I come across.
All the best,
M.

Answers (0)

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!