Calculate hash of an Image?
hi all,
i am trying to compare 2 images in an efficient manner using Qt/c++, how can i find the hash of an image?
i found this class QCryptographicHash that can be used but i am not sure, if this can be used then how do i convet the image say a Qimage to QByteArray?
Is there any thing similar available in c++?
thank u
Re: Calculate hash of an Image?
Quote:
how do i convet the image say a Qimage to QByteArray?
QImage has constBits() method that returns the pixel data, you can use it to construct the QByteArray, which you can pass to QCrypthographicHash.
Quote:
Is there any thing similar available in c++?
C++ is a programming language, it has no built-in support for image processing.
Re: Calculate hash of an Image?
If you're just comparing images, QImage::cacheKey may be what you're looking for.