so-rose / convmlv

A feature-rich RAW developer for Magic Lantern formats.
https://git.sofusrose.com/so-rose/convmlv
GNU General Public License v3.0
15 stars 0 forks source link

Integrate openlut #2

Closed so-rose closed 7 years ago

so-rose commented 8 years ago

This keeps v2.0.0's feature set, while fixing #1 . A few barriers hindering this right now:

so-rose commented 7 years ago

convmlv can make use of it right now - openlut now works with piping! Example of piping dcraw output to the script, which uses openlut to grade to sLog2 before outputting 'pipeTest.exr':

dcraw -q 3 -a -H 0 -g 1 1 -o 1 -W -6 -c test.dng | python3 pipeTest.py

#pipeTest.py
import sys

sys.path.append('/home/sofus/subhome/src/openlut')
import openlut as ol

img = ol.ColMap.fromBinary(sys.stdin.buffer.read(), "ppm")

img.apply(ol.LUT.lutFunc(ol.Gamma.sLog2)).save('pipeTest.exr')
img.save('pipeTest.exr')

Gaining matrix, 1D LUT, unified file IO, would be a game changer for convmlv. No more lengthy 3D LUTs. Only caveat: OPTIMIZATION. It's not good enough yet - say a 75% speedup would do it.