Lens Misalignment Distortion Correction

1 Ansicht (letzte 30 Tage)
forest tracker
forest tracker am 17 Jun. 2016
Currently I am working on the project related to lens misalignment distortion correction. I have finished color segmentation to extract a single ring. Then I got the code from my colleague to develop. I tried several times to approach him since some part of his code does not make sense to me. He applied some eccentricity method as an approach to solve the problem. I asked him about the Hp and Vp. He told me that is just to give me the center pixel in horizontal and vertical axis. But I still do not know how to determine them. Any recommendation suggestion and hint about Hp and Vp as well as the entire misalignment distortion correction are all greatly appreciated.Thank you in advance!
Here is the code:
stats = regionprops(BW2,'MajorAxisLength','MinorAxisLength','Centroid','Orientation');
alpha = pi/180*stats(1).Orientation;
Q = [cos(alpha), -sin(alpha); sin(alpha), cos(alpha)];
x0 = [Hp vp]';
b = semi_minor_axis;
a = semi_major_axis;
S = diag([1, a/b]);
C = Q*S*Q';
d = (eye(2) - C)*x0;
tform = maketform('affine', [C d; 0 0 1]');
Im2 = imtransform(BW2, tform);

Antworten (0)

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by