Dytex Class Reference

Dynamic Texture class. More...

#include <Dytex.hpp>

Collaboration diagram for Dytex:
[legend]

List of all members.

Public Member Functions

 Dytex (const DytexOptions &dtopt)
 allocate a new dynamic texture.
 Dytex ()
 allocate a new empty dynamic texture.
void setRegularizer (const DytexRegOptions &dtreg)
 set the regularization method.
void regularize (bool regA=false)
 apply regularization to the DT.
void regularizeA ()
void learnLeastSquares (const vector< Mat > &videos)
 estimate DT parameters from a set of videos.
void learnLeastSquares (const Mat &video)
 estimate DT parameters from a single video.
Mat synthesize (RNG &rng, int tau, bool video_output=true, bool display_video=false, double fps=30.0, double alpha=1.0, double beta=0.0)
 synthesize a video from the DT.
void processVideoTraining (const Mat &vin, Mat &Yout, Mat &Yout_mean)
 pre-process a video for training a DT.
void processVideoTesting (const Mat &vin, Mat &Yout) const
 pre-process a video for a learned DT.
virtual void dump_matlab (ostream &output) const
 debugging: dump the Dytex to a Matlab-readable string (dt struct).
virtual void dump (ostream &output) const
 debugging: dump information about the DT.

Public Attributes

DytexOptions dtopt
 options for the Dytex
Mat Ymean
 observation mean
Mat A
 transition matrix
Mat C
 observation matrix
Mat mu0
 initial state mean
CovMatrix R
 observation noise covariance
CovMatrix Q
 state noise covariance
CovMatrix S0
 initial state covariance
int vrows
 for synthesis, number of rows in a frame (0 if unknown).
int vcols
 for synthesis, number of columns in a frame (0 if unknown).
bool isempty
 indicates am empty Dt
Mat Cvs
 Cvs precomputed value.
bool isCvs
 Cvs computed.

Friends

ostream & operator<< (ostream &output, const Dytex &dt)
 debugging: dump the Dytex to an output stream.

Detailed Description

Dynamic Texture class.

This is the class for a standard dynamic texture. It serves as the base class for the online version of the DT. It includes functions for: 1) estimating parameters; 2) regularizing; 3) synthesizing video; 4) pre-processing video for usage with DT (for other classes).

Definition at line 25 of file Dytex.hpp.


Constructor & Destructor Documentation

Dytex::Dytex ( const DytexOptions &  dtopt  ) 

allocate a new dynamic texture.

Parameters:
dtopt the options to use.
See also:
DytexOptions

Definition at line 35 of file Dytex.cpp.


Member Function Documentation

void Dytex::dump ( ostream &  output  )  const [virtual]

debugging: dump information about the DT.

Definition at line 634 of file Dytex.cpp.

void Dytex::dump_matlab ( ostream &  output  )  const [virtual]

debugging: dump the Dytex to a Matlab-readable string (dt struct).

Definition at line 623 of file Dytex.cpp.

void Dytex::learnLeastSquares ( const Mat &  video  ) 

estimate DT parameters from a single video.

Uses Doretto's sub-optimal fast least-squares method to estimate parameters from a single video.

Parameters:
video the Mat video

Definition at line 398 of file Dytex.cpp.

Here is the call graph for this function:

void Dytex::learnLeastSquares ( const vector< Mat > &  videos  ) 

estimate DT parameters from a set of videos.

Uses Doretto's sub-optimal fast least-squares method to estimate parameters from a set of videos.

Parameters:
videos set of videos

Definition at line 226 of file Dytex.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Dytex::processVideoTesting ( const Mat &  vin,
Mat &  Yout 
) const

pre-process a video for a learned DT.

Given a learned DT, convert a Mat video to a vector time-series, and subtract the DT mean. This function is used by DytexKalmanFilter to pre-process the video.

Parameters:
vin the Mat video input
Yout the mean-subtracted vectorized video.
See also:
processVideoTraining, DytexKalmanFilter

Definition at line 173 of file Dytex.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Dytex::processVideoTraining ( const Mat &  vin,
Mat &  Yout,
Mat &  Yout_mean 
)

pre-process a video for training a DT.

Converts a Mat video into a vector time-series (of type OPT_MAT_TYPE). If the DT will model Ymean, then subtracts the empirical mean of the video. This function is used to pre-process video for learnLeastSquares.

Parameters:
vin the training Mat video
Yout the mean-subtracted vectorized video.
Yout_mean the empirical mean of vectorized vin.
See also:
processVideoTesting, learnLeastSquares

Definition at line 114 of file Dytex.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Dytex::regularize ( bool  regA = false  ) 

apply regularization to the DT.

See also:
setRegularizer, DytexRegOptions

Definition at line 71 of file Dytex.cpp.

Here is the call graph for this function:

void Dytex::setRegularizer ( const DytexRegOptions &  dtreg  ) 

set the regularization method.

Parameters:
dtreg the regularization options
See also:
regularize, DytexRegOptions

Definition at line 65 of file Dytex.cpp.

Here is the call graph for this function:

Mat Dytex::synthesize ( RNG &  rng,
int  tau,
bool  video_output = true,
bool  display_video = false,
double  fps = 30.0,
double  alpha = 1.0,
double  beta = 0.0 
)

synthesize a video from the DT.

Generates a tau-length sample from the DT, and return or display it. When displaying the video sample, the pixel values are scaled as alpha*pix+beta, and played at fps frames-per-second.

Parameters:
rng the random-number generator
tau the number of frames to sample
video_output if true, output a Mat video. If false, output a vectorized video (column vectors).
display_video if true, display the video during synthesis (supresses output).
fps frames per second for display
alpha scale factor
beta scale constant
Returns:
the Mat video sample or vectorized video sample.

Definition at line 519 of file Dytex.cpp.

Here is the call graph for this function:


Friends And Related Function Documentation

ostream& operator<< ( ostream &  output,
const Dytex &  dt 
) [friend]

debugging: dump the Dytex to an output stream.

See also:
dump

Member Data Documentation

for synthesis, number of columns in a frame (0 if unknown).

Definition at line 44 of file Dytex.hpp.

for synthesis, number of rows in a frame (0 if unknown).

Definition at line 44 of file Dytex.hpp.


The documentation for this class was generated from the following files:

Generated on 18 Dec 2014 for libdt-OpenCV by  doxygen 1.6.1