yzxing87 / Invertible-ISP

[CVPR2021] Invertible Image Signal Processing
MIT License
338 stars 39 forks source link

How can I save images as a raw format? #3

Closed UdonDa closed 3 years ago

UdonDa commented 3 years ago

I read your impressive paper and am interested in your work.

I ask you how to save the predicted images in a raw format. In your implementation, you save it in a jpg format. https://github.com/yzxing87/Invertible-ISP/blob/main/test_raw.py#L104

Please share the code of saving in raw format.

yzxing87 commented 3 years ago

Hi, we actually save predicted raw in .npy format, as shown in this line. JPEG format is just used for visualization purpose. And I don't think there is any existing python library to save an array into raw format. Adobe RAW SDK may provide the utility to save an array into DNG format, but it is based on C or C++.

UdonDa commented 3 years ago

Thank you for teaching me!

xunmeibuyue commented 2 years ago

In fact, PiDNG can do part of this work, but it aims at Raspberry Pi camera.
However, I failed to port the code on other type of camera. Sad.