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
4891faec
Commit
4891faec
authored
Jan 08, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the object_detector's interface a little more flexible.
parent
0433da57
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
object_detector.h
dlib/image_processing/object_detector.h
+5
-3
object_detector_abstract.h
dlib/image_processing/object_detector_abstract.h
+5
-1
No files found.
dlib/image_processing/object_detector.h
View file @
4891faec
...
...
@@ -59,7 +59,8 @@ namespace dlib
>
void
operator
()
(
const
image_type
&
img
,
std
::
vector
<
std
::
pair
<
double
,
rectangle
>
>&
final_dets
std
::
vector
<
std
::
pair
<
double
,
rectangle
>
>&
final_dets
,
double
adjust_threshold
);
template
<
typename
T
,
typename
U
>
...
...
@@ -263,14 +264,15 @@ namespace dlib
void
object_detector
<
image_scanner_type
,
overlap_tester_type
>::
operator
()
(
const
image_type
&
img
,
std
::
vector
<
std
::
pair
<
double
,
rectangle
>
>&
final_dets
std
::
vector
<
std
::
pair
<
double
,
rectangle
>
>&
final_dets
,
double
adjust_threshold
)
{
final_dets
.
clear
();
if
(
w
.
size
()
!=
0
)
{
std
::
vector
<
std
::
pair
<
double
,
rectangle
>
>
dets
;
const
double
thresh
=
w
(
scanner
.
get_num_dimensions
());
const
double
thresh
=
w
(
scanner
.
get_num_dimensions
())
+
adjust_threshold
;
scanner
.
load
(
img
);
scanner
.
detect
(
w
,
dets
,
thresh
);
...
...
dlib/image_processing/object_detector_abstract.h
View file @
4891faec
...
...
@@ -131,7 +131,8 @@ namespace dlib
>
void
operator
()
(
const
image_type
&
img
,
std
::
vector
<
std
::
pair
<
double
,
rectangle
>
>&
dets
std
::
vector
<
std
::
pair
<
double
,
rectangle
>
>&
dets
,
double
adjust_threshold
=
0
);
/*!
requires
...
...
@@ -150,6 +151,9 @@ namespace dlib
- #get_scanner() will have been loaded with img. Therefore, you can call
#get_scanner().get_feature_vector() to obtain the feature vectors for
the resulting object detection boxes.
- The detection threshold is adjusted by having adjust_threshold added
to it. Therefore, an adjust_threshold value > 0 makes detecting
objects harder while a negative one makes it easier.
!*/
};
...
...
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