diff options
author | Patrick Simianer <p@simianer.de> | 2016-11-26 15:51:09 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-11-26 15:51:09 +0100 |
commit | 611b8f0372d18d937a11d25070e9d4023ce06543 (patch) | |
tree | 6e972a11dee3f5567e1acc2bf95b78b3ed18c390 | |
parent | c6f314de958e082e55bbba79ba4d59c226deed22 (diff) |
merge-hdr-batch
-rwxr-xr-x | merge-fuse-batch | 3 | ||||
-rwxr-xr-x | merge-hdr-batch | 23 | ||||
-rwxr-xr-x | merge-hdr-wrapper | 4 |
3 files changed, 25 insertions, 5 deletions
diff --git a/merge-fuse-batch b/merge-fuse-batch index 1f21c55..fa29893 100755 --- a/merge-fuse-batch +++ b/merge-fuse-batch @@ -5,7 +5,8 @@ DIR=ARGV[0] i = 0 while line = STDIN.gets args = line.strip.split.join (" -f #{DIR}") - cmd = "#{BILDROEHRE}/merge -F -o mertens-fused-#{i}.jpg #{args}" + is = i.to_s.rjust(3, "0") + cmd = "#{BILDROEHRE}/merge -F -o mertens-fused-#{is}.jpg #{args}" STDERR.write "#{cmd}\n" `#{cmd}` i += 1 diff --git a/merge-hdr-batch b/merge-hdr-batch new file mode 100755 index 0000000..3cad1b1 --- /dev/null +++ b/merge-hdr-batch @@ -0,0 +1,23 @@ +#!/usr/bin/env ruby + +BILDROEHRE=File.dirname(__FILE__) +DIR=ARGV[0] +TONEMAP=ARGV[1] +GAMMA=ARGV[2].to_f +i = 0 +while line = STDIN.gets + fs = line.strip.split + s = " -f #{DIR}" + args = fs.join (" -f #{DIR}") + fs.each { |f| + exposure = `exiv2 #{DIR}/#{f} 2>/dev/null | grep 'Exposure time' | cut -d ':' -f 2 | strips | cut -d " " -f 1` + args += " -w #{Rational(exposure).to_f}" + } + is = i.to_s.rjust(3, "0") + s += args + cmd = "#{BILDROEHRE}/merge -D -R -g 1.0 -O debevec-#{TONEMAP}-gamma#{GAMMA}-#{is}.jpg -p robertston-#{TONEMAP}-gamma#{GAMMA}-#{is}.jpg #{s}" + STDERR.write "#{cmd}\n" + `#{cmd}` + i += 1 +end + diff --git a/merge-hdr-wrapper b/merge-hdr-wrapper deleted file mode 100755 index e1b8970..0000000 --- a/merge-hdr-wrapper +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/zsh -x - -exiv2 2016-10-30-15-08-38-dp2m.jpg 2>/dev/null | grep 'Exposure time' | cut -d ':' -f 2 | strips | cut -d " " -f 1 | bc -l - |