{"id":16609313,"url":"https://github.com/willbrennan/blurdetection2","last_synced_at":"2025-04-06T02:12:21.715Z","repository":{"id":48166315,"uuid":"83369688","full_name":"WillBrennan/BlurDetection2","owner":"WillBrennan","description":"Blur Detection with OpenCV in Python","archived":false,"fork":false,"pushed_at":"2023-02-10T09:23:16.000Z","size":517,"stargazers_count":358,"open_issues_count":6,"forks_count":83,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-30T01:11:36.716Z","etag":null,"topics":["blur","blur-detection","blur-detector","blurry","detection","opencv","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/WillBrennan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"patreon":"WillBrennan"}},"created_at":"2017-02-28T00:01:34.000Z","updated_at":"2025-03-27T15:28:20.000Z","dependencies_parsed_at":"2023-02-10T10:00:24.618Z","dependency_job_id":null,"html_url":"https://github.com/WillBrennan/BlurDetection2","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/WillBrennan%2FBlurDetection2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WillBrennan%2FBlurDetection2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WillBrennan%2FBlurDetection2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WillBrennan%2FBlurDetection2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WillBrennan","download_url":"https://codeload.github.com/WillBrennan/BlurDetection2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423516,"owners_count":20936626,"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":["blur","blur-detection","blur-detector","blurry","detection","opencv","python"],"created_at":"2024-10-12T01:28:46.019Z","updated_at":"2025-04-06T02:12:21.694Z","avatar_url":"https://github.com/WillBrennan.png","language":"Python","readme":"# Blur Detection\nBlur Detection works using the total variance of the laplacian of an\nimage, this provides a quick and accurate method for scoring how blurry\nan image is.\n\nThis package only depends on numpy and opencv, to install them run, \n\n```\npip install -U -r requirements.txt\n```\n\nThe repository has a script, `process.py` which lets us run on single images or directories of images. The blur detection method is highly dependent on the size of the image being processed. To get consistent scores we fix the image size to HD, to disable this use  `--variable-size`. The script has options to, \n\n```bash\n# run on a single image\npython process.py -i input_image.png\n\n# run on a directory of images\npython process.py -i input_directory/ \n\n# or both! \npython process.py -i input_directory/ other_directory/ input_image.png\n```\n\n. In addition to logging whether an image is blurry or not, we can also,\n\n```bash\n# save this information to json\npython process.py -i input_directory/ -s results.json\n\n# display blur-map image\npython process.py -i input_directory/ -d\n```\nThe saved json file has information on how blurry an image is, the higher the value, the less blurry the image.\n\n```json\n{\n    \"images\": [\"/Users/demo_user/Pictures/Flat/\"],\n    \"fix_size\": true,\n    \"results\": [\n        {\n            \"blurry\": false,\n            \"input_path\": \"/Users/demo_user/Pictures/Flat/IMG_1666.JPG\",\n            \"score\": 6984.8082115095549\n        },\n    ],\n    \"threshold\": 100.0\n}\n```\n\nThis is based upon the blogpost [Blur Detection With Opencv](https://www.pyimagesearch.com/2015/09/07/blur-detection-with-opencv/) by Adrian Rosebrock.\n\n![Blur Mask Demo](https://raw.githubusercontent.com/WillBrennan/BlurDetection2/master/docs/demo.png)\n","funding_links":["https://patreon.com/WillBrennan"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillbrennan%2Fblurdetection2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillbrennan%2Fblurdetection2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillbrennan%2Fblurdetection2/lists"}