#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];
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);
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();
// overwrite the template.
// とりあえず何も実装しないでやってみよう。上手く行かなかったら行かなかったで。
}
+
+}