Skip to content

Commit e57ba06

Browse files
author
Paolo Ragone
committed
Added v1 of the readme
1 parent cb15078 commit e57ba06

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# About jpHash
2+
This is library based on the great work behind pHash, the perceptual hash library (http://www.phash.org/).
3+
4+
My main problem with using this library is that it is written in C++ and I'm a Java guy. So I decided to have a go at converting it to Java.
5+
6+
Currently, only the Radial Image hash algorithm is implemented as that's the only one I've needed yet, but implementing the rest of the image hashing algorithms should be trivial as they are all based on the same preprocessing of the image (grayscaling, correcting brightness, blurring and scaling)... and all that is done already.
7+
8+
# Efficiency
9+
I've invested quite a bit in making this efficient. Some personal benchmarks have given me execution times comparable to the C++ version. Of course that meant that I had to implement my own grayscaling, resizing and bluring algorithms.
10+
11+
# Licence
12+
I still need to add all the licencing info, but the idea is that it be LGPL so it can be included in other distributed work. I'm still checking, but I believe this is compatible with the GPL version that pHash is on.
13+
14+
# Usage
15+
Simple:
16+
```
17+
RadialImageHash hash1 = jpHash.getImageRadialHash("/path/to/image");
18+
System.out.println("Hash1: " + hash1);
19+
RadialImageHash hash2 = jpHash.getImageRadialHash("/path/to/other/image");
20+
System.out.println("Hash2: " + hash2);
21+
22+
System.out.println("Similarity: " + jpHash.getSimilarity(hash1, hash2));
23+
24+
```
25+
26+
You can also persist the string representation of the hash and recover it with: RadialHash.fromString(String)
27+
28+
# Links
29+
Some links of interest that this work is based upon:
30+
31+
* http://phash.org/docs/pubs/thesis_zauner.pdf -> Available from http://phash.org/docs/
32+
* http://perso.uclouvain.be/fstandae/PUBLIS/26.pdf -> PRACTICAL EVALUATION OF A RADIAL SOFT HASH ALGORITHM
33+
* http://www.eurasip.org/Proceedings/Eusipco/2002/articles/paper745.pdf -> RASH:RAdon Soft Hash algorithm
34+
* ftp://bjhd.org/papers/PR/ICIP/ICIP05/defevent/papers/cr2347.pdf -> ROBUST IMAGE HASHING BASED ON RADIAL VARIANCE OF PIXELS
35+
36+
For info on building an efficient index for Nearest neighbour search (my planned next stage). These are some of the papers I've found:
37+
* http://arxiv.org/pdf/1202.6101.pdf -> Maximum Inner-Product Search using Tree Data-structures
38+
* Maximum Inner-Product Search using Tree Data-structures
39+
* http://www.vldb.org/journal/VLDBJ3/P517.pdf -> The W-Tree: An Index Structure for High-Dimensional Data
40+
* http://users.dcc.uchile.cl/~bebustos/cursos/2009/cc68p/papers/BKK96%20The%20X-tree%20an%20index%20structure%20for%20high-dimensional%20data.pdf -> The X-tree: An Index Structure for High-Dimensional Data
41+

0 commit comments

Comments
 (0)