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

Function get_random_image

dlib/test/ffmpeg.cpp:42–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41 template <class pixel>
42 matrix<pixel> get_random_image()
43 {
44 matrix<pixel> img;
45
46 img.set_size(rng.get_integer_in_range(1, 128),
47 rng.get_integer_in_range(1, 128));
48
49 for (long i = 0 ; i < img.nr() ; ++i)
50 for (long j = 0 ; j < img.nc() ; ++j)
51 assign_pixel(img(i,j), rng.get_random_8bit_number());
52
53 return img;
54 }
55
56 template <class pixel>
57 void check_image (

Callers

nothing calls this directly

Calls 6

assign_pixelFunction · 0.85
get_integer_in_rangeMethod · 0.80
set_sizeMethod · 0.45
nrMethod · 0.45
ncMethod · 0.45

Tested by

no test coverage detected