ENGLISH

OCR with OpenCV, Tesseract, and Python - Intro to OCR

Book information

Publisher
PyImageSearch
Year
2021
Language
english
Format
PDF
Filesize
22 MB (22580858 bytes)
Series
PyImageSearch OCR
Edition
Intro to OCR Edition 1.0
Pages
218\218
Time added
2021-04-01 08:22:40

Description

OCR with Tesseract, OpenCV, and Python will teach you how to successfully apply Optical Character Recognition to your work, projects, and research. You will learn via practical, hands-on projects (with lots of code) so you can not only develop your own OCR Projects, but feel confident while doing so. Companion Website......Page 3 Acronyms......Page 11 1 Introduction......Page 15 1.3 Do I Need to Know Deep Learning?......Page 16 1.5 Summary......Page 17 2 What Is Optical Character Recognition?......Page 19 2.2.1 A Brief History of OCR......Page 20 2.2.2 Applications of OCR......Page 21 2.2.4 The Importance of Pre-Processing and Post-Processing......Page 22 2.3 Summary......Page 23 3.2 OCR Tools and Libraries......Page 25 3.2.1 Tesseract......Page 26 3.2.4 OpenCV......Page 27 3.2.5 Keras, TensorFlow, and scikit-learn......Page 28 3.2.6 Cloud OCR APIs......Page 29 3.3 Summary......Page 30 4.2.1 A Note on Install Instructions......Page 31 4.2.2.2 Installing Tesseract on Ubuntu......Page 32 4.2.2.5 Verifying Your Tesseract Install......Page 33 4.2.5 Installing Other Computer Vision, Deep Learning, and Machine Learning Libraries......Page 34 4.3 Summary......Page 35 5 Your First OCR Project with Tesseract......Page 37 5.1 Chapter Learning Objectives......Page 38 5.2.2 Basic OCR with Tesseract......Page 39 5.2.3 Tesseract OCR Results......Page 41 5.3 Summary......Page 43 6 Detecting and OCR'ing Digits with Tesseract......Page 45 6.2.1 What Is Digit Detection and Recognition?......Page 46 6.2.3 OCR'ing Digits with Tesseract and OpenCV......Page 47 6.2.4 Digit OCR Results......Page 49 6.3 Summary......Page 50 7.2.1 What Are Whitelists and Blacklists?......Page 51 7.2.3 Whitelisting and Blacklisting Characters with Tesseract......Page 52 7.2.4 Whitelisting and Blacklisting with Tesseract Results......Page 54 7.3 Summary......Page 57 8.1 Chapter Learning Objectives......Page 59 8.2 What Is Orientation and Script Detection?......Page 60 8.3.2 Implementing Our Text Orientation and Correction Script......Page 61 8.3.3 Text Orientation and Correction Results......Page 63 8.4 Summary......Page 66 9.2 OCR and Language Translation......Page 69 9.2.1 Translating Text to Different Languages with textblob......Page 70 9.2.3 Implementing Our OCR and Language Translation Script......Page 71 9.2.4 OCR Language Translation Results......Page 72 9.3 Summary......Page 73 10.2.1 Configuring Tesseract for Multiple Languages......Page 75 10.2.2 Adding Language Packs to Tesseract......Page 76 10.2.3 The textblob Package's Relation to This Chapter......Page 77 10.2.4 Verifying Tesseract Support for Non-English Languages......Page 78 10.3.2 Implementing Our Tesseract with Non-English Languages Script......Page 79 10.3.3 Tesseract and Non-English Languages Results......Page 81 10.4 Summary......Page 84 11 Improving OCR Results with Tesseract Options......Page 85 11.2.1 What Are Page Segmentation Modes?......Page 86 11.2.2 Project Structure......Page 88 11.2.3 PSM 0. Orientation and Script Detection Only......Page 89 11.2.4 PSM 1. Automatic Page Segmentation with OSD......Page 91 11.2.6 PSM 3. Fully Automatic Page Segmentation, But No OSD......Page 92 11.2.7 PSM 4. Assume a Single Column of Text of Variable Sizes......Page 93 11.2.8 PSM 5. Assume a Single Uniform Block of Vertically Aligned Text......Page 96 11.2.9 PSM 6. Assume a Single Uniform Block of Text......Page 99 11.2.10 PSM 7. Treat the Image as a Single Text Line......Page 101 11.2.11 PSM 8. Treat the Image as a Single Word......Page 102 11.2.12 PSM 9. Treat the Image as a Single Word in a Circle......Page 103 11.2.14 PSM 11. Sparse Text: Find as Much Text as Possible in No Particular Order......Page 104 11.2.16 PSM 13. Raw Line: Treat the Image as a Single Text Line, Bypassing Hacks That Are Tesseract-Specific......Page 107 11.2.17 Tips, Suggestions, and Best Practices for PSM Modes......Page 108 11.3 Summary......Page 109 12.1 Chapter Learning Objectives......Page 111 12.2.2 When Tesseract by Itself Fails to OCR an Image......Page 112 12.2.3 Implementing an Image Processing Pipeline for OCR......Page 114 12.3 Summary......Page 119 13.2 OCR and Spellchecking......Page 121 13.2.2 Implementing Our OCR Spellchecking Script......Page 122 13.2.3 OCR Spellchecking Results......Page 124 13.3 Summary......Page 125 14.1 Chapter Learning Objectives......Page 127 14.2.1 What Is a Machine-Readable Zone?......Page 128 14.2.2 Project Structure......Page 129 14.2.3 Locating MRZs in Passport Images......Page 130 14.2.4 Text Blob Localization Results......Page 136 14.3 Summary......Page 138 15.2 OCR'ing Text via Template Matching......Page 141 15.2.1 The OCR-A, OCR-B, and MICR E-13B Fonts......Page 142 15.2.2 Project Structure......Page 143 15.2.3 Credit Card OCR with Template Matching and OpenCV......Page 144 15.2.4 Credit Card OCR Results......Page 153 15.3 Summary......Page 155 16 OCR'ing Characters with Basic Image Processing......Page 157 16.2.1 The 7-Segment Display......Page 158 16.2.2 Project Structure......Page 159 16.2.3 Implementing Our 7-Segment Visualization Utilities......Page 160 16.2.4 Visualizing Digits on a 7-Segment Display......Page 163 16.2.5 Creating Our 7-Segment Digit Recognizer......Page 164 16.2.6 Digit OCR with Image Processing and OpenCV......Page 166 16.2.7 The 7-Segment Digit OCR Results......Page 169 16.3 Summary......Page 170 17.1 Chapter Learning Objectives......Page 173 17.2.1 What Is Text Localization and Detection?......Page 174 17.2.3 Drawing OCR'd Text with OpenCV......Page 175 17.2.4 Implementing Text Localization and OCR with Tesseract......Page 176 17.2.5 Text Localization and OCR Results......Page 178 17.3 Summary......Page 180 18.1 Chapter Learning Objectives......Page 183 18.2.1 Why Is Natural Scene Text Detection So Challenging?......Page 184 18.2.2 EAST Deep Learning Text Detector......Page 186 18.2.3 Project Structure......Page 187 18.2.4 Creating Our Rotated Text Detector Helper Functions......Page 188 18.2.5 Implementing the EAST Text Detector with OpenCV......Page 191 18.2.6 Rotated Text Bounding Box Results......Page 195 18.3 Summary......Page 197 19 A Complete Text Detection and OCR Pipeline......Page 199 19.2.1 How to Combine Text Detection and OCR with OpenCV......Page 200 19.2.3 Implementing Our Text Detection and OCR Pipeline......Page 201 19.2.4 Text Detection and OCR with OpenCV Results......Page 207 19.3 Summary......Page 209 20 Conclusions......Page 211 Bibliography......Page 213

Similar books