Hi,

I was really into skateboarding as a middle schooler. Every waking second I spent on my board.

One day, I gave myself a pretty bad concussion. I was coasting along, and wham, out of nowhere, a big rock lodges underneath one of my wheels, my board abruptly halts, and I go flying.

Luckily, my head broke the fall.
Image
I was out cold for a minute, but when I came to, I was disoriented. I didn't know up from down or left from right. My brain needed a few minutes to reorient myself and figure out what was going on.

When applying OCR, knowing your orientation is critical. If your image is rotated, then your OCR accuracy will suffer.

Therefore, one way to improve OCR accuracy is to detect the text orientation and then correct for it:
Image
The big picture: If the text in your input image is rotated, your OCR accuracy will suffer. To improve OCR accuracy, you should first correct text orientation.

How it works: Tesseract's orientation and script detection (OSD) mode lets you do text orientation correction out of the box.

Our thoughts: If you don't have a way to deal with text orientation, you've got no chance of getting good OCR results. 

Yes, but: There are ways to correct text orientation, including various applications of deep learning; however, few are easier and more integrated than Tesseract's OSD.

Stay smart: OSD won't fix all your problems, but it will fix most of them when it comes to text orientation and OCR.

Click here to learn how to use OSD to correct text orientation with Tesseract.

PyImageSearch University

This lesson is part of PyImageSearch University, our flagship program to help you master computer vision, deep learning, and OpenCV.  PyImageSearch University is updated each week with new lessons.

Don't know Python?  No problem, we've got you covered with a short and sweet Python course to get you going.

Having problems with your local development environment or IDE?  Fortunately, our pre-configured Colab Notebooks mean you can run code the moment you join PyImageSearch University.  But, of course, you don't want to be a sys-admin, so don't waste time messing with your development environment.  

You can find the current lesson under OCR 110 — Using Tesseract for Translation and Non-English Languages. The direct link can be found here.

Want to master computer vision and deep learning?

Do you think mastering computer vision and deep learning has to be time-consuming, overwhelming, and complicated? Or has to involve complex mathematics and equations? Or requires a degree in computer science?

That's not the case. All you need to master computer vision and deep learning is for someone to explain things to you in simple, intuitive terms. And that's exactly what we do. Our mission is to change education and how complex Artificial Intelligence topics are taught.

Inside PyImageSearch University, you'll find:

  • 30+ courses on the hottest computer vision, deep learning, and OpenCV topics
  • 30+ Certificates of Completion (one for each course)
  • 39+ hours of on-demand video
  • Pre-configured Jupyter Notebooks running in Google Colab
  • Run all code examples in your web browser — works on Windows, macOS, and Linux (no dev environment configuration required!)
  • Access to centralized code repos for all 500+ tutorials on the PyImageSearch blog
  • Easy one-click downloads for code, datasets, pre-trained models, etc.
  • Access on mobile, laptop, desktop, etc.
  • New courses released regularly and new lessons weekly, ensuring you can keep up with state-of-the-art techniques

Click here to join PyImageSearch University


PyImageSearch Team

P.S. Have a question about Computer Vision, Deep Learning, and OpenCV?

I'd be happy to help — but the fact of the matter is that I receive 200+ emails per day asking for a bit of my time. There's simply not enough time in the day for me to respond to these emails and still have a happy, productive, and sustainable life.

Over the past 5 years I've authored over 350 free tutorials to learn from — and while it's been an absolute pleasure — if you want a bit of my time, I have to politely ask that you purchase one of my books or courses.

Not only will you be getting a great education through my books/courses, but if you have a question after becoming a customer, I will ensure it is answered.

If you have any questions on which book/course is right for you, just reply to this email, and I'll put you in touch with my Enrollment Advisor. They will personally guide you to which book/course is best for you and your project.