opencv detect what image type source has code example Example: finding the format of an image in cv2 cv2.imread('abalone.jpg', cv2.IMREAD_COLOR).dtype