PHP 클래스 Grafika\Imagick\ImageHash\AverageHash
Algorithm:
Reduce size. Remove high frequencies and detail by shrinking to 8x8 so that there are 64 total pixels.
Reduce color. The tiny 8x8 picture is converted to a grayscale.
Average the colors. Compute the mean value of the 64 colors.
Compute the bits. Each bit is simply set based on whether the color value is above or below the mean.
Construct the hash. Set the 64 bits into a 64-bit integer. The order does not matter, just as long as you are consistent.
http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
파일 보기
프로젝트 열기: kosinix/grafika
공개 메소드들
메소드 |
설명 |
|
hash ( Image $image ) : string |
Generate and get the average hash of the image. |
|
메소드 상세
Generate and get the average hash of the image.