MCPcopy Create free account
hub / github.com/Smorodov/Multitarget-tracker / GetRectPrediction

Method GetRectPrediction

src/Tracker/Kalman.cpp:812–838  ·  view source on GitHub ↗

\brief TKalmanFilter::GetRectPrediction \return

Source from the content-addressed store, hash-verified

810/// \return
811///
812cv::Rect TKalmanFilter::GetRectPrediction()
813{
814 if (m_initialized)
815 {
816 cv::Mat prediction;
817
818 switch (m_type)
819 {
820 case tracking::KalmanLinear:
821 prediction = m_linearKalman.predict();
822 break;
823
824 case tracking::KalmanUnscented:
825 case tracking::KalmanAugmentedUnscented:
826#ifdef USE_OCV_UKF
827 prediction = m_uncsentedKalman->predict();
828#else
829 prediction = m_linearKalman.predict();
830 std::cerr << "UnscentedKalmanFilter was disabled in CMAKE! Set KalmanLinear in constructor." << std::endl;
831#endif
832 break;
833 }
834
835 m_lastRectResult = cv::Rect_<track_t>(prediction.at<track_t>(0), prediction.at<track_t>(1), prediction.at<track_t>(2), prediction.at<track_t>(3));
836 }
837 return cv::Rect(static_cast<int>(m_lastRectResult.x), static_cast<int>(m_lastRectResult.y), static_cast<int>(m_lastRectResult.width), static_cast<int>(m_lastRectResult.height));
838}
839
840///
841/// \brief TKalmanFilter::Update

Callers 1

KalmanPredictRectMethod · 0.80

Calls 1

predictMethod · 0.45

Tested by

no test coverage detected