| 201 | // ---------------------------------------------------------------------------------------- |
| 202 | |
| 203 | std::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 |
no test coverage detected