server/src/KalmanTracker.cpp
// Update the state vector with observed bounding box.
Update the state vector with observed bounding box.
Update the state vector with observed bounding box .
void KalmanTracker::update(StateType stateMat)
{
	m_time_since_update = 0;
	m_history.clear();
	m_hits += 1;
	m_hit_streak += 1;
	measurement.at<float>(0, 0) = stateMat.x + stateMat.width / 2;
	measurement.at<float>(1, 0) = stateMat.y + stateMat.height / 2;
	measurement.at<float>(2, 0) = stateMat.area();
	measurement.at<float>(3, 0) = stateMat.width / stateMat.height;
	kf.correct(measurement);
}
void KalmanTracker :: update ( StateType stateMat ) { m_time_since_update = 0 ; m_history . clear ( ) ; m_hits += 1 ; m_hit_streak += 1 ; measurement . at < float > ( 0 , 0 ) = stateMat . x + stateMat . width / 2 ; measurement . at < float > ( 1 , 0 ) = stateMat . y + stateMat . height / 2 ; measurement . at < float > ( 2 , 0 ) = stateMat . area ( ) ; measurement . at < float > ( 3 , 0 ) = stateMat . width / stateMat . height ; kf . correct ( measurement ) ; }
Update the state vector with observed bounding box.
Update the state vector with observed bounding box .
// measurement // update