{"id":15715038,"url":"https://github.com/hideack/phash-study","last_synced_at":"2025-06-25T07:37:58.946Z","repository":{"id":28590555,"uuid":"32108730","full_name":"hideack/phash-study","owner":"hideack","description":null,"archived":false,"fork":false,"pushed_at":"2017-05-07T02:48:58.000Z","size":1459,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T19:51:18.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hideack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-12T23:22:38.000Z","updated_at":"2015-03-15T02:38:43.000Z","dependencies_parsed_at":"2022-09-03T17:31:01.079Z","dependency_job_id":null,"html_url":"https://github.com/hideack/phash-study","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hideack/phash-study","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hideack%2Fphash-study","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hideack%2Fphash-study/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hideack%2Fphash-study/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hideack%2Fphash-study/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hideack","download_url":"https://codeload.github.com/hideack/phash-study/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hideack%2Fphash-study/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261828372,"owners_count":23215947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T21:40:15.422Z","updated_at":"2025-06-25T07:37:58.917Z","avatar_url":"https://github.com/hideack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phash-study\n\n\n## 実験1 同一画像の加工時の比較\n- いくつかサンプル画像を用意して試してみる。利用した画像は ```samples``` 以下に置いてある。\n- サンプル\n - おなじみのlena画像を各種加工してみる\n \n### 結果\n\n| No | 画像 | ハッシュ値 | No.0とのハミング距離 |\n|----|------|------------|----------------------|\n|0 | ![](https://raw.githubusercontent.com/hideack/phash-study/master/samples/lena.jpg)            | c91cb262775a9800 | - |\n|1 | ![](https://raw.githubusercontent.com/hideack/phash-study/master/samples/lena-small.jpg)      | c91cb262775a9800 | 0 |\n|2 | ![](https://raw.githubusercontent.com/hideack/phash-study/master/samples/lena-sepia.jpg)      | c914b262775a9800 | 2 |\n|3 | ![](https://raw.githubusercontent.com/hideack/phash-study/master/samples/lena-mosaic.jpg)     | c98cb022375ad800 | 8 |\n|4 | ![](https://raw.githubusercontent.com/hideack/phash-study/master/samples/lena-cut.jpg)   | c9acb866635a9800 | 8 |\n|5 | ![](https://raw.githubusercontent.com/hideack/phash-study/master/samples/lena-cut2.jpg)  | cb8cba66535a9800 | 8 |\n|6 | ![](https://raw.githubusercontent.com/hideack/phash-study/master/samples/lena-horizonal-flip.jpg) | dc69f7330287e000 | 34 |\n\n### サンプルプログラム\n\n```javascript\nvar pHash = require(\"phash\");\n\nvar samples = [\n  \"samples/lena.jpg\",\n  \"samples/lena-small.jpg\",\n  \"samples/lena-sepia.jpg\",\n  \"samples/lena-mosaic.jpg\",\n  \"samples/lena-cut.jpg\",\n  \"samples/lena-cut2.jpg\",\n  \"samples/lena-horizonal-flip.jpg\"\n];\n\nvar hash = [];\nsamples.forEach(function(sample) {\n  hash.push(pHash.imageHashSync(sample));\n});\n\nfor(var i=0; i\u003chash.length; i++) {\n  console.log(\"Hash No.\" + i + \" : \" + parseInt(hash[i]).toString(16));\n  console.log(\"File:\" + samples[i]);\n  console.log(\"Haming distance (vs hash[0]) = \" + pHash.hammingDistance(hash[0], hash[i]));\n  console.log(\"-----\");\n}\n\n```\n\n```\nHash No.0 : c91cb262775a9800\nFile:samples/lena.jpg\nHaming distance (vs hash[0]) = 0\n-----\nHash No.1 : c91cb262775a9800\nFile:samples/lena-small.jpg\nHaming distance (vs hash[0]) = 0\n-----\nHash No.2 : c914b262775a9800\nFile:samples/lena-sepia.jpg\nHaming distance (vs hash[0]) = 2\n-----\nHash No.3 : c98cb022375ad800\nFile:samples/lena-mosaic.jpg\nHaming distance (vs hash[0]) = 8\n-----\nHash No.4 : c9acb866635a9800\nFile:samples/lena-cut.jpg\nHaming distance (vs hash[0]) = 8\n-----\nHash No.5 : cb8cba66535a9800\nFile:samples/lena-cut2.jpg\nHaming distance (vs hash[0]) = 8\n-----\nHash No.6 : dc69f7330287e000\nFile:samples/lena-horizonal-flip.jpg\nHaming distance (vs hash[0]) = 34\n-----\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhideack%2Fphash-study","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhideack%2Fphash-study","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhideack%2Fphash-study/lists"}