{"action":"created","comment":{"url":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/comments/31395784","id":31395784,"diff_hunk":"@@ -116,10 +116,10 @@ def average_hash(image, hash_size=8):\n def phash(image, hash_size=32):","path":"imagehash/__init__.py","position":19,"original_position":19,"commit_id":"23105d55e04638c53b98907aea2bfc12e6af2bba","original_commit_id":"23105d55e04638c53b98907aea2bfc12e6af2bba","user":{"login":"JohannesBuchner","id":51015,"avatar_url":"https://avatars.githubusercontent.com/u/51015?v=3","gravatar_id":"","url":"https://api.github.com/users/JohannesBuchner","html_url":"https://github.com/JohannesBuchner","followers_url":"https://api.github.com/users/JohannesBuchner/followers","following_url":"https://api.github.com/users/JohannesBuchner/following{/other_user}","gists_url":"https://api.github.com/users/JohannesBuchner/gists{/gist_id}","starred_url":"https://api.github.com/users/JohannesBuchner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohannesBuchner/subscriptions","organizations_url":"https://api.github.com/users/JohannesBuchner/orgs","repos_url":"https://api.github.com/users/JohannesBuchner/repos","events_url":"https://api.github.com/users/JohannesBuchner/events{/privacy}","received_events_url":"https://api.github.com/users/JohannesBuchner/received_events","type":"User","site_admin":false},"body":"Could you please keep the old function and rename it to \"phash_simple\"?\r\nAlso you mentioned that you looked into what phash.org implements. Would it make sense to have one or more of their algorithms? Obviously there is more than one way to implement a \"perceptual hash\", so they could be phash_xxx functions.","created_at":"2015-05-31T23:52:37Z","updated_at":"2015-05-31T23:52:37Z","html_url":"https://github.com/JohannesBuchner/imagehash/pull/14#discussion_r31395784","pull_request_url":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/comments/31395784"},"html":{"href":"https://github.com/JohannesBuchner/imagehash/pull/14#discussion_r31395784"},"pull_request":{"href":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/14","id":36575927,"html_url":"https://github.com/JohannesBuchner/imagehash/pull/14","diff_url":"https://github.com/JohannesBuchner/imagehash/pull/14.diff","patch_url":"https://github.com/JohannesBuchner/imagehash/pull/14.patch","issue_url":"https://api.github.com/repos/JohannesBuchner/imagehash/issues/14","number":14,"state":"open","locked":false,"title":"Rebuild the phash algorithm","user":{"login":"wyverntiger","id":8682791,"avatar_url":"https://avatars.githubusercontent.com/u/8682791?v=3","gravatar_id":"","url":"https://api.github.com/users/wyverntiger","html_url":"https://github.com/wyverntiger","followers_url":"https://api.github.com/users/wyverntiger/followers","following_url":"https://api.github.com/users/wyverntiger/following{/other_user}","gists_url":"https://api.github.com/users/wyverntiger/gists{/gist_id}","starred_url":"https://api.github.com/users/wyverntiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyverntiger/subscriptions","organizations_url":"https://api.github.com/users/wyverntiger/orgs","repos_url":"https://api.github.com/users/wyverntiger/repos","events_url":"https://api.github.com/users/wyverntiger/events{/privacy}","received_events_url":"https://api.github.com/users/wyverntiger/received_events","type":"User","site_admin":false},"body":"For experiments and reasoning, see: JohannesBuchner/imagehash/issues/13\r\n\r\nChanges to phash() algorithm:\r\n   - use a bi-directional DCT\r\n   - use the median instead of the mean of coefficients\r\n   - use all the low-frequency coefficients instead of skipping a column\r\n\r\nAlso includes a fix for binary_array_to_int()","created_at":"2015-05-31T02:57:18Z","updated_at":"2015-05-31T23:52:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1ff96ef72abefd417b4c5133a6a66321bce265e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/14/commits","review_comments_url":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/14/comments","review_comment_url":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JohannesBuchner/imagehash/issues/14/comments","statuses_url":"https://api.github.com/repos/JohannesBuchner/imagehash/statuses/23105d55e04638c53b98907aea2bfc12e6af2bba","head":{"label":"wyverntiger:master","ref":"master","sha":"23105d55e04638c53b98907aea2bfc12e6af2bba","user":{"login":"wyverntiger","id":8682791,"avatar_url":"https://avatars.githubusercontent.com/u/8682791?v=3","gravatar_id":"","url":"https://api.github.com/users/wyverntiger","html_url":"https://github.com/wyverntiger","followers_url":"https://api.github.com/users/wyverntiger/followers","following_url":"https://api.github.com/users/wyverntiger/following{/other_user}","gists_url":"https://api.github.com/users/wyverntiger/gists{/gist_id}","starred_url":"https://api.github.com/users/wyverntiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyverntiger/subscriptions","organizations_url":"https://api.github.com/users/wyverntiger/orgs","repos_url":"https://api.github.com/users/wyverntiger/repos","events_url":"https://api.github.com/users/wyverntiger/events{/privacy}","received_events_url":"https://api.github.com/users/wyverntiger/received_events","type":"User","site_admin":false},"repo":{"id":36584735,"name":"imagehash","full_name":"wyverntiger/imagehash","owner":{"login":"wyverntiger","id":8682791,"avatar_url":"https://avatars.githubusercontent.com/u/8682791?v=3","gravatar_id":"","url":"https://api.github.com/users/wyverntiger","html_url":"https://github.com/wyverntiger","followers_url":"https://api.github.com/users/wyverntiger/followers","following_url":"https://api.github.com/users/wyverntiger/following{/other_user}","gists_url":"https://api.github.com/users/wyverntiger/gists{/gist_id}","starred_url":"https://api.github.com/users/wyverntiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyverntiger/subscriptions","organizations_url":"https://api.github.com/users/wyverntiger/orgs","repos_url":"https://api.github.com/users/wyverntiger/repos","events_url":"https://api.github.com/users/wyverntiger/events{/privacy}","received_events_url":"https://api.github.com/users/wyverntiger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wyverntiger/imagehash","description":"A Python Perceptual Image Hashing Module","fork":true,"url":"https://api.github.com/repos/wyverntiger/imagehash","forks_url":"https://api.github.com/repos/wyverntiger/imagehash/forks","keys_url":"https://api.github.com/repos/wyverntiger/imagehash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wyverntiger/imagehash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wyverntiger/imagehash/teams","hooks_url":"https://api.github.com/repos/wyverntiger/imagehash/hooks","issue_events_url":"https://api.github.com/repos/wyverntiger/imagehash/issues/events{/number}","events_url":"https://api.github.com/repos/wyverntiger/imagehash/events","assignees_url":"https://api.github.com/repos/wyverntiger/imagehash/assignees{/user}","branches_url":"https://api.github.com/repos/wyverntiger/imagehash/branches{/branch}","tags_url":"https://api.github.com/repos/wyverntiger/imagehash/tags","blobs_url":"https://api.github.com/repos/wyverntiger/imagehash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wyverntiger/imagehash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wyverntiger/imagehash/git/refs{/sha}","trees_url":"https://api.github.com/repos/wyverntiger/imagehash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wyverntiger/imagehash/statuses/{sha}","languages_url":"https://api.github.com/repos/wyverntiger/imagehash/languages","stargazers_url":"https://api.github.com/repos/wyverntiger/imagehash/stargazers","contributors_url":"https://api.github.com/repos/wyverntiger/imagehash/contributors","subscribers_url":"https://api.github.com/repos/wyverntiger/imagehash/subscribers","subscription_url":"https://api.github.com/repos/wyverntiger/imagehash/subscription","commits_url":"https://api.github.com/repos/wyverntiger/imagehash/commits{/sha}","git_commits_url":"https://api.github.com/repos/wyverntiger/imagehash/git/commits{/sha}","comments_url":"https://api.github.com/repos/wyverntiger/imagehash/comments{/number}","issue_comment_url":"https://api.github.com/repos/wyverntiger/imagehash/issues/comments{/number}","contents_url":"https://api.github.com/repos/wyverntiger/imagehash/contents/{+path}","compare_url":"https://api.github.com/repos/wyverntiger/imagehash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wyverntiger/imagehash/merges","archive_url":"https://api.github.com/repos/wyverntiger/imagehash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wyverntiger/imagehash/downloads","issues_url":"https://api.github.com/repos/wyverntiger/imagehash/issues{/number}","pulls_url":"https://api.github.com/repos/wyverntiger/imagehash/pulls{/number}","milestones_url":"https://api.github.com/repos/wyverntiger/imagehash/milestones{/number}","notifications_url":"https://api.github.com/repos/wyverntiger/imagehash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wyverntiger/imagehash/labels{/name}","releases_url":"https://api.github.com/repos/wyverntiger/imagehash/releases{/id}","created_at":"2015-05-31T02:34:41Z","updated_at":"2015-05-31T02:34:44Z","pushed_at":"2015-05-31T02:46:08Z","git_url":"git://github.com/wyverntiger/imagehash.git","ssh_url":"git@github.com:wyverntiger/imagehash.git","clone_url":"https://github.com/wyverntiger/imagehash.git","svn_url":"https://github.com/wyverntiger/imagehash","homepage":"","size":103,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JohannesBuchner:master","ref":"master","sha":"89bc8fc7d23debb33f07748213d3f5d938e8ac06","user":{"login":"JohannesBuchner","id":51015,"avatar_url":"https://avatars.githubusercontent.com/u/51015?v=3","gravatar_id":"","url":"https://api.github.com/users/JohannesBuchner","html_url":"https://github.com/JohannesBuchner","followers_url":"https://api.github.com/users/JohannesBuchner/followers","following_url":"https://api.github.com/users/JohannesBuchner/following{/other_user}","gists_url":"https://api.github.com/users/JohannesBuchner/gists{/gist_id}","starred_url":"https://api.github.com/users/JohannesBuchner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohannesBuchner/subscriptions","organizations_url":"https://api.github.com/users/JohannesBuchner/orgs","repos_url":"https://api.github.com/users/JohannesBuchner/repos","events_url":"https://api.github.com/users/JohannesBuchner/events{/privacy}","received_events_url":"https://api.github.com/users/JohannesBuchner/received_events","type":"User","site_admin":false},"repo":{"id":8528872,"name":"imagehash","full_name":"JohannesBuchner/imagehash","owner":{"login":"JohannesBuchner","id":51015,"avatar_url":"https://avatars.githubusercontent.com/u/51015?v=3","gravatar_id":"","url":"https://api.github.com/users/JohannesBuchner","html_url":"https://github.com/JohannesBuchner","followers_url":"https://api.github.com/users/JohannesBuchner/followers","following_url":"https://api.github.com/users/JohannesBuchner/following{/other_user}","gists_url":"https://api.github.com/users/JohannesBuchner/gists{/gist_id}","starred_url":"https://api.github.com/users/JohannesBuchner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohannesBuchner/subscriptions","organizations_url":"https://api.github.com/users/JohannesBuchner/orgs","repos_url":"https://api.github.com/users/JohannesBuchner/repos","events_url":"https://api.github.com/users/JohannesBuchner/events{/privacy}","received_events_url":"https://api.github.com/users/JohannesBuchner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JohannesBuchner/imagehash","description":"A Python Perceptual Image Hashing Module","fork":true,"url":"https://api.github.com/repos/JohannesBuchner/imagehash","forks_url":"https://api.github.com/repos/JohannesBuchner/imagehash/forks","keys_url":"https://api.github.com/repos/JohannesBuchner/imagehash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JohannesBuchner/imagehash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JohannesBuchner/imagehash/teams","hooks_url":"https://api.github.com/repos/JohannesBuchner/imagehash/hooks","issue_events_url":"https://api.github.com/repos/JohannesBuchner/imagehash/issues/events{/number}","events_url":"https://api.github.com/repos/JohannesBuchner/imagehash/events","assignees_url":"https://api.github.com/repos/JohannesBuchner/imagehash/assignees{/user}","branches_url":"https://api.github.com/repos/JohannesBuchner/imagehash/branches{/branch}","tags_url":"https://api.github.com/repos/JohannesBuchner/imagehash/tags","blobs_url":"https://api.github.com/repos/JohannesBuchner/imagehash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JohannesBuchner/imagehash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JohannesBuchner/imagehash/git/refs{/sha}","trees_url":"https://api.github.com/repos/JohannesBuchner/imagehash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JohannesBuchner/imagehash/statuses/{sha}","languages_url":"https://api.github.com/repos/JohannesBuchner/imagehash/languages","stargazers_url":"https://api.github.com/repos/JohannesBuchner/imagehash/stargazers","contributors_url":"https://api.github.com/repos/JohannesBuchner/imagehash/contributors","subscribers_url":"https://api.github.com/repos/JohannesBuchner/imagehash/subscribers","subscription_url":"https://api.github.com/repos/JohannesBuchner/imagehash/subscription","commits_url":"https://api.github.com/repos/JohannesBuchner/imagehash/commits{/sha}","git_commits_url":"https://api.github.com/repos/JohannesBuchner/imagehash/git/commits{/sha}","comments_url":"https://api.github.com/repos/JohannesBuchner/imagehash/comments{/number}","issue_comment_url":"https://api.github.com/repos/JohannesBuchner/imagehash/issues/comments{/number}","contents_url":"https://api.github.com/repos/JohannesBuchner/imagehash/contents/{+path}","compare_url":"https://api.github.com/repos/JohannesBuchner/imagehash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JohannesBuchner/imagehash/merges","archive_url":"https://api.github.com/repos/JohannesBuchner/imagehash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JohannesBuchner/imagehash/downloads","issues_url":"https://api.github.com/repos/JohannesBuchner/imagehash/issues{/number}","pulls_url":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls{/number}","milestones_url":"https://api.github.com/repos/JohannesBuchner/imagehash/milestones{/number}","notifications_url":"https://api.github.com/repos/JohannesBuchner/imagehash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JohannesBuchner/imagehash/labels{/name}","releases_url":"https://api.github.com/repos/JohannesBuchner/imagehash/releases{/id}","created_at":"2013-03-02T23:32:48Z","updated_at":"2015-05-30T22:16:39Z","pushed_at":"2015-05-31T02:57:18Z","git_url":"git://github.com/JohannesBuchner/imagehash.git","ssh_url":"git@github.com:JohannesBuchner/imagehash.git","clone_url":"https://github.com/JohannesBuchner/imagehash.git","svn_url":"https://github.com/JohannesBuchner/imagehash","homepage":"","size":262,"stargazers_count":101,"watchers_count":101,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":7,"forks":16,"open_issues":7,"watchers":101,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/14"},"html":{"href":"https://github.com/JohannesBuchner/imagehash/pull/14"},"issue":{"href":"https://api.github.com/repos/JohannesBuchner/imagehash/issues/14"},"comments":{"href":"https://api.github.com/repos/JohannesBuchner/imagehash/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JohannesBuchner/imagehash/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/JohannesBuchner/imagehash/statuses/23105d55e04638c53b98907aea2bfc12e6af2bba"}}}}