class cv::detail::BundleAdjusterAffine

Overview

Bundle adjuster that expects affine transformation represented in homogeneous coordinates in R for each camera param. Implements camera parameters refinement algorithm which minimizes sum of the reprojection error squares. Moreā€¦

#include <motion_estimators.hpp>

class BundleAdjusterAffine: public cv::detail::BundleAdjusterBase
{
};

Inherited Members

public:
    // methods

    bool
    operator()(
        const std::vector<ImageFeatures>& features,
        const std::vector<MatchesInfo>& pairwise_matches,
        std::vector<CameraParams>& cameras
        );

    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();

protected:
    // fields

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

    // methods

    virtual
    bool
    estimate(
        const std::vector<ImageFeatures>& features,
        const std::vector<MatchesInfo>& pairwise_matches,
        std::vector<CameraParams>& cameras
        ) = 0;

    virtual
    void
    calcError(Mat& err) = 0;

    virtual
    void
    calcJacobian(Mat& jac) = 0;

    virtual
    bool
    estimate(
        const std::vector<ImageFeatures>& features,
        const std::vector<MatchesInfo>& pairwise_matches,
        std::vector<CameraParams>& cameras
        );

    virtual
    void
    obtainRefinedCameraParams(std::vector<CameraParams>& cameras) const = 0;

    virtual
    void
    setUpInitialCameraParams(const std::vector<CameraParams>& cameras) = 0;

Detailed Documentation

Bundle adjuster that expects affine transformation represented in homogeneous coordinates in R for each camera param. Implements camera parameters refinement algorithm which minimizes sum of the reprojection error squares.

It estimates all transformation parameters. Refinement mask is ignored.

See also:

AffineBasedEstimator AffineBestOf2NearestMatcher BundleAdjusterAffinePartial