Commit a0e44acc authored by Davis King's avatar Davis King

Switched all the uses of array2d to not use the array2d<type>::kernel_1a

syntax but to use the array2d<type> syntax.
parent 8dfde0fe
...@@ -427,7 +427,7 @@ namespace dlib ...@@ -427,7 +427,7 @@ namespace dlib
draw_image(c, point(rect.left(),rect.top()), img); draw_image(c, point(rect.left(),rect.top()), img);
} }
array2d<rgb_alpha_pixel>::kernel_1a img; array2d<rgb_alpha_pixel> img;
// restricted functions // restricted functions
image_widget(image_widget&); // copy constructor image_widget(image_widget&); // copy constructor
......
...@@ -244,7 +244,7 @@ namespace dlib ...@@ -244,7 +244,7 @@ namespace dlib
{ {
int dwx0, dwy0; int dwx0, dwy0;
int BBw, BBh, BBxoff0x, BByoff0y; int BBw, BBh, BBxoff0x, BByoff0y;
array2d<char>::kernel_1a bitmap; array2d<char> bitmap;
bool has_dw; bool has_dw;
}; };
bool parse_header( header_info& info ) bool parse_header( header_info& info )
...@@ -587,7 +587,7 @@ namespace dlib ...@@ -587,7 +587,7 @@ namespace dlib
bool bdf_font:: bool bdf_font::
bitmap_to_letter( bitmap_to_letter(
array2d<char>::kernel_1a& bitmap, array2d<char>& bitmap,
unichar enc, unichar enc,
unsigned long width, unsigned long width,
int x_offset, int x_offset,
......
...@@ -598,7 +598,7 @@ namespace dlib ...@@ -598,7 +598,7 @@ namespace dlib
void adjust_metrics(); void adjust_metrics();
private: 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; array<letter>::expand_1b_c gl;
unichar default_char; // if (is_intialized == true), then this MUST be an actual glyph unichar default_char; // if (is_intialized == true), then this MUST be an actual glyph
......
...@@ -217,9 +217,9 @@ namespace dlib ...@@ -217,9 +217,9 @@ namespace dlib
} }
} }
array2d<rgb_alpha_pixel>::kernel_1a img_mouseover; array2d<rgb_alpha_pixel> img_mouseover;
array2d<rgb_alpha_pixel>::kernel_1a img_normal; array2d<rgb_alpha_pixel> img_normal;
array2d<rgb_alpha_pixel>::kernel_1a img_disabled; array2d<rgb_alpha_pixel> img_disabled;
// this is the minimum amount of padding that can separate the name from the // this is the minimum amount of padding that can separate the name from the
// edge of the button // edge of the button
......
...@@ -3177,7 +3177,7 @@ namespace dlib ...@@ -3177,7 +3177,7 @@ namespace dlib
long new_cursor_pos 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 col_width;
array<unsigned long>::kernel_2a_c row_height; array<unsigned long>::kernel_2a_c row_height;
bool has_focus; bool has_focus;
...@@ -3298,7 +3298,7 @@ namespace dlib ...@@ -3298,7 +3298,7 @@ namespace dlib
unsigned long state unsigned long state
); );
array2d<rgb_alpha_pixel>::kernel_1a img; array2d<rgb_alpha_pixel> img;
std::vector<overlay_rect> overlay_rects; std::vector<overlay_rect> overlay_rects;
......
...@@ -309,7 +309,7 @@ namespace dlib ...@@ -309,7 +309,7 @@ namespace dlib
long num_intervals; long num_intervals;
long initial_step_size; long initial_step_size;
typedef array2d<double>::kernel_1a image_type; typedef array2d<double> image_type;
typedef array<image_type>::expand_1d pyramid_type; typedef array<image_type>::expand_1d pyramid_type;
pyramid_type pyramid; pyramid_type pyramid;
......
...@@ -371,7 +371,7 @@ namespace dlib ...@@ -371,7 +371,7 @@ namespace dlib
double values[num_orientation_bins]; double values[num_orientation_bins];
}; };
typename array2d<histogram>::kernel_1a hist_cells; array2d<histogram> hist_cells;
mutable descriptor_type des; mutable descriptor_type des;
......
...@@ -133,7 +133,7 @@ namespace dlib ...@@ -133,7 +133,7 @@ namespace dlib
try try
{ {
// convert from HSI to RGB (Or potentially RGB pixels that aren't laid out as R G B) // 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); assign_image(temp_img, img);
const int bit_depth = 8; const int bit_depth = 8;
...@@ -156,7 +156,7 @@ namespace dlib ...@@ -156,7 +156,7 @@ namespace dlib
try try
{ {
// convert from RGBA pixels that aren't laid out as R G B A // 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); assign_image(temp_img, img);
const int bit_depth = 8; const int bit_depth = 8;
...@@ -203,7 +203,7 @@ namespace dlib ...@@ -203,7 +203,7 @@ namespace dlib
try try
{ {
// convert from whatever this is to 16bit grayscale // 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); assign_image(temp_img, img);
const int bit_depth = 16; const int bit_depth = 16;
......
...@@ -127,7 +127,7 @@ namespace dlib ...@@ -127,7 +127,7 @@ namespace dlib
typedef typename pixel_traits<typename in_image_type::type>::basic_pixel_type bp_type; typedef typename pixel_traits<typename in_image_type::type>::basic_pixel_type bp_type;
typedef typename promote<bp_type>::type ptype; 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); temp_img.set_size(original.nr(), (original.nc()-3)/2);
down.set_size((original.nr()-3)/2, (original.nc()-3)/2); down.set_size((original.nr()-3)/2, (original.nc()-3)/2);
...@@ -218,7 +218,7 @@ namespace dlib ...@@ -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 in_image_type::type>::has_alpha == false );
COMPILE_TIME_ASSERT( pixel_traits<typename out_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); temp_img.set_size(original.nr(), (original.nc()-3)/2);
down.set_size((original.nr()-3)/2, (original.nc()-3)/2); down.set_size((original.nr()-3)/2, (original.nc()-3)/2);
......
...@@ -97,7 +97,7 @@ namespace dlib ...@@ -97,7 +97,7 @@ namespace dlib
private: private:
array2d<long>::kernel_1a int_img; array2d<long> int_img;
}; };
......
...@@ -409,10 +409,7 @@ namespace ...@@ -409,10 +409,7 @@ namespace
) )
{ {
dlog << LINFO << "testing kernel_1a"; dlog << LINFO << "testing kernel_1a";
array2d_kernel_test<array2d<unsigned long>::kernel_1a> (); array2d_kernel_test<array2d<unsigned long> > ();
print_spinner();
dlog << LINFO << "testing kernel_1a_c";
array2d_kernel_test<array2d<unsigned long>::kernel_1a_c> ();
print_spinner(); print_spinner();
} }
} a; } a;
......
...@@ -18,7 +18,7 @@ using namespace dlib; ...@@ -18,7 +18,7 @@ using namespace dlib;
using namespace std; using namespace std;
typedef dlib::array2d<hsi_pixel>::kernel_1a_c image; typedef dlib::array2d<hsi_pixel> image;
......
...@@ -32,7 +32,7 @@ namespace ...@@ -32,7 +32,7 @@ namespace
print_spinner(); print_spinner();
array2d<unsigned char>::kernel_1a_c img1, img2; array2d<unsigned char> img1, img2;
img1.set_size(100,100); img1.set_size(100,100);
...@@ -66,7 +66,7 @@ namespace ...@@ -66,7 +66,7 @@ namespace
} }
{ {
array2d<hsi_pixel>::kernel_1a img; array2d<hsi_pixel> img;
img.set_size(14,15); img.set_size(14,15);
for (long r = 0; r < 14; ++r) for (long r = 0; r < 14; ++r)
{ {
...@@ -106,7 +106,7 @@ namespace ...@@ -106,7 +106,7 @@ namespace
{ {
array2d<rgb_alpha_pixel>::kernel_1a img; array2d<rgb_alpha_pixel> img;
img.set_size(14,15); img.set_size(14,15);
for (long r = 0; r < 14; ++r) for (long r = 0; r < 14; ++r)
{ {
...@@ -147,7 +147,7 @@ namespace ...@@ -147,7 +147,7 @@ namespace
{ {
array2d<rgb_pixel>::kernel_1a img; array2d<rgb_pixel> img;
img.set_size(14,15); img.set_size(14,15);
for (long r = 0; r < 14; ++r) for (long r = 0; r < 14; ++r)
{ {
...@@ -212,7 +212,7 @@ namespace ...@@ -212,7 +212,7 @@ namespace
{ {
array2d<unsigned short>::kernel_1a img; array2d<unsigned short> img;
img.set_size(14,15); img.set_size(14,15);
for (long r = 0; r < 14; ++r) for (long r = 0; r < 14; ++r)
{ {
...@@ -247,7 +247,7 @@ namespace ...@@ -247,7 +247,7 @@ namespace
{ {
array2d<unsigned char>::kernel_1a img; array2d<unsigned char> img;
img.set_size(14,15); img.set_size(14,15);
for (long r = 0; r < 14; ++r) for (long r = 0; r < 14; ++r)
{ {
...@@ -308,7 +308,7 @@ namespace ...@@ -308,7 +308,7 @@ namespace
{ {
// in this test we will only assign pixel values that can be // 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. // 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); img.set_size(14,15);
for (long r = 0; r < 14; ++r) for (long r = 0; r < 14; ++r)
{ {
...@@ -365,8 +365,8 @@ namespace ...@@ -365,8 +365,8 @@ namespace
} }
{ {
array2d<unsigned short>::kernel_1a_c img1; array2d<unsigned short> img1;
array2d<unsigned char>::kernel_1a_c img2; array2d<unsigned char> img2;
img1.set_size(10,10); img1.set_size(10,10);
assign_all_pixels(img1, 0); assign_all_pixels(img1, 0);
...@@ -394,7 +394,7 @@ namespace ...@@ -394,7 +394,7 @@ namespace
} }
{ {
array2d<unsigned char>::kernel_1a_c img; array2d<unsigned char> img;
img.set_size(10,10); img.set_size(10,10);
assign_all_pixels(img, 0); assign_all_pixels(img, 0);
...@@ -419,7 +419,7 @@ namespace ...@@ -419,7 +419,7 @@ namespace
} }
{ {
array2d<unsigned char>::kernel_1a_c img; array2d<unsigned char> img;
img.set_size(11,11); img.set_size(11,11);
assign_all_pixels(img, 0); assign_all_pixels(img, 0);
...@@ -451,7 +451,7 @@ namespace ...@@ -451,7 +451,7 @@ namespace
{ {
dlib::rand rnd; dlib::rand rnd;
array2d<unsigned char>::kernel_1a_c img; array2d<unsigned char> img;
integral_image int_img; integral_image int_img;
int_img.load(img); int_img.load(img);
......
...@@ -406,7 +406,7 @@ namespace ...@@ -406,7 +406,7 @@ namespace
} }
{ {
array2d<double>::kernel_1a_c a; array2d<double> a;
a.set_size(6,7); a.set_size(6,7);
...@@ -447,7 +447,7 @@ namespace ...@@ -447,7 +447,7 @@ namespace
} }
{ {
array2d<double>::kernel_1a_c m; array2d<double> m;
m.set_size(5,5); m.set_size(5,5);
for (long r = 0; r < m.nr(); ++r) for (long r = 0; r < m.nr(); ++r)
......
...@@ -22,7 +22,7 @@ namespace ...@@ -22,7 +22,7 @@ namespace
void test_pyramid_down_graysclae() void test_pyramid_down_graysclae()
{ {
array2d<unsigned char>::kernel_1a img, down; array2d<unsigned char> img, down;
pyramid_down pyr; pyramid_down pyr;
img.set_size(300,264); img.set_size(300,264);
...@@ -50,8 +50,8 @@ void test_pyramid_down_graysclae() ...@@ -50,8 +50,8 @@ void test_pyramid_down_graysclae()
void test_pyramid_down_rgb() void test_pyramid_down_rgb()
{ {
array2d<rgb_pixel>::kernel_1a img; array2d<rgb_pixel> img;
array2d<bgr_pixel>::kernel_1a down; array2d<bgr_pixel> down;
pyramid_down pyr; pyramid_down pyr;
img.set_size(231, 351); img.set_size(231, 351);
...@@ -138,8 +138,8 @@ rgb_pixel mean_pixel ( ...@@ -138,8 +138,8 @@ rgb_pixel mean_pixel (
void test_pyramid_down_rgb2() void test_pyramid_down_rgb2()
{ {
array2d<rgb_pixel>::kernel_1a img, img3; array2d<rgb_pixel> img, img3;
array2d<unsigned char>::kernel_1a img2, img4; array2d<unsigned char> img2, img4;
img.set_size(300,400); img.set_size(300,400);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment