sighting_shows#
- rapidtools.processing.street_tracking.sighting_shows(obs: Observation, target: tuple[float, float], project: Callable[[float, float], tuple[float, float]], bearing_sigma_deg: float = 0.75, size_m: float = 5.0, range_ratio_bounds: tuple[float, float] = (0.6, 1.6)) bool[source]#
Whether a sighting can be of an object at
target.The ray must pass within a quarter of the object’s size of the target (plus bearing noise) with the target in front of the camera, and the ground-contact range, when there is one, must agree with the distance to the target within
range_ratio_bounds. The lateral tolerance is deliberately tighter thanmerge_by_rays()uses: a car parked alongside is 2.5 m across and must fail this test, while a piece of the object itself (half a car past a pole, its rear or front) is within about 1 m of the centre.- Parameters:
obs – The sighting (
bearingset).target –
(x, y)in the local metre frame.project – Local metre projection.
bearing_sigma_deg – One-sigma bearing error.
size_m – Object size the lateral tolerance scales with.
range_ratio_bounds – Accepted band for range over distance.
- Returns:
bool –
Truewhen the sighting is consistent with the target.
Example
>>> from rapidtools.core import Observation >>> from rapidtools.processing.street_localization import local_projection >>> project, _ = local_projection(-117.4, 47.7) >>> box = [(0.5, 0.5), (0.52, 0.5), (0.52, 0.55)] >>> o = Observation('i', 'car', box, -117.4, 47.7, 0.0, bearing=90.0) >>> o.range_m = 10.0 >>> sighting_shows(o, (10.0, 0.5), project) True >>> sighting_shows(o, (10.0, 3.0), project) # 3 m across: the car alongside False