ISP/sim/transform/raw_to_image.py

11 lines
222 B
Python
Raw Normal View History

2024-05-10 13:13:50 +08:00
import imageio
import numpy as np
2024-05-17 16:47:28 +08:00
im_width = 640
im_height = 480
2024-05-10 13:13:50 +08:00
if __name__ == '__main__':
2024-05-17 16:47:28 +08:00
raw = np.fromfile('./out.bin', dtype=np.int32)
2024-05-10 13:13:50 +08:00
image = raw.reshape((im_height, im_width))
2024-05-14 21:00:19 +08:00
imageio.imsave("./out.png", image)