homog2d library
Macros | Functions
homog_precision.cpp File Reference
#include "../homog2d.hpp"
Include dependency graph for homog_precision.cpp:

Macros

#define NUMTYPE   double
 Numerical type for object storage. More...
 

Functions

Homogr buildMatrix (int i)
 
long double computeDistTransformedLined (Hmatrix_< type::IsHomogr, NUMTYPE > &H, Point2d_< NUMTYPE > pt1, Point2d_< NUMTYPE > pt2)
 
int main (int argc, const char **argv)
 

Macro Definition Documentation

◆ NUMTYPE

#define NUMTYPE   double

Numerical type for object storage.

WIP: evaluate precision of homography on lines

Function Documentation

◆ buildMatrix()

Homogr buildMatrix ( int  i)
23 {
24  Homogr H;
25  return H;
26 }
Homogr_< HOMOG2D_INUMTYPE > Homogr
Default homography (3x3 matrix) type, uses double as numerical type.
Definition: homog2d.hpp:12382
Here is the caller graph for this function:

◆ computeDistTransformedLined()

long double computeDistTransformedLined ( Hmatrix_< type::IsHomogr, NUMTYPE > &  H,
Point2d_< NUMTYPE pt1,
Point2d_< NUMTYPE pt2 
)
15 {
16  Line2d_<NUMTYPE> line1( pt1, pt2 );
17  Point2d_<NUMTYPE> pt = H * pt1; // move the point with H
18  Line2d_<NUMTYPE> line2 = H * line1; // move the line with H^{-T}
19  return line2.distTo( pt ); // should be 0 !
20 }
Point2d pt
Definition: homog2d_test.cpp:4034
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
const char **  argv 
)
30 {
31  char sep = ' ';
32  int nb_A = 10;
33  int nb_B = 15;
34  for( int i=0; i<nb_A; i++ )
35  {
36  auto H = buildMatrix( i );
37  auto Hi = H;
38  Hi.inverse().transpose();
39  for( int j=0; j<nb_B; j++ )
40  {
41  Point2d_<NUMTYPE> pt1(x,y):
42 
43  auto d = computeDistTransformedLined( Hi, pt1, pt2 );
44  std::cout << i << sep << j << sep << d << '\n';
45  }
46  std::cout << '\n';
47  }
48 }
long double computeDistTransformedLined(Hmatrix_< type::IsHomogr, NUMTYPE > &H, Point2d_< NUMTYPE > pt1, Point2d_< NUMTYPE > pt2)
Definition: homog_precision.cpp:14
Homogr buildMatrix(int i)
Definition: homog_precision.cpp:22
Here is the call graph for this function: