hi everyone I need your help in extracting arabic text from image using vb.net. I only found program for extracting english language text but not found for arabic.
I used the following code that support only english language.
Imports MODI
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OpenFileDialog1.ShowDialog()
Dim filepath = OpenFileDialog1.FileName
Dim extract As String = Me.ExtractTextFromImage(filepath)
Label1.Text = extract.Replace(Environment.NewLine, "<br />")
End Sub
Private Function ExtractTextFromImage(ByVal filepath As String) As Object
Dim modiDocument As New Document()
modiDocument.Create(filepath)
modiDocument.OCR(MiLANGUAGES.miLANG_ENGLISH)
Dim modiImage As MODI.Image = TryCast(modiDocument.Images(0), MODI.Image)
Dim extractedText As String = modiImage.Layout.Text
modiDocument.Close()
Return extractedText
End Function
End Class