Commit 584d510e authored by Vladimir's avatar Vladimir

Fixes in modules/datasets/src/track_vot.cpp

parent 1e7d9e05
...@@ -107,8 +107,8 @@ namespace cv ...@@ -107,8 +107,8 @@ namespace cv
void TRACK_votImpl::loadDataset(const string &rootPath) void TRACK_votImpl::loadDataset(const string &rootPath)
{ {
ifstream namesList(rootPath + "/list.txt"); string nameListPath = rootPath + "/list.txt";
//ifstream lengthsList(rootPath + "/lengths.txt"); ifstream namesList(nameListPath.c_str());
vector <int> datasetsLengths; vector <int> datasetsLengths;
string datasetName; string datasetName;
...@@ -126,7 +126,8 @@ namespace cv ...@@ -126,7 +126,8 @@ namespace cv
Ptr<TRACK_votObj> currDataset(new TRACK_votObj); Ptr<TRACK_votObj> currDataset(new TRACK_votObj);
//Open dataset's ground truth file //Open dataset's ground truth file
ifstream gtList(rootPath + "/" + datasetName + "/groundtruth.txt"); string gtListPath = rootPath + "/" + datasetName + "/groundtruth.txt";
ifstream gtList(gtListPath.c_str());
if (!gtList.is_open()) if (!gtList.is_open())
cout << "Error to open groundtruth.txt!!!"; cout << "Error to open groundtruth.txt!!!";
...@@ -134,7 +135,7 @@ namespace cv ...@@ -134,7 +135,7 @@ namespace cv
int currFrameID = 1; int currFrameID = 1;
if (currDatasetID == 0) if (currDatasetID == 0)
cout << "VOT 2015 Dataset Initialization...\n"; cout << "VOT 2015 Dataset Initialization...\n";
bool trFLG = true;
do do
{ {
currFrameID++; currFrameID++;
...@@ -163,7 +164,7 @@ namespace cv ...@@ -163,7 +164,7 @@ namespace cv
//Add object to storage //Add object to storage
objects.push_back(currObj); objects.push_back(currObj);
} while (true); } while (trFLG);
datasetsLengths.push_back(currFrameID - 1); datasetsLengths.push_back(currFrameID - 1);
data.push_back(objects); data.push_back(objects);
......
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