diff options
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 11 | ||||
| -rw-r--r-- | ftnoir_tracker_ht/ht-api.h | 2 | ||||
| -rw-r--r-- | ftnoir_tracker_pt/point_extractor.cpp | 2 | 
4 files changed, 9 insertions, 8 deletions
| diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fbdfa87..4e5e6061 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)  set(CMAKE_AUTOMOC OFF)  set(CMAKE_POSITION_INDEPENDENT_CODE ON) -find_package(OpenCV) +find_package(OpenCV 3.0)  find_package(Qt5 REQUIRED COMPONENTS Core Xml Network Widgets Gui QUIET)  find_package(Qt5 COMPONENTS SerialPort QUIET) 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); diff --git a/ftnoir_tracker_ht/ht-api.h b/ftnoir_tracker_ht/ht-api.h index 2ab2e840..ed866e16 100644 --- a/ftnoir_tracker_ht/ht-api.h +++ b/ftnoir_tracker_ht/ht-api.h @@ -9,7 +9,7 @@  #if !defined(_WIN32) && !defined(_isnan)  #  define _isnan isnan  #endif -#include <opencv2/core/core.hpp> +#include <opencv2/core.hpp>  struct ht_context;  typedef struct ht_context headtracker_t; diff --git a/ftnoir_tracker_pt/point_extractor.cpp b/ftnoir_tracker_pt/point_extractor.cpp index 94096f9d..2c39c2e2 100644 --- a/ftnoir_tracker_pt/point_extractor.cpp +++ b/ftnoir_tracker_pt/point_extractor.cpp @@ -35,7 +35,7 @@ std::vector<Vec2f> PointExtractor::extract_points(Mat& frame)  	// convert to grayscale  	Mat frame_gray; -    cvtColor(frame, frame_gray, CV_RGB2GRAY); +    cvtColor(frame, frame_gray, cv::COLOR_RGB2GRAY);  	int secondary = s.threshold_secondary;      int primary = s.threshold; | 
