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
ffa0ae4c
Commit
ffa0ae4c
authored
Dec 26, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the randomly_sample_image_features() routine a little more general.
Also improved its spec.
parent
06dc489c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
image_feature_sampling.h
dlib/statistics/image_feature_sampling.h
+20
-7
image_feature_sampling_abstract.h
dlib/statistics/image_feature_sampling_abstract.h
+1
-0
No files found.
dlib/statistics/image_feature_sampling.h
View file @
ffa0ae4c
...
...
@@ -5,7 +5,6 @@
#include "image_feature_sampling_abstract.h"
#include "../statistics.h"
#include "../image_transforms.h"
namespace
dlib
{
...
...
@@ -34,11 +33,17 @@ namespace dlib
for
(
unsigned
long
i
=
0
;
i
<
images
.
size
();
++
i
)
{
assign_image
(
temp_img
,
images
[
i
]);
while
(
temp_img
.
nr
()
>
10
&&
temp_img
.
nc
()
>
10
)
bool
at_pyramid_top
=
true
;
while
(
true
)
{
fe
.
load
(
temp_img
);
if
(
at_pyramid_top
)
fe
.
load
(
images
[
i
]);
else
fe
.
load
(
temp_img
);
if
(
fe
.
size
()
==
0
)
break
;
for
(
long
r
=
0
;
r
<
fe
.
nr
();
++
r
)
{
for
(
long
c
=
0
;
c
<
fe
.
nc
();
++
c
)
...
...
@@ -54,8 +59,16 @@ namespace dlib
}
}
pyr
(
temp_img
,
temp_img2
);
temp_img2
.
swap
(
temp_img
);
if
(
at_pyramid_top
)
{
at_pyramid_top
=
false
;
pyr
(
images
[
i
],
temp_img
);
}
else
{
pyr
(
temp_img
,
temp_img2
);
swap
(
temp_img2
,
temp_img
);
}
}
}
return
basis
;
...
...
dlib/statistics/image_feature_sampling_abstract.h
View file @
ffa0ae4c
...
...
@@ -29,6 +29,7 @@ namespace dlib
dlib::hog_image
- image_array_type == an implementation of dlib/array/array_kernel_abstract.h
and it must contain image objects which can be passed to pyr() and fe.load()
and are swappable by global swap().
ensures
- creates an image pyramid for each image in images and performs feature
extraction on each pyramid level. Then selects a random subsample of at
...
...
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