OCR изображение в текст с помощью ASP.NET с#
An exception of type 'System.Runtime.InteropServices.COMException' occurred in App_Web_w2y32yvw.dll but was not handled in user code Additional information: Retrieving the COM class factory for component with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Что я уже пробовал:
protected void save_Click(object sender, EventArgs e) { string filePath = Server.MapPath("~/Uploads/" + Path.GetFileName(FileUpload1.PostedFile.FileName)); FileUpload1.SaveAs(filePath); string extractText = this.ExtractTextFromImage(filePath); lblText.Text = extractText.Replace(Environment.NewLine, "<br>"); } private string ExtractTextFromImage(string filePath) { Document modiDocument = new Document(); modiDocument.Create(filePath); modiDocument.OCR(MiLANGUAGES.miLANG_ENGLISH); MODI.Image modiImage = (modiDocument.Images[0] as MODI.Image); string extractedText = modiImage.Layout.Text; modiDocument.Close(); return extractedText; }