7 #ifndef MULTI_SAMPLER_HEADER
8 #define MULTI_SAMPLER_HEADER
10 #include "GlobalHeader.h"
16 #define MULTI_SAMPLER_SAMPLES 5
28 void Sample(
const std::vector<int> &matchDets,
const Pool<Rect> &detections,
const Size &imgSize);
42 typedef std::vector<Rect>::const_pointer pointer;
43 typedef int difference_type;
44 typedef std::input_iterator_tag iterator_category;
48 bool *m) : ptr(p), target(t), mask(m), length(l) {}
49 self_type operator++() {
51 self_type old = *
this;
58 while (i < length && !mask[i]) {
64 reference operator*() {
return *ptr; }
65 pointer operator->() {
return ptr; }
66 bool operator==(
const self_type& rhs) {
return ptr == rhs.ptr; }
67 bool operator!=(
const self_type& rhs) {
return ptr != rhs.ptr; }
68 int GetTarget() {
return (target == (i / MULTI_SAMPLER_SAMPLES)) ? 1 : -1; }
87 const_iterator end()
const {
return const_iterator(&
samples[0] +
samples.size(), -1,
samples.size(), mask); }
102 static std::default_random_engine generator;
103 std::normal_distribution<float> gaussianWidth;
104 std::normal_distribution<float> gaussianHeight;
Definition: Geometry.h:34
Definition: MultiSampler.h:18
Definition: Geometry.h:14
Definition: MultiSampler.h:37
std::vector< Rect > samples
Definition: MultiSampler.h:99
void Sample(const std::vector< int > &matchDets, const Pool< Rect > &detections, const Size &imgSize)
Definition: MultiSampler.cpp:18