Commit 603fb880 authored by Vladimir's avatar Vladimir

Fixed Warnings #1

parent 303c1c50
...@@ -48,7 +48,7 @@ namespace cv ...@@ -48,7 +48,7 @@ namespace cv
{ {
namespace tld namespace tld
{ {
CV_EXPORTS cv::Rect2d tld_InitDataset(int datasetInd, char* rootPath = "TLD_dataset"); CV_EXPORTS cv::Rect2d tld_InitDataset(int datasetInd, const char* rootPath = "TLD_dataset");
CV_EXPORTS cv::Mat tld_getNextDatasetFrame(); CV_EXPORTS cv::Mat tld_getNextDatasetFrame();
} }
} }
......
...@@ -93,7 +93,7 @@ static void onMouse(int event, int x, int y, int, void*) ...@@ -93,7 +93,7 @@ static void onMouse(int event, int x, int y, int, void*)
} }
} }
int main(int argc, char** argv) int main()
{ {
// //
// "MIL", "BOOSTING", "MEDIANFLOW", "TLD" // "MIL", "BOOSTING", "MEDIANFLOW", "TLD"
...@@ -152,12 +152,12 @@ int main(int argc, char** argv) ...@@ -152,12 +152,12 @@ int main(int argc, char** argv)
int frameCounter = 0; int frameCounter = 0;
//Time measurment //Time measurment
float e3 = getTickCount(); int64 e3 = getTickCount();
for (;;) for (;;)
{ {
//Time measurment //Time measurment
float e1 = getTickCount(); int64 e1 = getTickCount();
//Frame num //Frame num
frameCounter++; frameCounter++;
if (frameCounter == NUM_TEST_FRAMES) break; if (frameCounter == NUM_TEST_FRAMES) break;
...@@ -208,18 +208,18 @@ int main(int argc, char** argv) ...@@ -208,18 +208,18 @@ int main(int argc, char** argv)
//Time measurment //Time measurment
float e2 = getTickCount(); int64 e2 = getTickCount();
float t1 = (e2 - e1) / getTickFrequency(); double t1 = (e2 - e1) / getTickFrequency();
cout << frameCounter << "\tframe : " << t1 * 1000 << "ms" << endl; cout << frameCounter << "\tframe : " << t1 * 1000.0 << "ms" << endl;
//waitKey(0); //waitKey(0);
} }
} }
//Time measurment //Time measurment
float e4 = getTickCount(); int64 e4 = getTickCount();
float t2 = (e4 - e3) / getTickFrequency(); double t2 = (e4 - e3) / getTickFrequency();
cout << "Average Time for Frame: " << t2 * 1000 / frameCounter << "ms" << endl; cout << "Average Time for Frame: " << t2 * 1000.0 / frameCounter << "ms" << endl;
cout << "Average FPS: " << 1.0 / t2*frameCounter << endl; cout << "Average FPS: " << 1.0 / t2*frameCounter << endl;
......
...@@ -49,7 +49,7 @@ namespace cv ...@@ -49,7 +49,7 @@ namespace cv
int frameNum = 0; int frameNum = 0;
bool flagPNG = false; bool flagPNG = false;
cv::Rect2d tld_InitDataset(int datasetInd, char* rootPath) cv::Rect2d tld_InitDataset(int datasetInd,const char* rootPath)
{ {
char* folderName = ""; char* folderName = "";
int x, y, w, h; int x, y, w, h;
......
...@@ -263,11 +263,11 @@ namespace cv ...@@ -263,11 +263,11 @@ namespace cv
(*proxyN)++; (*proxyN)++;
} }
void TrackerTLDModel::printme(FILE* port) void TrackerTLDModel::printme(FILE* port)
{ {
//dfprintf((port, "TrackerTLDModel:\n")); dfprintf((port, "TrackerTLDModel:\n"));
//dfprintf((port, "\tpositiveExamples.size() = %d\n", (int)positiveExamples.size())); dfprintf((port, "\tpositiveExamples.size() = %d\n", (int)positiveExamples.size()));
//dfprintf((port, "\tnegativeExamples.size() = %d\n", (int)negativeExamples.size())); dfprintf((port, "\tnegativeExamples.size() = %d\n", (int)negativeExamples.size()));
} }
......
...@@ -89,9 +89,7 @@ bool TrackerTLDImpl::initImpl(const Mat& image, const Rect2d& boundingBox) ...@@ -89,9 +89,7 @@ bool TrackerTLDImpl::initImpl(const Mat& image, const Rect2d& boundingBox)
myBoundingBox.width *= scale; myBoundingBox.width *= scale;
myBoundingBox.height *= scale; myBoundingBox.height *= scale;
} }
model = Ptr<TrackerTLDModel>(new TrackerTLDModel(params, image_gray, myBoundingBox, data->getMinSize())); model = Ptr<TrackerTLDModel>(new TrackerTLDModel(params, image_gray, myBoundingBox, data->getMinSize()));
TrackerTLDModel* tldModel = ((TrackerTLDModel*)static_cast<TrackerModel*>(model));
data->confident = false; data->confident = false;
data->failedLastTime = false; data->failedLastTime = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment