00001 #ifndef Impala_Core_Tracking_TrackerFactory_h 00002 #define Impala_Core_Tracking_TrackerFactory_h 00003 00004 #include "Util/PropertySet.h" 00005 #include "Core/Tracking/TrackerBackFore.h" 00006 #include "Core/Tracking/TrackerKalmanAppearance.h" 00007 00008 namespace Impala 00009 { 00010 namespace Core 00011 { 00012 namespace Tracking 00013 { 00014 00015 class TrackerFactory 00016 { 00017 public: 00018 static Tracker* CreateTracker(CmdOptions& options) 00019 { 00020 std::string name = options.GetString("tracker"); 00021 if(name == "fore_back") 00022 { 00023 return new TrackerBackFore(options); 00024 } 00025 if(name == "appearance_kalman") 00026 { 00027 return new TrackerKalmanAppearance; 00028 } 00029 return new TrackerGeneralised; 00030 } 00031 }; 00032 00033 } //namespace Tracking 00034 } //namespace Core 00035 } //namespace Impala 00036 00037 #endif Impala_Core_Tracking_TrackerFactory_h