Problem with affine rectification

조회 수: 3 (최근 30일)
Marco Baratta
Marco Baratta 2019년 12월 15일
댓글: Massimo Vassalli 2020년 12월 11일
I have been trying to perform affine rectification using Matlab. By using Hough Lines I find two sets of parallel lines, I compute both of the vanishing points and then I find the vanishing line:
p1=[1056 2862 1];
p2=[1374 2692 1];
l1=cross(p1,p2);
p1=[2316 253 1];
p2=[2639 27 1];
l2=cross(p1,p2);
p1=[1149 2334 1];
p2=[1111 2833 1];
m1=cross(p1,p2);
p1=[1519 1602 1];
p2=[1532 2014 1];
m2=cross(p1,p2);
v1=cross(l1,l2);
v1=v1/v1(3) // =1.0e+03 * [-9.4067 8.4553 0.0010]
v2=cross(m1,m2);
v2=v2/v2(3); // =1.0e+03 * [1.4269 -1.3157 0.0010]
v_line = cross(v1,v2);
//
H = [1 0 0; 0 1 0; v_line(1)/v_line(3) v_line(2)/v_line(3) 1];
H_p=projective2d(H);
I_aff=imwarp(I, H_p);
The problem is that I_aff is exactly as the input image. Nothing happened. What am I doing wrong?
  댓글 수: 1
Massimo Vassalli
Massimo Vassalli 2020년 12월 11일
Have you solved this problem? Apparently I have the same issue.

댓글을 달려면 로그인하십시오.

답변 (0개)

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by