Open jalexhurt opened 5 years ago
When using lycon to load an image, the pixel values differ from loading from PIL and converting to NumPy
Reproduce:
import lycon import numpy as np from PIL import Image path = "/path/to/image.jpg" img1 = lycon.load(path).astype(np.float32) img2 = np.asarray(Image.open(path)).astype(np.float32) np.all(img1 == img2)
This will return False. In my testing the pixel values differ in ~11% of locations and differ by an average of 1.46
False
So in 11% of the image, if the PIL pixel value is 144, lycon is either around 145.5 or 142.5.
When using lycon to load an image, the pixel values differ from loading from PIL and converting to NumPy
Reproduce:
This will return
False
. In my testing the pixel values differ in ~11% of locations and differ by an average of 1.46So in 11% of the image, if the PIL pixel value is 144, lycon is either around 145.5 or 142.5.