diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-25 11:43:10 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-25 11:43:10 +0200 |
commit | 10ac081b3c4ebb9b29b81b30f5efe6622f4212bc (patch) | |
tree | fedfe7efc494145d0b46e91ba5a94c47cb0c1b6f /ftnoir_tracker_aruco | |
parent | 6baa8ca1070612e5d7cbae7aa62cbe4a9e51ad40 (diff) | |
parent | 24538cf3a3a91481851618791b11be81437563e4 (diff) |
Merge branch 'unstable' into trackhat-ui
Diffstat (limited to 'ftnoir_tracker_aruco')
-rw-r--r-- | ftnoir_tracker_aruco/ar_video_widget.cpp | 2 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 2 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/include/board.h | 2 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/include/boarddetector.h | 3 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/include/cameraparameters.h | 3 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/include/marker.h | 2 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/include/markerdetector.h | 3 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/trans_calib.cpp | 16 |
8 files changed, 14 insertions, 19 deletions
diff --git a/ftnoir_tracker_aruco/ar_video_widget.cpp b/ftnoir_tracker_aruco/ar_video_widget.cpp index 70c26e55..1c3af262 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.cpp +++ b/ftnoir_tracker_aruco/ar_video_widget.cpp @@ -7,8 +7,6 @@ #include "ar_video_widget.h" -using namespace std; - void ArucoVideoWidget::update_image(const cv::Mat& frame) { QMutexLocker foo(&mtx); diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 05f3e3a4..08ddd3b2 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -17,7 +17,7 @@ #include <opencv2/highgui/highgui.hpp> #include <opencv2/videoio.hpp> #include "opentrack/camera-names.hpp" -#include "opentrack/sleep.hpp" +#include "opentrack-compat/sleep.hpp" typedef struct { int width; diff --git a/ftnoir_tracker_aruco/include/board.h b/ftnoir_tracker_aruco/include/board.h index c1d79292..ec7dd43f 100644 --- a/ftnoir_tracker_aruco/include/board.h +++ b/ftnoir_tracker_aruco/include/board.h @@ -32,8 +32,8 @@ or implied, of Rafael Muñoz Salinas. #include <vector> #include "exports.h" #include "marker.h" -using namespace std; namespace aruco { +using namespace std; /** * 3d representation of a marker */ diff --git a/ftnoir_tracker_aruco/include/boarddetector.h b/ftnoir_tracker_aruco/include/boarddetector.h index a0ee2361..619b4798 100644 --- a/ftnoir_tracker_aruco/include/boarddetector.h +++ b/ftnoir_tracker_aruco/include/boarddetector.h @@ -32,11 +32,10 @@ or implied, of Rafael Muñoz Salinas. #include "board.h" #include "cameraparameters.h" #include "markerdetector.h" -using namespace std; namespace aruco { - +using namespace std; /**\brief This class detects AR boards * Version 1.2 * There are two modes for board detection. diff --git a/ftnoir_tracker_aruco/include/cameraparameters.h b/ftnoir_tracker_aruco/include/cameraparameters.h index a419afbe..083d5f96 100644 --- a/ftnoir_tracker_aruco/include/cameraparameters.h +++ b/ftnoir_tracker_aruco/include/cameraparameters.h @@ -30,9 +30,10 @@ or implied, of Rafael Muñoz Salinas. #include "exports.h" #include <opencv2/core/core.hpp> #include <string> -using namespace std; + namespace aruco { +using namespace std; /**\brief Parameters of the camera */ diff --git a/ftnoir_tracker_aruco/include/marker.h b/ftnoir_tracker_aruco/include/marker.h index 89961002..efc3e5fe 100644 --- a/ftnoir_tracker_aruco/include/marker.h +++ b/ftnoir_tracker_aruco/include/marker.h @@ -32,8 +32,8 @@ or implied, of Rafael Muñoz Salinas. #include <opencv2/core/core.hpp> #include "exports.h" #include "cameraparameters.h" -using namespace std; namespace aruco { +using namespace std; /**\brief This class represents a marker. It is a vector of the fours corners ot the marker * */ diff --git a/ftnoir_tracker_aruco/include/markerdetector.h b/ftnoir_tracker_aruco/include/markerdetector.h index 8a351f7c..ac120b18 100644 --- a/ftnoir_tracker_aruco/include/markerdetector.h +++ b/ftnoir_tracker_aruco/include/markerdetector.h @@ -33,11 +33,10 @@ or implied, of Rafael Muñoz Salinas. #include "cameraparameters.h" #include "exports.h" #include "marker.h" -using namespace std; namespace aruco { - +using namespace std; /**\brief Main class for marker detection * */ diff --git a/ftnoir_tracker_aruco/trans_calib.cpp b/ftnoir_tracker_aruco/trans_calib.cpp index a562763a..176cf24c 100644 --- a/ftnoir_tracker_aruco/trans_calib.cpp +++ b/ftnoir_tracker_aruco/trans_calib.cpp @@ -7,8 +7,6 @@ #include "trans_calib.h" -using namespace cv; - //----------------------------------------------------------------------------- TranslationCalibrator::TranslationCalibrator() { @@ -17,13 +15,13 @@ TranslationCalibrator::TranslationCalibrator() void TranslationCalibrator::reset() { - P = Matx66f::zeros(); - y = Vec6f(0,0,0, 0,0,0); + P = cv::Matx66f::zeros(); + y = cv::Vec6f(0,0,0, 0,0,0); } -void TranslationCalibrator::update(const Matx33d& R_CM_k, const Vec3d& t_CM_k) +void TranslationCalibrator::update(const cv::Matx33d& R_CM_k, const cv::Vec3d& t_CM_k) { - Matx<double, 6,3> H_k_T = Matx<double, 6,3>::zeros(); + cv::Matx<double, 6,3> H_k_T = cv::Matx<double, 6,3>::zeros(); for (int i=0; i<3; ++i) { for (int j=0; j<3; ++j) { H_k_T(i,j) = R_CM_k(j,i); @@ -37,8 +35,8 @@ void TranslationCalibrator::update(const Matx33d& R_CM_k, const Vec3d& t_CM_k) y += H_k_T * t_CM_k; } -Vec3f TranslationCalibrator::get_estimate() +cv::Vec3f TranslationCalibrator::get_estimate() { - Vec6f x = P.inv() * y; - return Vec3f(x[0], x[1], x[2]); + cv::Vec6f x = P.inv() * y; + return cv::Vec3f(x[0], x[1], x[2]); } |