0

I have extracted features such as sift,surf,edge,color and texture;and then I made a hash code using MD5. I have tried to compare and rank the bulk of images with query image with binary level hamming distance of feature hash code and direct hash code hamming distance with each feature in each time.Unfortunately these two hamming distances are giving me worst result in the case of every feature hash codes.

I just wanna solution for hash code based image search in java.And want to know how can i generate bitwise weight for each hash code.

TBN
  • 45
  • 9
  • Are you trying to do a useful comparison of the hashes? That's not going to work. MD5 is going to provide a semi-unique hash to represent the image that has no meaning except to validate that you have the right file, and to differentiate between others (with the unlikely chance that you will hit a collision). It is _not_ going to provide you a way to find similar images. You most likely want something else. – pickypg Feb 27 '14 at 06:16
  • By which hashing technology I will survive this problem sir – TBN Feb 27 '14 at 06:25
  • I'm not personally familiar with image matching, but hashing is not what you want. Take a look at the [image comparison algorithms](http://stackoverflow.com/questions/843972/image-comparison-fast-algorithm) over here. – pickypg Feb 27 '14 at 06:27

2 Answers2

1

maybe i'm wrong, but i don't think that this could be an effective approach. non-perfect hashing provoke some information loss, due to the fact that the hashing function maps a set of keys into a low-cardinality set of hashes. Furthermore you must use a meaningful hashing function if you want to directly measure distances beetween them. MD5 does not fits with your needs...a more interesting thing could be to set an hashing function(not necessarly intendend as common hashing function) that makes similar items collide, in order to "cluster" similar data

Carmine Ingaldi
  • 856
  • 9
  • 23
0
package methodoverloading;

import java.io.File;

public class Main {

 public static void main(String[] argv) throws Exception {

  File file1 = new File("f1");

File file2 = new File("f2");

File file3 = new File("f3");


int hc1 = file1.hashCode();

System.out.println(hc1);

int hc2 = file2.hashCode();

System.out.println(hc2);

int hc3 = file3.hashCode();

System.out.println(hc3);
}

}