summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_aruco
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-24 14:08:44 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-24 14:11:07 +0200
commit7d0c58540103e9182ba584b440b91068df03a49c (patch)
tree21ab00a85b0c74d3dcb9064aa838136473b4c7ac /ftnoir_tracker_aruco
parent948fb5ef0ffd6a83675763d80053a433e09aea06 (diff)
standardize on not using "using namespace {cv,std}"
Diffstat (limited to 'ftnoir_tracker_aruco')
-rw-r--r--ftnoir_tracker_aruco/ar_video_widget.cpp2
-rw-r--r--ftnoir_tracker_aruco/include/board.h2
-rw-r--r--ftnoir_tracker_aruco/include/boarddetector.h3
-rw-r--r--ftnoir_tracker_aruco/include/cameraparameters.h3
-rw-r--r--ftnoir_tracker_aruco/include/marker.h2
-rw-r--r--ftnoir_tracker_aruco/include/markerdetector.h3
-rw-r--r--ftnoir_tracker_aruco/trans_calib.cpp16
7 files changed, 13 insertions, 18 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/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]);
}