Smorodov / Multitarget-tracker

Multiple Object Tracker, Based on Hungarian algorithm + Kalman filter.
Apache License 2.0
2.17k stars 649 forks source link

some tracked objects flying? #445

Open xinsuinizhuan opened 8 months ago

xinsuinizhuan commented 8 months ago

when i set the settings.m_maxTraceLength long, the object disable will fly

TrackerSettings settings; settings.SetDistance(tracking::DistRects); settings.m_kalmanType = tracking::KalmanLinear; settings.m_filterGoal = tracking::FilterCenter; settings.m_lostTrackType = tracking::TrackNone; // Use visual objects tracker for collisions resolving. Used if m_filterGoal == tracking::FilterRect settings.m_matchType = tracking::MatchHungrian; settings.m_useAcceleration = false; // Use constant acceleration motion model settings.m_dt = settings.m_useAcceleration ? 0.05f : 0.5f; // Delta time for Kalman filter settings.m_accelNoiseMag = 0.1f; // Accel noise magnitude for Kalman filter settings.m_distThres = 0.95f; // Distance threshold between region and object on two frames settings.m_minAreaRadiusPix = -1.f; settings.m_minAreaRadiusK = 0.8f; settings.m_useAbandonedDetection = false; settings.m_maximumAllowedSkippedFrames = cvRound(2 m_videofps); // Maximum allowed skipped frames settings.m_maxTraceLength = cvRound(40 m_videofps); // Maximum trace length

图片

Nuzhny007 commented 7 months ago

Hi! It looks like a false positive detection. Or not? Another way to filter tracking errors:

track.IsRobust(4,                                    // Minimal trajectory size
            0.85f,                              // Minimal ratio raw_trajectory_points / trajectory_lenght
            cv::Size2f(0.1f, 10.0f),      // Min and max ratio: width / height
            1) <---------------------- set here a small value
xinsuinizhuan commented 7 months ago

ok,now its work. But where is the tracked object status,Confirmed,mis and remove? If the object is Confirmed need to do some other operate

Nuzhny007 commented 7 months ago

For missed objects used not very good named variable - TrajectoryPoint::m_hasRaw. And it drawn circle on trajectory: https://github.com/Smorodov/Multitarget-tracker/blob/master/example/VideoExample.cpp#L575C22-L575C30