recently I got a Pentax K-5II with the CFA removed so it takes only monochrome images. But the firmware of the camera of course isn’t aware of the missing CFA. So the RAW files in DNG format still contain the EXIF data as it would be in colour images.
Now I’d like to prepare the DNG (RAW) files from the camera so that processing software such as darktable (4.0.0 at the moment) recognises them as monochrome images. I know that I can create a preset in the demosaicing module which applies the “passthrough (monochrome)” workflow automatically if eg. the camera model in the EXIF data matches. That’s fine so far - unless there is a second camera of the same model…
Thank you for our quick answer.
If the images from the camera would be colour images, I’d agree. But in the case of converted cameras such as mine, some of the EXIF data like the value “Color Filter Array” for “Photometric Interpretation” is just wrong - there isn’t a CFA anymore. That’s why I don’t see a reason for keeping that false information.
Yes I also have a converted camera, an IR converted Fuji. I have a preset that works well. I keep the original metadata because changing it risks damaging the file, as both exiftool and exiv2 make exceedingly clear.
Also you don’t know how darktable or other application you may use in the future will react to the changed tag.
If I were you, I’d continue with your “workaround,” to me that is the proper way to handle such things.
Thank you for your answer which is an eye opener for me.
I think I’ve got it now:
EXIF tags are just information. There is no way via the EXIF tags to force a software to process an image in a predefined specific manner. The processing pipeline is defined completely within the software and only in the software. If eg. darktable interprets specific EXIF tags (as I found out: the tags of the embedded JPEG image in the SubIFD1 part), other software like digiKam or RawTherapee may use other tags to recognise whether an image is monochrome or not.
So now the converted Pentax K-5 II is set to monochrome style and I defined a preset in the demosaicing module in darktable, which applies the demosaicing method “passthrough (monochrome)” automatically if the camera model matches “K-5 II” and the image is monochrome. That worked fine. The countercheck with a chromatic Olympus E-M10II and an image in monochrome style showed the expected behaviour: embedded JPEG is displayed monochrome, the RAW data is correctly demosaiced and displayed in colour as it should be.
Disclaimer: I’m just a satisfied customer of Mr. Grybauskas and have no other relationship to him.
The camera was converted by Mr. Grybauskas in Vilnius, Lithuania. He works very professionally and he also sells converted cameras eg. in the international Pentax forum.
Despite the process of removing the CFA is risky - as he told me before I sent my camera to him - I can recommend his service. He has a good reputation and I can corroborate that this reputation is well earned.
For demosaicing raw images the software needs the CFA layout and the image dimensions from the metadata. Strictly speaking, the image dimensions are needed to display or work on any image. A bit pedantic, but only a bit…
Edit: Oh, the PhotometricInterpretation tag is needed to distinguish raw mosaics from RGB. Very important with DNGs, which can contain either.
Edit1: PhotometricInterpretation=1 is what you’d need to properly code your monochrome images. Okay, I’m done now…