D
David de Passos
Hi!
I'm using MODI activex from Microsoft Office 2003 and Microsoft VB.NET to
get the text from an OCR acquired image.
Why after OCR the image, the MODI component rotate the image?
Sometimes the MODI rotates the image 90 degrees and the OCR, obviously, can'
t do its job. Any ideia why this is happening?
There is my code:
Dim miDoc As MODI.Document
Dim miWord() As MODI.Word
Dim strWordInfo As String
Dim i, j As Long
Dim str As String
Dim Cont As Long
Dim IMG As Long
miDoc = New MODI.Document
miDoc.Create("C:\MultiPage.tif")
str = ""
Cont = 0
IMG = miDoc.Images.Count - 1
miDoc.OCR(MiLANGUAGES.miLANG_ENGLISH, True, True)
For j = 0 To IMG
miDoc.Images(j).rotate(0)
For i = 0 To miDoc.Images(j).Layout.Words.count - 1
ReDim Preserve miWord(Cont)
miWord(Cont) = miDoc.Images(j).Layout.Words(i)
Cont += 1
Next
Next
For i = 0 To miWord.Length - 1
str = str & " " & miWord(i).Text
Next
miDoc.Close(False)
miWord = Nothing
--
Cumprimentos,
David de Passos
--------------------------------------------------------------
RCSOFT, Lda.
E-Mail: (e-mail address removed)
Móvel: +351 966931639
Telefone: +351 239708708
Fax: +351 239708701
Tel. Directo: +351 239708705 ext. 401
I'm using MODI activex from Microsoft Office 2003 and Microsoft VB.NET to
get the text from an OCR acquired image.
Why after OCR the image, the MODI component rotate the image?
Sometimes the MODI rotates the image 90 degrees and the OCR, obviously, can'
t do its job. Any ideia why this is happening?
There is my code:
Dim miDoc As MODI.Document
Dim miWord() As MODI.Word
Dim strWordInfo As String
Dim i, j As Long
Dim str As String
Dim Cont As Long
Dim IMG As Long
miDoc = New MODI.Document
miDoc.Create("C:\MultiPage.tif")
str = ""
Cont = 0
IMG = miDoc.Images.Count - 1
miDoc.OCR(MiLANGUAGES.miLANG_ENGLISH, True, True)
For j = 0 To IMG
miDoc.Images(j).rotate(0)
For i = 0 To miDoc.Images(j).Layout.Words.count - 1
ReDim Preserve miWord(Cont)
miWord(Cont) = miDoc.Images(j).Layout.Words(i)
Cont += 1
Next
Next
For i = 0 To miWord.Length - 1
str = str & " " & miWord(i).Text
Next
miDoc.Close(False)
miWord = Nothing
--
Cumprimentos,
David de Passos
--------------------------------------------------------------
RCSOFT, Lda.
E-Mail: (e-mail address removed)
Móvel: +351 966931639
Telefone: +351 239708708
Fax: +351 239708701
Tel. Directo: +351 239708705 ext. 401