summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_aruco
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-11-23 15:24:37 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-11-23 15:24:37 +0100
commite058bd379f452ba7ecce64625c4438279a668ba4 (patch)
treeb28940f58338d0af328476d83146590ded3b56e7 /ftnoir_tracker_aruco
parent104f23670b7c3c5a1091a45d513b32bf72040a19 (diff)
remove goto, hopefully fix osx
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'ftnoir_tracker_aruco')
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp13
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.h1
2 files changed, 3 insertions, 11 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
index 2fdd1014..0d93dba5 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
@@ -129,8 +129,6 @@ void Tracker::load_settings()
headpos[i] = iniFile.value(QString("headpos-%1").arg(i), 0).toDouble();
}
iniFile.endGroup();
-
- reset = true;
}
Tracker::Tracker()
@@ -144,7 +142,6 @@ Tracker::Tracker()
Tracker::~Tracker()
{
- QMutexLocker foo(&mtx);
stop = true;
wait();
if (videoWidget)
@@ -155,7 +152,6 @@ Tracker::~Tracker()
void Tracker::StartTracker(QFrame* videoframe)
{
- reset = false;
videoframe->show();
videoWidget = new ArucoVideoWidget(videoframe);
QHBoxLayout* layout = new QHBoxLayout();
@@ -176,8 +172,6 @@ void Tracker::StartTracker(QFrame* videoframe)
void Tracker::run()
{
-start:
- reset = false;
cv::VideoCapture camera(camera_index);
if (force_width)
@@ -214,10 +208,6 @@ start:
cv::Point2f last_centroid;
while (!stop)
{
- if (reset)
- {
- goto start;
- }
if (!camera.read(color_))
continue;
auto tm = cv::getTickCount();
@@ -364,6 +354,9 @@ start:
if (frame.rows > 0)
videoWidget->update_image(frame);
}
+ qDebug() << "releasing camera, brace for impact";
+ camera.release();
+ qDebug() << "all done!";
}
bool Tracker::GiveHeadPoseData(double *data)
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
index 9b9ff19d..097c91e1 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
@@ -40,7 +40,6 @@ private:
double pose[6];
cv::Mat frame;
double headpos[3];
- volatile bool reset;
};
// Widget that has controls for FTNoIR protocol client-settings.