12#ifndef WSFIMAGEPROCESSOR_HPP
13#define WSFIMAGEPROCESSOR_HPP
15#include "wsf_mil_export.h"
53 void TurnOff(
double aSimTime)
override;
72 mResult =
"UNDETECTED";
73 mFinalResult =
"UNDETECTED";
74 mPreviouslyClassified =
false;
75 mPreviouslyIdentified =
false;
79 void SetResult(
const std::string& aResult) { mResult = aResult; }
83 void SetPerceivedType(
const std::string& aPerceivedType) { mPerceivedType = aPerceivedType; }
90 void SetDraw(
double aDraw) { mDraw = aDraw; }
105 std::string mFinalResult;
106 std::string mPerceivedType;
107 double mReqDetected{0.0};
108 double mReqClassified{0.0};
109 double mReqIdentified{0.0};
112 bool mPreviouslyClassified{
false};
113 bool mPreviouslyIdentified{
false};
202 void ClearStateList();
204 void ProcessImage(
double aSimTime,
WsfImage& aImage);
206 void PurgeOldTracks(
double aSimTime,
double aImageTime,
WsfSensor* aSensorPtr);
208 double ComputeProbabilityOfDetection(
double aObjectSize)
const;
209 double ComputeProbabilityOfClassification(
double aObjectSize)
const;
210 double ComputeProbabilityOfIdentification(
double aObjectSize)
const;
218 double mCoastTime{0.0};
221 int mMessageLength{0};
224 int mMessagePriority{0};
226 bool mReportsVelocity{
true};
227 bool mReportsSide{
false};
228 bool mReportsType{
false};
229 bool mReportsBearingElevation{
false};
230 bool mTargetRecognitionEnabled{
false};
236 bool mIncludeUnstableCovariance{
false};
237 bool mIncludeUnstableResidualCovariance{
false};
242 using StateList = std::map<size_t, State*>;
243 StateList mStateList;
247 WsfVariable<double> mMinDetectPixelCount{0.0};
248 WsfVariable<double> mMinClassPixelCount{0.0};
249 WsfVariable<double> mMinIdentPixelCount{0.0};
254 WsfVariable<double> mAverageAspectRatio{4.0};
258 WsfVariable<double> mDetectionSAF{1.0};
259 WsfVariable<double> mClassificationSAF{4.0};
260 WsfVariable<double> mIdentificationSAF{6.4};
265 WsfVariable<double> mDetectionDelayTime{0.0};
266 WsfVariable<double> mClassificationDelayTime{0.0};
267 WsfVariable<double> mIdentificationDelayTime{0.0};
272 WsfVariable<double> mTransitionCoastTime{0.0};
273 WsfVariable<double> mDetectionCoastTime{0.0};
274 WsfVariable<double> mClassificationCoastTime{0.0};
275 WsfVariable<double> mIdentificationCoastTime{0.0};
278 bool mShowStateTransitions{
false};
280 using StatusList = std::map<size_t, Status>;
281 StatusList mStatusList;
285 ObjectTest mObjectTest;
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Implement a filter as an adapter.
Definition WsfFilter.hpp:24
bool GetPreviouslyClassified() const
Definition WsfImageProcessor.hpp:95
void SetPreviouslyClassified(bool aPreviouslyClassified)
Definition WsfImageProcessor.hpp:97
void SetPreviouslyIdentified(bool aPreviouslyIdentified)
Definition WsfImageProcessor.hpp:98
double GetRequiredClassified() const
Definition WsfImageProcessor.hpp:87
bool GetPreviouslyIdentified() const
Definition WsfImageProcessor.hpp:96
void SetObject(const WsfImage::Object *aObjectPtr, const WsfImage *aImagePtr)
Definition WsfImageProcessor.hpp:63
void SetResult(const std::string &aResult)
Definition WsfImageProcessor.hpp:79
void SetPerceivedType(const std::string &aPerceivedType)
Definition WsfImageProcessor.hpp:83
void SetRequiredIdentified(double aReqIdentified)
Definition WsfImageProcessor.hpp:93
void SetFinalResult(const std::string &aResult)
Definition WsfImageProcessor.hpp:81
std::string GetResult() const
Definition WsfImageProcessor.hpp:78
void SetDraw(double aDraw)
Definition WsfImageProcessor.hpp:90
void SetRequiredDetected(double aReqDetected)
Definition WsfImageProcessor.hpp:91
std::string GetFinalResult() const
Definition WsfImageProcessor.hpp:80
const WsfImage::Object * mObjectPtr
Definition WsfImageProcessor.hpp:100
const WsfImage * mImagePtr
Definition WsfImageProcessor.hpp:101
double GetRequiredDetected() const
Definition WsfImageProcessor.hpp:86
double GetRequiredIdentified() const
Definition WsfImageProcessor.hpp:88
double GetDraw() const
Definition WsfImageProcessor.hpp:85
void SetRequiredClassified(double aReqClassified)
Definition WsfImageProcessor.hpp:92
std::string GetPerceivedType() const
Definition WsfImageProcessor.hpp:82
Definition WsfImageProcessor.hpp:117
WsfTrack * mTrackPtr
Definition WsfImageProcessor.hpp:119
unsigned int mStreamNumber
Definition WsfImageProcessor.hpp:121
WsfFilter * mFilterPtr
Definition WsfImageProcessor.hpp:120
double mMinimumTimeInState
The minimum time that must be spent in the current state before a transition to a higher state can oc...
Definition WsfImageProcessor.hpp:172
WsfStringId TruthName() const
Definition WsfImageProcessor.hpp:139
void SetStale()
Definition WsfImageProcessor.hpp:155
TargetRecognitionState CurrentState() const
Definition WsfImageProcessor.hpp:164
TargetRecognitionState CoastingState() const
Definition WsfImageProcessor.hpp:162
double mLastGoodUpdateTime
The last time when a detection was registered that met the criteria for the current state.
Definition WsfImageProcessor.hpp:174
TargetRecognitionState mCurrentState
The current state.
Definition WsfImageProcessor.hpp:176
Status(WsfStringId aTruthName=WsfStringId())
Definition WsfImageProcessor.hpp:127
double EarliestStateExitTime() const
Definition WsfImageProcessor.hpp:167
double mCoastingStartTime
The time when coasting started.
Definition WsfImageProcessor.hpp:178
void SetLastGoodUpdateTime(double aSimTime)
Definition WsfImageProcessor.hpp:148
void EnterState(TargetRecognitionState aNewState, double aStateEntryTime, double aMinimumTimeInState)
Definition WsfImageProcessor.hpp:141
bool mIsStale
True if the object is stale (didn't exist in the last image).
Definition WsfImageProcessor.hpp:184
double mStateEntryTime
The time when the transition occurred into the current state.
Definition WsfImageProcessor.hpp:170
double StateEntryTime() const
Definition WsfImageProcessor.hpp:165
TargetRecognitionState mCoastingState
The state (quality) of the update associated with mLastFailedUpdateTime;.
Definition WsfImageProcessor.hpp:180
bool IsStale() const
Definition WsfImageProcessor.hpp:156
WsfStringId mTruthName
The name id of the underlying platform represented by the object.
Definition WsfImageProcessor.hpp:182
A specialization of WsfMessageProcessor that implements an example image processor.
Definition WsfImageProcessor.hpp:25
virtual void ImageProcessingInitiated(double aSimTime, const WsfImage &aImage)
Definition WsfImageProcessor.cpp:434
virtual bool IsDetectable(double aSimTime, const WsfImage &aImage, const WsfImage::Object &aObject)
Definition WsfImageProcessor.cpp:459
WsfImageProcessor(WsfScenario &aScenario)
Constructor.
Definition WsfImageProcessor.cpp:50
virtual void ImageProcessingCompleted(double aSimTime, const WsfImage &aImage)
Definition WsfImageProcessor.cpp:381
double GetCoastTime() const
Return the value of 'coast_time'.
Definition WsfImageProcessor.hpp:56
TargetRecognitionState
Definition WsfImageProcessor.hpp:30
@ cST_WAITING_DETECTION
Definition WsfImageProcessor.hpp:32
@ cST_IDENTIFIED
Definition WsfImageProcessor.hpp:37
@ cST_DETECTED
Definition WsfImageProcessor.hpp:33
@ cST_WAITING_CLASSIFICATION
Definition WsfImageProcessor.hpp:34
@ cST_CLASSIFIED
Definition WsfImageProcessor.hpp:35
@ cST_WAITING_IDENTIFICATION
Definition WsfImageProcessor.hpp:36
@ cST_UNDETECTED
Definition WsfImageProcessor.hpp:31
virtual void TrackDropped(double aSimTime, const WsfTrack &aTrack)
Definition WsfImageProcessor.cpp:485
virtual void UpdateTrack(double aSimTime, WsfTrack &aTrack, const WsfImage &aImage, const WsfImage::Object &aObject)
Definition WsfImageProcessor.cpp:509
WsfImageProcessor & operator=(const WsfImageProcessor &)=delete
A nested class that represents the appearance of a single object (platform) in the image.
Definition WsfImage.hpp:40
Definition WsfImage.hpp:36
WsfProcessor * Clone() const override
Definition WsfMessageProcessor.cpp:70
bool Initialize(double aSimTime) override
Definition WsfMessageProcessor.cpp:77
bool ProcessMessage(double aSimTime, const WsfMessage &aMessage) override
Definition WsfMessageProcessor.cpp:198
bool ReceiveMessage(double aSimTime, const WsfMessage &aMessage) override
Definition WsfMessageProcessor.cpp:231
WsfMessageProcessor(WsfScenario &aScenario)
Definition WsfMessageProcessor.cpp:31
bool ProcessInput(UtInput &aInput) override
Definition WsfMessageProcessor.cpp:103
void TurnOff(double aSimTime) override
Definition WsfMessageProcessor.cpp:323
A base class for messages sent among simulation communication objects, processors and sensors.
Definition WsfMessage.hpp:33
Definition WsfProcessor.hpp:39
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfSensor.hpp:92
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120