Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed tool: Convert images to dng format #198

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

abrock
Copy link

@abrock abrock commented Mar 7, 2020

I sometimes take images using industrial cameras which produce raw streams of pixel values. Previously I could convert them to tiff / png or similar but RawTherapee (my favorite RAW editor) wouldn't load them as raw files and I was stuck with bilinear interpolation for demosaicing.
I managed to find other people's posts about that same problem but all the answers were disappointing ("Why would you even want to do that?", "Seems easy, just write a converter.") so I was very happy to find open source code which includes a DNG writer. I hacked a converter from any image format OpenCV can read to DNG.

My question is:
Do you want to include such a tool into the hdrmerge package? I would be willing to polish it if neccessary.

@fanckush
Copy link
Contributor

Sounds like a cool idea but i don't see how it's related to HDRMerge.
I personally have no problem to include such too in the app but i'm just a fellow contributor

Maybe it would make more sense to integrate this into RT, i think you can reuse the DNGWriter class from HDRMerge because the licenses (as far as i know) are compatible

@kmilos
Copy link

kmilos commented Nov 27, 2020

There's already plenty of options to do the conversion to DNG:

http://a1ex.magiclantern.fm/bleeding-edge/pgm2dng.c (needs a few more files from CHDK)
https://github.com/fastvideo/pgm2dng
https://github.com/schoolpost/PyDNG

Storing a DNG is "easy" technically, but doing the calibration and getting all the color related tags right is the tough part.

@Entropy512
Copy link

I agree with @kmilos here. If one of those three doesn't do the trick (for example you want floatingpointx2 compression, PyDNG does not support compression), I'm working on a reference/example Python script that uses tifffile to write out the DNG in preparation for some average-stacking work I want to do. I'll be putting it up in a repo later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants