Questions tagged [phash]

pHash or perceptual hash is an algorithm for creating fingerprints of multimedia data (images, audio, etc).

What is a perceptual hash?

A perceptual hash is a fingerprint of a multimedia file derived from various features from its content. Unlike cryptographic hash functions which rely on the avalanche effect of small changes in input leading to drastic changes in the output, perceptual hashes are "close" to one another if the features are similar.

Relevance of Perceptual Hashing

Perceptual hashes must be robust enough to take into account transformations or "attacks" on a given input and yet be flexible enough to distinguish between dissimilar files. Such attacks can include rotation, skew, contrast adjustment and different compression/formats. All of these challenges make perceptual hashing an interesting field of study and at the forefront of computer science research.

What is pHash?

pHash is an open source software library released under the license that implements several perceptual hashing algorithms, and provides a -like API to use those functions in your own programs. pHash itself is written in . pHash was created by Evan Klinger.

Project URL: http://www.phash.org

76 questions
0
votes
3 answers

Trouble doing a bitwise xor + bit_count in mysql

I am trying to perform a comparison on hash values (hexadecimal strings of 16 characters). I have a MYSQL table that stores those values with a phash VARCHAR(16) column. This is what I am trying to do: SELECT phash, bit_count(phash ^…
David
  • 1,898
  • 2
  • 14
  • 32
0
votes
1 answer

How to create and save pairwise hamming distances of image perceptual hashes for imput to clustering algorithm

hoping somebody can provide guidance as to how to compute pairwise hamming distance of a bunch of hashes and then cluster them. I don't care so much as to performance as from looking at what I am doing and what I want to do its going to be slow no…
0
votes
0 answers

How the OS X generate the icon phash?

I have tried to use wireshark to sniff airdrop function in OS X, I found that there is a element call phash. TXT: phash=upHAXlRUnb0ICgY2uDUpw6cv5fI= When using the AirDrop, the appearance icon will be your user icon if you have set it. I have…
0
votes
1 answer

phash breaks when nonetype object apears

import os, cv2, imagehash, PIL hashList = [] path = "C:\cardscryer\CardScryer-master\pictures" folderList = os.listdir(path) print(folderList) os.chdir(path) for folder in folderList: fileList = os.listdir(folder) for file in…
Greg Gee
  • 3
  • 1
0
votes
0 answers

Image Comparison tuned to Human Perception

Say I have two systems that take the same drawing commands and starts drawing on their respective platforms (i.e. HTML Canvas). After this is done, I want to save and compare these two images to ensure that they are perceptually the same, even…
Greg
  • 11
  • 2
0
votes
2 answers

Qt5 - Link pHash library "undefined reference"

I would like to add an external library called pHash. I added this to .pro file : win32:CONFIG(release, debug|release): LIBS += -L$PWD/Libs/pHash-0.9.4/release -lpHash else:win32:CONFIG(debug, debug|release): LIBS += -L$PWD/Libs/pHash-0.9.4/debug…
Vi.
  • 291
  • 3
  • 11
0
votes
1 answer

Use environment variable for a gem (pHash)

I'm on OSX and I've installed the pHash gem. When using the gem, I have the following error: Could not open library 'libpHash.dylib'. In the docs, the author says You can specify path to pHash library explicitly using environment variable like…
henritroyat
  • 201
  • 2
  • 14
0
votes
1 answer

phash ruby, how to access hash

I currently get to work phash (http://www.phash.org) in combination with ruby (https://github.com/toy/pHash/blob/master/lib/phash.rb). If i use the described examples, it works. But i want to extract only the hash - but i don't know how to do…
Dominik00000
  • 311
  • 1
  • 3
  • 10
0
votes
1 answer

Segmentation Fault error when trying to compare two videos with pHash library and its ruby bindings

I have set up my system with the latest ffmpeg and pHash libraries (ffmpeg-2.2.1 and pHash-0.9.6) as well as the pHash ruby gem (https://github.com/toy/pHash). I am using ruby and attempting to compare two video files like this: require…
0
votes
4 answers

Why am I getting an error "Attempted to read or write protected memory." after resizing image in C#?

I am using PHASH for computing the hash values for a large database of images. These images are of high resolution and hence I need to resize them for fast computing of the hash. However, when I resize the image, the PHASH program throws an error.…
milan m
  • 2,164
  • 3
  • 26
  • 40
0
votes
1 answer

Image matching in Cloud

How to check whether two images are similar or not? One image is captured by a cellphone and other is stored at cloud, without sending the whole image to cloud? I found out that extracting feature points from the source image and using Histogram…
habisravi
  • 69
  • 1
  • 4
0
votes
1 answer

Image Search inside another Image

I want to find similar images for a given image file. For example: Images 1,2,4,5 are similar. Images 4,5,6,7 are similar. 3 may be similar with those. I have tested http://www.phash.org/demo/ . There are three algorithms it is used: Radial,DCT,…
user706071
  • 805
  • 3
  • 10
  • 25
0
votes
1 answer

Visual Studio 2012 - "Error LNK2019 unresolved external symbol" when attempting to include .lib

I am trying to include a .lib file in my Visual Studio 2012 C++ project. The library is the pHash project to be specific. I have added the header file for the project to Project->Properties->Configuration Properties->VC++ Directories->Includes and…
user1049697
  • 2,479
  • 4
  • 29
  • 36
0
votes
2 answers

postgresql c-extension loads another external library

I need to compare pHashes (phash.org) with a hamming distance function. I tried the one from pg_similarity, but it doesn't seem to work right. (identical pHashes don't have a hamming distance of 0). So I figured I'd just use a c-extension to use the…
Mark Harviston
  • 660
  • 4
  • 18
-1
votes
1 answer

matlab code for perceptual hashing

I need a matlab code for a perceptual hashing algorithm descried here: http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html Basically I want this to remove deatails in an image and only leave the major structure components…
realmq
  • 429
  • 4
  • 18