Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
ecc71c32
Commit
ecc71c32
authored
Jun 25, 2015
by
Vladimir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing whitespaces
parent
1c70b5a0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
21 deletions
+16
-21
tldDetector.hpp
modules/tracking/src/tldDetector.hpp
+2
-3
tldEnsembleClassifier.cpp
modules/tracking/src/tldEnsembleClassifier.cpp
+5
-6
tldEnsembleClassifier.hpp
modules/tracking/src/tldEnsembleClassifier.hpp
+0
-2
tldModel.cpp
modules/tracking/src/tldModel.cpp
+3
-3
tldTracker.cpp
modules/tracking/src/tldTracker.cpp
+4
-4
tldTracker.hpp
modules/tracking/src/tldTracker.hpp
+1
-2
tldUtils.cpp
modules/tracking/src/tldUtils.cpp
+1
-1
No files found.
modules/tracking/src/tldDetector.hpp
View file @
ecc71c32
...
...
@@ -70,7 +70,6 @@ namespace cv
public
:
TLDDetector
(){}
~
TLDDetector
(){}
inline
double
ensembleClassifierNum
(
const
uchar
*
data
);
inline
void
prepareClassifiers
(
int
rowstep
);
double
Sr
(
const
Mat_
<
uchar
>&
patch
);
...
...
@@ -89,8 +88,8 @@ namespace cv
};
bool
detect
(
const
Mat
&
img
,
const
Mat
&
imgBlurred
,
Rect2d
&
res
,
std
::
vector
<
LabeledPatch
>&
patches
,
Size
initSize
);
protected
:
friend
class
MyMouseCallbackDEBUG
;
void
computeIntegralImages
(
const
Mat
&
img
,
Mat_
<
double
>&
intImgP
,
Mat_
<
double
>&
intImgP2
){
integral
(
img
,
intImgP
,
intImgP2
,
CV_64F
);
}
...
...
modules/tracking/src/tldEnsembleClassifier.cpp
View file @
ecc71c32
...
...
@@ -55,8 +55,7 @@ namespace cv
measurements
.
assign
(
meas
.
begin
()
+
beg
,
meas
.
begin
()
+
end
);
offset
.
assign
(
mpc
,
Point2i
(
0
,
0
));
}
// Calculate measure locations from 15x15 grid on minSize patches
// Calculate measure locations from 15x15 grid on minSize patches
void
TLDEnsembleClassifier
::
stepPrefSuff
(
std
::
vector
<
Vec4b
>&
arr
,
int
pos
,
int
len
,
int
gridSize
)
{
#if 0
...
...
@@ -92,7 +91,7 @@ namespace cv
}
#endif
}
// Calculate offsets for classifier
void
TLDEnsembleClassifier
::
prepareClassifier
(
int
rowstep
)
{
...
...
@@ -106,7 +105,7 @@ namespace cv
}
}
}
// Integrate patch into the Ensemble Classifier model
void
TLDEnsembleClassifier
::
integrate
(
const
Mat_
<
uchar
>&
patch
,
bool
isPositive
)
{
...
...
@@ -137,7 +136,7 @@ namespace cv
return
posNum
/
(
posNum
+
negNum
);
}
// Calculate the 13-bit fern index
// Calculate the 13-bit fern index
int
TLDEnsembleClassifier
::
codeFast
(
const
uchar
*
data
)
const
{
int
position
=
0
;
...
...
@@ -188,7 +187,7 @@ namespace cv
stepPrefSuff
(
measurements
,
2
,
size
.
height
,
gridSize
);
stepPrefSuff
(
measurements
,
3
,
size
.
height
,
gridSize
);
//Compile fern classifiers
//Compile fern classifiers
for
(
int
i
=
0
,
howMany
=
(
int
)
measurements
.
size
()
/
measurePerClassifier
;
i
<
howMany
;
i
++
)
classifiers
.
push_back
(
TLDEnsembleClassifier
(
measurements
,
i
*
measurePerClassifier
,
(
i
+
1
)
*
measurePerClassifier
));
...
...
modules/tracking/src/tldEnsembleClassifier.hpp
View file @
ecc71c32
...
...
@@ -65,6 +65,5 @@ namespace cv
int
lastStep_
;
};
}
}
\ No newline at end of file
modules/tracking/src/tldModel.cpp
View file @
ecc71c32
...
...
@@ -64,13 +64,12 @@ namespace cv
//Calculate the variance in initial BB
originalVariance_
=
variance
(
image
(
boundingBox
));
//Find the scale
double
scale
=
scaleAndBlur
(
image
,
cvRound
(
log
(
1.0
*
boundingBox
.
width
/
(
minSize
.
width
))
/
log
(
SCALE_STEP
)),
scaledImg
,
blurredImg
,
GaussBlurKernelSize
,
SCALE_STEP
);
GaussianBlur
(
image
,
image_blurred
,
GaussBlurKernelSize
,
0.0
);
TLDDetector
::
generateScanGrid
(
image
.
rows
,
image
.
cols
,
minSize_
,
scanGrid
);
getClosestN
(
scanGrid
,
Rect2d
(
boundingBox
.
x
/
scale
,
boundingBox
.
y
/
scale
,
boundingBox
.
width
/
scale
,
getClosestN
(
scanGrid
,
Rect2d
(
boundingBox
.
x
/
scale
,
boundingBox
.
y
/
scale
,
boundingBox
.
width
/
scale
,
boundingBox
.
height
/
scale
),
10
,
closest
);
Mat_
<
uchar
>
blurredPatch
(
minSize
);
...
...
@@ -271,7 +270,7 @@ namespace cv
}
}
}
\ No newline at end of file
modules/tracking/src/tldTracker.cpp
View file @
ecc71c32
...
...
@@ -89,7 +89,7 @@ bool TrackerTLDImpl::initImpl(const Mat& image, const Rect2d& boundingBox)
myBoundingBox
.
width
*=
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
()));
data
->
confident
=
false
;
data
->
failedLastTime
=
false
;
...
...
@@ -119,7 +119,7 @@ bool TrackerTLDImpl::updateImpl(const Mat& image, Rect2d& boundingBox)
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
Rect2d
tmpCandid
=
boundingBox
;
if
(
(
(
i
==
0
)
&&
!
data
->
failedLastTime
&&
trackerProxy
->
update
(
image
,
tmpCandid
)
)
||
if
(
(
(
i
==
0
)
&&
!
data
->
failedLastTime
&&
trackerProxy
->
update
(
image
,
tmpCandid
)
)
||
((
i
==
1
)
&&
(
tldModel
->
detector
->
detect
(
imageForDetector
,
image_blurred
,
tmpCandid
,
detectorResults
,
tldModel
->
getMinSize
()))))
{
candidates
.
push_back
(
tmpCandid
);
...
...
@@ -292,6 +292,6 @@ void Data::printme(FILE* port)
dfprintf
((
port
,
"
\t
minSize = %dx%d
\n
"
,
minSize
.
width
,
minSize
.
height
));
}
}
}
}
}
modules/tracking/src/tldTracker.hpp
View file @
ecc71c32
...
...
@@ -49,7 +49,7 @@
#include<algorithm>
#include<limits.h>
namespace
cv
namespace
cv
{
TrackerTLD
::
Params
::
Params
(){}
...
...
@@ -60,7 +60,6 @@ void TrackerTLD::Params::write(cv::FileStorage& /*fs*/) const {}
namespace
tld
{
class
TrackerProxy
{
...
...
modules/tracking/src/tldUtils.cpp
View file @
ecc71c32
...
...
@@ -42,7 +42,7 @@
#include "tldUtils.hpp"
namespace
cv
namespace
cv
{
namespace
tld
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment