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

Function jitter_image

examples/dnn_face_recognition_ex.cpp:203–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201// ----------------------------------------------------------------------------------------
202
203std::vector<matrix<rgb_pixel>> jitter_image(
204 const matrix<rgb_pixel>& img
205)
206{
207 // All this function does is make 100 copies of img, all slightly jittered by being
208 // zoomed, rotated, and translated a little bit differently. They are also randomly
209 // mirrored left to right.
210 thread_local dlib::rand rnd;
211
212 std::vector<matrix<rgb_pixel>> crops;
213 for (int i = 0; i < 100; ++i)
214 crops.push_back(jitter_image(img,rnd));
215
216 return crops;
217}
218
219// ----------------------------------------------------------------------------------------
220

Callers 6

mainFunction · 0.70
load_mini_batchFunction · 0.70
jitter_imageMethod · 0.50
get_jitter_imagesFunction · 0.50

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected