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

Function test_pyr_sizes

dlib/test/pyramid_down.cpp:284–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282
283template <typename pyramid_down_type>
284void test_pyr_sizes()
285{
286 dlib::rand rnd;
287
288 for (int iter = 0; iter < 20; ++iter)
289 {
290 long nr = rnd.get_random_32bit_number()%10+40;
291 long nc = rnd.get_random_32bit_number()%10+40;
292
293 array2d<unsigned char> img(nr,nc), img2;
294 assign_all_pixels(img,0);
295
296 pyramid_down_type pyr;
297
298 pyr(img, img2);
299 find_pyramid_down_output_image_size(pyr, nr, nc);
300 DLIB_TEST(img2.nr() == nr);
301 DLIB_TEST(img2.nc() == nc);
302 }
303}
304
305
306// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 5

assign_all_pixelsFunction · 0.85
nrMethod · 0.45
ncMethod · 0.45

Tested by

no test coverage detected