π Geometric Computer Vision Library for Spatial AI
equalize, equalize3d, equalize_clahe and posterize, and the augmentations built on them, now read an 8-bit image normalized as levels / 255 at its intended levels on every device. On CUDA, dividing a float64 tensor by 255 multiplies by a rounded 1 / 255 and leaves 24 of the 256 levels one unit in the last place below k / 255, which these ops truncated to level k - 1: on a random 8-bit image, float64 equalize on CUDA differed from the CPU by up to 2 levels on 8% of the pixels, equalize_clahe by up to 16 levels, and posterize(x, 7) by 2; x * (1 / 255) did the same on the CPU. For float32 and float64 input the factor 255 is now raised by 2**-21, relative, before truncation, so a continuous value that close below a level boundary also reads the level above, about 7 in 100000 pixels of a uniform random image. Levels read from float16 and bfloat16 input are unchanged. A channel that equalize or equalize3d leaves unchanged (lookup step 0, for example a volume of at most 255 voxels) now comes back exactly as given, instead of as (x * 255) / 255, which could be one unit in the last place off.