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
bd6c145b
Commit
bd6c145b
authored
Mar 03, 2013
by
Davis King
Browse files
Added draw_surf_points().
parent
1cab1fae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
dlib/image_keypoint/draw_surf_points.h
dlib/image_keypoint/draw_surf_points.h
+40
-0
dlib/image_keypoint/draw_surf_points_abstract.h
dlib/image_keypoint/draw_surf_points_abstract.h
+30
-0
No files found.
dlib/image_keypoint/draw_surf_points.h
0 → 100644
View file @
bd6c145b
// Copyright (C) 2013 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifndef DLIB_DRAW_SURf_POINTS_H_
#define DLIB_DRAW_SURf_POINTS_H_
#include "surf.h"
#include "../gui_widgets.h"
#include "draw_surf_points_abstract.h"
namespace
dlib
{
// ----------------------------------------------------------------------------------------
inline
void
draw_surf_points
(
image_window
&
win
,
const
std
::
vector
<
surf_point
>&
sp
)
{
for
(
unsigned
long
i
=
0
;
i
<
sp
.
size
();
++
i
)
{
const
unsigned
long
radius
=
static_cast
<
unsigned
long
>
(
sp
[
i
].
p
.
scale
*
3
);
const
point
center
(
sp
[
i
].
p
.
center
);
point
direction
=
center
+
point
(
radius
,
0
);
// SURF descriptors are rotated by sp[i].angle. So we want to include a visual
// indication of this rotation on our overlay.
direction
=
rotate_point
(
center
,
direction
,
sp
[
i
].
angle
);
win
.
add_overlay
(
image_display
::
overlay_circle
(
center
,
radius
,
rgb_pixel
(
0
,
255
,
0
)));
// Draw a line showing the orientation of the SURF descriptor.
win
.
add_overlay
(
center
,
direction
,
rgb_pixel
(
255
,
0
,
0
));
}
}
// ----------------------------------------------------------------------------------------
}
#endif // DLIB_DRAW_SURf_POINTS_H_
dlib/image_keypoint/draw_surf_points_abstract.h
0 → 100644
View file @
bd6c145b
// Copyright (C) 2013 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#undef DLIB_DRAW_SURf_POINTS_ABSTRACT_H_
#ifdef DLIB_DRAW_SURf_POINTS_ABSTRACT_H_
#include "surf_abstract.h"
#include "../gui_widgets.h"
namespace
dlib
{
// ----------------------------------------------------------------------------------------
void
draw_surf_points
(
image_window
&
win
,
const
std
::
vector
<
surf_point
>&
sp
);
/*!
ensures
- draws all the SURF points in sp onto the given image_window. They
are drawn as overlay circles with extra lines to indicate the rotation
of the SURF descriptor.
!*/
// ----------------------------------------------------------------------------------------
}
#endif // DLIB_DRAW_SURf_POINTS_ABSTRACT_H_
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