panomosity 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/panomosity/runner.rb +19 -1
- data/lib/panomosity/version.rb +1 -1
- data/lib/panomosity.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '03071187875baf71c4d0e42b8de46a74b836bbd4524ec733ad4ec338486a65ce'
|
4
|
+
data.tar.gz: 39f0f933ffd2e3def84fb3a1a4da58a5bd8ebfbd8bf0a26819a0a034cef40b30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 602928768c10822b685d50d53e8432ecb435ae447a4b67f18d24b594331f54c1b2373902d7665ecd9c9b9e4a9345c14be879b6eaaad2467720a7920a053183fe
|
7
|
+
data.tar.gz: b4993395c27c4bb359c184c7218dc03b4e5c99254e780333482110874d6b247fd087c0bdcea380c7eb8870135f5225d546a8a229a34764c50efd2e6812a9550c
|
data/Gemfile.lock
CHANGED
data/lib/panomosity/runner.rb
CHANGED
@@ -432,7 +432,25 @@ module Panomosity
|
|
432
432
|
def nona_grid
|
433
433
|
logger.info 'running nona and generated column and row based stitch sections'
|
434
434
|
images = Image.parse(@input_file)
|
435
|
-
|
435
|
+
res = @options[:res] || 'low'
|
436
|
+
columns = images.map(&:column).uniq.sort
|
437
|
+
columns.each do |column|
|
438
|
+
@output = "project_nona_c#{column}.pto"
|
439
|
+
@output_file = File.new(@output, 'w')
|
440
|
+
logger.debug "creating file #{@output}"
|
441
|
+
@lines = @input_file.each_line.map do |line|
|
442
|
+
image = images.find { |i| i.raw == line }
|
443
|
+
if image
|
444
|
+
image.to_s if image.column == column
|
445
|
+
else
|
446
|
+
next line
|
447
|
+
end
|
448
|
+
end.compact
|
449
|
+
save_file
|
450
|
+
logger.debug "running nona #{@output}"
|
451
|
+
output = `nona --save-intermediate-images --intermediate-suffix=intermediate -v -m TIFF_m --seam=blend #{@output} -o #{res}_res_stitch_section_c#{column}_`
|
452
|
+
logger.debug output
|
453
|
+
end
|
436
454
|
end
|
437
455
|
|
438
456
|
def optimize
|
data/lib/panomosity/version.rb
CHANGED
data/lib/panomosity.rb
CHANGED
@@ -47,6 +47,10 @@ module Panomosity
|
|
47
47
|
options[:max_removal] = mr
|
48
48
|
end
|
49
49
|
|
50
|
+
parser.on('--res RES', 'Resolution of images for nona_grid') do |res|
|
51
|
+
options[:res] = res
|
52
|
+
end
|
53
|
+
|
50
54
|
parser.on('-v', '--[no-]verbose', 'Run verbosely') do |v|
|
51
55
|
options[:verbose] = v
|
52
56
|
end
|