Modifying raw image data for experiments

Started Apr 5, 2021 | Discussions thread
Entropy512 Veteran Member • Posts: 6,205
For those who prefer Python
6

I've been planning on working on something similar for a while using rawpy, and finally stopped procrastinating (it helps that tifffile added support for a bunch of DNG tags internally so I didn't have to mess with multiple metadata libraries - well at least I didn't prior to wanting to copy lens/model metadata to the destination...):

https://github.com/Entropy512/pyimageconvert/blob/master/libraw2dng.py - Basic converter that takes anything supported by rawpy and attempts to output a DNG. Some metadata is copied - the script currently is tuned to behave as a preprocessor for RawTherapee to handle unsupported raw formats until RT 6.0's libraw rework happens, but happens to allow you to process the raw data as you wish. I'm currently subtracting black levels and scaling the white level in the script and then saving as float16 - if this seems weird, it was because it was preparation for

https://github.com/Entropy512/pyimageconvert/blob/master/pystack.py - mean-stacking of a set of images.  It's not as automated as Horshack's stacker so far (does not auto-identify stacks based on interval between images) but this could be added and I plan on it eventually.

These should serve as decent starting points for anyone who wants to do their own manipulation using numpy

-- hide signature --

Context is key. If I have quoted someone else's post when replying, please do not reply to something I say without reading text that I have quoted, and understanding the reason the quote function exists.

 Entropy512's gear list:Entropy512's gear list
Sony a6000 Pentax K-5 Pentax K-01 Sony a6300 Canon EF 85mm F1.8 USM +5 more
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow