BinocularPolyFit.h 849 Bytes
Newer Older
Thiago Santini's avatar
Thiago Santini committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#ifndef BINOCULARPOLYFIT_H
#define BINOCULARPOLYFIT_H

#include "PolyFit.h"

class BinocularPolyFit : public PolyFit {
public:
    BinocularPolyFit(const PlType& plType);
    bool calibrate(std::vector<CollectionTuple>& calibrationTuples, QString& errorMsg) override;
    std::string description() const override;

private:
    void estimateBinocular2d(const DataTuple& tuple, GazeEstimate& left, GazeEstimate& right, GazeEstimate& binocular) override;
    int binocularUnknowns;
    bool binocularCalibrated;

    cv::Mat1d bcx;
    cv::Mat1d bcy;

    bool calibrate(const PlType& type, const cv::Mat& lx, const cv::Mat& ly, const cv::Mat& rx, const cv::Mat& ry, const cv::Mat& z, cv::Mat1d& c, QString& errorMsg);
21
    bool calibrateWithInliers(std::vector<CollectionTuple>& calibrationTuples, QString& errorMsg);
Thiago Santini's avatar
Thiago Santini committed
22 23 24
};

#endif // BINOCULARPOLYFIT_H