Reducing quality of wrong path not working with color marker
Lets assume we detect a point at frame 0. We now track it in frame 1,2,3,4,5. In frame 6 we detect it again and the detected frame is "far" away from the tracked one. Then the tracking seems to be false and its quality (i.e. the quality of frame 1-5) should be reduced. We do this in the following code snippet:
int anz;
debout << "Warning: Big difference in location between existing and replacing track point of person " << persNr+1 << " in frame " << frame << "!" << endl;
// qualitaet anpassen, da der weg zum pkt nicht der richtige gewesen sein kann
// zurueck
for (anz=1; trackPointExist(frame-anz) && (trackPointAt(frame-anz).qual() < 100); ++anz)
;
for (i=1; i<(anz-1); ++i) // anz ist einer zu viel; zudem nur boie anz-1 , da sonst eh nur mit 1 multipliziert wuerde
(*this)[frame-mFirstFrame-i].setQual((i*trackPointAt(frame-i).qual())/anz);
// vor
for (anz=1; trackPointExist(frame+anz) && (trackPointAt(frame+anz).qual() < 100); ++anz)
;
for (i=1; i<(anz-1); ++i) // anz ist einer zu viel; zudem nur boie anz-1 , da sonst eh nur mit 1 multipliziert wuerde
(*this)[frame-mFirstFrame+i].setQual((i*trackPointAt(frame+i).qual())/anz);
(TrackPerson::insertAtFrame
)
But a multicolor-marker does not neccessarily have a quality of 100. Only when using perspective correction or detecting a aruco code/black dot, the quality gets set to 100. Else it is set to 90.
The heuristic that points with a quality lower than 100 are tracked, which is used in the code above, doesn't hold (it does work with contour markers and the color-marker).