Defined in File track-manager.h
UniformTrackManager: public aslam::TrackManager¶
Track manager using buckets to uniformly distribute weak new tracks.
The image space of the apple frame is divided into num_buckets_root^2 buckets.
Note: max_number_of_weak_new_tracks is only an upper bound for the max number of non-strong new tracks that can be born. It determines the bucket capacity as follows: bucket_capacity := floor(max_number_of_weak_new_tracks / num_buckets) It does not influence the number of strong new tracks that are forced pushed. I.e. there may be more strong new tracks being born in a bucket than bucket_capacity. In this case, no further weak new tracks will be generated in this particular bucket but it does not reduce the number of weak new tracks accepted in other (not yet full) buckets.
UniformTrackManager(size_t num_buckets_root, size_t max_number_of_weak_new_tracks, size_t num_strong_new_tracks_to_force_push, double match_score_very_strong_new_tracks_threshold)¶
applyMatchesToFrames(const FrameToFrameMatchesWithScore &matches_A_B, VisualFrame *apple_frame, VisualFrame *banana_frame)¶
Writes track ids into the given frames for the given matches.
In a first iteration, all track ids from preexisting tracks get assigned (i.e. matches, for which either one of the track ids is valid (>=0)). In a second iteration, the number_of_very_strong_new_tracks_to_push_ strongest new track matches are applied. The buckets get filled accordingly and may even overflow if the number of strong matches in a bucket exceeds the bucket capacity. In a third iteration, all buckets with remaining capacity are filled with the next best matches until either all buckets are full or all matches have been accepted. The matches are expected to be exclusive.