Resolve "Merge doesn't delete already merged person from further evaluation"
Merged
requested to merge 274-merge-doesn-t-delete-already-merged-person-from-further-evaluation into master
Compare changes
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.
This happens with trajectories, where:
(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?
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)
{
continue;
}
Closes #274 (closed)