MTF
|
Thin plate splines. More...
#include <TPS.h>
Public Types | |
typedef TPSParams | ParamType |
![]() | |
typedef SSMEstimatorParams | EstimatorParams |
Public Member Functions | |
TPS (TPSParams *params_in=nullptr) | |
void | compositionalUpdate (const VectorXd &state_update) 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 | estimateWarpFromCorners (VectorXd &state_update, const CornersT &in_corners, const CornersT &out_corners) 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 | setCorners (const CornersT &corners) override |
void | estimateWarpFromPts (VectorXd &state_update, vector< uchar > &mask, const vector< cv::Point2f > &in_pts, const vector< cv::Point2f > &out_pts, int estimation_method, double ransac_reproj_thresh) 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 |
void | getWarpFromState (Matrix3d &warp_mat, const VectorXd &ssm_state) override |
void | getStateFromWarp (VectorXd &state_vec, const Matrix3d &warp_mat) override |
![]() | |
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 | getCorners (cv::Mat &cv_corners) |
virtual void | setNChannels (int _n_channels) |
virtual void | setState (const VectorXd &ssm_state) |
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 void | additiveUpdate (const VectorXd &state_update) |
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 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 () |
Public Attributes | |
ParamType | params |
![]() | |
string | name |
Additional Inherited Members | |
![]() | |
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 |
Thin plate splines.
|
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.