Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

598 B
Raw Blame

undistort_image builds its sampling map, distorts it and samples in float32 for float16 and bfloat16 images, and returns the image dtype. The map used to be built in the image dtype, where pixel coordinates round to half pixels (float16, from 512 px) or whole pixels (bfloat16, from 128 px): at 640 x 480 with OpenCV-style radial distortion the image was sampled up to 0.79 px (float16) and 6.3 px (bfloat16) away from the float64 positions, on CPU and CUDA. A half image with K and dist of another dtype, such as float32 or float64, is now also accepted instead of raising a dtype mismatch.