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
b59b8419
Commit
b59b8419
authored
Jan 21, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to avoid bugs in GCC 4.1.2 on Debian Etch
parent
365f3eed
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
scan_image_pyramid_tools.h
dlib/image_processing/scan_image_pyramid_tools.h
+3
-1
create_random_projection_hash.h
dlib/lsh/create_random_projection_hash.h
+1
-1
projection_hash.h
dlib/lsh/projection_hash.h
+1
-1
object_detector.cpp
dlib/test/object_detector.cpp
+3
-1
No files found.
dlib/image_processing/scan_image_pyramid_tools.h
View file @
b59b8419
...
...
@@ -51,8 +51,10 @@ namespace dlib
<<
"
\n\t
images.size(): "
<<
images
.
size
()
);
pyramid
pyr
;
const
random_subset_selector
<
typename
feature_extractor
::
descriptor_type
>&
samps
=
randomly_sample_image_features
(
images
,
pyr
amid
()
,
fe
,
num_samples
);
randomly_sample_image_features
(
images
,
pyr
,
fe
,
num_samples
);
if
(
samps
.
size
()
<=
1
)
throw
dlib
::
image_hash_construction_failure
(
"Images too small, not able to gather enough samples to make hash"
);
...
...
dlib/lsh/create_random_projection_hash.h
View file @
b59b8419
...
...
@@ -79,7 +79,7 @@ namespace dlib
// figure out what the offset values should be
for
(
int
itr
=
0
;
itr
<
offset
.
size
();
++
itr
)
{
counts
.
assign
(
st
d
::
pow
(
2
.
0
,
bits
),
0
);
counts
.
assign
(
st
atic_cast
<
unsigned
long
>
(
std
::
pow
(
2
.
0
,
bits
)
),
0
);
// count the popularity of each hash value
for
(
unsigned
long
i
=
0
;
i
<
h
.
size
();
++
i
)
{
...
...
dlib/lsh/projection_hash.h
View file @
b59b8419
...
...
@@ -44,7 +44,7 @@ namespace dlib
unsigned
long
num_hash_bins
(
)
const
{
return
static_cast
<
unsigned
long
>
(
std
::
pow
(
2
.
0
,
offset
.
size
()));
return
static_cast
<
unsigned
long
>
(
std
::
pow
(
2
.
0
,
(
double
)
offset
.
size
()));
}
template
<
typename
EXP
>
...
...
dlib/test/object_detector.cpp
View file @
b59b8419
...
...
@@ -393,7 +393,9 @@ namespace
setup_grid_detection_templates
(
scanner
,
object_locations
,
2
,
2
);
feature_extractor_type
nnfe
;
nnfe
.
set_basis
(
randomly_sample_image_features
(
images
,
pyramid_down
(),
poly_image
<
5
>
(),
80
));
pyramid_down
pyr_down
;
poly_image
<
5
>
polyi
;
nnfe
.
set_basis
(
randomly_sample_image_features
(
images
,
pyr_down
,
polyi
,
80
));
scanner
.
copy_configuration
(
nnfe
);
structural_object_detection_trainer
<
image_scanner_type
>
trainer
(
scanner
);
...
...
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