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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/panomosity/runner.rb +14 -4
- data/lib/panomosity/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37bc8e2ba5e484863ff4212456fe563e2d35d7a9d50b0d5cb7409944b6e8fa6f
|
4
|
+
data.tar.gz: d82c77524660f0f96374d75e4f20ba0b8f0728893f7af9012d150018117e4817
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea16e7037cf97463690f8d55f9e8de303ef10694a1953aa076e1de387c34d81c7d2e3cdf42ff70f5ec8dae9260cf0e6e5435087710476e476042b6e9722d256d
|
7
|
+
data.tar.gz: 6d5dbc29a3cc8523f1cd81ea3003528a8d279e5ca394b659c63c62c6206e65539e70317d1a8a7a55f2964fe11d6de37888662ffce3226da12f2176ce12ae1b0f
|
data/Gemfile.lock
CHANGED
data/lib/panomosity/runner.rb
CHANGED
@@ -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
|
-
|
618
|
-
|
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
|
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' }
|
data/lib/panomosity/version.rb
CHANGED
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.
|
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-
|
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: []
|