{"id":19599133,"url":"https://github.com/nishant2018/text-extraction-ocr-opencv","last_synced_at":"2026-05-04T18:37:22.820Z","repository":{"id":243216416,"uuid":"811807274","full_name":"Nishant2018/Text-Extraction-OCR-OpenCV","owner":"Nishant2018","description":"Text extraction is the process of automatically extracting text from images or documents. Optical Character Recognition (OCR) is a technology that enables computers to convert images of text into machine-readable text.","archived":false,"fork":false,"pushed_at":"2024-06-10T10:38:35.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T15:17:18.080Z","etag":null,"topics":["ocr","opencv","python","text-extraction"],"latest_commit_sha":null,"homepage":"https://www.kaggle.com/code/endofnight17j03/text-extract-ocr-opencv","language":"Jupyter Notebook","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/Nishant2018.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-06-07T10:44:07.000Z","updated_at":"2025-02-07T17:48:00.000Z","dependencies_parsed_at":"2025-01-10T08:16:34.164Z","dependency_job_id":null,"html_url":"https://github.com/Nishant2018/Text-Extraction-OCR-OpenCV","commit_stats":null,"previous_names":["nishant2018/text-extraction-ocr-opencv"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Nishant2018/Text-Extraction-OCR-OpenCV","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nishant2018%2FText-Extraction-OCR-OpenCV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nishant2018%2FText-Extraction-OCR-OpenCV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nishant2018%2FText-Extraction-OCR-OpenCV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nishant2018%2FText-Extraction-OCR-OpenCV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nishant2018","download_url":"https://codeload.github.com/Nishant2018/Text-Extraction-OCR-OpenCV/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nishant2018%2FText-Extraction-OCR-OpenCV/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32620249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ocr","opencv","python","text-extraction"],"created_at":"2024-11-11T09:09:03.859Z","updated_at":"2026-05-04T18:37:22.791Z","avatar_url":"https://github.com/Nishant2018.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Text Extraction with OCR (Optical Character Recognition) using OpenCV\n\n### Introduction\n\nText extraction is the process of automatically extracting text from images or documents. Optical Character Recognition (OCR) is a technology that enables computers to convert images of text into machine-readable text. In this tutorial, we'll explore how to perform text extraction using OCR with OpenCV, a popular computer vision library in Python.\n\n### Why Use OCR for Text Extraction?\n\n- **Automated Data Entry**: OCR allows for automated extraction of text from scanned documents, images, or screenshots, reducing the need for manual data entry.\n- **Document Digitization**: OCR enables the digitization of printed documents, making them searchable and editable.\n- **Text Recognition in Images**: OCR can be used to extract text from images captured by cameras or mobile devices, enabling applications like automatic license plate recognition and text translation.\n\n### Key Steps in OCR Text Extraction with OpenCV\n\n1. **Preprocessing**: Preprocess the input image to enhance the text and remove noise. Common preprocessing techniques include resizing, binarization, noise reduction, and contrast enhancement.\n2. **Text Detection**: Use techniques such as edge detection, contour detection, or deep learning-based methods to locate regions containing text in the image.\n3. **Text Recognition**: Apply OCR algorithms to recognize and extract text from the detected regions. Tesseract is a popular open-source OCR engine that can be integrated with OpenCV for text recognition.\n4. **Post-processing**: Clean up and refine the extracted text to improve accuracy. This may involve removing artifacts, performing spell-checking, and formatting the text.\n\n### Getting Started with OCR and OpenCV\n\n1. **Install OpenCV and Tesseract**: Install OpenCV and Tesseract OCR on your system using package managers like pip or conda.\n2. **Load Image**: Load the input image containing the text you want to extract using OpenCV's imread function.\n3. **Preprocess Image**: Apply preprocessing techniques such as resizing, grayscale conversion, and thresholding to enhance the text.\n4. **Text Detection**: Implement text detection algorithms to locate text regions in the preprocessed image.\n5. **Text Recognition**: Use Tesseract OCR or other OCR libraries to recognize and extract text from the detected regions.\n6. **Post-processing**: Clean up the extracted text and perform any necessary formatting or correction.\n\n### Example Code\n\nHere's a simple example of text extraction using OCR with OpenCV and Tesseract in Python:\n\n```python\nimport cv2\nimport pytesseract\n\n# Load image\nimage = cv2.imread('image.jpg')\n\n# Preprocess image\ngray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\nthresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)[1]\n\n# Perform OCR\ntext = pytesseract.image_to_string(thresh)\n\n# Print extracted text\nprint(\"Extracted Text:\")\nprint(text)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishant2018%2Ftext-extraction-ocr-opencv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishant2018%2Ftext-extraction-ocr-opencv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishant2018%2Ftext-extraction-ocr-opencv/lists"}