frigate/frigate/ptz
ryzendigo 6d7b1ce384
fix: inverted condition causes division by zero in velocity direction check (#22470)
The cosine similarity calculation is guarded by:
  if not np.any(np.linalg.norm(velocities, axis=1))

This enters the block when ALL velocity norms are zero, then divides
by those zero norms. The condition should check that all norms are
non-zero before computing cosine similarity:
  if np.all(np.linalg.norm(velocities, axis=1))

Also fixes debug log that shows average_velocity[0] for both x and y
velocity components (second should be average_velocity[1]).
2026-03-16 06:47:24 -06:00
..
autotrack.py fix: inverted condition causes division by zero in velocity direction check (#22470) 2026-03-16 06:47:24 -06:00
onvif.py Miscellaneous Fixes (#21193) 2025-12-09 12:08:44 -06:00