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
237ca817
Commit
237ca817
authored
Jun 09, 2015
by
Vladimir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Warnings #3
parent
15da8085
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
tldDetector.cpp
modules/tracking/src/tldDetector.cpp
+3
-3
tldDetector.hpp
modules/tracking/src/tldDetector.hpp
+1
-1
tldModel.cpp
modules/tracking/src/tldModel.cpp
+1
-1
No files found.
modules/tracking/src/tldDetector.cpp
View file @
237ca817
...
...
@@ -159,7 +159,7 @@ namespace cv
{
LabeledPatch
labPatch
;
total
++
;
if
(
!
patchVariance
(
intImgP
,
intImgP2
,
originalVariance
,
Point
(
dx
*
i
,
dy
*
j
),
initSize
))
if
(
!
patchVariance
(
intImgP
,
intImgP2
,
originalVariance
Ptr
,
Point
(
dx
*
i
,
dy
*
j
),
initSize
))
continue
;
if
(
ensembleClassifierNum
(
&
blurred_img
.
at
<
uchar
>
(
dy
*
j
,
dx
*
i
))
<=
ENSEMBLE_THRESHOLD
)
continue
;
...
...
@@ -209,7 +209,7 @@ namespace cv
// Computes the variance of subimage given by box, with the help of two integral
// images intImgP and intImgP2 (sum of squares), which should be also provided.
bool
TLDDetector
::
patchVariance
(
Mat_
<
double
>&
intImgP
,
Mat_
<
double
>&
intImgP2
,
double
*
originalVariance
,
Point
pt
,
Size
size
)
bool
TLDDetector
::
patchVariance
(
Mat_
<
double
>&
intImgP
,
Mat_
<
double
>&
intImgP2
,
double
*
originalVariance
Ptr
,
Point
pt
,
Size
size
)
{
int
x
=
(
pt
.
x
),
y
=
(
pt
.
y
),
width
=
(
size
.
width
),
height
=
(
size
.
height
);
CV_Assert
(
0
<=
x
&&
(
x
+
width
)
<
intImgP
.
cols
&&
(
x
+
width
)
<
intImgP2
.
cols
);
...
...
@@ -229,7 +229,7 @@ namespace cv
D
=
intImgP2
(
y
+
height
,
x
+
width
);
p2
=
(
A
+
D
-
B
-
C
)
/
(
width
*
height
);
return
((
p2
-
p
*
p
)
>
VARIANCE_THRESHOLD
*
*
originalVariance
);
return
((
p2
-
p
*
p
)
>
VARIANCE_THRESHOLD
*
*
originalVariance
Ptr
);
}
}
...
...
modules/tracking/src/tldDetector.hpp
View file @
237ca817
...
...
@@ -79,7 +79,7 @@ namespace cv
std
::
vector
<
TLDEnsembleClassifier
>
classifiers
;
std
::
vector
<
Mat_
<
uchar
>
>
*
positiveExamples
,
*
negativeExamples
;
std
::
vector
<
int
>
*
timeStampsPositive
,
*
timeStampsNegative
;
double
*
originalVariance
;
double
*
originalVariance
Ptr
;
static
void
generateScanGrid
(
int
rows
,
int
cols
,
Size
initBox
,
std
::
vector
<
Rect2d
>&
res
,
bool
withScaling
=
false
);
struct
LabeledPatch
...
...
modules/tracking/src/tldModel.cpp
View file @
237ca817
...
...
@@ -60,7 +60,7 @@ namespace cv
detector
->
negativeExamples
=
&
negativeExamples
;
detector
->
timeStampsPositive
=
&
timeStampsPositive
;
detector
->
timeStampsNegative
=
&
timeStampsNegative
;
detector
->
originalVariance
=
&
originalVariance_
;
detector
->
originalVariance
Ptr
=
&
originalVariance_
;
//Calculate the variance in initial BB
originalVariance_
=
variance
(
image
(
boundingBox
));
...
...
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