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
55db2045
Commit
55db2045
authored
Jun 17, 2015
by
Kurnianggoro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing some indentations
parent
ab3015d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
25 deletions
+22
-25
trackerKCF.cpp
modules/tracking/src/trackerKCF.cpp
+22
-25
No files found.
modules/tracking/src/trackerKCF.cpp
View file @
55db2045
...
...
@@ -225,30 +225,28 @@ namespace cv{
// detection part
if
(
frame
>
0
){
//compute the gaussian kernel
if
(
params
.
compressFeature
){
compress
(
proj_mtx
,
x
,
x
);
compress
(
proj_mtx
,
z
,
zc
);
denseGaussKernel
(
params
.
sigma
,
x
,
zc
,
k
);
}
else
{
denseGaussKernel
(
params
.
sigma
,
x
,
z
,
k
);
}
// calculate filter response
if
(
params
.
splitCoeff
){
//compute the gaussian kernel
if
(
params
.
compressFeature
){
compress
(
proj_mtx
,
x
,
x
);
compress
(
proj_mtx
,
z
,
zc
);
denseGaussKernel
(
params
.
sigma
,
x
,
zc
,
k
);
}
else
denseGaussKernel
(
params
.
sigma
,
x
,
z
,
k
);
// calculate filter response
if
(
params
.
splitCoeff
)
calcResponse
(
alphaf
,
alphaf_den
,
k
,
response
);
}
else
{
else
calcResponse
(
alphaf
,
k
,
response
);
}
// extract the maximum response
minMaxLoc
(
response
,
&
minVal
,
&
maxVal
,
&
minLoc
,
&
maxLoc
);
roi
.
x
+=
(
maxLoc
.
x
-
roi
.
width
/
2
+
1
);
roi
.
y
+=
(
maxLoc
.
y
-
roi
.
height
/
2
+
1
);
// update the bounding box
boundingBox
.
x
=
(
resizeImage
?
roi
.
x
*
2
:
roi
.
x
)
+
boundingBox
.
width
/
2
;
boundingBox
.
y
=
(
resizeImage
?
roi
.
y
*
2
:
roi
.
y
)
+
boundingBox
.
height
/
2
;
// extract the maximum response
minMaxLoc
(
response
,
&
minVal
,
&
maxVal
,
&
minLoc
,
&
maxLoc
);
roi
.
x
+=
(
maxLoc
.
x
-
roi
.
width
/
2
+
1
);
roi
.
y
+=
(
maxLoc
.
y
-
roi
.
height
/
2
+
1
);
// update the bounding box
boundingBox
.
x
=
(
resizeImage
?
roi
.
x
*
2
:
roi
.
x
)
+
boundingBox
.
width
/
2
;
boundingBox
.
y
=
(
resizeImage
?
roi
.
y
*
2
:
roi
.
y
)
+
boundingBox
.
height
/
2
;
}
// extract the patch for learning purpose
...
...
@@ -256,11 +254,10 @@ namespace cv{
//update the training data
new_z
=
x
.
clone
();
if
(
frame
==
0
)
{
if
(
frame
==
0
)
z
=
x
.
clone
();
}
else
{
else
z
=
(
1.0
-
params
.
interp_factor
)
*
z
+
params
.
interp_factor
*
new_z
;
}
if
(
params
.
compressFeature
){
// feature compression
...
...
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