Skip to content

Resolve "Merge doesn't delete already merged person from further evaluation"

There was an error, where a person, who was already deleted because they were merged with another, still got evaluated. During this evaluation, the person which got the index of the deleted one got processed, or a segmentation fault happened, when the deleted person was the last one.

This is fixed by setting mStatus to not only signal not being tracked, but also, already being merged away.

Steps to reproduce

This happens with trajectories, where:

  1. The lower index is the traj that survives the merge
  2. Both trajecories where already trackd at that frame
  3. Both trajectories get retracked

(Note: The 3rd one could be annoying in using merge, since without retracking, no merging occurs; could be resolved with #261 )

So how to achieve that?

  1. Use complete trajectory vs a fake one in the middle of the video (e.g. real Frame 0 - 300, fake 150 - 160)
  2. Track both points without merge for a while and go back to the middle of the tracked trajectories
  3. Set the retack below quality to 100 and use the color marker

One also probably needs to comment out the logic which disabled retracking if inefficient in Tracker::calcPrevFeaturePoints:

             * For retracking to occur, every point in the path from the last
             * recognized point to this point should have been tracked with higher qual.
             * This should eliminate cases in which wrong points are tracked confidently
             * and replace better ones, under the assumption we only get to a wrong point
             * due to a low-quality tracking earlier.
            bool applyReTrack = reTrack;
            //            if(reTrack)
            //            {
            //                int dir = (frame - prevFrame); // direction of tracking - forward/backwards
            //                dir /= std::abs(dir);          // theoretically possible to omit MAX_STEP_TRACK frames
            //                constexpr int minQualReco = 90;
            //                for(int j = 0; person.trackPointExist(frame + j * dir) &&
            //                               person.trackPointAt(frame + j * dir).qual() < minQualReco;
            //                    ++j)
            //                {
            //                    if(person.trackPointAt(frame + j * dir).qual() < reQual)
            //                    {
            //                        applyReTrack = false;
            //                        break;
            //                    }
            //                }
            //            }
            if(person.trackPointExist(frame) && !applyReTrack)

Closes #274 (closed)

Merge request reports