LiveFit
Track and plot projectiles for in-class demonstration
Public Member Functions | Private Attributes | List of all members
BallTrackingFilter Class Reference

A TrackingFilter with some specifics for tracking a ball in flight. More...

#include <BallTrackingFilter.hpp>

Inheritance diagram for BallTrackingFilter:
Inheritance graph
[legend]
Collaboration diagram for BallTrackingFilter:
Collaboration graph
[legend]

Public Member Functions

void flushKalman ()
 Reset the status of the KF to initial.
 
void setXYCovariance (double sigma)
 Set the covariance for the x and y measurements in the KF.
 
void updateTrackFailure ()
 Tell the KF that we failed to track a ball.
 
void updateTrackSuccess (TrackingBall ball)
 Tell the KF about a new tracked ball.
 
void updateTimeState (double t)
 Change the current internal time state of the tracker (eg at a new tick)
 
void setGravConstant (double gravConstant)
 Set the acceleration due to gravity.
 
- Public Member Functions inherited from TrackingFilter
void flushKalman ()
 Reset KF state to initial values.
 
double kalmanDistance (cv::Mat measurement)
 Compute the Kalman distance to a measurement vector. More...
 
void updateTrackFailure ()
 Alert the KF that we did not track a ball this frame.
 
cv::Mat prediction ()
 The KF prediction of the state.
 
cv::Mat covariance ()
 The KF's covariance matrix.
 
void updateTimeState (double t)
 Update the time state of the tracker to the current time.
 
double dT ()
 Change in time from prior state to this one.
 
double time ()
 The current time state.
 
bool isFound ()
 Whether we have found a object recently.
 
bool isLost ()
 Whether the object is lost and we don't know anything about it.
 

Private Attributes

double mGravConstant
 A priori known acceleration due to gravity g (positive direction) is towards center of earth. More...
 

Additional Inherited Members

- Protected Attributes inherited from TrackingFilter
int mBlobRad
 Radius of the current state blob?
 
int mLatency
 Unused?
 
int mNotFoundCount
 Number of frames we have missed this object for. More...
 
int mKfStateLen
 Length of the state vector; 6 <x,y,dx,dy,w,h>
 
cv::Mat mKfState
 State vector of most recent state.
 
int mFoundCount
 Number of frames we have tracked this object for.
 
int mKfControlLen
 
cv::Mat mKfControl
 
cv::Mat mKfControlVec
 
int mKfMeasLen
 Length of the measurement vector; 4 <x,y,w,h>
 
cv::Mat mKfMeas
 Measurement vector of most recent state.
 
double mTstart = 0
 Start time of this tick (the previous timestep's time)
 
double mTstop = 0
 Stop time of this tick (the current timestate)
 
KalmanFilterPlus mKf
 The Kalman Filter object proper.
 

Detailed Description

A TrackingFilter with some specifics for tracking a ball in flight.

Member Data Documentation

double BallTrackingFilter::mGravConstant
private

A priori known acceleration due to gravity g (positive direction) is towards center of earth.


The documentation for this class was generated from the following files: