I want to get the phash with opencv on Android then compare to a database of image phashes on a server.
1.Is the phash algorithm in opencv img_hash the same as one from phash.org at all?
- I see img_hash.phash has compute function which just converts a mat to an output mat. How do I get the string representation of this output mat to then run against my phash database? This is what I have but I am getting some unrecognizable characters.
:
Mat outMat = new Mat();
phash.compute(inMat, outMat);
byte[] data = new byte[outMat.rows() * outMat.cols()];
outMat.get(0, 0, data);
String hashString = new String(data, StandardCharsets.UTF_8);