Go to the documentation of this file.00001
00002
00003 #ifndef GRAYMODEL_H
00004 #define GRAYMODEL_H
00005
00006 #include <Eigen/Dense>
00007 #include <vector>
00008
00009 namespace AprilTags {
00010
00012
00017 class GrayModel {
00018 public:
00019 GrayModel();
00020
00021 void addObservation(float x, float y, float gray);
00022
00023 inline int getNumObservations() { return nobs; }
00024
00025 float interpolate(float x, float y);
00026
00027 private:
00028 void compute();
00029
00030
00031
00032
00033
00034
00035
00036
00037 Eigen::Matrix4d A;
00038 Eigen::Vector4d v;
00039 Eigen::Vector4d b;
00040 int nobs;
00041 bool dirty;
00042 };
00043
00044 }
00045
00046 #endif