Skip to content

Commit c15d98b

Browse files
committed
Fix opencv#4
1 parent f5ea113 commit c15d98b

File tree

4 files changed

+21
-23
lines changed

4 files changed

+21
-23
lines changed

modules/datasets/include/opencv2/datasets/track_alov.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ class CV_EXPORTS TRACK_alov : public Dataset
7676
static Ptr<TRACK_alov> create();
7777

7878
virtual void load(const std::string &path) = 0;
79-
80-
//Load only frames with annotations (~every 5-th frame)
79+
80+
//Load only frames with annotations (~every 5-th frame)
8181
virtual void loadAnnotatedOnly(const std::string &path) = 0;
8282

8383
virtual int getDatasetsNum() = 0;
@@ -89,8 +89,8 @@ class CV_EXPORTS TRACK_alov : public Dataset
8989
virtual bool getNextFrame(Mat &frame) = 0;
9090
virtual vector <Point2f> getNextGT() = 0;
9191

92-
//Get frame/GT by datasetID (1..N) frameID (1..K)
93-
virtual bool getFrame(Mat &frame, int datasetID, int frameID) = 0;
92+
//Get frame/GT by datasetID (1..N) frameID (1..K)
93+
virtual bool getFrame(Mat &frame, int datasetID, int frameID) = 0;
9494
virtual vector <Point2f> getGT(int datasetID, int frameID) = 0;
9595

9696
protected:

modules/datasets/src/track_alov.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ namespace cv
158158
//Load frames
159159
//Loop for all sections of ALOV300++ (14 sections)
160160
for (int i = 0; i < 14; i++)
161-
{
161+
{
162162
//Loop for all videos in section
163163
for (int k = 0; k < sectionSizes[i]; k++)
164164
{
165165
vector <Ptr<TRACK_alovObj> > objects;
166-
166+
167167
//Make a list of datasets lengths
168168
int currFrameID = 0;
169169

@@ -177,8 +177,8 @@ namespace cv
177177
//Make ALOV300++ Object
178178
Ptr<TRACK_alovObj> currObj(new TRACK_alovObj);
179179
currObj->imagePath = fullPath;
180-
currObj->id = currFrameID;
181-
180+
currObj->id = currFrameID;
181+
182182
currObj->gtbb.push_back(Point2d(0, 0));
183183
currObj->gtbb.push_back(Point2d(0, 0));
184184
currObj->gtbb.push_back(Point2d(0, 0));
@@ -222,7 +222,7 @@ namespace cv
222222
do
223223
{
224224
//Make ALOV300++ Object
225-
string tmp;
225+
string tmp;
226226

227227
getline(annoList, tmp);
228228
std::istringstream in(tmp);
@@ -239,7 +239,7 @@ namespace cv
239239
} while (!annoList.eof());
240240
}
241241
}
242-
242+
243243
return;
244244
}
245245

@@ -266,13 +266,12 @@ namespace cv
266266
{
267267
printf("Error: Can't open annotation file *.ANN!!!\n");
268268
break;
269-
}
270-
271-
bool trFLG = true;
269+
}
270+
272271
int framesNum = 0;
273272

274273
do
275-
{
274+
{
276275
//Make ALOV300++ Object
277276
Ptr<TRACK_alovObj> currObj(new TRACK_alovObj);
278277
string tmp;
@@ -344,7 +343,7 @@ namespace cv
344343
}
345344

346345
bool TRACK_alovImpl::getNextFrame(Mat &frame)
347-
{
346+
{
348347
if (frameCounter >= (int)data[activeDatasetID - 1].size())
349348
return false;
350349
string imgPath = data[activeDatasetID - 1][frameCounter]->imagePath;

modules/tracking/src/gtrUtils.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace cv
4747
namespace gtr
4848
{
4949
double generateRandomLaplacian(double b, double m)
50-
{
50+
{
5151
double t = (double)rand() / (RAND_MAX);
5252
double n = (double)rand() / (RAND_MAX);
5353

@@ -78,7 +78,7 @@ namespace cv
7878
Rect2f targetPatchRect, searchPatchRect;
7979
Mat targetPatch, searchPatch;
8080

81-
//Crop Target Patch
81+
//Crop Target Patch
8282

8383
//Previous frame GTBBs center
8484
prevCenter.x = prevBB.x + prevBB.width / 2.0;
@@ -88,7 +88,7 @@ namespace cv
8888
targetPatchRect.y = prevCenter.y - prevBB.height*padTarget / 2.0;
8989
targetPatchRect.width = prevBB.width*padTarget;
9090
targetPatchRect.height = prevBB.height*padTarget;
91-
91+
9292
targetPatch = prevFrame(targetPatchRect);
9393

9494

@@ -116,7 +116,7 @@ namespace cv
116116
searchPatchRect.height = prevBB.height*padSearch*ds;
117117
searchPatchRect.x = currCenter.x + dx - searchPatchRect.width / 2;
118118
searchPatchRect.y = currCenter.y + dy - searchPatchRect.height / 2;
119-
119+
120120
searchPatch = currFrame(searchPatchRect);
121121

122122
//Calculate Relative GTBB in search patch
@@ -136,8 +136,7 @@ namespace cv
136136

137137
return trainingSamples;
138138
}
139-
139+
140140
vector <TrainingSample> gatherImageSamples();
141141
}
142142
}
143-

modules/tracking/src/gtrUtils.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace cv
2323
const double padTarget = 2.0;
2424
const double padSearch = 2.0;
2525

26-
//Scale parameters for Lablace distribution for Translation/Scale
26+
//Scale parameters for Lablace distribution for Translation/Scale
2727
const double bX = 1.0/5;
2828
const double bY = 1.0 / 5;
2929
const double bS = 1.0/15;
@@ -54,7 +54,7 @@ namespace cv
5454
//Make a batch for training
5555
vector <TrainingSample> makeBatch();
5656

57-
//Gather samples from random video frame
57+
//Gather samples from random video frame
5858
vector <TrainingSample> gatherFrameSamples(Mat prevFrame, Mat currFrame, Rect2f prevBB, Rect2f currBB);
5959

6060
//Gather samples from random still image

0 commit comments

Comments
 (0)