pub fn auto_zoom_segments(
clicks: &[ClickEvent],
fps: u32,
cfg: &AutoZoomConfig,
) -> Vec<ZoomSegment>Expand description
Generate auto-zoom regions from a click log.
Clicks within ~1 s of each other form one cluster; each cluster becomes
a zoom that opens ~0.3 s before the first click, holds cfg.hold_time_ms
after the last, and targets the cluster’s centroid at cfg.max_zoom.
Sub-half-second windows are dropped, and adjacent windows are clamped so
they never overlap. Returns an empty list if detection is disabled or
there are no clicks. The regions are concrete Manual-targeted zooms so
they punch into the click immediately under the zoom
engine; the user edits them like any other zoom.