.RAW files are not supported in OpenCV .
But the file can be opened using Python and parsed using Numpy
import numpy as np fd = open('flight0000.raw', 'rb') rows = 480 cols = 640 f = np.fromfile(fd, dtype=np.uint8,count=rows*cols) im = f.reshape((rows, cols))
This makes an array of arrays that OpenCV can directly manipulate.
import cv2 cv2.imshow('', im) cv2.waitKey() cv2.destroyAllWindows()
source share