<?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: pings10</title>
    <description>The latest articles on DEV Community by pings10 (@pings10).</description>
    <link>https://dev.to/pings10</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1055210%2F54477efa-9b2a-480f-9209-9c85f2fbc726.png</url>
      <title>DEV Community: pings10</title>
      <link>https://dev.to/pings10</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pings10"/>
    <language>en</language>
    <item>
      <title>How do I get tesseract python to read these numbers?</title>
      <dc:creator>pings10</dc:creator>
      <pubDate>Thu, 30 Mar 2023 04:37:42 +0000</pubDate>
      <link>https://dev.to/pings10/how-do-i-get-tesseract-python-to-read-these-numbers-el8</link>
      <guid>https://dev.to/pings10/how-do-i-get-tesseract-python-to-read-these-numbers-el8</guid>
      <description>&lt;p&gt;I have cropped just the area where the price tag is. I did this on the input side, even with that cropped it still has trouble reading the numbers. This is the code I've tried. In the last photo, I"m trying to read the part that says ISBN: numbers and letters. I wont always be able to get the price tag perfectly cropped, so I know I may need a way to isolate the price tag, it is mostly white. Even with this cropped though, I'm having hard time getting tesseract to read the price in the right square.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from PIL import Image, ImageOps
import pytesseract as tt
import numpy as np
import cv2

#tt.tesseract_cmd = '/usr/bin/tesseract'

filename = 'tbar.jpg'
#img1 = np.array(Image.open(filename))

img1 = cv2.imread(filename, cv2.IMREAD_GRAYSCALE)


#img1 = cv2.GaussianBlur(img1,(2,2), 1)

#img = cv2.GaussianBlur(img, (5, 5), 0)

text = tt.image_to_string(img1, lang='eng',  \
           config='--psm 10 --oem 3 -c tessedit_char_whitelist=0123456789')



#text = tt.image_to_string(img1)


print(text)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Febzxp4g5ck9chdkc0qh6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Febzxp4g5ck9chdkc0qh6.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkzyn5t56wpat4851dk16.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkzyn5t56wpat4851dk16.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1836alqiri1hrbs4fkgk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1836alqiri1hrbs4fkgk.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

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