{"id":17122020,"url":"https://github.com/techbyvj/license-plate-recognition-nodejs","last_synced_at":"2025-04-13T05:01:40.355Z","repository":{"id":257807362,"uuid":"866593664","full_name":"techbyvj/license-plate-recognition-nodejs","owner":"techbyvj","description":"License plate recognition in Nodejs","archived":false,"fork":false,"pushed_at":"2024-10-03T07:51:03.000Z","size":34,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T12:18:20.644Z","etag":null,"topics":["anpr","easyocr","license-plate-detection","license-plate-reader","license-plate-recognition","lpr","nodejs","number","number-plate-detection","number-plate-reader","number-plate-recognition","number-plate-scanner","plate-recognition","tesseract-ocr"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/techbyvj.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-02T14:37:51.000Z","updated_at":"2025-04-04T13:22:52.000Z","dependencies_parsed_at":"2024-10-09T13:45:12.273Z","dependency_job_id":null,"html_url":"https://github.com/techbyvj/license-plate-recognition-nodejs","commit_stats":null,"previous_names":["techbyvj/license-plate-recognition-nodejs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techbyvj%2Flicense-plate-recognition-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techbyvj%2Flicense-plate-recognition-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techbyvj%2Flicense-plate-recognition-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techbyvj%2Flicense-plate-recognition-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techbyvj","download_url":"https://codeload.github.com/techbyvj/license-plate-recognition-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665755,"owners_count":21142123,"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":["anpr","easyocr","license-plate-detection","license-plate-reader","license-plate-recognition","lpr","nodejs","number","number-plate-detection","number-plate-reader","number-plate-recognition","number-plate-scanner","plate-recognition","tesseract-ocr"],"created_at":"2024-10-14T18:06:13.107Z","updated_at":"2025-04-13T05:01:40.321Z","avatar_url":"https://github.com/techbyvj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# License Plate Recognizer\n\nA Node.js package for license plate recognition using OpenCV and OCR.\n\n## Description\n\nThis package provides a robust solution for recognizing license plates in images. It uses computer vision techniques with OpenCV for plate detection and multiple OCR engines for text extraction.\n\n## Features\n\n- License plate detection in images\n- Text recognition from detected license plates using multiple OCR engines (Tesseract and EasyOCR)\n- Logging of recognition process\n- Saving of original and processed images\n\n## Installation\n\nTo install the package, run:\n\n```bash\nnpm install license-plate-recognizer\n```\n\n## Prerequisites\n\n- Node.js (version 12 or higher recommended)\n- OpenCV (automatically installed via @u4/opencv4nodejs)\n- Tesseract OCR (must be installed separately on your system)\n\n## Usage\n\nHere's a basic example of how to use the package:\n\n```typescript\nimport { recognizeLicensePlate } from 'license-plate-recognizer';\n\nconst imagePath = 'path/to/your/image.jpg';\nrecognizeLicensePlate(imagePath)\n  .then(([licensePlate, text]) =\u003e {\n    if (licensePlate \u0026\u0026 text) {\n      console.log(`Detected license plate: ${text}`);\n    } else {\n      console.log('No license plate detected');\n    }\n  })\n  .catch(error =\u003e console.error('Error:', error));\n```\n\n## API\n\n### `recognizeLicensePlate(imagePath: string): Promise\u003c[cv.Mat | null, string | null]\u003e`\n\nProcesses an image and attempts to recognize a license plate.\n\n- `imagePath`: The path to the image file.\n- Returns: A Promise that resolves to a tuple containing:\n  - The detected license plate image (`cv.Mat` object) or `null` if not found.\n  - The recognized text from the license plate or `null` if not recognized.\n\n## Dependencies\n\nThis package relies on the following main dependencies:\n\n- [@u4/opencv4nodejs](https://www.npmjs.com/package/@u4/opencv4nodejs): For image processing and computer vision tasks.\n- [node-tesseract-ocr](https://www.npmjs.com/package/node-tesseract-ocr): For Optical Character Recognition using Tesseract.\n- [node-easyocr](https://www.npmjs.com/package/node-easyocr): For Optical Character Recognition using EasyOCR.\n- [winston](https://www.npmjs.com/package/winston): For logging.\n\nMake sure to install Tesseract OCR on your system for text recognition to work properly. EasyOCR is included as a fallback OCR engine.\n\n## Output\n\nProcessed images are saved in an `output` directory, organized by date. The original image and the cropped license plate image (if detected) are both saved.\n\n## Development\n\nTo set up the development environment:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/techbyvj/license-plate-recognition-nodejs.git\n   ```\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n3. Build the project:\n   ```bash\n   npm run build\n   ```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the ISC License.\n\n## Issues\n\nIf you encounter any problems or have suggestions, please file an issue on the [GitHub repository](https://github.com/techbyvj/license-plate-recognition-nodejs/issues).\n\n## Connect\n\nFollow the author on X (Twitter): [@saidbyvj](https://x.com/saidbyvj)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechbyvj%2Flicense-plate-recognition-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechbyvj%2Flicense-plate-recognition-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechbyvj%2Flicense-plate-recognition-nodejs/lists"}