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
a0e44acc
Commit
a0e44acc
authored
May 28, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switched all the uses of array2d to not use the array2d<type>::kernel_1a
syntax but to use the array2d<type> syntax.
parent
8dfde0fe
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
38 additions
and
41 deletions
+38
-41
base_widgets.h
dlib/gui_widgets/base_widgets.h
+1
-1
fonts.cpp
dlib/gui_widgets/fonts.cpp
+2
-2
fonts.h
dlib/gui_widgets/fonts.h
+1
-1
style.h
dlib/gui_widgets/style.h
+3
-3
widgets.h
dlib/gui_widgets/widgets.h
+2
-2
hessian_pyramid.h
dlib/image_keypoint/hessian_pyramid.h
+1
-1
hog.h
dlib/image_keypoint/hog.h
+1
-1
save_png.h
dlib/image_saver/save_png.h
+3
-3
image_pyramid.h
dlib/image_transforms/image_pyramid.h
+2
-2
integral_image.h
dlib/image_transforms/integral_image.h
+1
-1
array2d.cpp
dlib/test/array2d.cpp
+1
-4
main.cpp
dlib/test/gui/main.cpp
+1
-1
image.cpp
dlib/test/image.cpp
+12
-12
matrix.cpp
dlib/test/matrix.cpp
+2
-2
pyramid_down.cpp
dlib/test/pyramid_down.cpp
+5
-5
No files found.
dlib/gui_widgets/base_widgets.h
View file @
a0e44acc
...
...
@@ -427,7 +427,7 @@ namespace dlib
draw_image
(
c
,
point
(
rect
.
left
(),
rect
.
top
()),
img
);
}
array2d
<
rgb_alpha_pixel
>
::
kernel_1a
img
;
array2d
<
rgb_alpha_pixel
>
img
;
// restricted functions
image_widget
(
image_widget
&
);
// copy constructor
...
...
dlib/gui_widgets/fonts.cpp
View file @
a0e44acc
...
...
@@ -244,7 +244,7 @@ namespace dlib
{
int
dwx0
,
dwy0
;
int
BBw
,
BBh
,
BBxoff0x
,
BByoff0y
;
array2d
<
char
>
::
kernel_1a
bitmap
;
array2d
<
char
>
bitmap
;
bool
has_dw
;
};
bool
parse_header
(
header_info
&
info
)
...
...
@@ -587,7 +587,7 @@ namespace dlib
bool
bdf_font
::
bitmap_to_letter
(
array2d
<
char
>
::
kernel_1a
&
bitmap
,
array2d
<
char
>&
bitmap
,
unichar
enc
,
unsigned
long
width
,
int
x_offset
,
...
...
dlib/gui_widgets/fonts.h
View file @
a0e44acc
...
...
@@ -598,7 +598,7 @@ namespace dlib
void
adjust_metrics
();
private
:
bool
bitmap_to_letter
(
array2d
<
char
>
::
kernel_1a
&
bitmap
,
unichar
enc
,
unsigned
long
width
,
int
x_offset
,
int
y_offset
);
bool
bitmap_to_letter
(
array2d
<
char
>&
bitmap
,
unichar
enc
,
unsigned
long
width
,
int
x_offset
,
int
y_offset
);
array
<
letter
>::
expand_1b_c
gl
;
unichar
default_char
;
// if (is_intialized == true), then this MUST be an actual glyph
...
...
dlib/gui_widgets/style.h
View file @
a0e44acc
...
...
@@ -217,9 +217,9 @@ namespace dlib
}
}
array2d
<
rgb_alpha_pixel
>
::
kernel_1a
img_mouseover
;
array2d
<
rgb_alpha_pixel
>
::
kernel_1a
img_normal
;
array2d
<
rgb_alpha_pixel
>
::
kernel_1a
img_disabled
;
array2d
<
rgb_alpha_pixel
>
img_mouseover
;
array2d
<
rgb_alpha_pixel
>
img_normal
;
array2d
<
rgb_alpha_pixel
>
img_disabled
;
// this is the minimum amount of padding that can separate the name from the
// edge of the button
...
...
dlib/gui_widgets/widgets.h
View file @
a0e44acc
...
...
@@ -3177,7 +3177,7 @@ namespace dlib
long
new_cursor_pos
);
array2d
<
data_type
>
::
kernel_1a_c
grid
;
array2d
<
data_type
>
grid
;
array
<
unsigned
long
>::
kernel_2a_c
col_width
;
array
<
unsigned
long
>::
kernel_2a_c
row_height
;
bool
has_focus
;
...
...
@@ -3298,7 +3298,7 @@ namespace dlib
unsigned
long
state
);
array2d
<
rgb_alpha_pixel
>
::
kernel_1a
img
;
array2d
<
rgb_alpha_pixel
>
img
;
std
::
vector
<
overlay_rect
>
overlay_rects
;
...
...
dlib/image_keypoint/hessian_pyramid.h
View file @
a0e44acc
...
...
@@ -309,7 +309,7 @@ namespace dlib
long
num_intervals
;
long
initial_step_size
;
typedef
array2d
<
double
>
::
kernel_1a
image_type
;
typedef
array2d
<
double
>
image_type
;
typedef
array
<
image_type
>::
expand_1d
pyramid_type
;
pyramid_type
pyramid
;
...
...
dlib/image_keypoint/hog.h
View file @
a0e44acc
...
...
@@ -371,7 +371,7 @@ namespace dlib
double
values
[
num_orientation_bins
];
};
typename
array2d
<
histogram
>::
kernel_1a
hist_cells
;
array2d
<
histogram
>
hist_cells
;
mutable
descriptor_type
des
;
...
...
dlib/image_saver/save_png.h
View file @
a0e44acc
...
...
@@ -133,7 +133,7 @@ namespace dlib
try
{
// convert from HSI to RGB (Or potentially RGB pixels that aren't laid out as R G B)
array2d
<
rgb_pixel
>
::
kernel_1a
temp_img
;
array2d
<
rgb_pixel
>
temp_img
;
assign_image
(
temp_img
,
img
);
const
int
bit_depth
=
8
;
...
...
@@ -156,7 +156,7 @@ namespace dlib
try
{
// convert from RGBA pixels that aren't laid out as R G B A
array2d
<
rgb_alpha_pixel
>
::
kernel_1a
temp_img
;
array2d
<
rgb_alpha_pixel
>
temp_img
;
assign_image
(
temp_img
,
img
);
const
int
bit_depth
=
8
;
...
...
@@ -203,7 +203,7 @@ namespace dlib
try
{
// convert from whatever this is to 16bit grayscale
array2d
<
dlib
::
uint16
>
::
kernel_1a
temp_img
;
array2d
<
dlib
::
uint16
>
temp_img
;
assign_image
(
temp_img
,
img
);
const
int
bit_depth
=
16
;
...
...
dlib/image_transforms/image_pyramid.h
View file @
a0e44acc
...
...
@@ -127,7 +127,7 @@ namespace dlib
typedef
typename
pixel_traits
<
typename
in_image_type
::
type
>::
basic_pixel_type
bp_type
;
typedef
typename
promote
<
bp_type
>::
type
ptype
;
typename
array2d
<
ptype
>::
kernel_1a
temp_img
;
array2d
<
ptype
>
temp_img
;
temp_img
.
set_size
(
original
.
nr
(),
(
original
.
nc
()
-
3
)
/
2
);
down
.
set_size
((
original
.
nr
()
-
3
)
/
2
,
(
original
.
nc
()
-
3
)
/
2
);
...
...
@@ -218,7 +218,7 @@ namespace dlib
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
in_image_type
::
type
>::
has_alpha
==
false
);
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
out_image_type
::
type
>::
has_alpha
==
false
);
array2d
<
rgbptype
>
::
kernel_1a
temp_img
;
array2d
<
rgbptype
>
temp_img
;
temp_img
.
set_size
(
original
.
nr
(),
(
original
.
nc
()
-
3
)
/
2
);
down
.
set_size
((
original
.
nr
()
-
3
)
/
2
,
(
original
.
nc
()
-
3
)
/
2
);
...
...
dlib/image_transforms/integral_image.h
View file @
a0e44acc
...
...
@@ -97,7 +97,7 @@ namespace dlib
private
:
array2d
<
long
>
::
kernel_1a
int_img
;
array2d
<
long
>
int_img
;
};
...
...
dlib/test/array2d.cpp
View file @
a0e44acc
...
...
@@ -409,10 +409,7 @@ namespace
)
{
dlog
<<
LINFO
<<
"testing kernel_1a"
;
array2d_kernel_test
<
array2d
<
unsigned
long
>::
kernel_1a
>
();
print_spinner
();
dlog
<<
LINFO
<<
"testing kernel_1a_c"
;
array2d_kernel_test
<
array2d
<
unsigned
long
>::
kernel_1a_c
>
();
array2d_kernel_test
<
array2d
<
unsigned
long
>
>
();
print_spinner
();
}
}
a
;
...
...
dlib/test/gui/main.cpp
View file @
a0e44acc
...
...
@@ -18,7 +18,7 @@ using namespace dlib;
using
namespace
std
;
typedef
dlib
::
array2d
<
hsi_pixel
>
::
kernel_1a_c
image
;
typedef
dlib
::
array2d
<
hsi_pixel
>
image
;
...
...
dlib/test/image.cpp
View file @
a0e44acc
...
...
@@ -32,7 +32,7 @@ namespace
print_spinner
();
array2d
<
unsigned
char
>
::
kernel_1a_c
img1
,
img2
;
array2d
<
unsigned
char
>
img1
,
img2
;
img1
.
set_size
(
100
,
100
);
...
...
@@ -66,7 +66,7 @@ namespace
}
{
array2d
<
hsi_pixel
>
::
kernel_1a
img
;
array2d
<
hsi_pixel
>
img
;
img
.
set_size
(
14
,
15
);
for
(
long
r
=
0
;
r
<
14
;
++
r
)
{
...
...
@@ -106,7 +106,7 @@ namespace
{
array2d
<
rgb_alpha_pixel
>
::
kernel_1a
img
;
array2d
<
rgb_alpha_pixel
>
img
;
img
.
set_size
(
14
,
15
);
for
(
long
r
=
0
;
r
<
14
;
++
r
)
{
...
...
@@ -147,7 +147,7 @@ namespace
{
array2d
<
rgb_pixel
>
::
kernel_1a
img
;
array2d
<
rgb_pixel
>
img
;
img
.
set_size
(
14
,
15
);
for
(
long
r
=
0
;
r
<
14
;
++
r
)
{
...
...
@@ -212,7 +212,7 @@ namespace
{
array2d
<
unsigned
short
>
::
kernel_1a
img
;
array2d
<
unsigned
short
>
img
;
img
.
set_size
(
14
,
15
);
for
(
long
r
=
0
;
r
<
14
;
++
r
)
{
...
...
@@ -247,7 +247,7 @@ namespace
{
array2d
<
unsigned
char
>
::
kernel_1a
img
;
array2d
<
unsigned
char
>
img
;
img
.
set_size
(
14
,
15
);
for
(
long
r
=
0
;
r
<
14
;
++
r
)
{
...
...
@@ -308,7 +308,7 @@ namespace
{
// in this test we will only assign pixel values that can be
// represented with 8 bits even though we are using a wider pixel type.
array2d
<
unsigned
short
>
::
kernel_1a
img
;
array2d
<
unsigned
short
>
img
;
img
.
set_size
(
14
,
15
);
for
(
long
r
=
0
;
r
<
14
;
++
r
)
{
...
...
@@ -365,8 +365,8 @@ namespace
}
{
array2d
<
unsigned
short
>
::
kernel_1a_c
img1
;
array2d
<
unsigned
char
>
::
kernel_1a_c
img2
;
array2d
<
unsigned
short
>
img1
;
array2d
<
unsigned
char
>
img2
;
img1
.
set_size
(
10
,
10
);
assign_all_pixels
(
img1
,
0
);
...
...
@@ -394,7 +394,7 @@ namespace
}
{
array2d
<
unsigned
char
>
::
kernel_1a_c
img
;
array2d
<
unsigned
char
>
img
;
img
.
set_size
(
10
,
10
);
assign_all_pixels
(
img
,
0
);
...
...
@@ -419,7 +419,7 @@ namespace
}
{
array2d
<
unsigned
char
>
::
kernel_1a_c
img
;
array2d
<
unsigned
char
>
img
;
img
.
set_size
(
11
,
11
);
assign_all_pixels
(
img
,
0
);
...
...
@@ -451,7 +451,7 @@ namespace
{
dlib
::
rand
rnd
;
array2d
<
unsigned
char
>
::
kernel_1a_c
img
;
array2d
<
unsigned
char
>
img
;
integral_image
int_img
;
int_img
.
load
(
img
);
...
...
dlib/test/matrix.cpp
View file @
a0e44acc
...
...
@@ -406,7 +406,7 @@ namespace
}
{
array2d
<
double
>
::
kernel_1a_c
a
;
array2d
<
double
>
a
;
a
.
set_size
(
6
,
7
);
...
...
@@ -447,7 +447,7 @@ namespace
}
{
array2d
<
double
>
::
kernel_1a_c
m
;
array2d
<
double
>
m
;
m
.
set_size
(
5
,
5
);
for
(
long
r
=
0
;
r
<
m
.
nr
();
++
r
)
...
...
dlib/test/pyramid_down.cpp
View file @
a0e44acc
...
...
@@ -22,7 +22,7 @@ namespace
void
test_pyramid_down_graysclae
()
{
array2d
<
unsigned
char
>
::
kernel_1a
img
,
down
;
array2d
<
unsigned
char
>
img
,
down
;
pyramid_down
pyr
;
img
.
set_size
(
300
,
264
);
...
...
@@ -50,8 +50,8 @@ void test_pyramid_down_graysclae()
void
test_pyramid_down_rgb
()
{
array2d
<
rgb_pixel
>
::
kernel_1a
img
;
array2d
<
bgr_pixel
>
::
kernel_1a
down
;
array2d
<
rgb_pixel
>
img
;
array2d
<
bgr_pixel
>
down
;
pyramid_down
pyr
;
img
.
set_size
(
231
,
351
);
...
...
@@ -138,8 +138,8 @@ rgb_pixel mean_pixel (
void
test_pyramid_down_rgb2
()
{
array2d
<
rgb_pixel
>
::
kernel_1a
img
,
img3
;
array2d
<
unsigned
char
>
::
kernel_1a
img2
,
img4
;
array2d
<
rgb_pixel
>
img
,
img3
;
array2d
<
unsigned
char
>
img2
,
img4
;
img
.
set_size
(
300
,
400
);
...
...
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