diff options
-rw-r--r-- | ftnoir_tracker_pt/boost-compat.h | 5 | ||||
-rw-r--r-- | ftnoir_tracker_pt/camera.h | 2 | ||||
-rw-r--r-- | ftnoir_tracker_pt/frame_observer.h | 6 | ||||
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 7 | ||||
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt.h | 4 | ||||
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp | 2 | ||||
-rw-r--r-- | ftnoir_tracker_pt/point_tracker.cpp | 1 | ||||
-rw-r--r-- | ftnoir_tracker_pt/point_tracker.h | 4 | ||||
-rw-r--r-- | ftnoir_tracker_pt/pt_video_widget.h | 2 |
9 files changed, 13 insertions, 20 deletions
diff --git a/ftnoir_tracker_pt/boost-compat.h b/ftnoir_tracker_pt/boost-compat.h deleted file mode 100644 index 612f2c4d..00000000 --- a/ftnoir_tracker_pt/boost-compat.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once -#include <memory> -namespace boost { - using std::shared_ptr; -} diff --git a/ftnoir_tracker_pt/camera.h b/ftnoir_tracker_pt/camera.h index ea68c387..a9f60841 100644 --- a/ftnoir_tracker_pt/camera.h +++ b/ftnoir_tracker_pt/camera.h @@ -12,7 +12,7 @@ #ifndef OPENTRACK_API
# include <boost/shared_ptr.hpp>
#else
-# include "FTNoIR_Tracker_PT/boost-compat.h"
+# include <memory> # include <opencv2/highgui/highgui.hpp>
# include <opencv2/highgui/highgui_c.h>
#endif
diff --git a/ftnoir_tracker_pt/frame_observer.h b/ftnoir_tracker_pt/frame_observer.h index 585a6ee7..c3c20259 100644 --- a/ftnoir_tracker_pt/frame_observer.h +++ b/ftnoir_tracker_pt/frame_observer.h @@ -13,7 +13,7 @@ #ifndef OPENTRACK_API
# include <boost/shared_ptr.hpp>
#else
-# include "FTNoIR_Tracker_PT/boost-compat.h"
+# include <memory> #endif
#include <set>
@@ -31,7 +31,7 @@ public: ~FrameProvider();
protected:
- virtual bool get_frame_and_points(cv::Mat& frame, boost::shared_ptr< std::vector<cv::Vec2f> >& points) = 0;
+ virtual bool get_frame_and_points(cv::Mat& frame, std::shared_ptr< std::vector<cv::Vec2f> >& points) = 0;
bool has_observers() const { QMutexLocker lock(&observer_mutex); return !frame_observers.empty(); }
@@ -58,7 +58,7 @@ public: if (provider) provider->remove_observer(this);
}
- bool get_frame_and_points(cv::Mat& frame, boost::shared_ptr< std::vector<cv::Vec2f> >& points) {
+ bool get_frame_and_points(cv::Mat& frame, std::shared_ptr< std::vector<cv::Vec2f> >& points) {
return provider ? provider->get_frame_and_points(frame, points) : false;
}
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index ef72f9a2..268abeab 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -14,7 +14,6 @@ using namespace std;
using namespace cv;
-using namespace boost;
//#define PT_PERF_LOG //log performance
@@ -139,7 +138,7 @@ void Tracker::apply_inner() {
cv::Vec3f M01(s.m01_x, s.m01_y, s.m01_z);
cv::Vec3f M02(s.m02_x, s.m02_y, s.m02_z);
- point_tracker.point_model = boost::shared_ptr<PointModel>(new PointModel(M01, M02));
+ point_tracker.point_model = std::shared_ptr<PointModel>(new PointModel(M01, M02));
}
point_tracker.dynamic_pose_resolution = s.dyn_pose_res;
point_tracker.dt_reset = s.reset_time / 1000.0;
@@ -172,14 +171,14 @@ void Tracker::center() X_GH_0 = R_GC * X_CM_0 * X_MH;
}
-bool Tracker::get_frame_and_points(cv::Mat& frame_copy, boost::shared_ptr< std::vector<Vec2f> >& points)
+bool Tracker::get_frame_and_points(cv::Mat& frame_copy, std::shared_ptr< std::vector<Vec2f> >& points)
{
QMutexLocker lock(&mutex);
if (frame.empty()) return false;
// copy the frame and points from the tracker thread
frame_copy = frame.clone();
- points = boost::shared_ptr< vector<Vec2f> >(new vector<Vec2f>(point_extractor.get_points()));
+ points = std::shared_ptr< vector<Vec2f> >(new vector<Vec2f>(point_extractor.get_points()));
return true;
}
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h index 79f16629..7e944fc2 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h @@ -29,7 +29,7 @@ #ifndef OPENTRACK_API
# include <boost/shared_ptr.hpp>
#else
-# include "FTNoIR_Tracker_PT/boost-compat.h"
+# include <memory> #endif
#include <vector>
@@ -56,7 +56,7 @@ public: protected:
// --- MutexedFrameProvider interface ---
- virtual bool get_frame_and_points(cv::Mat& frame, boost::shared_ptr< std::vector<cv::Vec2f> >& points);
+ virtual bool get_frame_and_points(cv::Mat& frame, std::shared_ptr< std::vector<cv::Vec2f> >& points);
// --- thread ---
QMutex mutex;
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp index c103b78c..00d10d13 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp @@ -13,7 +13,7 @@ #ifndef OPENTRACK_API
# include <boost/shared_ptr.hpp>
#else
-# include "FTNoIR_Tracker_PT/boost-compat.h"
+# include <memory> #endif
#include <vector>
diff --git a/ftnoir_tracker_pt/point_tracker.cpp b/ftnoir_tracker_pt/point_tracker.cpp index dfefdaf8..5735c081 100644 --- a/ftnoir_tracker_pt/point_tracker.cpp +++ b/ftnoir_tracker_pt/point_tracker.cpp @@ -14,7 +14,6 @@ #include <QDebug>
using namespace cv;
-using namespace boost;
using namespace std;
const float PI = 3.14159265358979323846f;
diff --git a/ftnoir_tracker_pt/point_tracker.h b/ftnoir_tracker_pt/point_tracker.h index 11034100..3ff9c724 100644 --- a/ftnoir_tracker_pt/point_tracker.h +++ b/ftnoir_tracker_pt/point_tracker.h @@ -12,7 +12,7 @@ #ifndef OPENTRACK_API
# include <boost/shared_ptr.hpp>
#else
-# include "FTNoIR_Tracker_PT/boost-compat.h"
+# include <memory> #endif
#include <list>
@@ -91,7 +91,7 @@ public: // f : (focal length)/(sensor width)
// dt : time since last call
bool track(const std::vector<cv::Vec2f>& points, float f, float dt);
- boost::shared_ptr<PointModel> point_model;
+ std::shared_ptr<PointModel> point_model;
bool dynamic_pose_resolution;
float dt_reset;
diff --git a/ftnoir_tracker_pt/pt_video_widget.h b/ftnoir_tracker_pt/pt_video_widget.h index 25d593c3..f7de4db8 100644 --- a/ftnoir_tracker_pt/pt_video_widget.h +++ b/ftnoir_tracker_pt/pt_video_widget.h @@ -16,7 +16,7 @@ # include <QGLWidget>
# include <boost/shared_ptr.hpp>
#else
-# include "FTNoIR_Tracker_PT/boost-compat.h"
+# include <memory> # if defined(_WIN32)
# include <dshow.h>
# endif
|