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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03fdb416c8d39656632189a9880aa52e3e60fff0dfc56b50183b59b3102f2f24
4
- data.tar.gz: 6c52de6b53ca852186783e9dc20245b54b4cf1c1b36aaf58bc7604d396bd922f
3
+ metadata.gz: '03071187875baf71c4d0e42b8de46a74b836bbd4524ec733ad4ec338486a65ce'
4
+ data.tar.gz: 39f0f933ffd2e3def84fb3a1a4da58a5bd8ebfbd8bf0a26819a0a034cef40b30
5
5
  SHA512:
6
- metadata.gz: 077a3ad888b535c4c0d6a0602122e96a9cd23569ec9488dd699e3ef0a6bedc05f91df3e7780075b554e7447d10927ab9a48d257369a8de900653911ac1cf426c
7
- data.tar.gz: 5362b8ad8a925074425e0df89397e2eb488a904553e9369eb4b94594df0f5f49a1210f54296ec9624d47b17039b1bcf7dd75ad6497ba139ab8bca38c59bc9612
6
+ metadata.gz: 602928768c10822b685d50d53e8432ecb435ae447a4b67f18d24b594331f54c1b2373902d7665ecd9c9b9e4a9345c14be879b6eaaad2467720a7920a053183fe
7
+ data.tar.gz: b4993395c27c4bb359c184c7218dc03b4e5c99254e780333482110874d6b247fd087c0bdcea380c7eb8870135f5225d546a8a229a34764c50efd2e6812a9550c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- panomosity (0.1.14)
4
+ panomosity (0.1.15)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Panomosity
2
- VERSION = '0.1.15'
2
+ VERSION = '0.1.16'
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panomosity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Garcia