On Tue, Dec 10, 2013 at 10:51 AM, Sneha Murganoor <[email protected]>wrote:
> Hi Zdenko, > > "More complex solution" is giving better results in detecting text than > earlier one. In addition it points out the layout of where the text is. > > But I don't have clear idea as to what this script is doing better > compared to earlier one. > > Please help me in understanding what the following methods are for: > > TessBaseAPISetPageSegMode > TessBaseAPIGetComponentImages > TessBaseAPISetVariable > > These are the functions from C-API [1]. C-API wraps C++ tesseract functions API[2]. E.g. TessBaseAPISetPageSegMode[3] is C equivalent for SetPageSegMode[4]. So if you need description of C function you need read comment for it in C++ API ;-) [1] https://code.google.com/p/tesseract-ocr/source/browse/trunk/api/capi.h?r=836 [2] https://code.google.com/p/tesseract-ocr/source/browse/trunk/api/baseapi.h?r=836 [3] https://code.google.com/p/tesseract-ocr/source/browse/trunk/api/capi.h?r=836#132 [4] https://code.google.com/p/tesseract-ocr/source/browse/trunk/api/baseapi.h?r=856#258 > Also, > What are Page Segmentation Modes? > see description [5]. [5] https://code.google.com/p/tesseract-ocr/source/browse/trunk/ccstruct/publictypes.h?r=856#146 > What are Page Iterator Levels? > see description [6]. [6] https://code.google.com/p/tesseract-ocr/source/browse/trunk/ccstruct/publictypes.h?r=856#190 > What is OSD? > > Orientation and script detection. > Thanks, > Sneha > > > > > On Sun, Dec 8, 2013 at 4:45 AM, zdenko podobny <[email protected]> wrote: > >> More complex solution: >> >> http://www.sk-spell.sk.cx/getting-component-coordinates-with-python-from-tesseract-c-api >> >> Zdenko >> >> >> On Thu, Dec 5, 2013 at 7:56 PM, zdenko podobny <[email protected]> wrote: >> >>> You need to use leptonica (e.g. via ctypes, but there is also python >>> module pylepthonica). >>> >>> Modify relevant part of script with something like this: >>> >>> >>> lep = ctypes.cdll.LoadLibrary("liblept.so") >>> pix_image = lep.pixRead(filename)print "image width:", >>> lep.pixGetWidth(pix_image)print "image height:", lep.pixGetHeight(pix_image) >>> >>> tesseract.TessBaseAPISetImage2(api, pix_image) >>> tesseract.TessBaseAPISetRectangle(api, 30, 60, 400, 100) >>> text_out = tesseract.TessBaseAPIGetUTF8Text(api) >>> result_text = ctypes.string_at(text_out)print result_text >>> >>> >>> Zdenko >>> >>> >>> On Thu, Dec 5, 2013 at 10:34 AM, Sneha Murganoor <[email protected]>wrote: >>> >>>> Hi Zdenko, >>>> >>>> how to get size of image and set recognition to a sub-rectangle of the >>>> image in this? >>>> >>>> Thanks, >>>> Sneha >>>> >>>> >>>> On Wed, Dec 4, 2013 at 11:18 AM, Sneha Murganoor >>>> <[email protected]>wrote: >>>> >>>>> Zdenko, >>>>> >>>>> It is just excellent. It works very well. Thank you. >>>>> >>>>> Thanks, >>>>> Sneha >>>>> >>>>> >>>>> On Wed, Nov 20, 2013 at 6:59 PM, Nick White >>>>> <[email protected]>wrote: >>>>> >>>>>> Hi Zdenko, >>>>>> >>>>>> On Wed, Nov 20, 2013 at 02:19:07PM +0100, zdenko podobny wrote: >>>>>> > Anyway you can use tesseract 3.02.02 in python via ctypes - see >>>>>> example[1] >>>>>> > >>>>>> > [1] >>>>>> https://code.google.com/p/tesseract-ocr/source/browse/trunk/contrib/ >>>>>> > tesseract-c_api-demo.py?r=903 >>>>>> >>>>>> That's neat, I hadn't seen python's ctypes before! Any chance you >>>>>> could add that (or a link to it) to the APIExample wiki page? >>>>>> >>>>>> Nick >>>>>> >>>>>> -- >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "tesseract-ocr" group. >>>>>> To post to this group, send email to [email protected] >>>>>> To unsubscribe from this group, send email to >>>>>> [email protected] >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/tesseract-ocr?hl=en >>>>>> >>>>>> --- >>>>>> You received this message because you are subscribed to a topic in >>>>>> the Google Groups "tesseract-ocr" group. >>>>>> To unsubscribe from this topic, visit >>>>>> https://groups.google.com/d/topic/tesseract-ocr/tfi9RrPk3_E/unsubscribe >>>>>> . >>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>> [email protected]. >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> >>>>> >>>>> >>>> -- >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "tesseract-ocr" group. >>>> To post to this group, send email to [email protected] >>>> To unsubscribe from this group, send email to >>>> [email protected] >>>> For more options, visit this group at >>>> http://groups.google.com/group/tesseract-ocr?hl=en >>>> >>>> --- >>>> 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]. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "tesseract-ocr" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/tesseract-ocr?hl=en >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "tesseract-ocr" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/tesseract-ocr/tfi9RrPk3_E/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > -- > You received this message because you are subscribed to the Google > Groups "tesseract-ocr" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/tesseract-ocr?hl=en > > --- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tesseract-ocr?hl=en --- 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]. For more options, visit https://groups.google.com/groups/opt_out.

