{"id":14977702,"url":"https://github.com/arghyadeep-k/opencv-facecrop","last_synced_at":"2025-10-28T05:30:57.020Z","repository":{"id":40705434,"uuid":"296559559","full_name":"arghyadeep-k/opencv-facecrop","owner":"arghyadeep-k","description":"Auto-detect faces in a picture and crop them out.","archived":false,"fork":false,"pushed_at":"2024-11-04T00:18:54.000Z","size":3652,"stargazers_count":12,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T12:11:12.390Z","etag":null,"topics":["face-crop","image","javascript","nodejs","npm","npm-package","npmjs","opencv","processing"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/opencv-facecrop","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arghyadeep-k.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,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"arghyadeep","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/arghyadeep"]}},"created_at":"2020-09-18T08:21:40.000Z","updated_at":"2023-10-12T07:24:29.000Z","dependencies_parsed_at":"2024-09-18T22:08:55.744Z","dependency_job_id":"9558d615-88e5-4d2d-88ee-9e2eb300117e","html_url":"https://github.com/arghyadeep-k/opencv-facecrop","commit_stats":{"total_commits":47,"total_committers":4,"mean_commits":11.75,"dds":0.1063829787234043,"last_synced_commit":"044720455f81a072e5bc67afb019ea06387bc162"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arghyadeep-k%2Fopencv-facecrop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arghyadeep-k%2Fopencv-facecrop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arghyadeep-k%2Fopencv-facecrop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arghyadeep-k%2Fopencv-facecrop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arghyadeep-k","download_url":"https://codeload.github.com/arghyadeep-k/opencv-facecrop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238278232,"owners_count":19445765,"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":["face-crop","image","javascript","nodejs","npm","npm-package","npmjs","opencv","processing"],"created_at":"2024-09-24T13:56:10.097Z","updated_at":"2025-10-28T05:30:56.554Z","avatar_url":"https://github.com/arghyadeep-k.png","language":"JavaScript","funding_links":["https://ko-fi.com/arghyadeep","https://www.buymeacoffee.com/arghyadeep"],"categories":[],"sub_categories":[],"readme":"# OpenCv - Face Crop : Autodetect \u0026 crop faces out of an image (Node.js)\n\n![CI](https://github.com/arghyadeep-k/opencv-facecrop/workflows/CI/badge.svg?branch=master)\n![codecov.io](https://codecov.io/github/arghyadeep-k/opencv-facecrop/coverage.svg?branch=master)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=arghyadeep-k_opencv-facecrop\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=arghyadeep-k_opencv-facecrop)\n![npm](https://img.shields.io/npm/v/opencv-facecrop)\n![npm bundle size](https://img.shields.io/bundlephobia/min/opencv-facecrop)\n![Libraries.io SourceRank](https://img.shields.io/librariesio/sourcerank/npm/opencv-facecrop)\n![Depfu](https://img.shields.io/depfu/arghyadeep-k/opencv-facecrop)\n![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/opencv-facecrop)\n![npm](https://img.shields.io/npm/dt/opencv-facecrop)\n![NPM](https://img.shields.io/npm/l/opencv-facecrop?color=blue)\n\n\nThis package helps you to auto-detect faces in a picture and crop them out.\n\n## Installation\n\n[![NPM](https://nodei.co/npm/opencv-facecrop.png)](https://nodei.co/npm/opencv-facecrop/)\n\n**Install from command line:**\n\n`npm install --save opencv-facecrop`\n\n\n\n## Basic Usage\n```javascript\nconst facecrop = require('opencv-facecrop');\n\nfacecrop('./image-file.jpg', './dest/output.jpg', \"image/jpeg\", 0.95, 1.5);\n\n/* \nOutputs image with file name output.jpg in 'dest' folder with the face cropped out.\n\nIf multiple faces are detected, the files will be automatically renamed to output-1.jpg, output-2.jpg and so on.\n*/\n```\n\n## Results\n\nOriginal Image:\n\n\u003cimg src=\"https://github.com/arghyadeep-k/resources/raw/master/opencv-facecrop_test-file-1.jpg\"\u003e\n\u003csmall\u003eImage by \u003ca href=\"https://pixabay.com/photos/?utm_source=link-attribution\u0026amp;utm_medium=referral\u0026amp;utm_campaign=image\u0026amp;utm_content=919048\"\u003eFree-Photos\u003c/a\u003e from \u003ca href=\"https://pixabay.com/?utm_source=link-attribution\u0026amp;utm_medium=referral\u0026amp;utm_campaign=image\u0026amp;utm_content=919048\"\u003ePixabay\u003c/a\u003e\u003c/small\u003e\n\n\u003cbr\u003e\n\nCropped Image:\n\n\u003cimg src=\"https://github.com/arghyadeep-k/resources/raw/master/opencv-facecrop_test-file-1-output.jpg\" width=250px\u003e\n\n\n## API\n\n**facecrop(input_filename, output_filename, type, quality, factor)**\n\n- **input_filename**: Input String containing file name with relative/absolute filepath.\n\n- **output_filename**: (Optional) Requires a string value which will contains the output file name.\n\n- **type**: (Optional) Requires String value which will tell the format of the output image.\n\n- **quality**: (Optional) Requires a float value between 0 to 1 which stands for the quality index of the output file compares to the input file. Set 1 for no reduction in quality.\n\n- **factor**: (Optional) Scaling Factor by which the area of cropping of the face can be increased/decreased to add more details. Must be greater than 0.\n\n## Defaults \n\n - **input_filename**: Mandatory parameter\n - **output_filename**: \"./output.jpg\"\n - **type**: 'image/jpeg'\n - **quality**: 0.95\n - **factor**: 1\n\n## Changelogs:\nTo view the changelogs, please refer to the \u003ca href=\"https://github.com/arghyadeep-k/opencv-facecrop/releases\"\u003eGithub Releases page\u003c/a\u003e of this project.\n\n## License\n\nOpenCv - Face Crop is published under the Unlicense. For more information, see the accompanying LICENSE file. \n\n\u003cbr\u003e\n\n---\n\n\u003cbr\u003e\n\nP.S. - This is a pre-release version. More updates with refinements coming soon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farghyadeep-k%2Fopencv-facecrop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farghyadeep-k%2Fopencv-facecrop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farghyadeep-k%2Fopencv-facecrop/lists"}