Does anyone know of a way to reference Microsoft.Windows.Ocr (/ WindowsPreview.Media.Ocr.dll ) Assembly on a server-side ASP.Net Web application like MV4 Web API and make use of the OCR Functionality in that assembly to take a photo image as input and extract the text content out of it ? If yes, please provide detailed instructions in your answer.
I am building a web application that takes an image uploaded to the Server (via a file upload UI screen) and then reads the text using OCR and displays the text on the next page, right next to the image that was uploaded. Since most commercial OCR Libraries cost an arm and length (over $1,300 last time I checked) I thought I can try and use the Microsoft OCR Library Microsoft.Windows.Ocr that is FREE and seems to be very simple and straightforward to use. So I tried to install the Microsoft.Windows.Ocr Nuget Package to my ASP.Net MVC4 Web API Project and that succeeded. After that, I looked through my MVC4 Web API Project References, and to my surprise, did not find a reference to Microsoft.Windows.Ocr.dll Assembly. So then I tried to add a reference to the x86 version of the Microsoft.Windows.Ocr.dll Assembly by browsing to that Assembly in the \packages folder, and selected the WindowsPreview.Media.Ocr.dll from \lib\win81\x86 folder Note: The Assembly name is WindowsPreview.Media.Ocr.dll and not Microsoft.Windows.Ocr.dll , not sure why! When I did that and clicked OK, I got the following Error Message.
--------------------------- Microsoft Visual Studio --------------------------- A reference to 'D:\TestProjects\packages\Microsoft.Windows.Ocr.1.0.0\lib\win81\x86\ WindowsPreview.Media.Ocr.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. --------------------------- OK ---------------------------
I then found out from the Nuget Page that the "Supported Platforms" are only Windows Phone 8, Windows Phone 8.1, Windows 8.1 (Windows Store apps only). But surely, there must be a way to use this OCR dll on the Server-side in an ASP.Net Application?