mirror of
https://github.com/YutaItoh/3D-Eye-Tracker.git
synced 2025-11-04 15:39:41 +08:00
Update eye_model_updater.h
This commit is contained in:
parent
bb4bf8c0cd
commit
530db2f9d9
@ -58,9 +58,13 @@ public:
|
|||||||
|
|
||||||
void render(cv::Mat &img);
|
void render(cv::Mat &img);
|
||||||
void reset_indices();
|
void reset_indices();
|
||||||
|
void rm_oldest_index();
|
||||||
|
|
||||||
bool search(int x, int y, cv::Vec2i &pt, float &dist);
|
bool search(int x, int y, cv::Vec2i &pt, float &dist);
|
||||||
bool is_initialized(){ return is_initialized_; };
|
bool is_initialized(){ return is_initialized_; };
|
||||||
|
std::vector<bool> taken_flags_;
|
||||||
|
std::vector<int> flag_order_;//keeps order in which flags are set to true
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Local variables initialized at the constructor
|
// Local variables initialized at the constructor
|
||||||
const int kSearchGridSize_;
|
const int kSearchGridSize_;
|
||||||
@ -72,9 +76,14 @@ protected:
|
|||||||
bool is_initialized_ = false;
|
bool is_initialized_ = false;
|
||||||
const int kN_ = 1;
|
const int kN_ = 1;
|
||||||
int sample_num_;
|
int sample_num_;
|
||||||
std::vector<bool> taken_flags_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class EyeMovementToolbox {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// 3D eye model fitting
|
// 3D eye model fitting
|
||||||
class EyeModelUpdater
|
class EyeModelUpdater
|
||||||
{
|
{
|
||||||
@ -83,12 +92,14 @@ public:
|
|||||||
EyeModelUpdater(double focal_length, double region_band_width, double region_step_epsilon);
|
EyeModelUpdater(double focal_length, double region_band_width, double region_step_epsilon);
|
||||||
|
|
||||||
bool add_observation(cv::Mat &image, sef::Ellipse2D<double> &pupil, std::vector<cv::Point2f> &pupil_inliers, bool force=false);
|
bool add_observation(cv::Mat &image, sef::Ellipse2D<double> &pupil, std::vector<cv::Point2f> &pupil_inliers, bool force=false);
|
||||||
|
bool update_observation(cv::Mat &image, sef::Ellipse2D<double> &pupil, std::vector<cv::Point2f> &pupil_inliers, bool force = false);
|
||||||
|
|
||||||
singleeyefitter::EyeModelFitter::Circle unproject(cv::Mat &img, sef::Ellipse2D<double> &el, std::vector<cv::Point2f> &inlier_pts);
|
singleeyefitter::EyeModelFitter::Circle unproject(cv::Mat &img, sef::Ellipse2D<double> &el, std::vector<cv::Point2f> &inlier_pts);
|
||||||
|
|
||||||
double compute_reliability(cv::Mat &img, sef::Ellipse2D<double> &el, std::vector<cv::Point2f> &inlier_pts);
|
double compute_reliability(cv::Mat &img, sef::Ellipse2D<double> &el, std::vector<cv::Point2f> &inlier_pts);
|
||||||
|
|
||||||
void render(cv::Mat &img, sef::Ellipse2D<double> &el, std::vector<cv::Point2f> &inlier_pts);
|
void render(cv::Mat &img, sef::Ellipse2D<double> &el, std::vector<cv::Point2f> &inlier_pts);
|
||||||
|
void EyeModelUpdater::getEyeVector(cv::Mat &img, sef::Ellipse2D<double> &el, std::vector<cv::Point2f> &inlier_pts, std::vector<double> &outPoints);
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
@ -100,6 +111,11 @@ public:
|
|||||||
size_t fitter_count(){ return fitter_count_; }
|
size_t fitter_count(){ return fitter_count_; }
|
||||||
size_t fitter_end_count(){ return fitter_max_count_; }
|
size_t fitter_end_count(){ return fitter_max_count_; }
|
||||||
void add_fitter_max_count(int n);
|
void add_fitter_max_count(int n);
|
||||||
|
void set_fitter_max_count(int n);
|
||||||
|
void rm_oldest_observation();
|
||||||
|
void force_rebuild_model();
|
||||||
|
int get_current_count();
|
||||||
|
int get_max_count();
|
||||||
const singleeyefitter::EyeModelFitter&fitter(){ return simple_fitter_; };
|
const singleeyefitter::EyeModelFitter&fitter(){ return simple_fitter_; };
|
||||||
protected:
|
protected:
|
||||||
// Local variables initialized at the constructor
|
// Local variables initialized at the constructor
|
||||||
@ -121,4 +137,4 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif // EYE_MODEL_UPDATER_H
|
#endif // EYE_MODEL_UPDATER_H
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user