ISP/Demosaic/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-14 21:00:19 +08:00
im_width = 512
im_height = 256
2024-05-10 13:13:50 +08:00
if __name__ == '__main__':
2024-05-14 21:00:19 +08:00
raw = np.fromfile('./out.bin', dtype=np.int16)
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)