panomosity 0.1.37 → 0.1.38

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: 55fb5d3e10b18279691fb06a4cc567ca0a1bc01098d23d1247a9469e75ffc5e4
4
- data.tar.gz: f5088d9459ecbeaa7f892d14f9a9deb12c33fd5017dd11625555e29d9fd95817
3
+ metadata.gz: 37bc8e2ba5e484863ff4212456fe563e2d35d7a9d50b0d5cb7409944b6e8fa6f
4
+ data.tar.gz: d82c77524660f0f96374d75e4f20ba0b8f0728893f7af9012d150018117e4817
5
5
  SHA512:
6
- metadata.gz: fe93c2b8c9acfe777523d9533ca0391a7e63964a4a7facb153e7f7f8fb34ccf8616af7b998965c724f4779bc02d94e73356ac8f3f0208b604bbac1e1e0920c8e
7
- data.tar.gz: 1e69b3b9c79df369d31330188ef7ab7c3d10e6aa9d2e625cbce1fe4e3d327b27ea1d9c5df7df03d27b2cbdc4fd17a2b84ce4832efd7ef04f61ac4fbaa38b6d73
6
+ metadata.gz: ea16e7037cf97463690f8d55f9e8de303ef10694a1953aa076e1de387c34d81c7d2e3cdf42ff70f5ec8dae9260cf0e6e5435087710476e476042b6e9722d256d
7
+ data.tar.gz: 6d5dbc29a3cc8523f1cd81ea3003528a8d279e5ca394b659c63c62c6206e65539e70317d1a8a7a55f2964fe11d6de37888662ffce3226da12f2176ce12ae1b0f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- panomosity (0.1.37)
4
+ panomosity (0.1.38)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -610,12 +610,17 @@ module Panomosity
610
610
  logger.info 'preparing for pr0ntools'
611
611
 
612
612
  images = Image.parse(@input_file)
613
+ # ds --> X (cols)
614
+ # es --> Y (rows)
613
615
  ds = images.map(&:d).uniq.sort
614
616
  es = images.map(&:e).uniq.sort
615
617
 
616
- # within two pixels of each other
617
- d_groups = ds.map { |d| ds.select { |n| n.between?(d-2, d+2) }.sort }
618
- e_groups = es.map { |e| es.select { |n| n.between?(e-2, e+2) }.sort }
618
+ # split ds and es into groups within two pixels of each other,
619
+ # required because d/e can vary a few pixels based on system precision
620
+ # each group of d/e represents an acceptable pixel range
621
+ # for images to be considered part of a col/row
622
+ d_groups = ds.map { |d| ds.select { |n| n.between?(d-2, d+2) }.sort }.uniq
623
+ e_groups = es.map { |e| es.select { |n| n.between?(e-2, e+2) }.sort }.uniq
619
624
 
620
625
  fov = images.map(&:v).uniq.find { |v| v != 0.0 }
621
626
  images.each do |i|
@@ -641,7 +646,12 @@ module Panomosity
641
646
  FileUtils.mkdir_p(new_dir)
642
647
 
643
648
  logger.info 'renaming files to format cX_rY.jpg'
644
- images.each { |image| FileUtils.cp(image[:original_n], new_dir + image.n) }
649
+ images.each do |image|
650
+ original_name = image[:original_n]
651
+ new_name = new_dir + image.n
652
+ FileUtils.cp(original_name, new_name)
653
+ logger.debug "copied #{original_name} to #{new_name}"
654
+ end
645
655
 
646
656
  logger.info 'creating scan.json'
647
657
  image_first_col = images.find { |image| image.n == 'c0_r0.jpg' }
@@ -1,3 +1,3 @@
1
1
  module Panomosity
2
- VERSION = '0.1.37'
2
+ VERSION = '0.1.38'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panomosity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.37
4
+ version: 0.1.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Garcia
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-23 00:00:00.000000000 Z
11
+ date: 2020-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,7 +95,7 @@ homepage: https://github.com/elevatesystems/panomosity
95
95
  licenses:
96
96
  - MIT
97
97
  metadata: {}
98
- post_install_message:
98
+ post_install_message:
99
99
  rdoc_options: []
100
100
  require_paths:
101
101
  - lib
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubygems_version: 3.0.8
114
- signing_key:
114
+ signing_key:
115
115
  specification_version: 4
116
116
  summary: Wrapper for the PTO file parsing needed for PanoTools.
117
117
  test_files: []