OpenCV  3.0.0
Open Source Computer Vision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cv::detail::BundleAdjusterBase Class Referenceabstract

Base class for all camera parameters refinement methods. More...

#include "motion_estimators.hpp"

Inheritance diagram for cv::detail::BundleAdjusterBase:
cv::detail::Estimator cv::detail::BundleAdjusterRay cv::detail::BundleAdjusterReproj

Public Member Functions

double confThresh () const
 
const Mat refinementMask () const
 
void setConfThresh (double conf_thresh)
 
void setRefinementMask (const Mat &mask)
 
void setTermCriteria (const TermCriteria &term_criteria)
 
TermCriteria termCriteria ()
 
- Public Member Functions inherited from cv::detail::Estimator
virtual ~Estimator ()
 
bool operator() (const std::vector< ImageFeatures > &features, const std::vector< MatchesInfo > &pairwise_matches, std::vector< CameraParams > &cameras)
 Estimates camera parameters. More...
 

Protected Member Functions

 BundleAdjusterBase (int num_params_per_cam, int num_errs_per_measurement)
 Construct a bundle adjuster base instance. More...
 
virtual void calcError (Mat &err)=0
 Calculates error vector. More...
 
virtual void calcJacobian (Mat &jac)=0
 Calculates the cost function jacobian. More...
 
virtual bool estimate (const std::vector< ImageFeatures > &features, const std::vector< MatchesInfo > &pairwise_matches, std::vector< CameraParams > &cameras)
 This method must implement camera parameters estimation logic in order to make the wrapper detail::Estimator::operator()_ work. More...
 
virtual void obtainRefinedCameraParams (std::vector< CameraParams > &cameras) const =0
 Gets the refined camera parameters. More...
 
virtual void setUpInitialCameraParams (const std::vector< CameraParams > &cameras)=0
 Sets initial camera parameter to refine. More...
 

Protected Attributes

Mat cam_params_
 
double conf_thresh_
 
std::vector< std::pair< int,
int > > 
edges_
 
const ImageFeaturesfeatures_
 
int num_errs_per_measurement_
 
int num_images_
 
int num_params_per_cam_
 
const MatchesInfopairwise_matches_
 
Mat refinement_mask_
 
TermCriteria term_criteria_
 
int total_num_matches_
 

Detailed Description

Base class for all camera parameters refinement methods.

Constructor & Destructor Documentation

cv::detail::BundleAdjusterBase::BundleAdjusterBase ( int  num_params_per_cam,
int  num_errs_per_measurement 
)
inlineprotected

Construct a bundle adjuster base instance.

Parameters
num_params_per_camNumber of parameters per camera
num_errs_per_measurementNumber of error terms (components) per match

Member Function Documentation

virtual void cv::detail::BundleAdjusterBase::calcError ( Mat err)
protectedpure virtual

Calculates error vector.

Parameters
errError column-vector of length total_num_matches * num_errs_per_measurement
virtual void cv::detail::BundleAdjusterBase::calcJacobian ( Mat jac)
protectedpure virtual

Calculates the cost function jacobian.

Parameters
jacJacobian matrix of dimensions (total_num_matches * num_errs_per_measurement) x (num_images * num_params_per_cam)
double cv::detail::BundleAdjusterBase::confThresh ( ) const
inline
virtual bool cv::detail::BundleAdjusterBase::estimate ( const std::vector< ImageFeatures > &  features,
const std::vector< MatchesInfo > &  pairwise_matches,
std::vector< CameraParams > &  cameras 
)
protectedvirtual

This method must implement camera parameters estimation logic in order to make the wrapper detail::Estimator::operator()_ work.

Parameters
featuresFeatures of images
pairwise_matchesPairwise matches of images
camerasEstimated camera parameters
Returns
True in case of success, false otherwise

Implements cv::detail::Estimator.

virtual void cv::detail::BundleAdjusterBase::obtainRefinedCameraParams ( std::vector< CameraParams > &  cameras) const
protectedpure virtual

Gets the refined camera parameters.

Parameters
camerasRefined camera parameters
const Mat cv::detail::BundleAdjusterBase::refinementMask ( ) const
inline
void cv::detail::BundleAdjusterBase::setConfThresh ( double  conf_thresh)
inline
void cv::detail::BundleAdjusterBase::setRefinementMask ( const Mat mask)
inline
void cv::detail::BundleAdjusterBase::setTermCriteria ( const TermCriteria term_criteria)
inline
virtual void cv::detail::BundleAdjusterBase::setUpInitialCameraParams ( const std::vector< CameraParams > &  cameras)
protectedpure virtual

Sets initial camera parameter to refine.

Parameters
camerasCamera parameters
TermCriteria cv::detail::BundleAdjusterBase::termCriteria ( )
inline

Member Data Documentation

Mat cv::detail::BundleAdjusterBase::cam_params_
protected
double cv::detail::BundleAdjusterBase::conf_thresh_
protected
std::vector<std::pair<int,int> > cv::detail::BundleAdjusterBase::edges_
protected
const ImageFeatures* cv::detail::BundleAdjusterBase::features_
protected
int cv::detail::BundleAdjusterBase::num_errs_per_measurement_
protected
int cv::detail::BundleAdjusterBase::num_images_
protected
int cv::detail::BundleAdjusterBase::num_params_per_cam_
protected
const MatchesInfo* cv::detail::BundleAdjusterBase::pairwise_matches_
protected
Mat cv::detail::BundleAdjusterBase::refinement_mask_
protected
TermCriteria cv::detail::BundleAdjusterBase::term_criteria_
protected
int cv::detail::BundleAdjusterBase::total_num_matches_
protected

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