I want to process HDR and RAW images with Python
rawpy
https://github.com/letmaik/rawpy
Basic RAW processing library. Compatible with Windows (prebuilt and piped)
colour-hdri
color-science https://github.com/colour-science
https://www.colour-science.org/colour-hdri/
I use rawpy to read and write RAW.
Also pay attention to the color package!
https://github.com/colour-science/colour
In addition, various color chart data (EXR format) is added to color-nuke.
https://github.com/colour-science/colour-nuke/tree/master/colour_nuke/resources/images
imageio
You can read various things.
https://imageio.readthedocs.io/en/stable/formats.html
OpenEXR was also supported (via FreeImage).
https://imageio.readthedocs.io/en/stable/format_exr-fi.html#exr-fi
If it is pip, prebuilt will be included? It may not be necessary to compile. (The prebuilt binaries linked above are 6 years old and old)
EXR
There seems to be an OpenEXR package.
https://pypi.org/project/OpenEXR/
Is pyexr easier?
https://github.com/tvogels/pyexr
However, both are troublesome because they are from source to build.
imageio may be fine, but PyEXR using TinyEXR
https://github.com/ialhashim/PyEXR
I made a prebuilt binary wheel for Windows, macOS, and Linux with cibuildwheel.
Build python bwheel (including C ++ module) with cibuildwheel in bulk with CI and upload it to PyPI Note: https://qiita.com/syoyo/items/97f35b4d5c40761cc314
https://pypi.org/project/pytinyexr/
You can install pip without compiling! (python2.7 is not supported.)
If you want to save as 32bit float, is tifffile https://pypi.org/project/tifffile/ good?
You may be able to use rawpy.
Is it quick to make it a numpy 2D array (float32) and process it with numpy or something?
T.B.W. (Is it in the colour-science
package?)
You want to create a zebra (striped pattern) pattern where the highlights are flying. There seems to be no quick way to do it. Is it possible to create an image of a zebra pattern and combine it?
T.B.W.
Happy HDR/RAW image loading & editing!
Recommended Posts