Added Python infrastructure, as well as, PIP NOW WORKSgit add README .venv requirements.txt !
parent
f8cd85bbc2
commit
913d6904bc
|
@ -1 +1,2 @@
|
||||||
recursive-include openlut *.py
|
recursive-include openlut *.py
|
||||||
|
include openlut/lib/olOpt.cpp
|
||||||
|
|
4
main.py
4
main.py
|
@ -8,9 +8,11 @@ Color Management: openlut deals with the raw RGB values, does its work, then put
|
||||||
Dependencies:
|
Dependencies:
|
||||||
-numpy: Like, everything.
|
-numpy: Like, everything.
|
||||||
-wand: Saving/loading images.
|
-wand: Saving/loading images.
|
||||||
|
-PyOpenGL - For image viewer and other future graphics processing.
|
||||||
|
-pygame - For the physical display in the viewer.
|
||||||
-scipy - OPTIONAL: For spline interpolation.
|
-scipy - OPTIONAL: For spline interpolation.
|
||||||
|
|
||||||
Easily get all deps: sudo pip3 install numpy wand numba scipy
|
Easily get all deps: sudo pip3 install numpy wand scipy PyOpenGL pygame
|
||||||
|
|
||||||
*Make sure you get the Python 3.X version of these packages!!!
|
*Make sure you get the Python 3.X version of these packages!!!
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ from functools import reduce
|
||||||
import operator as oper
|
import operator as oper
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import numba
|
#~ import numba
|
||||||
|
|
||||||
from .Transform import Transform
|
from .Transform import Transform
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class ColMat(Transform) :
|
||||||
return ColMat(reduce(ColMat.__mul__, reversed(inMats))) #Works because multiply is actually non-commutative dot.
|
return ColMat(reduce(ColMat.__mul__, reversed(inMats))) #Works because multiply is actually non-commutative dot.
|
||||||
#This is why we reverse inMats.
|
#This is why we reverse inMats.
|
||||||
|
|
||||||
@numba.jit(nopython=True)
|
#~ @numba.jit(nopython=True)
|
||||||
def __optDot(img, mat, shp, out) :
|
def __optDot(img, mat, shp, out) :
|
||||||
'''
|
'''
|
||||||
Dots the matrix with each tuple of colors in the img.
|
Dots the matrix with each tuple of colors in the img.
|
||||||
|
|
|
@ -50,6 +50,7 @@ py::array_t<float> gam(py::array_t<float> arr, const std::function<float(float)>
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
numpy==1.12.0
|
||||||
|
pygame==1.9.3
|
||||||
|
PyOpenGL==3.1.0
|
||||||
|
scipy==0.18.1
|
||||||
|
Wand==0.4.4
|
|
@ -2,25 +2,40 @@
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools import Extension
|
from setuptools import Extension
|
||||||
|
from setuptools import find_packages
|
||||||
|
|
||||||
|
cpp_args = ['-fopenmp', '-std=gnu++14']
|
||||||
|
link_args = ['-fopenmp']
|
||||||
|
|
||||||
|
olOpt = Extension( 'openlut.lib.olOpt',
|
||||||
|
sources = ['openlut/lib/olOpt.cpp'],
|
||||||
|
language = 'c++',
|
||||||
|
extra_compile_args = cpp_args,
|
||||||
|
extra_link_args = cpp_args
|
||||||
|
)
|
||||||
|
|
||||||
setup( name = 'openlut',
|
setup( name = 'openlut',
|
||||||
version = '0.0.2',
|
version = '0.1.1',
|
||||||
description = 'OpenLUT is a practical color management library.',
|
description = 'OpenLUT is a practical color management library.',
|
||||||
author = 'Sofus Rose',
|
author = 'Sofus Rose',
|
||||||
author_email = 'sofus@sofusrose.com',
|
author_email = 'sofus@sofusrose.com',
|
||||||
url = 'https://www.github.com/so-rose/openlut',
|
url = 'https://www.github.com/so-rose/openlut',
|
||||||
|
|
||||||
|
packages = find_packages(exclude=['src']),
|
||||||
|
|
||||||
|
ext_modules = [olOpt],
|
||||||
|
|
||||||
license = 'MIT Licence',
|
license = 'MIT Licence',
|
||||||
|
|
||||||
keywords = 'color image images processing',
|
keywords = 'color image images processing',
|
||||||
|
|
||||||
install_requires = ['numpy', 'wand', 'scipy', 'pygame','PyOpenGL'],
|
install_requires = ['numpy', 'wand', 'scipy', 'pygame','PyOpenGL', 'setuptools'],
|
||||||
|
|
||||||
classifiers = [
|
classifiers = [
|
||||||
'Development Status :: 3 - Alpha',
|
'Development Status :: 3 - Alpha',
|
||||||
|
|
||||||
'License :: OSI Approved :: MIT License',
|
'License :: OSI Approved :: MIT License',
|
||||||
|
|
||||||
'Programming Language :: Python :: 3.5'
|
'Programming Language :: Python :: 3'
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue