summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-06-05 11:56:37 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-06-05 11:56:37 +0200
commit23afc7945f7058224b656c13572b2e97fc1da8b9 (patch)
treeb04ae66d7ff0bce55418ae884de16d06310acbf3 /ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
parent46c297050898737745ad0b620796df9de30b63eb (diff)
require opencv 3.0 and fix build
Diffstat (limited to 'ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp')
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
index 2447e24a..8188db90 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
@@ -15,6 +15,7 @@
#include "opentrack/plugin-api.hpp"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/videoio.hpp>
#include "opentrack/camera-names.hpp"
#include "opentrack/thread.hpp"
@@ -103,11 +104,11 @@ void Tracker::run()
camera = cv::VideoCapture(camera_name_to_index(s.camera_name));
if (res.width)
{
- camera.set(CV_CAP_PROP_FRAME_WIDTH, res.width);
- camera.set(CV_CAP_PROP_FRAME_HEIGHT, res.height);
+ camera.set(cv::CAP_PROP_FRAME_WIDTH, res.width);
+ camera.set(cv::CAP_PROP_FRAME_HEIGHT, res.height);
}
if (fps)
- camera.set(CV_CAP_PROP_FPS, fps);
+ camera.set(cv::CAP_PROP_FPS, fps);
aruco::MarkerDetector detector;
detector.setDesiredSpeed(3);
@@ -233,7 +234,7 @@ void Tracker::run()
obj_points.at<float>(x4,1)= size + s.headpos_y;
obj_points.at<float>(x4,2)= 0 + s.headpos_z;
- cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, false, CV_ITERATIVE);
+ cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, false, cv::SOLVEPNP_ITERATIVE);
std::vector<cv::Point2f> roi_projection(4);
@@ -257,7 +258,7 @@ void Tracker::run()
}
cv::Mat rvec_, tvec_;
- cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec_, tvec_, false, CV_ITERATIVE);
+ cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec_, tvec_, false, cv::SOLVEPNP_ITERATIVE);
cv::Mat roi_points = obj_points * c_search_window;
cv::projectPoints(roi_points, rvec_, tvec_, intrinsics, dist_coeffs, roi_projection);