Image Hashing Toobox in Matlab
Vishal Monga, Divyanshu Vats, and Brian L. Evans
The University of Texas at Austin, Austin, TX 78712 USA
Download Version 0.1 beta
Image Hashing Research at UT Austin
Hash functions are frequently called message digest functions.
Their purpose is to extract a fixed-length bit string from a message
(image, documents, etc.).
Hash functions have found varied applications in various cryptographic,
compiler and database search applications.
In cryptography, hash functions are typically used for digital signatures
to authenticate the message being sent so that the recipient can verify
Recently, there has been a lot of interest in using hash functions in
multimedia applications both for security and indexing.
A key feature of conventional cryptographic hashing algorithms such as
message digest 5 (MD5) and secure hash algorithm 1 (SHA-1) is that they
are extremely sensitive to the message, i.e. changing even one bit of
the input will change the output dramatically.
However, multimedia data such as digital images go through various
manipulations such as compression, enhancement, cropping, and scaling.
An image hash function should instead take into account the changes in
the visual domain and produce hash values based on the image's visual
Such a hash function would be useful in identifying images in databases,
in which the image possibly undergoes incidental changes (such as compression
and format changes, common signal processing operations, scanning or
watermarking). A second significant application of a perceptual image hash
could be for robust image authentication.
In such cases, the hash must be invariant under perceptually insignificant
modifications to the image but detect malicious tampering of image data.
Several other applications can be identified in the areas of watermarking
and information embedding in images.
hashingdemo performs an automated test for a perceptual match
of two images.
This is done by computing hashes from the two images and comparing the hash
vectors for a meaningful notion of distance.
Image hashing methods included in this demo are:
Start the demo by typing
- Discrete Wavelet Transform (DWT) Based Image Hash [Venkatesan et al., 2000]
- Hashing Via Singular Value Decomposition (SVD) [Kozat et al., 2004]
- Feature Point Based Image Hashing [Monga & Evans, 2004-06]
hashingdemo from the MATLAB command
help function yields useful help information for
each function.m file in the toolbox
- Description of algorithm parameters for each hash algorithm is available in
the following files:
- Wavelet Based Image Hash [Venkatesan et al., 2000] - wavelethash.m
- Hashing Via Singular Value Decomposition [Kozat et al. 2004] - hashbySVD.m
- Feature Point Based Image Hashing [Monga & Evans, 2004-06] - MakeFeatures.m
- Some sample images for comparisons are available in the directory DemoImages û
two example images are read in by default.
To compare your own pair of images modify passImages.m
- Files runSVDHash.m, runWaveletHash.m, runFPHash.m contain detection thresholds
for each hash algorithm û these were experimentally optimized for each algorithm.
The user may changes this to vary robustness.
But if you do be sure to save the original values.
Example images that have been tampered with are available in the
The image hashing toolbox requires Matlab 6.5 or higher, as well as
the Image Processing Toolbox and Wavelet Toolbox in MATLAB.
Versions 0.1 of the toolbox was generated by Dr. Vishal Monga and
Mr. Divyanshu Vats at UT Austin under the direction of Prof. Brian L. Evans.
Dr. Vishal Monga is currently a Member of Research Staff at
Xerox Research Labs in El Segundo, California.
Mr. Divyanshu Vats is currently a graduate student in electrical and computer
engineering at Carnegie Mellon University in Pittsburg, Pennsylvania.
Prof. Brian L. Evans is currently Professor of Electrical and Computer
Engineering at The University of Texas at Austin in Austin, Texas.
For questions on the toolbox please write to Dr. Vishal Monga at