Created
March 25, 2017 03:30
-
-
Save KelSolaar/a3f7fd0514b27cdf0bc6d2b109080077 to your computer and use it in GitHub Desktop.
Fits - Demosaicing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from astropy.io import fits | |
import colour | |
import colour_demosaicing | |
image = its.getdata('test.fits', ext=0).astype(np.float_) / 255.0 | |
# image = colour.orient(image, '90 CW') | |
colour.write_image(image, '/Users/kelsolaar/Downloads/test.exr') | |
colour.write_image(colour_demosaicing.demosaicing_CFA_Bayer_Malvar2004(image, pattern='GRBG'), '/Users/kelsolaar/Downloads/test_demosaiced.exr') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment