MTF
|
Corner Based Homography. More...
#include <CBH.h>
Public Types | |
typedef CBHParams | ParamType |
![]() | |
typedef boost::mt11213b | SampleGenT |
typedef boost::normal_distribution< double > | SampleDistT |
typedef SampleDistT::param_type | DistParamT |
![]() | |
typedef SSMEstimatorParams | EstimatorParams |
Public Member Functions | |
CBH (const ParamType *params_in=nullptr) | |
void | setCorners (const Matrix24d &corners) override |
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 | cmptWarpedPixJacobian (MatrixXd &dI_dp, const PixGradT &dI_dw) override |
void | cmptPixJacobian (MatrixXd &jacobian_prod, const PixGradT &am_jacobian) override |
void | cmptApproxPixJacobian (MatrixXd &jacobian_prod, const PixGradT &pix_jacobian) override |
void | estimateWarpFromCorners (VectorXd &state_update, const Matrix24d &in_corners, const Matrix24d &out_corners) override |
void | estimateWarpFromPts (VectorXd &state_update, vector< uchar > &mask, const vector< cv::Point2f > &in_pts, const vector< cv::Point2f > &out_pts, const EstimatorParams &est_params) override |
void | invertState (VectorXd &inv_state, const VectorXd &state) override |
void | getInitPixGrad (Matrix2Xd &ssm_grad, int pt_id) override |
void | getCurrPixGrad (Matrix2Xd &ssm_grad, int pt_id) override |
void | getWarpFromState (Matrix3d &warp_mat, const VectorXd &ssm_state) override |
void | getStateFromWarp (VectorXd &state_vec, const Matrix3d &warp_mat) override |
![]() | |
ProjectiveBase (const SSMParams *params) | |
void | setCorners (const CornersT &corners) override |
void | setState (const VectorXd &ssm_state) override |
void | additiveUpdate (const VectorXd &state_update) override |
void | invertState (VectorXd &inv_state, const VectorXd &state) override |
void | updateGradPts (double grad_eps) override |
void | updateHessPts (double hess_eps) override |
void | applyWarpToCorners (Matrix24d &warped_corners, const Matrix24d &orig_corners, const VectorXd &state_update) override |
void | applyWarpToPts (Matrix2Xd &warped_pts, const Matrix2Xd &orig_pts, const VectorXd &state_update) override |
void | applyWarpToPt (double &warped_x, double &warped_y, double x, double y, const ProjWarpT &warp) |
void | getIdentityWarp (VectorXd &identity_warp) override |
void | composeWarps (VectorXd &composed_state, const VectorXd &state_1, const VectorXd &state_2) override |
void | initializeSampler (const VectorXd &state_sigma, const VectorXd &state_mean) override |
void | setSampler (const VectorXd &state_sigma, const VectorXd &state_mean) override |
void | setSamplerMean (const VectorXd &mean) override |
void | setSamplerSigma (const VectorXd &std) override |
VectorXd | getSamplerSigma () override |
VectorXd | getSamplerMean () override |
void | additiveRandomWalk (VectorXd &perturbed_state, const VectorXd &base_state) override |
void | compositionalRandomWalk (VectorXd &perturbed_state, const VectorXd &base_state) override |
void | additiveAutoRegression1 (VectorXd &perturbed_state, VectorXd &perturbed_ar, const VectorXd &base_state, const VectorXd &base_ar, double a=0.5) override |
void | compositionalAutoRegression1 (VectorXd &perturbed_state, VectorXd &perturbed_ar, const VectorXd &base_state, const VectorXd &base_ar, double a=0.5) override |
void | generatePerturbation (VectorXd &perturbation) override |
void | generatePerturbedPts (VectorXd &perturbed_pts) override |
void | estimateMeanOfSamples (VectorXd &sample_mean, const std::vector< VectorXd > &samples, int n_samples) override |
void | getPerturbedPts (VectorXd &perturbed_pts, const VectorXd &state_perturbation) override |
void | estimateStateSigma (VectorXd &state_sigma, double pix_sigma) 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 | 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 | cmptInitPixHessian (MatrixXd &pix_hess_ssm, const PixHessT &pix_hess_coord, const PixGradT &pix_grad) |
virtual void | cmptPixHessian (MatrixXd &pix_hess_ssm, const PixHessT &pix_hess_coord, const PixGradT &pix_grad) |
virtual void | cmptWarpedPixHessian (MatrixXd &pix_hess_ssm, const PixHessT &pix_hess_coord, const PixGradT &pix_grad) |
virtual void | cmptApproxPixHessian (MatrixXd &pix_hess_ssm, const PixHessT &pix_hess_coord, const PixGradT &pix_grad) |
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 PtsT | applyWarpToPts (const PtsT &in_pts, const VectorXd &ssm_state) |
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 | setInitStatus () |
virtual void | clearInitStatus () |
virtual void | setFirstIter () |
virtual void | clearFirstIter () |
virtual void | setSPIMask (const bool *_spi_mask) |
virtual void | clearSPIMask () |
virtual bool | supportsSPI () |
Additional Inherited Members | |
![]() | |
std::vector< SampleGenT > | rand_gen |
std::vector< SampleDistT > | rand_dist |
VectorXd | state_perturbation |
![]() | |
string | name |
![]() | |
const PtsT & | getNormPts () const |
const HomPtsT & | getHomNormPts () const |
const CornersT & | getNormCorners () const |
const HomCornersT & | getHomNormCorners () const |
void | getPtsFromCorners (ProjWarpT &warp, PtsT &pts, HomPtsT &pts_hm, const CornersT &corners) |
![]() | |
ProjWarpT | warp_mat |
ProjWarpT | warp_update_mat |
ProjWarpT | inv_warp_mat |
ProjWarpT | curr_warp |
HomPtsT | init_pts_hm |
3 x 3 projective warp matrix | |
HomPtsT | curr_pts_hm |
HomCornersT | init_corners_hm |
HomCornersT | curr_corners_hm |
PtsT | norm_pts |
HomPtsT | norm_pts_hm |
CornersT | norm_corners |
HomCornersT | norm_corners_hm |
![]() | |
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 |
Corner Based Homography.
|
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.