scan_from_observation#
- rapidtools.processing.street_fusion.scan_from_observation(index: int, obs: Observation) Scan | None[source]#
Read a sighting’s outline as a scan: its lower and upper edge per column.
- Parameters:
index – Position of the sighting in its list, kept on the scan.
obs – The sighting.
- Returns:
Scan | None – The scan without range bands (see
set_range_bands()), orNonefor an outline that wraps the whole horizon.
Example
>>> from rapidtools.core import Observation >>> obs = Observation('i', 'car', [(0.50, 0.55), (0.52, 0.55), (0.52, 0.60), ... (0.50, 0.60)], 0.0, 0.0, 0.0, is_pano=True) >>> scan = scan_from_observation(0, obs) >>> round(scan.width, 1), round(float(scan.bottom.min()), 1) (7.2, -18.0)