<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: M.V.S.Sai hiranmayee</title>
    <description>The latest articles on DEV Community by M.V.S.Sai hiranmayee (@hiranmayee1123).</description>
    <link>https://dev.to/hiranmayee1123</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F753391%2F85fd1e7c-6093-4646-b668-4657737e1733.png</url>
      <title>DEV Community: M.V.S.Sai hiranmayee</title>
      <link>https://dev.to/hiranmayee1123</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hiranmayee1123"/>
    <language>en</language>
    <item>
      <title>3-lines code to detect text from an image in python</title>
      <dc:creator>M.V.S.Sai hiranmayee</dc:creator>
      <pubDate>Sun, 28 Nov 2021 13:54:37 +0000</pubDate>
      <link>https://dev.to/hiranmayee1123/3-lines-code-to-detect-text-from-an-image-in-python-3jl9</link>
      <guid>https://dev.to/hiranmayee1123/3-lines-code-to-detect-text-from-an-image-in-python-3jl9</guid>
      <description>&lt;h2&gt;
  
  
  Using Tesseract library, we can detect the text from an image in 3 lines of code.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step-1&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Install teserract library&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
In command prompt: pip install pytesseract&lt;br&gt;
In Anaconda prompt: conda install -c conda-forge pytesseract&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step-2&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Download and install the Tesseract OCR executable from the following links&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w32-setup-v5.0.0-alpha.20210506.exe"&gt;https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w32-setup-v5.0.0-alpha.20210506.exe&lt;/a&gt; (32-bit)&lt;br&gt;
&lt;a href="https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-v5.0.0-alpha.20210506.exe"&gt;https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-v5.0.0-alpha.20210506.exe&lt;/a&gt; (64-bit)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step-3&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;And run the below given code to extract text from an image&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;import pytesseract&lt;/p&gt;

&lt;p&gt;pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract'&lt;/p&gt;

&lt;p&gt;print(pytesseract.image_to_string(r'link to the image from which the text to be detected'))&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MO0odGg9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfj47zxljue4t9junq40.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MO0odGg9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfj47zxljue4t9junq40.jpg" alt="Image description" width="880" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>tesseract</category>
      <category>jupyter</category>
    </item>
  </channel>
</rss>
