summaryrefslogtreecommitdiffhomepage
path: root/tracker-easy/tracker-easy.h
diff options
context:
space:
mode:
authorStéphane Lenclud <github@lenclud.com>2019-04-15 13:03:23 +0200
committerStéphane Lenclud <github@lenclud.com>2019-04-24 18:46:12 +0200
commit5e2f6182f41d7c027f58b110bc8c6e539a50ac2c (patch)
tree641fea105a557b34eac09f07d4ab6c92f50242e7 /tracker-easy/tracker-easy.h
parent6ca96478ea4d8e6ba71ebf41a1f7d904f2c3df5d (diff)
Easy Tracker: Improved solver managements of data structures.
Diffstat (limited to 'tracker-easy/tracker-easy.h')
-rw-r--r--tracker-easy/tracker-easy.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/tracker-easy/tracker-easy.h b/tracker-easy/tracker-easy.h
index 8b771c67..00e24811 100644
--- a/tracker-easy/tracker-easy.h
+++ b/tracker-easy/tracker-easy.h
@@ -37,6 +37,7 @@ namespace EasyTracker
struct Tracker : QThread, ITracker
{
+ public:
friend class Dialog;
explicit Tracker();
@@ -44,10 +45,11 @@ namespace EasyTracker
module_status start_tracker(QFrame* parent_window) override;
void data(double* data) override;
bool center() override;
-
- int get_n_points();
-
+
private:
+ void CreateModelFromSettings();
+ void CreateCameraIntrinsicsMatrices();
+
void run() override;
bool maybe_reopen_camera();
@@ -73,10 +75,17 @@ namespace EasyTracker
cv::Mat iMatFrame;
Preview iPreview;
- std::atomic<unsigned> point_count{ 0 };
std::atomic<bool> ever_success = false;
mutable QMutex center_lock, data_lock;
+ // Vertices defining the model we are tracking
+ std::vector<cv::Point3f> iModel;
+ // Bitmap points corresponding to model vertices
+ std::vector<cv::Point2f> iTrackedPoints;
+ // Intrinsics camera matrix
+ cv::Mat iCameraMatrix;
+ // Intrinsics distortion coefficients as a matrix
+ cv::Mat iDistCoeffsMatrix;
// Translation solutions
std::vector<cv::Mat> iTranslations;
// Rotation solutions