[Pyimagesearch] Ubuntu16.04 for OCR installation tesseract

Source: Internet
Author: User
Tags tesseract ocr

  Today's blog is the first part of the two-part series that installs and uses optical character recognition (OCR) for the Tesseract library.

  The first part of this series will focus on installing and configuring Tesseract on your machine, and then using the tesseract command to apply OCR to the input image.

  In this blog post, we will:

    • Install the tesseract on our system.
    • Verify that the Tesseract installation is working correctly.
    • Try Tesseract OCR on some sample input images.

After this tutorial, you will have the knowledge to run Tesseract on your own image. Here's a specific tutorial:

1. in order to use the Tesseract library, we first need to install it on our system.

Open Terminal Ternimal and enter the command:

  $ sudo apt-get install tesseract-OCR

2. to verify that the Tesseract has been successfully installed on your computer, execute the following command:

  $ tesseract -v

  

 3. Test tesseract OCR

  When using tesseract, I recommend:

  • Use the input image at the highest possible resolution and DPI.
  • Apply thresholds to split text from the background.
  • Make sure the foreground is segmented as far as possible from the background (that is, no pixelated or distorted characters).
  • Apply a text offset correction to the input image to ensure that the text is aligned correctly.

  Now, we apply OCR to the following sample image. (First you need to download the sample image in the original link, the original link is given below)

Go to your project path and enter the following command in your ternimal:

$ tesseract tesseract_inputs/example_01. png stdout

You will see the results as shown:

  

Here, OCR is complete, and of course you can try other sample images.

Attached original link: https://www.pyimagesearch.com/2017/07/03/installing-tesseract-for-ocr/

  

Copyright Notice:

Wang Old man
Source:http://www.cnblogs.com/wmr95/p/7642938.html
The copyright of this article is owned by the author and the blog Park, welcome reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to give the original link, otherwise, the author will retain the right to pursue legal responsibility.







  

[Pyimagesearch] Ubuntu16.04 for OCR installation tesseract

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.