track_points#
- rapidtools.processing.street_instances.track_points(held_by: csr_matrix, seen: ndarray, frame: ndarray, track: ndarray, min_vote_fraction: float = 0.7, min_votes: int = 3, min_frames: int = 3) tuple[ndarray, ndarray][source]#
Assign every reconstructed point to the track it belongs to, if any.
A point is on a building when at least
min_votesframes, andmin_vote_fractionof the frames that see it, place it inside an outline. It belongs to the track that most of those frames outline it with. Tracks seen in fewer thanmin_framesframes get no points.- Returns:
tuple[np.ndarray, np.ndarray] – For every point, its track number (meaningless where the second array is
False) and whether it was assigned.
Example
>>> owner, assigned = track_points( ... held_by, seen, frame, track) >>> int(assigned.sum()) 183204