mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 21:40:49 +08:00
Fixed Warnings #1
This commit is contained in:
@@ -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*)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
|||||||
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)
|
|||||||
|
|
||||||
|
|
||||||
//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
|
|||||||
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;
|
||||||
|
@@ -265,9 +265,9 @@ namespace cv
|
|||||||
|
|
||||||
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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -90,8 +90,6 @@ bool TrackerTLDImpl::initImpl(const Mat& image, const Rect2d& boundingBox)
|
|||||||
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;
|
||||||
|
Reference in New Issue
Block a user