Dytex.hpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef DYTEX_HPP
00012 #define DYTEX_HPP
00013
00014 using namespace cv;
00015 using namespace std;
00016
00025 class Dytex
00026 {
00027
00028 public:
00029
00030
00031 DytexOptions dtopt;
00033
00034 Mat Ymean,
00035 A,
00036 C,
00037 mu0;
00038 CovMatrix R,
00039 Q,
00040 S0;
00042
00043
00044 int vrows,
00045 vcols;
00047 bool isempty;
00048 Mat Cvs;
00049 bool isCvs;
00051
00052
00057 Dytex(const DytexOptions &dtopt);
00060 Dytex();
00061 virtual ~Dytex();
00062
00067 void setRegularizer(const DytexRegOptions &dtreg);
00068
00072 void regularize(bool regA=false);
00073 void regularizeA();
00074
00080 void learnLeastSquares(const vector<Mat> &videos);
00081
00087 void learnLeastSquares(const Mat &video);
00088
00102 Mat synthesize(RNG &rng, int tau, bool video_output = true, bool display_video = false,
00103 double fps=30.0, double alpha=1.0, double beta=0.0);
00104
00105
00106
00117 void processVideoTraining(const Mat &vin, Mat &Yout, Mat &Yout_mean);
00118
00126 void processVideoTesting(const Mat &vin, Mat &Yout) const;
00127
00128
00129
00133 friend ostream& operator <<(ostream &output, const Dytex &dt);
00134
00136 virtual void dump_matlab(ostream &output) const;
00137
00139 virtual void dump(ostream & output) const;
00140
00141 private:
00142
00143 };
00144
00145 #endif