Skip to content

Commit

Permalink
New filter for trajectory
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuzhny007 committed Jul 6, 2022
1 parent ca760de commit bea1c3e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Tracker/trajectory.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,14 @@ struct TrackingObject
/// \param sizeRatio
/// \return
///
bool IsRobust(int minTraceSize, float minRawRatio, cv::Size2f sizeRatio) const
bool IsRobust(int minTraceSize, float minRawRatio, cv::Size2f sizeRatio, size_t lastDetectsCount = 0) const
{
m_lastRobust = m_trace.size() > static_cast<size_t>(minTraceSize);
if (lastDetectsCount)
{
size_t raws = m_trace.GetRawCount(lastDetectsCount);
m_lastRobust = (raws > 0);
}
m_lastRobust &= m_trace.GetRawCount(m_trace.size() - 1) / static_cast<float>(m_trace.size()) > minRawRatio;
if (sizeRatio.width + sizeRatio.height > 0)
{
Expand Down

0 comments on commit bea1c3e

Please sign in to comment.