MCPcopy Create free account
hub / github.com/davisking/dlib / load

Method load

dlib/test/object_detector.cpp:104–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102 public:
103
104 inline void load (
105 const funny_image& img_
106 )
107 {
108 const array2d<unsigned char>& img = img_.img;
109
110 feat_image.set_size(img.nr(), img.nc());
111 assign_all_pixels(feat_image,0);
112 for (long r = 1; r+1 < img.nr(); ++r)
113 {
114 for (long c = 1; c+1 < img.nc(); ++c)
115 {
116 unsigned char f = 0;
117 if (img[r][c]) f |= 0x1;
118 if (img[r][c+1]) f |= 0x2;
119 if (img[r][c-1]) f |= 0x4;
120 if (img[r+1][c]) f |= 0x8;
121 if (img[r-1][c]) f |= 0x10;
122
123 // Store the code value for the pattern of pixel values in the 4-connected
124 // neighborhood around this row and column.
125 feat_image[r][c] = f;
126 }
127 }
128 }
129
130 inline void load (
131 const array2d<unsigned char>& img

Callers 15

static_map_kernel_testFunction · 0.45
make_datasetFunction · 0.45
test1Function · 0.45
perform_testMethod · 0.45
test_projection_errorMethod · 0.45
test_with_kernelMethod · 0.45
do_the_testMethod · 0.45
sum_filter_iFunction · 0.45
scan_image_iFunction · 0.45
perform_testMethod · 0.45
test_integral_imageFunction · 0.45

Calls 4

assign_all_pixelsFunction · 0.85
set_sizeMethod · 0.45
nrMethod · 0.45
ncMethod · 0.45

Tested by

no test coverage detected