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
b4fd140d
Commit
b4fd140d
authored
Aug 07, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some casts and a few other minor changes to get the code compiling
in gcc 4.1.1.
parent
46c02483
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
hog.h
dlib/image_keypoint/hog.h
+2
-2
detection_template_tools.h
dlib/image_processing/detection_template_tools.h
+2
-2
find_max_factor_graph_viterbi.h
dlib/optimization/find_max_factor_graph_viterbi.h
+3
-3
find_max_factor_graph_viterbi.cpp
dlib/test/find_max_factor_graph_viterbi.cpp
+1
-1
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
=
st
d
::
floor
(
angle
);
unsigned
long
quantized_angle_lower
=
st
atic_cast
<
unsigned
long
>
(
std
::
floor
(
angle
)
);
unsigned
long
quantized_angle_upper
=
st
d
::
ceil
(
angle
);
unsigned
long
quantized_angle_upper
=
st
atic_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