TrackerSampler.txt 1.33 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
@startuml
package "TrackerSampler package" #DDDDDD {

class TrackerSampler{
    -vector<pair<String, Ptr<TrackerSamplerAlgorithm> > > samplers
    -vector<Mat> samples;
    ...
    TrackerSampler();
    ~TrackerSampler();
    +sampling(const Mat& image, Rect boundingBox);
    +const vector<pair<String, Ptr<TrackerSamplerAlgorithm> > >& getSamplers();
    +const vector<Mat>& getSamples();
    +bool addTrackerSamplerAlgorithm(String trackerSamplerAlgorithmType);
    +bool addTrackerSamplerAlgorithm(Ptr<TrackerSamplerAlgorithm>& sampler);
    ---
    -void clearSamples();
}

class TrackerSamplerAlgorithm{
    ~TrackerSamplerAlgorithm();
    +static Ptr<TrackerSamplerAlgorithm> create(const String& trackerSamplerType);
    +bool sampling(const Mat& image, Rect boundingBox, vector<Mat>& sample);
}
note bottom: A tracker could sample the target\nor it could sample the target and the background


class TrackerSamplerCS{
    TrackerSamplerCS();
    ~TrackerSamplerCS();
    +bool sampling(const Mat& image, Rect boundingBox, vector<Mat>& sample);
}
class TrackerSamplerCSC{
    TrackerSamplerCSC();
    ~TrackerSamplerCSC();
    +bool sampling(const Mat& image, Rect boundingBox, vector<Mat>& sample);
}



TrackerSampler *-- TrackerSamplerAlgorithm
TrackerSamplerAlgorithm <|-- TrackerSamplerCS
TrackerSamplerAlgorithm <|-- TrackerSamplerCSC
}
@enduml