panomosity 0.1.38 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/panomosity.rb +1 -0
- data/lib/panomosity/errors.rb +3 -0
- data/lib/panomosity/generalized_neighborhood.rb +18 -2
- data/lib/panomosity/utils.rb +1 -1
- data/lib/panomosity/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0babb2f2886451531b10cafb8fb2b8ccce33edd260247d1a100001120c3af57
|
4
|
+
data.tar.gz: 93c56a79260969f6a77c87d019bbd5efb11c6bcd908fd6ea05f5ad13334c2b3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f373113dd8fbb7e70045e94cd20d97342f1d955f64b221208288246f8fbcc486e05785e518769d51b73096029b8570861929a9eb10fd1ed0081c448d9111895
|
7
|
+
data.tar.gz: e82ff01175bbf2010e102fceae0acc512517ac51037b2e70a1b893ecd6325c0afc251e4a3525fe003528a557b5849590c56229b3c51edab896eb4a79b71bc4d0
|
data/lib/panomosity.rb
CHANGED
@@ -88,6 +88,17 @@ module Panomosity
|
|
88
88
|
type == :horizontal ? @horizontal_similar_neighborhoods : @vertical_similar_neighborhoods
|
89
89
|
end
|
90
90
|
|
91
|
+
def similar_neighborhoods!(type: :horizontal)
|
92
|
+
neighborhoods = similar_neighborhoods(type: type)
|
93
|
+
|
94
|
+
if neighborhoods.nil? || neighborhoods.empty?
|
95
|
+
error = "No similar #{type} neighborhoods found"
|
96
|
+
raise NoSimilarNeighborhoodsError, error
|
97
|
+
else
|
98
|
+
neighborhoods
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
91
102
|
def neighborhoods_by_similar_neighborhood(type: :horizontal)
|
92
103
|
type == :horizontal ? @horizontal_neighborhoods_by_similar_neighborhood : @vertical_neighborhoods_by_similar_neighborhood
|
93
104
|
end
|
@@ -101,9 +112,14 @@ module Panomosity
|
|
101
112
|
|
102
113
|
def std_outlier_reduction(type: :horizontal, max_reduction_attempts: 2, reduction_attempts: 0)
|
103
114
|
return if reduction_attempts >= max_reduction_attempts
|
115
|
+
|
104
116
|
logger.debug "twice reducing #{type} neighborhood std outliers"
|
105
|
-
|
106
|
-
similar_neighborhoods(type: type)
|
117
|
+
|
118
|
+
neighborhoods = similar_neighborhoods!(type: type)
|
119
|
+
std_dist_of_neighborhoods = neighborhoods.map(&:dist_std)
|
120
|
+
avg, std = *calculate_average_and_std(values: std_dist_of_neighborhoods)
|
121
|
+
|
122
|
+
similar_neighborhoods!(type: type).select! { |n| (avg - n.dist_std).abs <= std }
|
107
123
|
std_outlier_reduction(type: type, max_reduction_attempts: max_reduction_attempts, reduction_attempts: reduction_attempts + 1)
|
108
124
|
end
|
109
125
|
|
data/lib/panomosity/utils.rb
CHANGED
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.39
|
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-09-
|
11
|
+
date: 2020-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- exe/panomosity
|
78
78
|
- lib/panomosity.rb
|
79
79
|
- lib/panomosity/control_point.rb
|
80
|
+
- lib/panomosity/errors.rb
|
80
81
|
- lib/panomosity/generalized_neighborhood.rb
|
81
82
|
- lib/panomosity/image.rb
|
82
83
|
- lib/panomosity/measure.rb
|
@@ -95,7 +96,7 @@ homepage: https://github.com/elevatesystems/panomosity
|
|
95
96
|
licenses:
|
96
97
|
- MIT
|
97
98
|
metadata: {}
|
98
|
-
post_install_message:
|
99
|
+
post_install_message:
|
99
100
|
rdoc_options: []
|
100
101
|
require_paths:
|
101
102
|
- lib
|
@@ -111,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
112
|
version: '0'
|
112
113
|
requirements: []
|
113
114
|
rubygems_version: 3.0.8
|
114
|
-
signing_key:
|
115
|
+
signing_key:
|
115
116
|
specification_version: 4
|
116
117
|
summary: Wrapper for the PTO file parsing needed for PanoTools.
|
117
118
|
test_files: []
|