JohnMoyer
Leading Member
Since the color channels are separated in the OctaveRawTools software, I thought it might be interesting to experiment with the Canon DPRAW files.
But, it has been decades since I have used Mathmatica and I have never written code for DNG files and I have forgotten much.
I began experimenting with a photo which I had previously published at: https://www.rsok.com/~jrm/2025Jan31_birds_and_cats/2025jan25_cardinal_IMG_2713c.html
I used the libraw 4channel program to separate the channels into individual TIFF files. I then used subtract to get the half of the photosite data from the combined file ( although I am not completely convinced that the combined file is always created in camera using an "add" operation. )
I resized each individual file to 200% using graphicsmagick "-filter point".
I then added the 2 expanded half files back together. Here is a crop to the eye of the Cardinal bird from the red channel scaled 200%. The Cardinalis cardinalis is a mostly red bird.

Scaled 2x using DPRAW data ; Northern Cardinal (Cardinalis cardinalis) in Norman, Oklahoma, United States on January 25, 2025
Do any know how I might combine the individual channels after scaling so they might be demosaiced by rawtherapee?
Here is a crop done in ratherapee after normal demosaic:

cropped in rawtherapee and upscaled 2x by graphicsmagick also using "-filter point"
--
https://www.rsok.com/~jrm/
John Moyer
But, it has been decades since I have used Mathmatica and I have never written code for DNG files and I have forgotten much.
I began experimenting with a photo which I had previously published at: https://www.rsok.com/~jrm/2025Jan31_birds_and_cats/2025jan25_cardinal_IMG_2713c.html
I used the libraw 4channel program to separate the channels into individual TIFF files. I then used subtract to get the half of the photosite data from the combined file ( although I am not completely convinced that the combined file is always created in camera using an "add" operation. )
I resized each individual file to 200% using graphicsmagick "-filter point".
I then added the 2 expanded half files back together. Here is a crop to the eye of the Cardinal bird from the red channel scaled 200%. The Cardinalis cardinalis is a mostly red bird.

Scaled 2x using DPRAW data ; Northern Cardinal (Cardinalis cardinalis) in Norman, Oklahoma, United States on January 25, 2025
Do any know how I might combine the individual channels after scaling so they might be demosaiced by rawtherapee?
Here is a crop done in ratherapee after normal demosaic:

cropped in rawtherapee and upscaled 2x by graphicsmagick also using "-filter point"
--
https://www.rsok.com/~jrm/
John Moyer
Last edited: