img= np.frombuffer(all_bytes, dtype=‘uint16’)
import os
import numpy as np
import cv2 as cv
f = open("20220509105320.txt","rb")
ccc=f.read(320*240*2)
img= np.frombuffer(ccc, dtype='uint16')
img = img.reshape((240, 320, 1))
gray = cv.cvtColor(img,cv.COLOR_GRAY2BGR)
cv.imshow("img", gray)
cv.waitKey(0)
f.close()



