color_decomposition 0.0.2 → 0.0.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 950ef10443171231f927fdf69472d93a40d0f3f0
|
4
|
+
data.tar.gz: 957c2c56e97115cadc8a1f3d3f466a0eea93705f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 148841f348ad3d85e35c8e650c678af553c5acd36160265160044bd8eeac3dbf0de15effb2b41945c6b15480b966690943f165e615b448a9dcf0a7c2773a784f
|
7
|
+
data.tar.gz: 102d7ea33a714faf5e81f51a6770e7d23805f90278af3300fbe2fd5fb3def643481dcb3f732c29bd9e5a7380a06a48070d02871555fed5c78a90253804e33b35
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Color decomposition
|
2
2
|
|
3
|
-
<img align="left" hspace="
|
3
|
+
<img align="left" hspace="6" src="http://i.imgur.com/7L6XkjE.gif" width="120">
|
4
4
|
|
5
5
|
A quadtree color decomposition algorithm that uses the CIELAB color space and the
|
6
6
|
CIEDE2000 color difference formula.
|
@@ -8,6 +8,8 @@ CIEDE2000 color difference formula.
|
|
8
8
|
The generated quadtree structure contains the leaves that represent the highest node
|
9
9
|
levels containing a visually similar color for a given area.
|
10
10
|
|
11
|
+
<br>
|
12
|
+
|
11
13
|
## Installation
|
12
14
|
|
13
15
|
This gem requires an installation of
|
data/lib/color_decomposition.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'color_decomposition/quadtree/quadtree'
|
2
|
-
require 'color_decomposition/image
|
2
|
+
require 'color_decomposition/image'
|
3
3
|
require 'color_decomposition/version'
|
4
4
|
|
5
5
|
module ColorDecomposition
|
@@ -9,7 +9,7 @@ module ColorDecomposition
|
|
9
9
|
unless similarity.between?(0, 100)
|
10
10
|
raise ArgumentError, 'Similarity value must be between 0 and 100'
|
11
11
|
end
|
12
|
-
image =
|
12
|
+
image = Image.new(path)
|
13
13
|
puts 'Generating initial quadtree structure'
|
14
14
|
quadtree = Quadtree.new(image.width, image.height)
|
15
15
|
image.add_image_data(quadtree)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: color_decomposition
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Bleyl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -82,7 +82,7 @@ files:
|
|
82
82
|
- lib/color_decomposition.rb
|
83
83
|
- lib/color_decomposition/color/color.rb
|
84
84
|
- lib/color_decomposition/color/comparator.rb
|
85
|
-
- lib/color_decomposition/image
|
85
|
+
- lib/color_decomposition/image.rb
|
86
86
|
- lib/color_decomposition/quadtree/node.rb
|
87
87
|
- lib/color_decomposition/quadtree/quadtree.rb
|
88
88
|
- lib/color_decomposition/version.rb
|