1 #ifndef __RMM_MOBILE_OBJECT_H__ 2 #define __RMM_MOBILE_OBJECT_H__ 4 #include "MODELS/reliabilitymultimodel.h" 5 #include "src/ModelInterface.h" 11 #define MOBILE_DEBUG_DATA 12 #define MOBILE_DETAILS 13 #define SHOW_BLOB_BUFFER 24 typedef QSharedPointer<RMMMobileObject> SpRMMMobileObject;
27 bool operator()(SpRMMMobileObject mobile1, SpRMMMobileObject mobile2);
31 bool operator()(SpRMMMobileObject mobile1, SpRMMMobileObject mobile2);
40 static double m_maxSpeed;
41 static int m_currentTrackingBlobsNumber;
42 static double m_lambda;
43 static int m_MultiModelBufferSize;
44 static int m_trajectoryMaxSize;
45 static double m_knownSolutionThreshold;
46 static double m_mobile2DCoverageRateToConsiderEqual;
47 static double m_mobile2DCoverageSegmentationToConsiderEqual;
48 static double m_mobileMinProbabilityToClassify;
51 static double m_CoherenceReliabilityThreshold;
52 static double m_CoherenceProbabilityThreshold;
53 static double m_probabilityToEnsureMode;
54 static int m_reliableFrames;
55 static double zeroTolerance;
57 static double *secDiffSequence;
58 static double *secDiffToCurrent;
59 static double *coolingValue;
63 static cv::KalmanFilter m_kalman;
65 static bool m_useKalman;
66 static int m_kalmanMaxPixelError;
68 static SpRMMHypothesis activeHypothesis;
72 unsigned long mobile_id;
75 ObjectSubtype best_subtype;
83 int numberOfFramesNotSeen, numberOfFramesSinceFirstTimeSeen;
89 DetectionProblemType currentVisualState;
94 double prevCooling, sumCooling;
109 int firstForwardModel;
113 std::deque<SpRMMMobileObject> history;
129 void initUsedBlobs();
130 void initInvolvedBlobs();
131 static void initKalman();
134 std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator> setInitialMultiModel(
BoundingBox &bbox);
142 void setMobileId(
unsigned long i_id);
143 void setNewMobileFromBlob(
Blob *blob,
unsigned long mobile_id);
144 void setNumberOfFramesNotSeen(
int num);
145 void incrementNumberOfFramesNotSeen();
146 void incrementNumberOfFramesSinceFirstTimeSeen();
147 void setGlobalProbability();
150 unsigned long getMobileId();
151 ObjectType getBestType();
152 ObjectSubtype getBestSubType();
153 int getNumberOfFramesNotSeen();
154 int getNumberOfFramesSinceFirstTimeSeen();
155 double getGlobalProbability();
156 SpReliabilitySingleModelInterface getSubModel(QString);
157 SpReliabilitySingleModelInterface getSubModel(QString name, std::deque<SpReliabilitySingleModelInterface> &models);
159 bool findSingleModelByName(QString name);
162 static double NormalizeOrientation(
double);
163 static double minimalAngularDistance(
double alpha1,
double alpha2);
164 static double NormalizeVelocityAngle(
double);
165 static double coolingFunction(
double x);
167 std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator> updateMobilePath(
BoundingBox &bbox, DetectionProblemType dp_type);
168 void updateMobileBufferStructures(
BoundingBox &bbox, DetectionProblemType dp_type);
169 void updateMobileDynamics();
174 double DimensionalCoherenceReliability(
double sigma_dim,
double min,
double max);
177 friend std::ostream& operator<<(std::ostream&, SpRMMMobileObject);
180 void updateBestTypeInformation();
181 void incrementalUpdateDynamics(std::deque<SpReliabilitySingleModelInterface> &dyn);
182 void updateCooling();
183 bool mobileOutOfScene();
185 void setMobileReference();
190 void prepareNewMobile(
BoundingBox &bbox,
unsigned long mobile_id, DetectionProblemType dp_type);
191 void prepareExistingMobile(
BoundingBox &bbox, DetectionProblemType dp_type);
192 bool differentEnoughForWorthyBackReprocessing(SpReliabilitySingleModelInterface current, SpReliabilitySingleModelInterface dependant);
193 static bool diffEnoughSegmentation(cv::Mat ¤t, cv::Mat &dependant);
194 void genROIFromFg(cv::Mat &image_roi,
BoundingBox &roi);
205 static void genROIFromSpecificSegmentation(cv::Mat &image_roi,
BoundingBox &roi,
BoundingBox &original_roi, cv::Mat &original_seg);
207 static double segmentationSimilarity(cv::Mat &m1, cv::Mat &m2);
Definition: reliabilitymultimodel.h:126
Definition: RMMTracker.h:60
Definition: RMMMobileObject.h:36
Definition: RMMMobileObject.h:30
Definition: calibration.h:51
Definition: reliabilitysinglemodelinterface.h:27
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39
Definition: RMMMobileObject.h:26
Definition: reliabilitymultimodel.h:24
Definition: reliabilitysinglemodelinterface.h:21