Giter Club home page Giter Club logo

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Also, the attached bmp file can be parsed using this code:

print tesseract.ProcessPagesWrapper("p.bmp", _tessApi)

However, it fails if cv image is used:

image=cv.LoadImage("p.bmp", cv.CV_LOAD_IMAGE_GRAYSCALE)
tesseract.SetCvImage(image,_tessApi)
text=_tessApi.GetUTF8Text()       # Prints 'Empty page!!' error message
conf=_tessApi.MeanTextConf()
print text, conf


What's the reason for that? Did I do something wrong?

Original comment by [email protected] on 10 Feb 2013 at 10:51

Attachments:

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
https://code.google.com/p/tesseract-ocr/issues/detail?id=852&thanks=852&ts=13605
82829

Original comment by [email protected] on 11 Feb 2013 at 11:41

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
The problem aroused because you did not provide sufficient border for 
tesseract. The following python program shall work



import cv2.cv as cv
import tesseract

image0=cv.LoadImage("p.bmp", cv.CV_LOAD_IMAGE_UNCHANGED)
print image0
offset=15
IPL_BORDER_REPLICATE=1
IPL_BORDER_CONSTANT=0
image=cv.CreateImage((image0.width+offset*2, image0.height+offset*2), 
cv.IPL_DEPTH_8U, 3 ) 
cv.CopyMakeBorder(image0,image, (offset,offset), IPL_BORDER_CONSTANT, 
(255,255,255)) 
cv.NamedWindow("Red Eye Test")
#cv.ShowImage("Red Eye Test", image)
#cv.WaitKey(0)
cv.DestroyWindow("Red Eye Test")
api = tesseract.TessBaseAPI()
api.Init(".","eng",tesseract.OEM_DEFAULT)
#api.SetPageSegMode(tesseract.PSM_SINGLE_WORD)
api.SetPageSegMode(tesseract.PSM_AUTO)
tesseract.SetCvImage(image,api)
text=api.GetUTF8Text()
conf=api.MeanTextConf()
image=None
print text
print conf

Original comment by [email protected] on 15 Feb 2013 at 10:34

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Yeah, I kinda figured that problem out on myself. I added some border to the 
picture and most of the 'Empty page' errors are gone, although there are still 
a few images still can't be parsed no matter how wide the border I added. Maybe 
it's a matter of the color of the border?

Anyway, what really makes me itchy is the first problem. Had anyone seen that 
error before?

Original comment by [email protected] on 25 Feb 2013 at 8:49

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
What is "the first problem" you have referred?

Original comment by [email protected] on 25 Feb 2013 at 9:05

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
The one in the op, that running of test-slim failed at 'ProcessPagesRaw'.

Original comment by [email protected] on 28 Feb 2013 at 2:59

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Send me your ssh account and password tben

Original comment by [email protected] on 28 Feb 2013 at 11:57

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024

Original comment by [email protected] on 25 Apr 2014 at 4:34

  • Changed state: Done

from python-tesseract.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.