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
1bb12d6a
Commit
1bb12d6a
authored
Dec 26, 2011
by
Davis King
Browse files
Made the object_detector's interface a little more complete and flexible.
parent
806c6372
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
0 deletions
+78
-0
dlib/image_processing/object_detector.h
dlib/image_processing/object_detector.h
+48
-0
dlib/image_processing/object_detector_abstract.h
dlib/image_processing/object_detector_abstract.h
+30
-0
No files found.
dlib/image_processing/object_detector.h
View file @
1bb12d6a
...
@@ -34,6 +34,15 @@ namespace dlib
...
@@ -34,6 +34,15 @@ namespace dlib
const
matrix
<
double
,
0
,
1
>&
w_
const
matrix
<
double
,
0
,
1
>&
w_
);
);
const
matrix
<
double
,
0
,
1
>&
get_w
(
)
const
;
const
overlap_tester_type
&
get_overlap_tester
(
)
const
;
const
image_scanner_type
&
get_scanner
(
)
const
;
object_detector
&
operator
=
(
object_detector
&
operator
=
(
const
object_detector
&
item
const
object_detector
&
item
);
);
...
@@ -277,6 +286,45 @@ namespace dlib
...
@@ -277,6 +286,45 @@ namespace dlib
}
}
}
}
// ----------------------------------------------------------------------------------------
template
<
typename
image_scanner_type
,
typename
overlap_tester_type
>
const
matrix
<
double
,
0
,
1
>&
object_detector
<
image_scanner_type
,
overlap_tester_type
>::
get_w
(
)
const
{
return
w
;
}
// ----------------------------------------------------------------------------------------
template
<
typename
image_scanner_type
,
typename
overlap_tester_type
>
const
overlap_tester_type
&
object_detector
<
image_scanner_type
,
overlap_tester_type
>::
get_overlap_tester
(
)
const
{
return
boxes_overlap
;
}
// ----------------------------------------------------------------------------------------
template
<
typename
image_scanner_type
,
typename
overlap_tester_type
>
const
image_scanner_type
&
object_detector
<
image_scanner_type
,
overlap_tester_type
>::
get_scanner
(
)
const
{
return
scanner
;
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
dlib/image_processing/object_detector_abstract.h
View file @
1bb12d6a
...
@@ -71,6 +71,30 @@ namespace dlib
...
@@ -71,6 +71,30 @@ namespace dlib
with respect to overlap_tester. That is, for all
with respect to overlap_tester. That is, for all
pairs of returned detections A and B, we will always
pairs of returned detections A and B, we will always
have: overlap_tester(A,B) == false
have: overlap_tester(A,B) == false
- #get_w() == w
- #get_overlap_tester() == overlap_tester
- #get_scanner() == scanner
!*/
const
matrix
<
double
,
0
,
1
>&
get_w
(
)
const
;
/*!
ensures
- returns the weight vector used by this object
!*/
const
overlap_tester_type
&
get_overlap_tester
(
)
const
;
/*!
ensures
- returns the overlap tester used by this object
!*/
const
image_scanner_type
&
get_scanner
(
)
const
;
/*!
ensures
- returns the image scanner used by this object.
!*/
!*/
object_detector
&
operator
=
(
object_detector
&
operator
=
(
...
@@ -97,6 +121,9 @@ namespace dlib
...
@@ -97,6 +121,9 @@ namespace dlib
- The returned vector will be sorted in the sense that the highest
- The returned vector will be sorted in the sense that the highest
confidence detections come first. E.g. element 0 is the best detection,
confidence detections come first. E.g. element 0 is the best detection,
element 1 the next best, and so on.
element 1 the next best, and so on.
- #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.
!*/
!*/
template
<
template
<
...
@@ -120,6 +147,9 @@ namespace dlib
...
@@ -120,6 +147,9 @@ namespace dlib
detection. This is the detection value output by the scanner
detection. This is the detection value output by the scanner
minus the threshold, therefore this is a value > 0.
minus the threshold, therefore this is a value > 0.
- #dets[i].second == the bounding box for the i-th detection.
- #dets[i].second == the bounding box for the i-th detection.
- #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.
!*/
!*/
};
};
...
...
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