The exception was thrown because you had specified a rectangle larger than, or outside of, the image. So make sure it is within bounds.
On Wednesday, November 11, 2015 at 4:32:11 PM UTC-6, Tesseract1 wrote: > > I am able to process smaller files say up to 160 kb > > When I hit 220 to 250 kb, I am having issues and getting the following > error: > > Exception in thread "main" java.lang.Error: Invalid memory access > at com.sun.jna.Native.invokePointer(Native Method) > at com.sun.jna.Function.invokePointer(Function.java:470) > at com.sun.jna.Function.invoke(Function.java:404) > at com.sun.jna.Function.invoke(Function.java:315) > at com.sun.jna.Library$Handler.invoke(Library.java:212) > at com.sun.proxy.$Proxy0.TessBaseAPIGetUTF8Text(Unknown Source) > at net.sourceforge.tess4j.Tesseract.getOCRText(Unknown Source) > at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source) > at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source) > at com.nationwide.robot.MinP98TextReader.main(MinP98TextReader.java:34) > split_pt >0 && split_pt < word->chopped_word->NumBlobs():Error:Assert > failed:in file ..\..\ccmain\tfacepp.cpp, line 186 > > Using the following code > > Tesseract instance = new Tesseract(); > String result = instance.doOCR(outputFile ); > > Now if I set a rectangle in the doOCR I am able to process that rectangle > but not the complete image of course limited to the rectangle. I stepped > the rectangle around the file to determine if there is an issue and cannot > find a problem with the processing of the image, just a problem with > processing the entire image. > > so if I process > > new Rectangle(0, 0,1200, 1000) It works > > If I exceed to new Rectangle(0, 0,1400, 1000), it fails with the above > error. > > > Is there some buffer size I need to adjust to allow for processing the > larger image or higher text content images? > > Or is there a strategy I can employ other than making lots of rectangles :) > > > -- 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 http://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/a37145e9-3008-4590-9c70-8be4561a8c34%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

