PHP 클래스 Grafika\Gd\ImageHash\DifferenceHash

Algorithm: Reduce size. The fastest way to remove high frequencies and detail is to shrink the image. In this case, shrink it to 9x8 so that there are 72 total pixels. Reduce color. Convert the image to a grayscale picture. This changes the hash from 72 pixels to a total of 72 colors. Compute the difference. The algorithm works on the difference between adjacent pixels. This identifies the relative gradient direction. In this case, the 9 pixels per row yields 8 differences between adjacent pixels. Eight rows of eight differences becomes 64 bits. Assign bits. Each bit is simply set based on whether the left pixel is brighter than the right pixel. http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html
파일 보기 프로젝트 열기: kosinix/grafika 1 사용 예제들

공개 메소드들

메소드 설명
hash ( Image $image, Editor $editor ) : string Generate and get the difference hash of image.

메소드 상세

hash() 공개 메소드

Generate and get the difference hash of image.
public hash ( Image $image, Editor $editor ) : string
$image Grafika\Gd\Image
$editor Grafika\Gd\Editor
리턴 string