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
6acf4eac
Commit
6acf4eac
authored
Aug 09, 2011
by
Davis King
Browse files
Removed unneeded code.
parent
c1e03a2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
26 deletions
+6
-26
dlib/test/pyramid_down.cpp
dlib/test/pyramid_down.cpp
+6
-26
No files found.
dlib/test/pyramid_down.cpp
View file @
6acf4eac
...
...
@@ -91,26 +91,6 @@ void test_pyramid_down_rgb()
// ----------------------------------------------------------------------------
template
<
typename
image_type
,
typename
pixel_type
>
void
draw_rectangle
(
image_type
&
img
,
const
rectangle
&
rect
,
const
pixel_type
&
p
)
{
rectangle
area
=
rect
.
intersect
(
get_rect
(
img
));
for
(
long
r
=
area
.
top
();
r
<=
area
.
bottom
();
++
r
)
{
for
(
long
c
=
area
.
left
();
c
<=
area
.
right
();
++
c
)
{
assign_pixel
(
img
[
r
][
c
],
p
);
}
}
}
// ----------------------------------------------------------------------------
template
<
typename
image_type
>
rgb_pixel
mean_pixel
(
const
image_type
&
img
,
...
...
@@ -149,9 +129,9 @@ void test_pyramid_down_rgb2()
rectangle
rect2
=
centered_rect
(
100
,
100
,
34
,
42
);
rectangle
rect3
=
centered_rect
(
310
,
215
,
65
,
21
);
draw
_rect
angle
(
img
,
rect1
,
rgb_pixel
(
255
,
0
,
0
));
draw
_rect
angle
(
img
,
rect2
,
rgb_pixel
(
0
,
255
,
0
));
draw
_rect
angle
(
img
,
rect3
,
rgb_pixel
(
0
,
0
,
255
));
fill
_rect
(
img
,
rect1
,
rgb_pixel
(
255
,
0
,
0
));
fill
_rect
(
img
,
rect2
,
rgb_pixel
(
0
,
255
,
0
));
fill
_rect
(
img
,
rect3
,
rgb_pixel
(
0
,
0
,
255
));
...
...
@@ -236,9 +216,9 @@ void test_pyramid_down_grayscale2()
rectangle
rect2
=
centered_rect
(
100
,
100
,
34
,
42
);
rectangle
rect3
=
centered_rect
(
310
,
215
,
65
,
21
);
draw
_rect
angle
(
img
,
rect1
,
255
);
draw
_rect
angle
(
img
,
rect2
,
170
);
draw
_rect
angle
(
img
,
rect3
,
100
);
fill
_rect
(
img
,
rect1
,
255
);
fill
_rect
(
img
,
rect2
,
170
);
fill
_rect
(
img
,
rect3
,
100
);
...
...
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