From 214843df726b8f1b2bbb5be3e10c3ee703addeed Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 31 Oct 2016 14:55:25 +0300 Subject: [PATCH] doc: remove UML diagrams in tracking module --- modules/tracking/doc/diagrams.markdown | 256 ------------------ modules/tracking/include/opencv2/tracking.hpp | 5 - 2 files changed, 261 deletions(-) delete mode 100644 modules/tracking/doc/diagrams.markdown diff --git a/modules/tracking/doc/diagrams.markdown b/modules/tracking/doc/diagrams.markdown deleted file mode 100644 index 32abd2e0d..000000000 --- a/modules/tracking/doc/diagrams.markdown +++ /dev/null @@ -1,256 +0,0 @@ -Tracking diagrams {#tracking_diagrams} -================= - -General diagram -=============== - -@startuml{tracking_uml_general.png} - package "Tracker" - package "TrackerFeature" - package "TrackerSampler" - package "TrackerModel" - - Tracker -> TrackerModel: create - Tracker -> TrackerSampler: create - Tracker -> TrackerFeature: create -@enduml - -Tracker diagram -=============== - -@startuml{tracking_uml_tracking.png} - package "Tracker package" #DDDDDD { - - - class Algorithm - - class Tracker{ - Ptr featureSet; - Ptr sampler; - Ptr model; - --- - +static Ptr create(const string& trackerType); - +bool init(const Mat& image, const Rect& boundingBox); - +bool update(const Mat& image, Rect& boundingBox); - } - class Tracker - note right: Tracker is the general interface for each specialized trackers - class TrackerMIL{ - +static Ptr createTracker(const TrackerMIL::Params ¶meters); - +virtual ~TrackerMIL(); - } - class TrackerBoosting{ - +static Ptr createTracker(const TrackerBoosting::Params ¶meters); - +virtual ~TrackerBoosting(); - } - Algorithm <|-- Tracker : virtual inheritance - Tracker <|-- TrackerMIL - Tracker <|-- TrackerBoosting - - note "Single instance of the Tracker" as N1 - TrackerBoosting .. N1 - TrackerMIL .. N1 - } - -@enduml - -TrackerFeatureSet diagram -========================= - -@startuml{tracking_uml_feature.png} - package "TrackerFeature package" #DDDDDD { - - class TrackerFeatureSet{ - -vector > > features - -vector responses - ... - TrackerFeatureSet(); - ~TrackerFeatureSet(); - -- - +extraction(const std::vector& images); - +selection(); - +removeOutliers(); - +vector response getResponses(); - +vector > > getTrackerFeatures(); - +bool addTrackerFeature(string trackerFeatureType); - +bool addTrackerFeature(Ptr& feature); - -clearResponses(); - } - - class TrackerFeature <>{ - static Ptr = create(const string& trackerFeatureType); - compute(const std::vector& images, Mat& response); - selection(Mat& response, int npoints); - } - note bottom: Can be specialized as in table II\nA tracker can use more types of features - - class TrackerFeatureFeature2D{ - -vector keypoints - --- - TrackerFeatureFeature2D(string detectorType, string descriptorType); - ~TrackerFeatureFeature2D(); - --- - compute(const std::vector& images, Mat& response); - selection( Mat& response, int npoints); - } - class TrackerFeatureHOG{ - TrackerFeatureHOG(); - ~TrackerFeatureHOG(); - --- - compute(const std::vector& images, Mat& response); - selection(Mat& response, int npoints); - } - - TrackerFeatureSet *-- TrackerFeature - TrackerFeature <|-- TrackerFeatureHOG - TrackerFeature <|-- TrackerFeatureFeature2D - - - note "Per readability and simplicity in this diagram\n there are only two TrackerFeature but you\n can considering the implementation of the other TrackerFeature" as N1 - TrackerFeatureHOG .. N1 - TrackerFeatureFeature2D .. N1 - } - -@enduml - - -TrackerModel diagram -==================== - -@startuml{tracking_uml_model.png} - package "TrackerModel package" #DDDDDD { - - class Typedef << (T,#FF7700) >>{ - ConfidenceMap - Trajectory - } - - class TrackerModel{ - -vector confidenceMaps; - -Trajectory trajectory; - -Ptr stateEstimator; - ... - TrackerModel(); - ~TrackerModel(); - - +bool setTrackerStateEstimator(Ptr trackerStateEstimator); - +Ptr getTrackerStateEstimator(); - - +void modelEstimation(const vector& responses); - +void modelUpdate(); - +void setLastTargetState(const Ptr lastTargetState); - +void runStateEstimator(); - - +const vector& getConfidenceMaps(); - +const ConfidenceMap& getLastConfidenceMap(); - } - class TrackerTargetState <>{ - Point2f targetPosition; - --- - Point2f getTargetPosition(); - void setTargetPosition(Point2f position); - } - class TrackerTargetState - note bottom: Each tracker can create own state - - class TrackerStateEstimator <>{ - ~TrackerStateEstimator(); - static Ptr create(const String& trackeStateEstimatorType); - Ptr estimate(const vector& confidenceMaps) - void update(vector& confidenceMaps) - } - - class TrackerStateEstimatorSVM{ - TrackerStateEstimatorSVM() - ~TrackerStateEstimatorSVM() - Ptr estimate(const vector& confidenceMaps) - void update(vector& confidenceMaps) - } - class TrackerStateEstimatorMILBoosting{ - TrackerStateEstimatorMILBoosting() - ~TrackerStateEstimatorMILBoosting() - Ptr estimate(const vector& confidenceMaps) - void update(vector& confidenceMaps) - } - - TrackerModel -> TrackerStateEstimator: create - TrackerModel *-- TrackerTargetState - TrackerStateEstimator <|-- TrackerStateEstimatorMILBoosting - TrackerStateEstimator <|-- TrackerStateEstimatorSVM - } -@enduml - -TrackerSampler diagram -====================== - -@startuml{tracking_uml_sampler.png} - package "TrackerSampler package" #DDDDDD { - - class TrackerSampler{ - -vector > > samplers - -vector samples; - ... - TrackerSampler(); - ~TrackerSampler(); - +sampling(const Mat& image, Rect boundingBox); - +const vector > >& getSamplers(); - +const vector& getSamples(); - +bool addTrackerSamplerAlgorithm(String trackerSamplerAlgorithmType); - +bool addTrackerSamplerAlgorithm(Ptr& sampler); - --- - -void clearSamples(); - } - - class TrackerSamplerAlgorithm{ - ~TrackerSamplerAlgorithm(); - +static Ptr create(const String& trackerSamplerType); - +bool sampling(const Mat& image, Rect boundingBox, vector& 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& sample); - } - class TrackerSamplerCSC{ - TrackerSamplerCSC(); - ~TrackerSamplerCSC(); - +bool sampling(const Mat& image, Rect boundingBox, vector& sample); - } - - - } -@enduml - -MultiTracker diagram -====================== - -@startuml{tracking_uml_multiple.png} - package "MultiTracker" - package "Tracker" - - MultiTracker -> Tracker: create - - note top of Tracker: Several classes can be generated. -@enduml - -@startuml{multi_tracker_uml.png} - - class MultiTracker{ - MultiTracker(const String& trackerType = "" ); - ~MultiTracker(); - +bool add( const Mat& image, const Rect2d& boundingBox ); - +bool add( const String& trackerType, const Mat& image, const Rect2d& boundingBox ); - +bool add(const String& trackerType, const Mat& image, std::vector boundingBox); - +bool add(const Mat& image, std::vector boundingBox); - +bool update( const Mat& image, std::vector & boundingBox ); - +std::vector objects; - --- - #std::vector< Ptr > trackerList; - #String defaultAlgorithm; - } - - -@enduml diff --git a/modules/tracking/include/opencv2/tracking.hpp b/modules/tracking/include/opencv2/tracking.hpp index 488c2db93..6efabc6c7 100644 --- a/modules/tracking/include/opencv2/tracking.hpp +++ b/modules/tracking/include/opencv2/tracking.hpp @@ -69,14 +69,9 @@ the TrackerModel is the statistical model. A recent benchmark between these algorithms can be found in @cite OOT -UML design: see @ref tracking_diagrams - To see how API works, try tracker demo: -@note This Tracking API has been designed with PlantUML. If you modify this API please change UML -in modules/tracking/doc/tracking_diagrams.markdown. The following reference was used in the API - Creating Own Tracker --------------------