Question
JAVA ASSIGNMENT: Convert all images to grey-scale images and normalized to a common size. The image is then divided into a number of (strictly or
JAVA ASSIGNMENT:
Convert all images to grey-scale images and normalized to a common size. The image is then divided into a number of (strictly or almost) equally-sized patches, prior to being inputted to the actual hashing procedure. You may experiment with different patch sizes before settling on a reasonable choice. The output of the hashing procedure is a fixed finite-length string of bits equal in length to the number of patches in the image (e.g., 11010100100100000010100100101011111111011111100101010010101010101010101001100101; it should not be too short)
The method used to achieve above task is the Mean Value Based Algorithm:
a) Convert the image to grey scale and normalize the original image into a preset size.
b) Let N denote the bit length (e.g. 256 bit) of the final hash value. Divide the pixels of the image I into non-overlapped blocks I1, I2, . . . , IN .
c) Encrypt the indices of the block sequence {I1, I2, . . . , IN } using a secret key K to obtain a block sequence with a new scanning order {I 0 1 , I0 2 , . . . , I0 N }. [44] specifies no further details about what encryption algorithm to use. So it is up to the implementor of this perceptual image hash function to choose an adequate one.
d) Calculate the mean of the pixel values of each block. That is, calculate the mean value sequence {M1, M2, . . . , MN } from corresponding block sequence {I 0 1 , I0 2 , . . . , I0 N }. Finally obtain the median value Md of the mean value sequence.
e) Normalize the mean value sequence into a binary form and obtain the hash value h as h(i) = ( 0 , Mi < Md 1 , Mi Md .
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started