phash - matlab code for perceptual hashing -
I need a matlab code here for the conceptual hashing algorithm:
Actually I remove it Want to delay an image and leave only information about the key structure components.
To do this, I think I need the following steps: 1. Reduce the DCT. Let's say the DCT is 32x32 (), just keep the top-left 8x8. They represent the lowest frequencies in the picture. Calculate the average value, like the average hash, the average DCT value (using only 8x8 DCT low frequency values and excluding the first term, the DC coefficient other Calculate the values can be quite different and the average will be off).
Reduce further DCT to determine 64 thousand bits based on 0 or 1 depending on whether the average of 64 dct values is above or below each average value. The result does not tell us the actual low frequencies; It only tells the attacks the many relative values of the frequencies, the result will not be different unless the overall structure of the image remains the same; It can avoid gamma and color histogram adjustments without problems.
Rebuilding the image after processing.
Can anyone help any one of the above steps? I have tried some code which gives some results (in the link below), it is not correct yet:
Try it out:
Read the image I = imread ('cameraman.tif'); % Cosine result and decrease D = DCT2 (I); D = D (1: 8,1: 8); % Calculation average a = mean (mean (d)); % Set bits, here's the ambiguity that & gt; Or & gt; = Will be used b = d & gt; a; % Maybe change to string: string = num2str (b (:) ');
Comments
Post a Comment