Modifying raw image data for experiments

Started Apr 5, 2021 | Discussions thread
OP Horshack Veteran Member • Posts: 9,769
OctaveRawTools (GitHub repository)
4

I have completed a set of Octave/Matlab function scripts for reading and writing the raw data inside a DNG. Unlike the OP workflow this works on an existing DNG, so it doesn't require converting back and forth between a raw and PGM file. You do have to use uncompressed DNGs though.

The GitHub repository is here. I've only tested these under Octave but will ping Jack to see if he can try them under Matlab as well.

loadDngRawData.m - loads the raw data for a DNG. It also loads the full EXIF data into a containers.Map, which allows the EXIF info to be accessed like an associative array. For example, exifMap("iso") returns the ISO value. Use exifMap.keys() to get a full list of tags available for the DNG loaded.

saveRawDataToDng.m - writes modified raw data back into the DNG. It also strips off the MD5 digest of the raw data, which will stop ACR/LR from complaining about the file being damaged.

swapRedBlueChannelsInDng.m - Trivial example showing how to use loadDngRawData and saveRawDataToDng.

applyFlatFrameToDng.m - Another simple example of usage, applies a raw flat frame to another raw file (for sensor dust removal and vignetting correction).

Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow