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

Function make_random_detections

examples/learning_to_track_ex.cpp:233–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231// ----------------------------------------------------------------------------------------
232
233std::vector<detection> make_random_detections(long num_dets)
234{
235 /*
236 Finally, when we test the tracker we learned we will need to sample regular old
237 unlabeled detections. This function helps us do that.
238 */
239 DLIB_CASSERT(num_dets <= num_objects,
240 "You can't ask for more detections than there are objects in our little simulation.");
241
242 std::vector<detection> dets(num_dets);
243 for (unsigned long i = 0; i < dets.size(); ++i)
244 {
245 dets[i] = sample_detection_from_sensor(i);
246 }
247 return dets;
248}
249
250// ----------------------------------------------------------------------------------------
251

Callers 1

mainFunction · 0.70

Calls 2

sizeMethod · 0.45

Tested by

no test coverage detected