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
1c598a62
Commit
1c598a62
authored
Feb 23, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarified spec
parent
29658c4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
68 deletions
+8
-68
remove_unobtainable_rectangles_abstract.h
...mage_processing/remove_unobtainable_rectangles_abstract.h
+8
-68
No files found.
dlib/image_processing/remove_unobtainable_rectangles_abstract.h
View file @
1c598a62
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#include "scan_image_pyramid_abstract.h"
#include "scan_image_pyramid_abstract.h"
#include "scan_image_boxes_abstract.h"
#include "scan_image_boxes_abstract.h"
#include "scan_image_custom_abstract.h"
#include "scan_image_custom_abstract.h"
#include "scan_fhog_pyramid_abstract.h"
#include "../svm/structural_object_detection_trainer_abstract.h"
#include "../svm/structural_object_detection_trainer_abstract.h"
#include "../geometry.h"
#include "../geometry.h"
...
@@ -16,84 +17,23 @@ namespace dlib
...
@@ -16,84 +17,23 @@ namespace dlib
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
template
<
typename
image_scanner_type
,
typename
image_array_type
,
typename
image_array_type
,
typename
Pyramid_type
,
typename
Pyramid_type
typename
Feature_extractor_type
>
>
std
::
vector
<
std
::
vector
<
rectangle
>
>
remove_unobtainable_rectangles
(
std
::
vector
<
std
::
vector
<
rectangle
>
>
remove_unobtainable_rectangles
(
const
structural_object_detection_trainer
<
scan_image_pyramid
<
Pyramid_type
,
Feature_extractor_type
>
>&
trainer
,
const
structural_object_detection_trainer
<
image_scanner_type
>&
trainer
,
const
image_array_type
&
images
,
const
image_array_type
&
images
,
std
::
vector
<
std
::
vector
<
rectangle
>
>&
object_locations
std
::
vector
<
std
::
vector
<
rectangle
>
>&
object_locations
);
);
/*!
/*!
requires
requires
- image_scanner_type must be either scan_image_boxes, scan_image_pyramid,
scan_image_custom, or scan_fhog_pyramid.
- images.size() == object_locations.size()
- images.size() == object_locations.size()
ensures
ensures
- Recall that the scan_image_pyramid object can't produce all possible rectangles
- Recall that the image scanner objects can't produce all possible rectangles
as object detections since it only considers a limited subset of all possible
as object detections since they only consider a limited subset of all possible
object positions. Moreover, the structural_object_detection_trainer requires
its input training data to not contain any object positions which are unobtainable
by its scanner object. Therefore, remove_unobtainable_rectangles() is a tool
to filter out these unobtainable rectangles from the training data before giving
it to a structural_object_detection_trainer.
- This function interprets object_locations[i] as the set of object positions for
image[i], for all valid i.
- In particular, this function removes unobtainable rectangles from object_locations
and also returns a vector V such that:
- V.size() == object_locations.size()
- for all valid i:
- V[i] == the set of rectangles removed from object_locations[i]
!*/
// ----------------------------------------------------------------------------------------
template
<
typename
image_array_type
,
typename
feature_extractor
,
typename
box_generator
>
std
::
vector
<
std
::
vector
<
rectangle
>
>
remove_unobtainable_rectangles
(
const
structural_object_detection_trainer
<
scan_image_boxes
<
feature_extractor
,
box_generator
>
>&
trainer
,
const
image_array_type
&
images
,
std
::
vector
<
std
::
vector
<
rectangle
>
>&
object_locations
);
/*!
requires
- images.size() == object_locations.size()
ensures
- Recall that the scan_image_boxes object can't produce all possible rectangles
as object detections since it only considers a limited subset of all possible
object positions. Moreover, the structural_object_detection_trainer requires
its input training data to not contain any object positions which are unobtainable
by its scanner object. Therefore, remove_unobtainable_rectangles() is a tool
to filter out these unobtainable rectangles from the training data before giving
it to a structural_object_detection_trainer.
- This function interprets object_locations[i] as the set of object positions for
image[i], for all valid i.
- In particular, this function removes unobtainable rectangles from object_locations
and also returns a vector V such that:
- V.size() == object_locations.size()
- for all valid i:
- V[i] == the set of rectangles removed from object_locations[i]
!*/
// ----------------------------------------------------------------------------------------
template
<
typename
image_array_type
,
typename
feature_extractor
>
std
::
vector
<
std
::
vector
<
rectangle
>
>
remove_unobtainable_rectangles
(
const
structural_object_detection_trainer
<
scan_image_custom
<
feature_extractor
>
>&
trainer
,
const
image_array_type
&
images
,
std
::
vector
<
std
::
vector
<
rectangle
>
>&
object_locations
);
/*!
requires
- images.size() == object_locations.size()
ensures
- Recall that the scan_image_custom object can't produce all possible rectangles
as object detections since it only considers a limited subset of all possible
object positions. Moreover, the structural_object_detection_trainer requires
object positions. Moreover, the structural_object_detection_trainer requires
its input training data to not contain any object positions which are unobtainable
its input training data to not contain any object positions which are unobtainable
by its scanner object. Therefore, remove_unobtainable_rectangles() is a tool
by its scanner object. Therefore, remove_unobtainable_rectangles() is a tool
...
...
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