Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
d02e6472
Commit
d02e6472
authored
Nov 23, 2013
by
Davis King
Browse files
Slightly changed code to reduce the number of memory allocations
made during object detection.
parent
8e318190
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
dlib/image_processing/scan_fhog_pyramid.h
dlib/image_processing/scan_fhog_pyramid.h
+3
-2
No files found.
dlib/image_processing/scan_fhog_pyramid.h
View file @
d02e6472
...
@@ -374,6 +374,7 @@ namespace dlib
...
@@ -374,6 +374,7 @@ namespace dlib
else
else
{
{
saliency_image
.
clear
();
saliency_image
.
clear
();
array2d
<
float
>
scratch
;
// find the first filter to apply
// find the first filter to apply
unsigned
long
i
=
0
;
unsigned
long
i
=
0
;
...
@@ -385,9 +386,9 @@ namespace dlib
...
@@ -385,9 +386,9 @@ namespace dlib
for
(
unsigned
long
j
=
0
;
j
<
w
.
row_filters
[
i
].
size
();
++
j
)
for
(
unsigned
long
j
=
0
;
j
<
w
.
row_filters
[
i
].
size
();
++
j
)
{
{
if
(
saliency_image
.
size
()
==
0
)
if
(
saliency_image
.
size
()
==
0
)
area
=
spatially_filter_image_separable
(
feats
[
i
],
saliency_image
,
w
.
row_filters
[
i
][
j
],
w
.
col_filters
[
i
][
j
],
1
,
false
,
false
);
area
=
float_
spatially_filter_image_separable
(
feats
[
i
],
saliency_image
,
w
.
row_filters
[
i
][
j
],
w
.
col_filters
[
i
][
j
],
scratch
,
false
);
else
else
area
=
spatially_filter_image_separable
(
feats
[
i
],
saliency_image
,
w
.
row_filters
[
i
][
j
],
w
.
col_filters
[
i
][
j
],
1
,
false
,
true
);
area
=
float_
spatially_filter_image_separable
(
feats
[
i
],
saliency_image
,
w
.
row_filters
[
i
][
j
],
w
.
col_filters
[
i
][
j
],
scratch
,
true
);
}
}
}
}
if
(
saliency_image
.
size
()
==
0
)
if
(
saliency_image
.
size
()
==
0
)
...
...
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