How to obtain the hash representation from the image_hash module
I 'm trying to compute the perceptual hash for an image (Using for example the phash algorithm). I want to compute and save the hash in a database for future comparissons.
The compute method from the PHashImpl
class set an cv::OutputArray
with the result of the computation (the hash).
Is it posible to convert it into a alphanumeric of numeric representation of the hash?
Like: image -> phash_algrithm -> 8a0303f6df3ec8cd
Am i thinking in the right way or my limited knowledge at the moment of the OpenCv is leading me to the wrong path?
I think that you will have to convert data using your own function
Thanks for your answer Laurent. Do you mean like for example looping through the pixel and transform the values to some number or string equivalent and then concatenate them or similar? I need to generate same alphanumeric size hashes in order to compare them using Hamming distance. I'm a bit lost in how to start from the Mat object, but reading a lot :)