Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
d1efcd94
Commit
d1efcd94
authored
Apr 07, 2016
by
Fm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added options for corellation tracker
parent
71af6f48
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
correlation_tracker.h
dlib/image_processing/correlation_tracker.h
+11
-11
No files found.
dlib/image_processing/correlation_tracker.h
View file @
d1efcd94
...
...
@@ -138,36 +138,36 @@ namespace dlib
// use the current filter to predict the object's location
G
=
0
;
for
(
unsigned
long
i
=
0
;
i
<
F
.
size
();
++
i
)
G
+=
pointwise_multiply
(
F
[
i
],
conj
(
A
[
i
]));
G
=
pointwise_multiply
(
G
,
reciprocal
(
B
+
get_regularizer_space
()));
G
+=
pointwise_multiply
(
F
[
i
],
conj
(
A
[
i
]));
G
=
pointwise_multiply
(
G
,
reciprocal
(
B
+
get_regularizer_space
()));
ifft_inplace
(
G
);
const
dlib
::
vector
<
double
,
2
>
pp
=
max_point_interpolated
(
real
(
G
));
const
dlib
::
vector
<
double
,
2
>
pp
=
max_point_interpolated
(
real
(
G
));
// Compute the peak to side lobe ratio.
const
point
p
=
pp
;
running_stats
<
double
>
rs
;
const
rectangle
peak
=
centered_rect
(
p
,
8
,
8
);
const
rectangle
peak
=
centered_rect
(
p
,
8
,
8
);
for
(
long
r
=
0
;
r
<
G
.
nr
();
++
r
)
{
for
(
long
c
=
0
;
c
<
G
.
nc
();
++
c
)
{
if
(
!
peak
.
contains
(
point
(
c
,
r
)))
rs
.
add
(
G
(
r
,
c
).
real
());
if
(
!
peak
.
contains
(
point
(
c
,
r
)))
rs
.
add
(
G
(
r
,
c
).
real
());
}
}
const
double
psr
=
(
G
(
p
.
y
(),
p
.
x
()).
real
()
-
rs
.
mean
())
/
rs
.
stddev
();
const
double
psr
=
(
G
(
p
.
y
(),
p
.
x
()).
real
()
-
rs
.
mean
())
/
rs
.
stddev
();
// update the position of the object
position
=
translate_rect
(
guess
,
tform
(
pp
)
-
center
(
guess
));
position
=
translate_rect
(
guess
,
tform
(
pp
)
-
center
(
guess
));
// now update the position filters
make_target_location_image
(
pp
,
G
);
B
*=
(
1
-
get_nu_space
());
B
*=
(
1
-
get_nu_space
());
for
(
unsigned
long
i
=
0
;
i
<
F
.
size
();
++
i
)
{
A
[
i
]
=
get_nu_space
()
*
pointwise_multiply
(
G
,
F
[
i
])
+
(
1
-
get_nu_space
())
*
A
[
i
];
B
+=
get_nu_space
()
*
(
squared
(
real
(
F
[
i
]))
+
squared
(
imag
(
F
[
i
])));
A
[
i
]
=
get_nu_space
()
*
pointwise_multiply
(
G
,
F
[
i
])
+
(
1
-
get_nu_space
())
*
A
[
i
];
B
+=
get_nu_space
()
*
(
squared
(
real
(
F
[
i
]))
+
squared
(
imag
(
F
[
i
])));
}
return
psr
;
...
...
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