import cv2
import numpy as np
import math
import sys
import matplotlib.pyplot as plt
import utils as ut
imgGray = cv2.imread(imgfile, cv2.IMREAD_GRAYSCALE)
plt.imshow(imgGray, cmap = 'gray')
plt.show()
cv2.imshow("",imgGray)
cv2.waitKey(0)
cv2.destroyAllWindows()
sys.exit()
plt.show() result
cv2.imshow() result
I thought both of them would be same. But as you can see, two pictures have different grayscale. Seems plt.show() darker than cv2.imshow()
How do I have to make grayscale in plt.show() same as cv2.imshow()?
Python : 3.9.6
opencv-python : 4.5.3.56
mathplotlib : 3.4.3

