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
b59b8419
Commit
b59b8419
authored
Jan 21, 2012
by
Davis King
Browse files
Minor changes to avoid bugs in GCC 4.1.2 on Debian Etch
parent
365f3eed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
dlib/image_processing/scan_image_pyramid_tools.h
dlib/image_processing/scan_image_pyramid_tools.h
+3
-1
dlib/lsh/create_random_projection_hash.h
dlib/lsh/create_random_projection_hash.h
+1
-1
dlib/lsh/projection_hash.h
dlib/lsh/projection_hash.h
+1
-1
dlib/test/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
(
std
::
pow
(
2.0
,
bits
),
0
);
counts
.
assign
(
static_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