I use VB.NET and the signed tessnet_32.dll, I've fixed the pathing
issue previously encountered, however now my issue is as follows.
(Currentview is the tiff, there's also currentview2 and currentview3

            Dim ocr As Tesseract = New Tesseract()
            ocr.Init("C:\tessdata", "eng", False)
            ocr.OcrDone = New tessnet2.Tesseract.OcrDoneHandler
(AddressOf Done)
                lOCR.Items.Clear()
                m_words = Nothing
                ocr.doOCR(currentView, Rectangle.Empty)

    Sub Done(ByVal words As List(Of tessnet2.Word))
        m_words = words
        Me.Invoke(New FillResult(AddressOf FillResultMethod))
    End Sub

    Delegate Sub FillResult()
    Private Sub FillResultMethod()
        lOCR.Items.AddRange(m_words.ToArray())
    End Sub

My problem is that, I need to do OCR on all 3 images seperately, I
tried doing another ocr.doOCR(currentView2, Rectangle.Empty), but I
get an error "Attempted to read or write protected memory. This is
often an indication that other memory is corrupt". I get the same
error when calling "ocr.clear()" or "ocr.dispose()"

I also tried declaring another seperate one:
            Dim ocr2 As Tesseract = New Tesseract()
            ocr2.Init("C:\tessdata", "eng", False)
            ocr2.OcrDone = New tessnet2.Tesseract.OcrDoneHandler
(AddressOf Done)
                lOCR.Items.Clear()
                m_words = Nothing
                ocr2.doOCR(currentView2, Rectangle.Empty)

I receive the same error. I tried doing it in a loop as well, with no
help. What's the proper way to be able to do all three images?

Also, I'd like for the call to ocr.DoOCR to just return the array of
words like this:
Dim x as tessnet2.words
x = doOCR(currentView, Rectangle.Empty)

Is this possible? If so, what changes would I need to make above?

Thanks.
-- 
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.


Reply via email to