I am using the vs 3 .net wrapper.
When I run the function Recognize it ocrs the image fine and I can get
the string.
I need the confidence level of each character, but it is always 0.
What am I doing wrong?



        Dim image As New Bitmap("C:\MyImage.tif")
        Dim ocr As New TesseractProcessor

        ocr.Init(Nothing, "eng", False)
        Console.WriteLine(ocr.Recognize(image))


        ocr.InitForAnalysePage()
        ocr.SetVariable("tessedit_thresholding_method", "1")
        ocr.SetVariable("save_best_choices", "T")


        Dim doc As DocumentLayout = ocr.AnalyseLayout(image)
        For Each blk As OCR.TesseractWrapper.Block In doc.Blocks
            Console.WriteLine("Block Confidence: " & blk.Confidence)


            For Each para As Paragraph In blk.Paragraphs
                Console.WriteLine("para Confidence: " &
para.Confidence)

                For Each ln As TextLine In para.Lines
                    Console.WriteLine("ln Confidence: " &
ln.Confidence)

                    For Each wrd As Word In ln.Words
                        Console.WriteLine("wrd Confidence: " &
wrd.Confidence)
                        Console.WriteLine("wrd Text: " & wrd.Text)

                        For Each ch As Character In wrd.CharList
                            Console.WriteLine("V:" & ch.Value)
                            Console.WriteLine("C:" & ch.Confidence)
                        Next

                    Next

                Next
            Next
        Next

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