Login  Register

Re: Canon RAW images in AIJ

Posted by karenacollins on Oct 24, 2015; 5:59am
URL: http://astroimagej.170.s1.nabble.com/Canon-RAW-images-in-AIJ-tp280p289.html

This message is from user JohnK. Hopefully it is helpful. I don't have any direct experience with raw image processing myself:

I have used dcraw to do the conversion from  native camera "raw" format to  PNG before running AIJ. The dcraw code is reverse engineered from Canon images (and other manufacturers) and the program has several options when it is run that may affect the output.   I don't know about rawtran.  There are IJ plugins that use the dcraw software too.

When I ran into a similar need recently, I found CR2FITS,  a Python program that works with raw color images (presumably what they have since it's Canon format) and extracts the red, green and blue channels as FITS files.  It would be my choice for the task now.

https://github.com/eaydin/cr2fits

It gives each color channel its own file before the IJ engine is involved.  Of course since it's color with a Bayer mask, the full resolution representation at each pixel in each of R, G, and B is interpolated from the mask data in the raw image.  cr2fits has the very nice feature of preserving the metadata in the fits header.   An example from a Sony raw image is this header:

SIMPLE  =  True
BITPIX  =  16
NAXIS  =  2
NAXIS1  =  4256
NAXIS2  =  2848
EXTEND  =  True
BSCALE  =  1
BZERO  =  32768
OBSTIME  =  2015-10-18 10:57:11
EXPTIME  =  1/800.0
APERTUR  =  22.0
ISO  =  6400
FOCAL  =  55.0
ORIGIN  =  DSC01145.ARW
FILTER  =  Green
CAMERA  =  Sony ILCE-7S
COMMENT  =  FITS File Created with cr2fits.py available at http://github.com/eaydin/
COMMENT  =  cr2fits
COMMENT  =  cr2fits.py version 1.0.3
COMMENT  =  EXPTIME is in seconds.
COMMENT  =  APERTUR is the ratio as in f/APERTUR
COMMENT  =  FOCAL is in mm


JohnK