panomosity 0.1.40 → 0.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/panomosity/runner.rb +10 -2
- data/lib/panomosity/version.rb +1 -1
- data/panomosity.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43cc742ee7f3a7e491f8e2ffe3a2f47096c649949e4c9a7cc144c7a2baea819c
|
4
|
+
data.tar.gz: 2754ed973a428206f5d2fa4a2327a77fa43a5fedb7151be499f7aaa029d0ca50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1a7250d3b3c71680547decb6062086889c5dc60b03ba32a0bff7331264696fb435131fb9239a8b9c37e0aec0e90e6e5dcc56156eb2b7424ec7013cbe364928d
|
7
|
+
data.tar.gz: f430213bf4698399eae2607930ba443c529da150df03034f2e3100e68a45d43d18d228a8e64fc74f63561518a89e26db04b653d9a0e751de70a38c059f887c38
|
data/lib/panomosity/runner.rb
CHANGED
@@ -230,12 +230,19 @@ module Panomosity
|
|
230
230
|
logger.debug "cropping to #{percent}%"
|
231
231
|
unless @options[:without_cropping]
|
232
232
|
images = Image.parse(@input_file)
|
233
|
-
|
233
|
+
|
234
|
+
crop_center_commands = images.map do |image|
|
234
235
|
width_offset = (image.w.to_f * (1 - scale_factor) / 2).round
|
235
236
|
height_offset = (image.h.to_f * (1 - scale_factor) / 2).round
|
236
237
|
logger.debug "cropping #{image.name}"
|
237
|
-
|
238
|
+
|
239
|
+
"convert #{image.name} -crop '#{percent}%x#{percent}%+#{width_offset}+#{height_offset}' #{image.name}"
|
238
240
|
end
|
241
|
+
|
242
|
+
crop_centers_command = crop_center_commands.join("\n")
|
243
|
+
parallel_command = "cat <<'EOF' | parallel \n%s\nEOF"
|
244
|
+
crop_centers_command = parallel_command % crop_centers_command
|
245
|
+
`#{crop_centers_command}`
|
239
246
|
end
|
240
247
|
|
241
248
|
# Since all images have been cropped, we need to change d,e params to move images based on how much was cropped
|
@@ -641,6 +648,7 @@ module Panomosity
|
|
641
648
|
save_file
|
642
649
|
logger.debug "running nona #{@output}"
|
643
650
|
output = "nona --save-intermediate-images --intermediate-suffix=intermediate -v -m TIFF_m --seam=blend #{@output} -o #{res}_res_stitch_section_c#{column.to_s.rjust(5, '0')}_"
|
651
|
+
# output = "nona-mask #@output -m TIFF_m -o #{res}_res_stitch_section_c#{column.to_s.rjust(5, '0')}_"
|
644
652
|
logger.debug output
|
645
653
|
output
|
646
654
|
end
|
data/lib/panomosity/version.rb
CHANGED
data/panomosity.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'panomosity/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'panomosity'
|
8
8
|
spec.version = Panomosity::VERSION
|
9
|
-
spec.authors = ['Oliver Garcia']
|
9
|
+
spec.authors = ['Oliver Garcia', 'Joshua Stowers']
|
10
10
|
spec.email = ['ogarci5@gmail.com']
|
11
11
|
|
12
12
|
spec.summary = %q{Wrapper for the PTO file parsing needed for PanoTools.}
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
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.41
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Garcia
|
8
|
+
- Joshua Stowers
|
8
9
|
autorequire:
|
9
10
|
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
12
|
+
date: 2020-10-30 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|