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