Skip to content

Ashley-Tung/Papers-Please-CV

Repository files navigation

CS153 Final Project

Computer Vision in Papers, Please

Requirements

Download Tesseract 4.0

Download Tesseract 4.0 with "missing dlls" from here. Then, within the code, change the location of tesseract in pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'. Remember to add Tesseract to your PATH.

Steps in Code (main.py)

  1. Import the image
  2. Crop the image
  3. Find the edge of the documents with Canny Edge Detection
  4. Resize the bounding box of the document edges
  5. Determining passport country with Color Detection
  6. Cropping and thresholding images of attributes from documents
  7. Using PyTesseract to read the cropped attributes
  8. Comparing attributes
  9. If all attributes have been correctly matched, the traveler has correct information. Else, the traveler has incorrect information

Files

main.py

Main code

BMMINI_Training

Files to train Tesseract on BMMini font

MiniKylie_Training

Files to train Tesseract on MiniKylie font

Final_Dataset

Contains all 69 screenshots used to test the code

Seals

Contains images of correct seals for the entry permit

QT-Box-Editor

Program used to correct Tesseract box files

Final-Output.txt

Text file with all print statements and results from images in "Final_Dataset"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages