I have this PNG image that shows a spectrum of greyscale, but the largest pixel value is over 49,000. The smallest non-zero value is 6,825:
import cv2
import os
import numpy as np
img_path = os.path.expanduser('~/test.png')
img = cv2.imread(img_path, cv2.IMREAD_UNCHANGED)
img_array = np.array(img)
print(np.min(img_array[img_array > 0])) #6825
print(np.max(img_array)) #49350
How come the image shows a spectrum when the values are (0, 6825...49350) and appears to be normalised? How come the values can exceed 255?