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
166ff18c
Commit
166ff18c
authored
Jul 15, 2012
by
Davis King
Browse files
Made this code a little more efficient.
parent
2d086b45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
dlib/image_processing/scan_image.h
dlib/image_processing/scan_image.h
+2
-4
No files found.
dlib/image_processing/scan_image.h
View file @
166ff18c
...
@@ -172,8 +172,7 @@ namespace dlib
...
@@ -172,8 +172,7 @@ namespace dlib
{
{
const
typename
image_array_type
::
type
&
img
=
images
[
movable_rects
[
i
].
first
];
const
typename
image_array_type
::
type
&
img
=
images
[
movable_rects
[
i
].
first
];
assign_all_pixels
(
tempimg
,
0
);
sum_filter_assign
(
img
,
tempimg
,
movable_rects
[
i
].
second
);
sum_filter
(
img
,
tempimg
,
movable_rects
[
i
].
second
);
const
rectangle
rect
=
get_rect
(
tempimg
).
intersect
(
translate_rect
(
window
,
position
));
const
rectangle
rect
=
get_rect
(
tempimg
).
intersect
(
translate_rect
(
window
,
position
));
if
(
rect
.
is_empty
()
==
false
)
if
(
rect
.
is_empty
()
==
false
)
...
@@ -352,8 +351,7 @@ namespace dlib
...
@@ -352,8 +351,7 @@ namespace dlib
for
(
unsigned
long
i
=
0
;
i
<
movable_rects
.
size
();
++
i
)
for
(
unsigned
long
i
=
0
;
i
<
movable_rects
.
size
();
++
i
)
{
{
const
rectangle
rect
=
movable_rects
[
i
].
second
;
const
rectangle
rect
=
movable_rects
[
i
].
second
;
assign_all_pixels
(
temp
,
0
);
sum_filter_assign
(
images
[
movable_rects
[
i
].
first
],
temp
,
rect
);
sum_filter
(
images
[
movable_rects
[
i
].
first
],
temp
,
rect
);
max_filter
(
temp
,
accum
,
window
.
width
(),
window
.
height
(),
0
);
max_filter
(
temp
,
accum
,
window
.
width
(),
window
.
height
(),
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