fthaler / rawhdr Goto Github PK
View Code? Open in Web Editor NEWA simple HDR image merger that converts multiple RAW files into a single HDR image.
Home Page: https://fthaler.github.io/rawhdr
License: Other
A simple HDR image merger that converts multiple RAW files into a single HDR image.
Home Page: https://fthaler.github.io/rawhdr
License: Other
In load_image, assuming the input data domain is [0, 65535] (i.e. 16-bit integer) then the converted output range is [0, 1) because it's being divided by 65536.
Though it would never be visible, it appeared incorrect to me. I created #4 while experimenting with some other changes
pi@skycamuni:~ $ sudo pip install rawhdr
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting rawhdr
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.5.3-py3-none-any.whl (10 kB)
Collecting scipy
Downloading scipy-1.9.1.tar.gz (42.0 MB)
|████████████████████████████████| 42.0 MB 19 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmphap9lclp_in_process.py get_requires_for_build_wheel /tmp/tmpo2kut9dr
cwd: /tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3
Complete output (61 lines):
The Meson build system
Version: 0.62.2
Source dir: /tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3
Build dir: /tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3/.mesonpy-glryk8ol/build
Build type: native build
Project name: SciPy
Project version: 1.9.1
C compiler for the host machine: cc (gcc 10.2.1 "cc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
C linker for the host machine: cc ld.bfd 2.35.2
C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
C++ linker for the host machine: c++ ld.bfd 2.35.2
Host machine cpu family: arm
Host machine cpu: armv7l
Compiler for C supports arguments -Wno-unused-but-set-variable: YES
Library m found: YES
../../meson.build:41:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['g95']]
The following exception(s) were encountered:
Running "gfortran --version" gave "[Errno 2] No such file or directory: 'gfortran'"
Running "gfortran -V" gave "[Errno 2] No such file or directory: 'gfortran'"
Running "flang --version" gave "[Errno 2] No such file or directory: 'flang'"
Running "flang -V" gave "[Errno 2] No such file or directory: 'flang'"
Running "nvfortran --version" gave "[Errno 2] No such file or directory: 'nvfortran'"
Running "nvfortran -V" gave "[Errno 2] No such file or directory: 'nvfortran'"
Running "pgfortran --version" gave "[Errno 2] No such file or directory: 'pgfortran'"
Running "pgfortran -V" gave "[Errno 2] No such file or directory: 'pgfortran'"
Running "ifort --version" gave "[Errno 2] No such file or directory: 'ifort'"
Running "ifort -V" gave "[Errno 2] No such file or directory: 'ifort'"
Running "g95 --version" gave "[Errno 2] No such file or directory: 'g95'"
Running "g95 -V" gave "[Errno 2] No such file or directory: 'g95'"
A full log can be found at /tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3/.mesonpy-glryk8ol/build/meson-logs/meson-log.txt
+ meson setup --native-file=/tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=/usr /tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3 /tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3/.mesonpy-glryk8ol/build
Traceback (most recent call last):
File "/tmp/tmphap9lclp_in_process.py", line 280, in <module>
main()
File "/tmp/tmphap9lclp_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/tmphap9lclp_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-rhofusf6/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 964, in get_requires_for_build_wheel
with _project(config_settings) as project:
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/tmp/pip-build-env-rhofusf6/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 943, in _project
with Project.with_temp_working_dir(
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/tmp/pip-build-env-rhofusf6/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 772, in with_temp_working_dir
yield cls(source_dir, tmpdir, build_dir)
File "/tmp/pip-build-env-rhofusf6/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 677, in __init__
self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
File "/tmp/pip-build-env-rhofusf6/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 708, in _configure
self._meson(
File "/tmp/pip-build-env-rhofusf6/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 691, in _meson
return self._proc('meson', *args)
File "/tmp/pip-build-env-rhofusf6/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 686, in _proc
subprocess.check_call(list(args))
File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=/tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3/.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=/usr', '/tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3', '/tmp/pip-install-z1ayqhkl/scipy_952423fb68974fe2a2dd96d8ebf04dc3/.mesonpy-glryk8ol/build']' returned non-zero exit status 1.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/db/af/16906139f52bc6866c43401869ce247662739ad71afa11c6f18505eb0546/scipy-1.9.1.tar.gz#sha256=26d28c468900e6d5fdb37d2812ab46db0ccd22c63baa095057871faa3a498bc9 (from https://pypi.org/simple/scipy/) (requires-python:>=3.8,<3.12). Command errored out with exit status 1: /usr/bin/python3 /tmp/tmphap9lclp_in_process.py get_requires_for_build_wheel /tmp/tmpo2kut9dr Check the logs for full command output.
Downloading scipy-1.9.0.tar.gz (42.0 MB)
|████████████████████████████████| 42.0 MB 8.1 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmpi81tft55_in_process.py get_requires_for_build_wheel /tmp/tmpcmne1z7k
cwd: /tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962
Complete output (61 lines):
The Meson build system
Version: 0.62.2
Source dir: /tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962
Build dir: /tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962/.mesonpy-om6e30tl/build
Build type: native build
Project name: SciPy
Project version: 1.9.0
C compiler for the host machine: cc (gcc 10.2.1 "cc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
C linker for the host machine: cc ld.bfd 2.35.2
C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
C++ linker for the host machine: c++ ld.bfd 2.35.2
Host machine cpu family: arm
Host machine cpu: armv7l
Compiler for C supports arguments -Wno-unused-but-set-variable: YES
Library m found: YES
../../meson.build:41:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['g95']]
The following exception(s) were encountered:
Running "gfortran --version" gave "[Errno 2] No such file or directory: 'gfortran'"
Running "gfortran -V" gave "[Errno 2] No such file or directory: 'gfortran'"
Running "flang --version" gave "[Errno 2] No such file or directory: 'flang'"
Running "flang -V" gave "[Errno 2] No such file or directory: 'flang'"
Running "nvfortran --version" gave "[Errno 2] No such file or directory: 'nvfortran'"
Running "nvfortran -V" gave "[Errno 2] No such file or directory: 'nvfortran'"
Running "pgfortran --version" gave "[Errno 2] No such file or directory: 'pgfortran'"
Running "pgfortran -V" gave "[Errno 2] No such file or directory: 'pgfortran'"
Running "ifort --version" gave "[Errno 2] No such file or directory: 'ifort'"
Running "ifort -V" gave "[Errno 2] No such file or directory: 'ifort'"
Running "g95 --version" gave "[Errno 2] No such file or directory: 'g95'"
Running "g95 -V" gave "[Errno 2] No such file or directory: 'g95'"
A full log can be found at /tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962/.mesonpy-om6e30tl/build/meson-logs/meson-log.txt
+ meson setup --native-file=/tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=/usr /tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962 /tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962/.mesonpy-om6e30tl/build
Traceback (most recent call last):
File "/tmp/tmpi81tft55_in_process.py", line 280, in <module>
main()
File "/tmp/tmpi81tft55_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/tmpi81tft55_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-o98kti7v/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 909, in get_requires_for_build_wheel
with _project(config_settings) as project:
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/tmp/pip-build-env-o98kti7v/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 888, in _project
with Project.with_temp_working_dir(
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/tmp/pip-build-env-o98kti7v/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 547, in with_temp_working_dir
yield cls(source_dir, tmpdir, build_dir)
File "/tmp/pip-build-env-o98kti7v/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 463, in __init__
self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
File "/tmp/pip-build-env-o98kti7v/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 494, in _configure
self._meson(
File "/tmp/pip-build-env-o98kti7v/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 477, in _meson
return self._proc('meson', *args)
File "/tmp/pip-build-env-o98kti7v/overlay/lib/python3.9/site-packages/mesonpy/__init__.py", line 472, in _proc
subprocess.check_call(list(args))
File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=/tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962/.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=/usr', '/tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962', '/tmp/pip-install-z1ayqhkl/scipy_e7f3288d46ad42dba8b56e550d083962/.mesonpy-om6e30tl/build']' returned non-zero exit status 1.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a8/e3/4ec401f609d34162b7023a09165da491630879e4cfa2336667fe2102cd06/scipy-1.9.0.tar.gz#sha256=c0dfd7d2429452e7e94904c6a3af63cbaa3cf51b348bd9d35b42db7e9ad42791 (from https://pypi.org/simple/scipy/) (requires-python:>=3.8,<3.12). Command errored out with exit status 1: /usr/bin/python3 /tmp/tmpi81tft55_in_process.py get_requires_for_build_wheel /tmp/tmpcmne1z7k Check the logs for full command output.
Downloading https://www.piwheels.org/simple/scipy/SciPy-1.8.1-cp39-cp39-linux_armv7l.whl (72.2 MB)
|████████████████████████████████| 72.2 MB 2.5 kB/s
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from rawhdr) (1.19.5)
Collecting PyWavelets
Downloading https://www.piwheels.org/simple/pywavelets/PyWavelets-1.4.1-cp39-cp39-linux_armv7l.whl (6.3 MB)
|████████████████████████████████| 6.3 MB 108 kB/s
Requirement already satisfied: imageio in /usr/local/lib/python3.9/dist-packages (from rawhdr) (2.22.0)
Collecting dtcwt
Downloading https://www.piwheels.org/simple/dtcwt/dtcwt-0.12.0-py3-none-any.whl (90 kB)
|████████████████████████████████| 90 kB 1.3 MB/s
Collecting rawhdr
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.5.2-py3-none-any.whl (10 kB)
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.5.0-py3-none-any.whl (10 kB)
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.4.1-py3-none-any.whl (9.3 kB)
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.4.0-py3-none-any.whl (9.2 kB)
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.3.0-py3-none-any.whl (8.0 kB)
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.2.4-py3-none-any.whl (7.6 kB)
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.2.3-py3-none-any.whl (7.4 kB)
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.2.2-py3-none-any.whl (7.2 kB)
Downloading https://www.piwheels.org/simple/rawhdr/rawhdr-0.2.1-py3-none-any.whl (7.2 kB)
ERROR: Cannot install rawhdr==0.2.1, rawhdr==0.2.2, rawhdr==0.2.3, rawhdr==0.2.4, rawhdr==0.3.0, rawhdr==0.4.0, rawhdr==0.4.1, rawhdr==0.5.0, rawhdr==0.5.2 and rawhdr==0.5.3 because these package versions have conflicting dependencies.
The conflict is caused by:
rawhdr 0.5.3 depends on rawpy
rawhdr 0.5.2 depends on rawpy
rawhdr 0.5.0 depends on rawpy
rawhdr 0.4.1 depends on rawpy
rawhdr 0.4.0 depends on rawpy
rawhdr 0.3.0 depends on rawpy
rawhdr 0.2.4 depends on rawpy
rawhdr 0.2.3 depends on rawpy
rawhdr 0.2.2 depends on rawpy
rawhdr 0.2.1 depends on rawpy
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
hey fthaler thanks alot for sharing your work!
I try to estimate solar irradiance with groundbased sky imaging.
Clouds or sky recordings have the greatest dynamic range of all. I was thinking about merging ~ 15 images. There will also be heavily overexposed and heavily underexposed images - is there a kind of weight function, with which such images are sorted out directly? Furthermore, I wanted to ask how exactly your / on which mathematics your merging works?
Many greetings
Paul
pi@allskyLA:~/rawhdr $ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing rawhdr.egg-info/PKG-INFO
writing dependency_links to rawhdr.egg-info/dependency_links.txt
writing entry points to rawhdr.egg-info/entry_points.txt
writing requirements to rawhdr.egg-info/requires.txt
writing top-level names to rawhdr.egg-info/top_level.txt
reading manifest file 'rawhdr.egg-info/SOURCES.txt'
writing manifest file 'rawhdr.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build/bdist.linux-armv7l/egg
creating build/bdist.linux-armv7l/egg/rawhdr
copying build/lib/rawhdr/focus_fusion.py -> build/bdist.linux-armv7l/egg/rawhdr
copying build/lib/rawhdr/generic_fusion.py -> build/bdist.linux-armv7l/egg/rawhdr
copying build/lib/rawhdr/common.py -> build/bdist.linux-armv7l/egg/rawhdr
copying build/lib/rawhdr/exposure_fusion.py -> build/bdist.linux-armv7l/egg/rawhdr
creating build/bdist.linux-armv7l/egg/rawhdr/test
copying build/lib/rawhdr/test/test_exposure_fusion.py -> build/bdist.linux-armv7l/egg/rawhdr/test
copying build/lib/rawhdr/test/__init__.py -> build/bdist.linux-armv7l/egg/rawhdr/test
copying build/lib/rawhdr/test/test_common.py -> build/bdist.linux-armv7l/egg/rawhdr/test
copying build/lib/rawhdr/__init__.py -> build/bdist.linux-armv7l/egg/rawhdr
copying build/lib/rawhdr/cli.py -> build/bdist.linux-armv7l/egg/rawhdr
byte-compiling build/bdist.linux-armv7l/egg/rawhdr/focus_fusion.py to focus_fusion.cpython-39.pyc
byte-compiling build/bdist.linux-armv7l/egg/rawhdr/generic_fusion.py to generic_fusion.cpython-39.pyc
byte-compiling build/bdist.linux-armv7l/egg/rawhdr/common.py to common.cpython-39.pyc
byte-compiling build/bdist.linux-armv7l/egg/rawhdr/exposure_fusion.py to exposure_fusion.cpython-39.pyc
byte-compiling build/bdist.linux-armv7l/egg/rawhdr/test/test_exposure_fusion.py to test_exposure_fusion.cpython-39.pyc
byte-compiling build/bdist.linux-armv7l/egg/rawhdr/test/__init__.py to __init__.cpython-39.pyc
byte-compiling build/bdist.linux-armv7l/egg/rawhdr/test/test_common.py to test_common.cpython-39.pyc
byte-compiling build/bdist.linux-armv7l/egg/rawhdr/__init__.py to __init__.cpython-39.pyc
byte-compiling build/bdist.linux-armv7l/egg/rawhdr/cli.py to cli.cpython-39.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying rawhdr.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying rawhdr.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying rawhdr.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying rawhdr.egg-info/entry_points.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying rawhdr.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying rawhdr.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/rawhdr-0.6.0-py3.9.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing rawhdr-0.6.0-py3.9.egg
Removing /usr/local/lib/python3.9/dist-packages/rawhdr-0.6.0-py3.9.egg
Copying rawhdr-0.6.0-py3.9.egg to /usr/local/lib/python3.9/dist-packages
rawhdr 0.6.0 is already the active version in easy-install.pth
Installing rawhdr script to /usr/local/bin
Installed /usr/local/lib/python3.9/dist-packages/rawhdr-0.6.0-py3.9.egg
Processing dependencies for rawhdr==0.6.0
Searching for scipy
Reading https://pypi.org/simple/scipy/
Downloading https://files.pythonhosted.org/packages/db/af/16906139f52bc6866c43401869ce247662739ad71afa11c6f18505eb0546/scipy-1.9.1.tar.gz#sha256=26d28c468900e6d5fdb37d2812ab46db0ccd22c63baa095057871faa3a498bc9
Best match: scipy 1.9.1
Processing scipy-1.9.1.tar.gz
Writing /tmp/easy_install-6efbji2k/scipy-1.9.1/setup.cfg
Running scipy-1.9.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6efbji2k/scipy-1.9.1/egg-dist-tmp-tw0tpqxb
/tmp/easy_install-6efbji2k/scipy-1.9.1/setup.py:390: UserWarning: Unrecognized setuptools command ('-q bdist_egg --dist-dir /tmp/easy_install-6efbji2k/scipy-1.9.1/egg-dist-tmp-tw0tpqxb'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Error: 'pybind11' must be installed before running the build.
error: Setup script exited with 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.