필터 지우기
필터 지우기

Lens Misalignment Distortion Correction

조회 수: 1 (최근 30일)
forest tracker
forest tracker 2016년 6월 17일
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);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by