Modifying raw image data for experiments

Started Apr 5, 2021 | Discussions thread
OP Horshack Veteran Member • Posts: 9,769
Automated raw median image stacking
6

I have added automated median image stacking (source , documentation) to the repository. Here's how it works:

  1. Put all your raw files in a directory
  2. From the Octave console, run createMedianStackedDngs("source dir", "output dir")

Script does the following:

  1. Converts all raw images in "source dir" to uncompressed DNGs by spawning Adobe's DNG converter. Thanks to Jack for giving me the idea of using the DNG converter from the command-line.
  2. Scans all converted DNGs to automatically find related images to stack. Right now it considers images to be in the same stack if their EXIF creation time tags are within two seconds of each other.
  3. Reads the raw data from each collection of images for a detected sequence and calculates the median.
  4. Generates a new DNG with the calculated median by cloning the first image of the stack and overwriting its raw data with the calculated median. The resulting filename is equal to the first image of the stack with "_x_Stacked" appended to the name, where <x> is the number of images stacked to create the DNG.
  5. Loops back to step #2 to find the next related group of images to stack in "source dir".

Here is the sample output of an underexposed GX85 ISO 6400 9-image stack, comparing the stacked image to one of the constituent images making up the stack

Animated PNG (9MB) - GX85 ISO 6400 9-image median stack

Notes:

  • This hasn't been tested under Matlab yet since I don't own a copy. Jack has generously offered his time to help fix any compatibility issues between my Octave scripts and Matlab.
  • I haven't tested this under the Mac OS yet. I plan to within the next few days.
  • Code is initial implementation - it can use some cleanup when I have the time.
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow