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
b4fd140d
Commit
b4fd140d
authored
Aug 07, 2011
by
Davis King
Browse files
Added some casts and a few other minor changes to get the code compiling
in gcc 4.1.1.
parent
46c02483
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
dlib/image_keypoint/hog.h
dlib/image_keypoint/hog.h
+2
-2
dlib/image_processing/detection_template_tools.h
dlib/image_processing/detection_template_tools.h
+2
-2
dlib/optimization/find_max_factor_graph_viterbi.h
dlib/optimization/find_max_factor_graph_viterbi.h
+3
-3
dlib/test/find_max_factor_graph_viterbi.cpp
dlib/test/find_max_factor_graph_viterbi.cpp
+1
-1
dlib/test/object_detector.cpp
dlib/test/object_detector.cpp
+1
-1
No files found.
dlib/image_keypoint/hog.h
View file @
b4fd140d
...
@@ -346,8 +346,8 @@ namespace dlib
...
@@ -346,8 +346,8 @@ namespace dlib
}
}
else
// if we should do some interpolation
else
// if we should do some interpolation
{
{
unsigned
long
quantized_angle_lower
=
std
::
floor
(
angle
);
unsigned
long
quantized_angle_lower
=
static_cast
<
unsigned
long
>
(
std
::
floor
(
angle
)
)
;
unsigned
long
quantized_angle_upper
=
std
::
ceil
(
angle
);
unsigned
long
quantized_angle_upper
=
static_cast
<
unsigned
long
>
(
std
::
ceil
(
angle
)
)
;
quantized_angle_lower
%=
num_orientation_bins
;
quantized_angle_lower
%=
num_orientation_bins
;
quantized_angle_upper
%=
num_orientation_bins
;
quantized_angle_upper
%=
num_orientation_bins
;
...
...
dlib/image_processing/detection_template_tools.h
View file @
b4fd140d
...
@@ -34,8 +34,8 @@ namespace dlib
...
@@ -34,8 +34,8 @@ namespace dlib
*/
*/
using
namespace
std
;
using
namespace
std
;
const
int
height
=
std
::
floor
(
std
::
sqrt
(
area
/
width_to_height_ratio
)
+
0.5
);
const
int
height
=
(
int
)
std
::
floor
(
std
::
sqrt
(
area
/
width_to_height_ratio
)
+
0.5
);
const
int
width
=
std
::
floor
(
area
/
height
+
0.5
);
const
int
width
=
(
int
)
std
::
floor
(
area
/
height
+
0.5
);
return
centered_rect
(
0
,
0
,
width
,
height
);
return
centered_rect
(
0
,
0
,
width
,
height
);
}
}
...
...
dlib/optimization/find_max_factor_graph_viterbi.h
View file @
b4fd140d
...
@@ -67,12 +67,12 @@ namespace dlib
...
@@ -67,12 +67,12 @@ namespace dlib
COMPILE_TIME_ASSERT
(
num_states
>
0
);
COMPILE_TIME_ASSERT
(
num_states
>
0
);
DLIB_ASSERT
(
std
::
pow
(
num_states
,
order
)
<
std
::
numeric_limits
<
unsigned
long
>::
max
(),
DLIB_ASSERT
(
std
::
pow
(
num_states
,
(
double
)
order
)
<
std
::
numeric_limits
<
unsigned
long
>::
max
(),
"
\t
void find_max_factor_graph_viterbi()"
"
\t
void find_max_factor_graph_viterbi()"
<<
"
\n\t
The order is way too large for this algorithm to handle."
<<
"
\n\t
The order is way too large for this algorithm to handle."
<<
"
\n\t
order: "
<<
order
<<
"
\n\t
order: "
<<
order
<<
"
\n\t
num_states: "
<<
num_states
<<
"
\n\t
num_states: "
<<
num_states
<<
"
\n\t
std::pow(num_states,order): "
<<
std
::
pow
(
num_states
,
order
)
<<
"
\n\t
std::pow(num_states,order): "
<<
std
::
pow
(
num_states
,
(
double
)
order
)
<<
"
\n\t
std::numeric_limits<unsigned long>::max(): "
<<
std
::
numeric_limits
<
unsigned
long
>::
max
()
<<
"
\n\t
std::numeric_limits<unsigned long>::max(): "
<<
std
::
numeric_limits
<
unsigned
long
>::
max
()
);
);
...
@@ -106,7 +106,7 @@ namespace dlib
...
@@ -106,7 +106,7 @@ namespace dlib
}
}
const
unsigned
long
trellis_size
=
static_cast
<
unsigned
long
>
(
std
::
pow
(
num_states
,
order
));
const
unsigned
long
trellis_size
=
static_cast
<
unsigned
long
>
(
std
::
pow
(
num_states
,
(
double
)
order
));
unsigned
long
init_ring_size
=
1
;
unsigned
long
init_ring_size
=
1
;
array2d
<
impl
::
viterbi_data
>
trellis
;
array2d
<
impl
::
viterbi_data
>
trellis
;
...
...
dlib/test/find_max_factor_graph_viterbi.cpp
View file @
b4fd140d
...
@@ -36,7 +36,7 @@ namespace
...
@@ -36,7 +36,7 @@ namespace
map_problem
()
map_problem
()
{
{
data
=
randm
(
number_of_nodes
(),
std
::
pow
(
num_states
,
order
+
1
),
rnd
);
data
=
randm
(
number_of_nodes
(),
(
long
)
std
::
pow
(
num_states
,
(
double
)
order
+
1
),
rnd
);
}
}
unsigned
long
number_of_nodes
(
unsigned
long
number_of_nodes
(
...
...
dlib/test/object_detector.cpp
View file @
b4fd140d
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
#include "tester.h"
#include "tester.h"
#include <dlib/pixel.h>
#include <dlib/pixel.h>
#include <dlib/svm_threaded.h>
#include <dlib/svm_threaded.h>
#include <dlib/gui_widgets.h>
#include <dlib/array.h>
#include <dlib/array.h>
#include <dlib/array2d.h>
#include <dlib/array2d.h>
#include <dlib/image_keypoint.h>
#include <dlib/image_keypoint.h>
#include <dlib/image_processing.h>
#include <dlib/image_processing.h>
#include <dlib/image_transforms.h>
namespace
namespace
{
{
...
...
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