ImageCalibrator.hpp

Go to the documentation of this file.
00001 #ifndef LOPER_IMAGECALIBRATOR
00002 #define LOPER_IMAGECALIBRATOR
00003 
00014 #include <vector>
00015 using std::vector;
00016 #include "GslMatrix.hpp"
00017 
00019 class PointCorrespondence
00020 {
00021 public:
00022         bool operator<(const PointCorrespondence &pc) const
00023         {
00024                 return (memcmp(this, &pc, sizeof(PointCorrespondence)) < 0);
00025         }
00026     double x,y; // 3d coord, z assumed as zero
00027     double u,v; // 2d image coord
00028 };
00029 
00030 typedef vector< vector < double > > Table;
00031 
00032 GslVector getNullspaceVector (GslMatrix table);
00033 
00034 
00035 
00043 class ImageCalibrator
00044 {
00045 public:
00046 
00047 /* 
00048  * Constructors
00049  */
00050     ImageCalibrator() :
00051         homography(3,3),
00052         rotation(3),
00053         translation(3)
00054     {
00055     }
00056 
00057 /*
00058  * Operators
00059  */
00060     void recalculateHomography();
00061 
00062 /*
00063  * Accessors
00064  */
00065     void printPoints();
00066     void printHomography();
00067 
00068 /*
00069  * Member variables
00070  */
00071     std::vector< PointCorrespondence > points;
00072 
00073     // our 3x3 homography
00074     GslMatrix homography;
00075     GslVector rotation; // rotation amount is in the length
00076     GslVector translation;
00077 };
00078 
00079 
00080 
00081 #endif // LOPER_IMAGECALIBRATOR

Generated on Mon May 26 11:19:28 2003 for CamChecker by doxygen1.3