Questions tagged [imagehash]

A image hashing library written in Python.

A image hashing library written in Python. ImageHash supports:

average hashing (`aHash`)
perception hashing (`pHash`)
difference hashing (`dHash`)
wavelet hashing (`wHash`)

Available on pypi,org.

20 questions
3
votes
2 answers

not able to remove duplicate image with hashing

My aim is to remove identical images like the following: Image 1: https://i.stack.imgur.com/8dLPo.png Image 2: https://i.stack.imgur.com/hF11m.png Currently, I am using average hashing with the hash size of 32 (hash size less than this is giving…
3
votes
1 answer

How to use image hash as filename for downloaded images?

In Python I want to save an image to file. The filenames should be hashes, generated by imagehash.average_hash(). Using ls -l I see files but they are empty: -rw-r--r-- 1 lorem lorem 0 8 Sep 16:20 c4c0bcb49890bcfc.jpg -rwxr-xr-x 1 lorem …
2
votes
0 answers

Storing Imagehash in mysql database

I am trying to save hash_value in mysql database using python. I have obtained hash value hash = imagehash.dhash(Image.open('temp_face.jpg')) but after the execution of insert query cursor.execute("INSERT INTO image(hash,name,photo) VALUES(%d,%s,%s…
1
vote
0 answers

How can I use imagehash to identify visually identical images?

I'm trying to use the imagehash library (https://pypi.org/project/ImageHash/) to identify visually identical files. I'm testing with 3 files. The second is just a reduced resolution of the first. File 3 is very different. Images below. I wrote a…
1
vote
0 answers

No connection adapters were found for 'data:image/png;base64,

I want to get fingerprint key after applying hash funtion on a online image. for this i'm using the code below : img_path='''data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAB0AAAAaCAYAA…
1
vote
1 answer

Is there any way by which I can apply imagehash function in online images in Python

I want to get fingerprints for images with the help of the imagehash function in Python but in order to apply hash = imagehash.average_hash(Image.open(path)) the image needs to be in storage. Is there any way from which by just giving the image URL…
1
vote
0 answers

How can I make cluster of near similar images in dictionary based on imageHash without repeating same images in Dictionary

So i have a folder with images I am trying to make cluster of near similar images in a python dictionary with Imagehash as the key and a list of similar images as their value, how can i prevent for a image to generate a new key if it's already…
1
vote
1 answer

Perceptual Hash (pHash) Image Color vs Gray scale vs Threshold which is best input source

I've researched a lot and could not find a definitive answer. What kind of image color is most used for pHash input to generate the hash/fingerprint. For example I have a target image that I'm looking for within a source image, but the target can…
P_C
  • 185
  • 2
  • 11
1
vote
1 answer

Confusion about the minus operator for hashes from ImageHash library

I'm new to Python. As per this example (https://pypi.org/project/ImageHash/), what is the meaning of the following operation? d879f8f89b1bbf - ffff3720200ffff These appear to be hex strings. If that is the case, what operation is the - operator…
user5858
  • 1,082
  • 4
  • 39
  • 79
0
votes
1 answer

Appending hashes to a list for reference

I'm using the imagehash library in Python and i'm trying to compare one image to a set of images to determine if it's similar to any of them. To avoid having to fetch the hashes every time I run the program I generated each hash and appended it to a…
0
votes
1 answer

How could i save all the hashes generated from jpg images into a csv file and not only the last one?

import imagehash from PIL import Image import glob import numpy as np image_list = [] for filename in glob.glob('/home/folder/*.jpg'): im=Image.open(filename) image_list.append(im) hash = imagehash.average_hash(im) print(hash) …
yonas
  • 41
  • 4
0
votes
0 answers

Lengths of image hashes

I'm developing an application that involves hashing of images and storing those hash values. Based on the links in this post and other research I have done, am I understanding correctly that most image hashes are 64 bits in length? I do see some…
0
votes
0 answers

Number recognition in a randomly generated numeric pad

I'm struggling to find a way to precisely extract numbers from a numeric pad. I have tried pytesseract, image.hash and even a code I found that compares characteristics from one image trying to find them in the other image and gives a percentage of…
0
votes
1 answer

Grouping similar hash value

I change images to hash values and try to classify images with similar hash values into the same group. so for example. import imagehash # img1, img2, img3 are same images img1_hash = imagehash.average_hash(Image.open('data/image1.jpg')) img2_hash…
minholee
  • 1
  • 1
0
votes
1 answer

Numpy error trying to use difference hashing with the ImageHash library

I am trying to perform difference hashing with the python ImageHash library and keep getting a numpy error. The error: File "/Users/testuser/Desktop/test_folder/test_env/lib/python3.8/site-packages/imagehash.py", line 252, in dhash image =…
O R
  • 9
  • 6
1
2