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
e86be040
Commit
e86be040
authored
Jan 02, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a verbose version of setup_grid_detection_templates()
parent
ffd3401b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
scan_image_pyramid_tools.h
dlib/image_processing/scan_image_pyramid_tools.h
+22
-0
scan_image_pyramid_tools_abstract.h
dlib/image_processing/scan_image_pyramid_tools_abstract.h
+21
-0
No files found.
dlib/image_processing/scan_image_pyramid_tools.h
View file @
e86be040
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include "../image_keypoint.h"
#include "../image_keypoint.h"
#include <list>
#include <list>
#include "../geometry.h"
#include "../geometry.h"
#include <iostream>
namespace
dlib
namespace
dlib
{
{
...
@@ -211,6 +212,27 @@ namespace dlib
...
@@ -211,6 +212,27 @@ namespace dlib
}
}
}
}
// ----------------------------------------------------------------------------------------
template
<
typename
image_scanner_type
>
void
setup_grid_detection_templates_verbose
(
image_scanner_type
&
scanner
,
const
std
::
vector
<
std
::
vector
<
rectangle
>
>&
rects
,
unsigned
int
cells_x
,
unsigned
int
cells_y
,
double
min_match_score
=
0
.
75
)
{
const
std
::
vector
<
rectangle
>&
object_boxes
=
determine_object_boxes
(
scanner
,
rects
,
min_match_score
);
std
::
cout
<<
"number of detection templates: "
<<
object_boxes
.
size
()
<<
std
::
endl
;
for
(
unsigned
long
i
=
0
;
i
<
object_boxes
.
size
();
++
i
)
{
std
::
cout
<<
" object box "
<<
i
<<
": width: "
<<
object_boxes
[
i
].
width
()
<<
" height: "
<<
object_boxes
[
i
].
height
()
<<
std
::
endl
;
scanner
.
add_detection_template
(
object_boxes
[
i
],
create_grid_detection_template
(
object_boxes
[
i
],
cells_x
,
cells_y
));
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
dlib/image_processing/scan_image_pyramid_tools_abstract.h
View file @
e86be040
...
@@ -158,6 +158,27 @@ namespace dlib
...
@@ -158,6 +158,27 @@ namespace dlib
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
typename
image_scanner_type
>
void
setup_grid_detection_templates_verbose
(
image_scanner_type
&
scanner
,
const
std
::
vector
<
std
::
vector
<
rectangle
>
>&
rects
,
unsigned
int
cells_x
,
unsigned
int
cells_y
,
double
min_match_score
=
0
.
75
);
/*!
requires
- cells_x > 0
- cells_y > 0
- 0 < min_match_score <= 1
- image_scanner_type == an implementation of the scan_image_pyramid
object defined in dlib/image_processing/scan_image_pyramid_tools_abstract.h
ensures
- this function is identical to setup_grid_detection_templates() except
that it also outputs the selected detection templates to standard out.
!*/
}
}
#endif // DLIB_SCAN_IMaGE_PYRAMID_TOOLS_ABSTRACT_H__
#endif // DLIB_SCAN_IMaGE_PYRAMID_TOOLS_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