Skip to content

Mayan-S/document-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description:

This C++ application is a document scanner and OCR (Optical Character Recognition) tool built using OpenCV and Tesseract OCR. It allows users to select a document image, automatically detects and extracts the document from the image, applies perspective correction, and then performs OCR to extract the text content. The scanned image and the recognized text are saved in the results folder for future use.


Program In Use:

  1. User Input: The user is prompted to select a document image (1–8).

Screenshot 2025-06-25 231938

  1. Image Loading: The selected image is loaded from the Resources/ folder.
  2. Preprocessing: The image is converted to grayscale, blurred, and edges are detected.
  3. Contour Detection: The largest 4-point contour is found and reordered.
  4. Warping & Cropping: The document is warped to a flat, top-down view and cropped.

BEFORE: document_4

AFTER: Screenshot 2025-06-25 232127

  1. OCR: Tesseract extracts text from the scanned image.
  2. Saving Results: The scanned image is saved as Results/output.jpg, and the text is saved as Results/output.txt.

Screenshot 2025-06-25 232159

Screenshot 2025-06-25 232416

Screenshot 2025-06-25 232356

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages