Exporting/importing photos in full 32-bit representation (to train a neural network for image denoising)

ISO 12800 with Canon EOS M5.





CC0 IMG_6990.CR2 (43.0 MB)

Meanwhile I have been trying to work with PGM files to be able to noise reduce before demosaicing and before black level. Got stuck with PGM files from 7D. When I try to create DNG files from PGM I get the wrong colour. Perhaps wrong cfa pattern? Works with M5, M6, R etc…

Skärmbild från 2021-06-27 14-37-25

For my M5, there were no issue.
dcraw -4 -E -j -t 0 IMG_6990.CR2
IMG_6990.zip (38.2 MB)

./pgm2dng IMG_6990.pgm

IMG_6990.DNG (48.7 MB)
CR2 to the left, DNG from pgm2dng to the right.
After that I copied all metadata with
exiftool -tagsFromFile IMG_6990.CR2 -all -icc_profile IMG_6990.DNG

pgm2dng is avalible from Magic Lantern http://a1ex.magiclantern.fm/bleeding-edge/pgm2dng.c
Compile it with gcc -o pgm2dng -m32 pgm2dng.c /path/to/magic-lantern/src/chdk-dng.c -I/path/to/magic-lantern/src -lm

Or use the one I compiled for M5.
pgm2dng.zip (8.9 KB)