<https://lh3.googleusercontent.com/-f0TLvQEBSBk/WQwhbImrJ-I/AAAAAAAAF0A/CHWCn40GISMs965I3Q_giSBGWKpcwD09wCLcB/s1600/IMG_20170504_200627.jpg>
<https://lh3.googleusercontent.com/-f0TLvQEBSBk/WQwhbImrJ-I/AAAAAAAAF0A/CHWCn40GISMs965I3Q_giSBGWKpcwD09wCLcB/s1600/IMG_20170504_200627.jpg> Hello I am trying to extract text from a picture but I always get an empty string-> the image_to_string() function delivers an empty string. The picture "temp2.jpg" from which the teext should be extracted is added below. I hope anybody can tell me what function is missing and answer in short time. #!/usr/bin/env python import os import subprocess from picamera.array import PiRGBArray from time import * from picamera import PiCamera from datetime import datetime, timedelta import cv2 try: import Image except ImportError: from PIL import Image, ImageEnhance, ImageFilter from pytesseract import * #EXTRACT TEXT print 'pytesser:' #img = Image.open('/home/pi/camera/IMAGE-2017-05-04_141433.png') img = Image.open('artikelbild-02.jpg') im = img.convert('RGBA') enhancer = ImageEnhance.Contrast(im) im = enhancer.enhance(3) im = im.convert('1') im.save('temp2.jpg') #use tesseract library to extract text from text = pytesseract.image_to_string(Image.open('temp2.jpg')) print "Text:"+text # Analyse what person rang the bell if "DHL" in text: print 'DHL Lieferant' elif "Post" in text: print 'Postbote' ...... -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/e6f60eee-2b2a-4fcd-b473-913cd396259f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

