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
55c1d6cd
Commit
55c1d6cd
authored
Jan 21, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified these examples slightly.
parent
cb578ea2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
object_detector_advanced_ex.cpp
examples/object_detector_advanced_ex.cpp
+1
-1
object_detector_ex.cpp
examples/object_detector_ex.cpp
+1
-1
surf_ex.cpp
examples/surf_ex.cpp
+5
-5
No files found.
examples/object_detector_advanced_ex.cpp
View file @
55c1d6cd
...
...
@@ -281,7 +281,7 @@ int main()
for
(
unsigned
long
j
=
0
;
j
<
rects
.
size
();
++
j
)
{
// Add each detection as a red box.
win
.
add_overlay
(
image_display
::
overlay_rect
(
rects
[
j
],
rgb_pixel
(
255
,
0
,
0
)
));
win
.
add_overlay
(
rects
[
j
],
rgb_pixel
(
255
,
0
,
0
));
}
cout
<<
"Hit enter to see the next image."
;
...
...
examples/object_detector_ex.cpp
View file @
55c1d6cd
...
...
@@ -216,7 +216,7 @@ int main()
for
(
unsigned
long
j
=
0
;
j
<
rects
.
size
();
++
j
)
{
// Add each detection as a red box.
win
.
add_overlay
(
image_display
::
overlay_rect
(
rects
[
j
],
rgb_pixel
(
255
,
0
,
0
)
));
win
.
add_overlay
(
rects
[
j
],
rgb_pixel
(
255
,
0
,
0
));
}
cout
<<
"Hit enter to see the next image."
;
...
...
examples/surf_ex.cpp
View file @
55c1d6cd
...
...
@@ -76,14 +76,14 @@ int main(int argc, char** argv)
const
point
p4
=
rotate_point
(
center
,
rect
.
br_corner
(),
ang
);
// Draw the sides of the box as red lines
my_window
.
add_overlay
(
image_window
::
overlay_line
(
p1
,
p2
,
rgb_pixel
(
255
,
0
,
0
)
));
my_window
.
add_overlay
(
image_window
::
overlay_line
(
p1
,
p3
,
rgb_pixel
(
255
,
0
,
0
)
));
my_window
.
add_overlay
(
image_window
::
overlay_line
(
p4
,
p2
,
rgb_pixel
(
255
,
0
,
0
)
));
my_window
.
add_overlay
(
image_window
::
overlay_line
(
p4
,
p3
,
rgb_pixel
(
255
,
0
,
0
)
));
my_window
.
add_overlay
(
p1
,
p2
,
rgb_pixel
(
255
,
0
,
0
));
my_window
.
add_overlay
(
p1
,
p3
,
rgb_pixel
(
255
,
0
,
0
));
my_window
.
add_overlay
(
p4
,
p2
,
rgb_pixel
(
255
,
0
,
0
));
my_window
.
add_overlay
(
p4
,
p3
,
rgb_pixel
(
255
,
0
,
0
));
// Draw a line from the center to the top side so we can see how the box is oriented.
// Also make this line green.
my_window
.
add_overlay
(
image_window
::
overlay_line
(
center
,
(
p1
+
p2
)
/
2
,
rgb_pixel
(
0
,
255
,
0
)
));
my_window
.
add_overlay
(
center
,
(
p1
+
p2
)
/
2
,
rgb_pixel
(
0
,
255
,
0
));
}
// wait until the user closes the window before we let the program
...
...
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