{"id":18074126,"url":"https://github.com/bytespider/psnr","last_synced_at":"2025-04-23T20:25:23.164Z","repository":{"id":13679761,"uuid":"16373501","full_name":"bytespider/psnr","owner":"bytespider","description":"Peak signal-to-noise ratio http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio","archived":false,"fork":false,"pushed_at":"2014-07-22T07:49:25.000Z","size":148,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T08:34:46.715Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytespider.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":"2014-01-30T09:48:22.000Z","updated_at":"2024-05-15T02:19:40.000Z","dependencies_parsed_at":"2022-09-23T14:03:09.280Z","dependency_job_id":null,"html_url":"https://github.com/bytespider/psnr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytespider%2Fpsnr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytespider%2Fpsnr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytespider%2Fpsnr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytespider%2Fpsnr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytespider","download_url":"https://codeload.github.com/bytespider/psnr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250507553,"owners_count":21442020,"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-31T10:11:22.051Z","updated_at":"2025-04-23T20:25:23.119Z","avatar_url":"https://github.com/bytespider.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# psnr\n\nPeak signal-to-noise ratio, often abbreviated PSNR, is an engineering term for the ratio between the maximum possible power of a signal and the power of corrupting noise that affects the fidelity of its representation. \n\nBecause many signals have a very wide dynamic range, PSNR is usually expressed in terms of the logarithmic decibel scale.\n\nPSNR is most commonly used to measure the quality of reconstruction of lossy compression codecs (e.g., for image compression). The signal in this case is the original data, and the noise is the error introduced by compression. When comparing compression codecs, PSNR is an approximation to human perception of reconstruction quality.\n\nhttp://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio  \n\n# example\n\n```\nvar psnr = require('psnr');\nvar data_1 = [\n    188, 100, 114, 171, 171, 173, 230, 149,\n    191,  81,  61,  62, 127, 217,  62,  81, \n    178, 159, 245,  18,   9,  86, 201, 166,\n    122, 210,   4, 182,  15,  18, 135, 203,\n    222, 134, 154,  21,  71, 217,  48, 153,\n    113, 234, 207, 119,  51,  61, 149, 222, \n    186,  38, 158,  79, 185,   1, 118, 222,\n     22, 137, 110, 206,  94, 120, 163, 241\n]; \n\nvar data_2 = [\n    188, 100, 114, 171, 171, 173, 230, 149,\n    191,  81,  61,  62, 127, 217,  62,  81, \n    178, 159, 245,  18,   9,  86, 201, 166,\n    122, 210,   4, 182,  15,  18, 135, 203,\n    222, 134, 154,  21,  71, 217,  48, 153,\n    113, 234, 207, 119,  51,  61, 149, 222, \n    186,  38, 158,  79, 185,   1, 118, 222,\n     22, 137, 110, 206,  94, 120, 163, 241\n];\n\nvar result = psnr(data_1, data_2);\nif (result == Infinity) {\n    console.log('results are identical');\n}\n\n```\n\n# license\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytespider%2Fpsnr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytespider%2Fpsnr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytespider%2Fpsnr/lists"}