dhashy 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -7
- data/Rakefile +8 -12
- data/dhashy.gemspec +4 -4
- data/lib/dhashy.rb +0 -1
- data/lib/dhashy/version.rb +2 -1
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5067fba3f6776625079758de6f0ef7f7c43078cf3ef390dcf640290473a6406
|
4
|
+
data.tar.gz: 814393829725c047374c0ed4eb684a97f0bfe7e99ea840cc1f7101a62b6a16ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a950984d4cf14c2425f14e1ab15bdb93baa72f84369ece7b3ed42130e0527f13ab6c4fab417731a09bc8d37ac58ec97c5a1cd7ddefabab5709ae82907c4ff6a9
|
7
|
+
data.tar.gz: 4aa24f876b2e06bddd6e91cdc853b5ca0a8843930c7e09383cf346813efa6ae69f19205529efe66fdd45edc973b0bf751740ee4b2abe6812bdaf00d60613bd45
|
data/README.md
CHANGED
@@ -1,13 +1,6 @@
|
|
1
1
|
# Dhashy
|
2
2
|
|
3
3
|
Dhashy is a ruby gem implementing the *difference hash* algorithm for perceptual image matching.
|
4
|
-
|
5
|
-
## Dependencies
|
6
|
-
|
7
|
-
Dhashy is tested with ```imagemagick```, version 7. ```Graphicsmagick``` may or may not work.
|
8
|
-
|
9
|
-
You can choose between ```mini_magick``` or ```vips``` for image processing, via the [```image_processing```](https://github.com/janko-m/image_processing) gem. When using ```vips```.
|
10
|
-
|
11
4
|
## Installation
|
12
5
|
|
13
6
|
Add this line to your application's Gemfile:
|
data/Rakefile
CHANGED
@@ -9,19 +9,15 @@ end
|
|
9
9
|
task :tree do |t|
|
10
10
|
require '../minimagick/lib/mini_magick'
|
11
11
|
require './lib/dhashy'
|
12
|
-
|
12
|
+
IMAGEDIR = "./test/fixtures/images"
|
13
13
|
results = []
|
14
|
-
(
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
diff = f1 - f2
|
22
|
-
results << diff
|
23
|
-
puts "difference %2i avg %2i" % [diff, results.sum / results.size]
|
24
|
-
end
|
14
|
+
Pathname(IMAGEDIR).glob("*.jpg").combination(2).to_a.shuffle.each do |first, second|
|
15
|
+
puts "#{first} #{second}"
|
16
|
+
f1 = Dhashy.new(first)
|
17
|
+
f2 = Dhashy.new(second)
|
18
|
+
diff = f1 - f2
|
19
|
+
results << diff
|
20
|
+
puts "difference %2i avg %2i" % [diff, results.sum / results.size]
|
25
21
|
end
|
26
22
|
end
|
27
23
|
|
data/dhashy.gemspec
CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
end
|
20
20
|
|
21
21
|
spec.require_paths = ["lib"]
|
22
|
-
spec.add_dependency "mini_magick", "~> 4"
|
23
|
-
spec.add_development_dependency "bundler", "~> 1
|
24
|
-
spec.add_development_dependency "rake", "~>
|
25
|
-
spec.add_development_dependency "minitest", "~> 5.
|
22
|
+
spec.add_dependency "mini_magick", "~> 4.1"
|
23
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
24
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
25
|
+
spec.add_development_dependency "minitest", "~> 5.1"
|
26
26
|
end
|
data/lib/dhashy.rb
CHANGED
data/lib/dhashy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dhashy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthias Winkelmann
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4'
|
19
|
+
version: '4.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4'
|
26
|
+
version: '4.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1
|
33
|
+
version: '2.1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1
|
40
|
+
version: '2.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '5.
|
61
|
+
version: '5.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '5.
|
68
|
+
version: '5.1'
|
69
69
|
description: A transformation-robust image comparison usign the difference hash (dhash)
|
70
70
|
algorithm.
|
71
71
|
email:
|
@@ -89,7 +89,7 @@ homepage: https://github.com/MatthiasWinkelmann/dhashy
|
|
89
89
|
licenses:
|
90
90
|
- MIT
|
91
91
|
metadata: {}
|
92
|
-
post_install_message:
|
92
|
+
post_install_message:
|
93
93
|
rdoc_options: []
|
94
94
|
require_paths:
|
95
95
|
- lib
|
@@ -104,9 +104,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
|
108
|
-
|
109
|
-
signing_key:
|
107
|
+
rubygems_version: 3.1.2
|
108
|
+
signing_key:
|
110
109
|
specification_version: 4
|
111
110
|
summary: Perceptive Image Hashing and Deduplication.
|
112
111
|
test_files: []
|