MTF
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Spline Class Reference
Inheritance diagram for Spline:
StateSpaceModel

Public Types

typedef SplineParams ParamType
 
typedef SplineParams::InterpolationType InterpolationType
 
- Public Types inherited from StateSpaceModel
typedef SSMEstimatorParams EstimatorParams
 

Public Member Functions

 Spline (const ParamType *params_in=nullptr)
 
void getCorners (cv::Mat &cv_corners) override
 
void additiveUpdate (const VectorXd &state_update) override
 
void setCorners (const CornersT &corners) override
 
void compositionalUpdate (const VectorXd &state_update) override
 
void setState (const VectorXd &state) override
 
void cmptInitPixJacobian (MatrixXd &jacobian_prod, const PixGradT &am_jacobian) override
 right multiplies the initial or current ssm jacobian with the provided am jacobian; though this can be accomplished by the search method itself with simple matrix multiplication, the ssm jacobian often satisfies several constraints (e.g. More...
 
void cmptPixJacobian (MatrixXd &jacobian_prod, const PixGradT &am_jacobian) override
 
void cmptWarpedPixJacobian (MatrixXd &jacobian_prod, const PixGradT &pix_jacobian) override
 
void cmptApproxPixJacobian (MatrixXd &jacobian_prod, const PixGradT &pix_jacobian) override
 
void cmptInitPixHessian (MatrixXd &pix_hess_ssm, const PixHessT &pix_hess_coord, const PixGradT &pix_grad) override
 
void cmptWarpedPixHessian (MatrixXd &pix_hess_ssm, const PixHessT &pix_hess_coord, const PixGradT &pix_grad) override
 
void cmptApproxPixHessian (MatrixXd &pix_hess_ssm, const PixHessT &pix_hess_coord, const PixGradT &pix_grad) override
 
void cmptPixHessian (MatrixXd &pix_hess_ssm, const PixHessT &pix_hess_coord, const PixGradT &pix_grad) override
 
void invertState (VectorXd &inv_state, const VectorXd &state) override
 
void updateGradPts (double grad_eps) override
 
void updateHessPts (double hess_eps) override
 
bool supportsSPI () override
 
void getInitPixGrad (Matrix2Xd &jacobian_prod, int pix_id) override
 
void getCurrPixGrad (Matrix2Xd &jacobian_prod, int pix_id) override
 
void generatePerturbation (VectorXd &state_update) override
 
- Public Member Functions inherited from StateSpaceModel
 StateSpaceModel (const SSMParams *params)
 
virtual unsigned int getStateSize ()
 
virtual unsigned int getResX ()
 
virtual unsigned int getResY ()
 
virtual unsigned int getNPts ()
 
virtual unsigned int getNChannels ()
 
virtual const PtsT & getPts ()
 
virtual const CornersT & getCorners ()
 
virtual const VectorXd & getState ()
 
virtual const GradPtsT & getGradPts ()
 
virtual const HessPtsT & getHessPts ()
 
virtual void getCorners (cv::Point2d *cv_corners)
 
virtual void setNChannels (int _n_channels)
 
virtual void setCorners (const cv::Mat &cv_corners)
 
virtual void initialize (const CornersT &eig_corners, int _n_channels=1)
 
virtual void initialize (const cv::Mat &cv_corners, int _n_channels=1)
 
virtual void initializeGradPts (double grad_eps)
 
virtual void initializeHessPts (double hess_eps)
 
virtual VectorXd invertState (const VectorXd &state)
 
virtual void applyWarpToCorners (CornersT &out_corners, const CornersT &in_corners, const VectorXd &ssm_state)
 
virtual CornersT applyWarpToCorners (const CornersT &in_corners, const VectorXd &ssm_state)
 
virtual void applyWarpToCorners (cv::Mat &out_corners_cv, const cv::Mat &in_corners_cv, const VectorXd &ssm_state)
 
virtual cv::Mat applyWarpToCorners (const cv::Mat &in_corners, const VectorXd &ssm_state)
 
virtual void applyWarpToPts (PtsT &out_pts, const PtsT &in_pts, const VectorXd &ssm_state)
 
virtual PtsT applyWarpToPts (const PtsT &in_pts, const VectorXd &ssm_state)
 
virtual void getIdentityWarp (VectorXd &p)
 
virtual void composeWarps (VectorXd &p12, const VectorXd &p1, const VectorXd &p2)
 
virtual void estimateWarpFromCorners (VectorXd &state_update, const CornersT &in_corners, const CornersT &out_corners)
 
virtual VectorXd estimateWarpFromCorners (const CornersT &in_corners, const CornersT &out_corners)
 
virtual void estimateWarpFromCorners (VectorXd &state_update, const cv::Mat &in_corners_cv, const cv::Mat &out_corners_cv)
 
virtual VectorXd estimateWarpFromCorners (const cv::Mat &in_corners, const cv::Mat &out_corners)
 
virtual void estimateWarpFromPts (VectorXd &state_update, vector< uchar > &mask, const vector< cv::Point2f > &in_pts, const vector< cv::Point2f > &out_pts, const EstimatorParams &est_params)
 
virtual void initializeSampler (const VectorXd &state_sigma, const VectorXd &state_mean)
 
virtual void setSampler (const VectorXd &state_sigma, const VectorXd &state_mean)
 
virtual void setSamplerMean (const VectorXd &mean)
 
virtual void setSamplerSigma (const VectorXd &std)
 
virtual VectorXd getSamplerSigma ()
 
virtual VectorXd getSamplerMean ()
 
virtual void compositionalRandomWalk (VectorXd &perturbed_state, const VectorXd &base_state)
 
virtual void additiveRandomWalk (VectorXd &perturbed_state, const VectorXd &base_state)
 
virtual void compositionalAutoRegression1 (VectorXd &perturbed_state, VectorXd &perturbed_ar, const VectorXd &base_state, const VectorXd &base_ar, double a=0.5)
 
virtual void additiveAutoRegression1 (VectorXd &perturbed_state, VectorXd &perturbed_ar, const VectorXd &base_state, const VectorXd &base_ar, double a=0.5)
 
virtual void generatePerturbedPts (VectorXd &perturbed_pts)
 
virtual void getPerturbedPts (VectorXd &perturbed_pts, const VectorXd &state_update)
 
virtual void estimateMeanOfSamples (VectorXd &sample_mean, const std::vector< VectorXd > &samples, int n_samples)
 
virtual void estimateStateSigma (VectorXd &state_sigma, double pix_sigma)
 
virtual void setInitStatus ()
 
virtual void clearInitStatus ()
 
virtual void setFirstIter ()
 
virtual void clearFirstIter ()
 
virtual void setSPIMask (const bool *_spi_mask)
 
virtual void clearSPIMask ()
 

Protected Member Functions

void initInterpolationWeights ()
 
void updateInterpolationWeights ()
 
double getWeight (double x, double y)
 

Protected Attributes

ParamType params
 
PtsT norm_pts
 
CornersT norm_corners
 
PtsT init_control_pts
 
PtsT curr_control_pts
 
VectorXd ctrl_idx
 
VectorXd ctrl_idy
 
unsigned int control_res_x
 
unsigned int control_res_y
 
unsigned int n_control_pts
 
int n_bounding_pts
 no. of pts that lie on the region boundary
 
VectorXd dist_norm_x
 
VectorXd dist_norm_y
 
MatrixXd norm_dist_x
 
MatrixXd norm_dist_y
 
MatrixXd interp_wts
 
Matrix2Xd ssm_grad
 
double max_dist_x
 
double max_dist_y
 
CornersT rand_d
 
Vector2d rand_t
 
CornersT disturbed_corners
 
- Protected Attributes inherited from StateSpaceModel
const unsigned int resx
 
const unsigned int resy
 
const unsigned int n_pts
 
unsigned int state_size
 
unsigned int n_channels
 
VectorXd curr_state
 parameters defining the SSM state
 
PtsT init_pts
 grid points and corners that define the object's location in the frame
 
PtsT curr_pts
 
CornersT init_corners
 
CornersT curr_corners
 
GradPtsT grad_pts
 
HessPtsT hess_pts
 
bool identity_jacobian
 
SSMStatus is_initialized
 keep track of what state variables have been initialized
 
bool first_iter
 indicator variable that can be set by the search method to indicate when a new frame has been acquired; can be used to perform some costly operations/updates only once per frame rather than at every iteration of the same frame
 
const bool * spi_mask
 

Additional Inherited Members

- Public Attributes inherited from StateSpaceModel
string name
 

Member Function Documentation

void Spline::cmptInitPixJacobian ( MatrixXd &  jacobian_prod,
const PixGradT &  pixel_grad 
)
overridevirtual

right multiplies the initial or current ssm jacobian with the provided am jacobian; though this can be accomplished by the search method itself with simple matrix multiplication, the ssm jacobian often satisfies several constraints (e.g.

sparsity) that can be exploited to gain computational savings by manually computing the product matrix

Reimplemented from StateSpaceModel.


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