OSDN Git Service

名前空間をよりわかりやすく、かつTGA右->左に対応
[paldema/paldema.git] / src / cpp / pdtracker.cpp
index 8d05108..1bac87d 100644 (file)
@@ -16,8 +16,9 @@
 
 #include "pdtracker.h"
 
+namespace pd {
 
-pd::Tracker::Tracker(pd::Video* video, CvPoint initialPoint, CvRect target, CvRect window,
+Tracker::Tracker(pd::Video* video, CvPoint initialPoint, CvRect target, CvRect window,
                      int trackingAlgorism, int channel) {
   this->video = video;
   this->points = new CvPoint[video->frames];
@@ -36,12 +37,12 @@ pd::Tracker::Tracker(pd::Video* video, CvPoint initialPoint, CvRect target, CvRe
   this->channel = channel;
 }
 
-pd::Tracker::~Tracker() {
+Tracker::~Tracker() {
   delete [] this->points;
   delete [] this->accuracies;
 }
 
-void pd::Tracker::start() {
+void Tracker::start() {
   if(this->_target != NULL) cvReleaseImage(&this->_target);
   if(this->_window != NULL) cvReleaseImage(&this->_window);
   
@@ -60,11 +61,11 @@ void pd::Tracker::start() {
   cvResetImageROI(this->_buffer);
 }
 
-void pd::Tracker::setZeroPosition() {
+void Tracker::setZeroPosition() {
   this->start(); //暫定的。
 }
 
-void pd::Tracker::next() {
+void Tracker::next() {
   if(this->_window != NULL) cvReleaseImage(&this->_window);
   
   this->_buffer = this->video->next();
@@ -97,3 +98,5 @@ void pd::Tracker::next() {
   // overwrite the template.
   // とりあえず何も実装しないでやってみよう。上手く行かなかったら行かなかったで。
 }
+
+}