We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Also see the title, I did the test following the code.
import cv2 from PIL import Image import matplotlib.pyplot as plt img = cv2.imread("./ILSVRC2012/ILSVRC2012_val_00000001.JPEG") img = img[:, :, ::-1] cv_img = cv2.resize( img, (224,224), interpolation=cv2.INTER_LINEAR).astype( np.float32 ) pil_image = Image.fromarray( img ) pil_image = pil_image.resize((224, 224), Image.BILINEAR) pil_image = np.array(pil_image).astype( np.float32 ) print( cv_img.dtype, pil_image.dtype ) diff = np.sum( np.abs(cv_img-pil_image) ) print( diff )
The diff s 397057.0 under the same mode. The PIL version is 6.2.1, opencv version is 4.1.1, so is it always different here?
397057.0
6.2.1
4.1.1
The text was updated successfully, but these errors were encountered:
Is the discussion in #2718 helpful?
There is also #4320 (comment)
Sorry, something went wrong.
No branches or pull requests
Also see the title, I did the test following the code.
The diff s
397057.0
under the same mode. The PIL version is6.2.1
, opencv version is4.1.1
, so is it always different here?The text was updated successfully, but these errors were encountered: