Distortion Correction without any camera information
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a image which has pincushion distortion. I know nothing about the camera parameters, e.g. focal length, projection, etc.
I can, using SVD (singular value decomposition), successfully compute the coefficients of the polynomial that correct the image at the point centers, since I know the relative positions of the ideal points - point correspondences between points.
So, the polynomial is of the form
x = a0 + a1x + a2y + a3xy + a4x^2 + a5y^2;
y = b0 + b1x + b2y + b3xy + b4x^2 + b5y^2;
There are 6 different sets of of 12 coefficients, on set for each line of dots.
When I apply the coefficients with polynomials to the center of ground truth points, they map perfectly to the center of the distorted points.
So far so good.
My question is, what is the way to get the coefficients "between" the dots, to map the points between the dots to the ideal points?
My idea was to interpolate weights between each row:
weightA = 1 - n weightB = n
where n is from 0 - 1.0.
So for instance the first row would have a weight of 1, with n= 0. and row 2 coefficients would have a weight of 1, as weightA would be 0.
e.g. weightA *a0 + weightB b0, for all coeffients.
And the middle, would be half of each coefficient summed.
middle coefficients = 0.5*a0 + 0.5b0...0.5a5+0.5b5
So a linear weighting between the two.
This however, in my tests seems to give me the wrong results.
So, my question is, is the approach correct and my calculations incorrect, or is the approach for interpolating / weighting the coefficients wrong?
Thanks
0 Kommentare
Antworten (1)
Bjorn Gustavsson
am 3 Okt. 2020
To my understanding you are supposed to fit the polynomials to the full set of points, not row-by-row but all 36 points. That should give you 2 correction-polynomials to apply for each image coordinate.
HTH
4 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!