Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

495 B
Raw Blame

get_perspective_transform no longer returns a NaN/inf matrix when its M[2, 2] = 1 form is not finite in the output dtype: a homography whose computed bottom-right entry is exactly zero, such as one that sends source pixel (0, 0) to infinity, or a float16 homography with entries beyond 65504. Such a matrix is divided instead by the geometric mean of its largest and smallest nonzero magnitudes, which keeps both within the dtype's range. Every result that was finite before is unchanged.