Lens Misalignment Distortion Correction

1 view (last 30 days)
forest tracker
forest tracker on 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);

Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!