5 # include <vcl_msvc_warnings.h> 12 direct_compute(
double T[2][2],
13 double p11,
double p12,
double p13,
14 double p21,
double p22,
double p23,
16 double q11,
double q12,
double q13,
17 double q21,
double q22,
double q23)
19 double A[2][2],B[2][2];
22 t=+(p22*p13-p12*p23); A[0][0]=t*p11; A[1][0]=t*p21;
23 t=-(p21*p13-p11*p23); A[0][1]=t*p12; A[1][1]=t*p22;
25 t=+(q22*q13-q12*q23); B[0][0]=t*q11; B[1][0]=t*q21;
26 t=-(q21*q13-q11*q23); B[0][1]=t*q12; B[1][1]=t*q22;
28 T[0][0]= B[0][0]*A[1][1]-B[0][1]*A[1][0];
29 T[1][0]= B[1][0]*A[1][1]-B[1][1]*A[1][0];
30 T[0][1]=-B[0][0]*A[0][1]+B[0][1]*A[0][0];
31 T[1][1]=-B[1][0]*A[0][1]+B[1][1]*A[0][0];
39 assert(points1.size() == 3);
40 assert(points2.size() == 3);
43 points1[0].x() , points1[1].x() , points1[2].x(),
44 points1[0].w() , points1[1].w() , points1[2].w(),
46 points2[0].x() , points2[1].x() , points2[2].x(),
47 points2[0].w() , points2[1].w() , points2[2].w());
bool compute_cool_homg(const std::vector< vgl_homg_point_1d< double > > &points1, const std::vector< vgl_homg_point_1d< double > > &points2, vgl_h_matrix_1d< double > &H) override
A class to hold a line-to-line projective transformation matrix and to perform common operations usin...
vgl_h_matrix_1d & set(T const *M)
Set to 2x2 row-stored matrix.
Calculate the line projectivity which matches three 1D point correspondences.
Represents a homogeneous 1-D point, i.e., a homogeneous pair (x,w).