01-02-2014 03:52 AM
Does anyone know how to do a OCR train in C# /VB.Net? simple sample code is good for me.
01-02-2014 11:10 AM
01-02-2014 11:23 AM
uday,
That is not correct. This forum is for National Instruments Vision support. Since the Vision library can be called from several languages, this forum includes those languages.
Bruce
01-02-2014 11:27 AM
01-02-2014 06:10 PM
or what is steps before calling the OcrSession.Train Function? please help...
01-24-2014 02:19 PM
I'm looking for the same thing: example of OCR in .Net.
02-04-2014 02:48 PM
Is there anyway to launch the NI OCR Training Interface from a command line or through a dll?
I need to include a training interface in my application and it seems like a waste to rewrite this application. The only other alternative is to run NI Vision Assistant, but that is an overkill.
07-28-2016 11:18 PM
i'm looking for the same things too, Process.Start with argument seem doesn't work, anyone know how to start OCR Training Intrerface with input parameter like image path and .abc path in c#?
08-02-2016 01:37 PM
@lkleong wrote:i'm looking for the same things too, Process.Start with argument seem doesn't work, anyone know how to start OCR Training Intrerface with input parameter like image path and .abc path in c#?
Have you tried this Solution?:
Using Command Line Arguments with the NI OCR Training Interface:
The NI OCR Training Interface accepts command line arguments with the following syntax:
"OCR Training.exe" [/fontpath ["File Path"] [/imagespath ["Folder Path"]
Examples
"C:\Program Files (x86)\National Instruments\Vision\Utility\OCR Training Interface\OCR Training.exe" /fontpath "C:\Program Files (x86)\National Instruments\Vision\Utility\OCR Training Interface\OCR Tutorial\NIOCRTutorial.abc" | Opens the OCR Training Interface and loads the NIOCRTutorial.abc character set from the OCR Tutorial folder. |
"C:\Program Files (x86)\National Instruments\Vision\Utility\OCR Training Interface\OCR Training.exe" /imagespath "C:\Program Files (x86)\National Instruments\Vision\Utility\OCR Training Interface\OCR Tutorial" | Opens the OCR Training Interface and loads images from the OCR Tutorial folder. |
08-02-2016 08:06 PM
Thank you Andrey Dmitriev.
Yes, It's working now in C#, and below is my code, I miss the " in previous run that's why not working.
By the way, is there similiar way to call other utility like Color Classification Training Interface and Classification Training Interface? it's not accepting command arguments?
ProcessStartInfo pi = new ProcessStartInfo();
pi.FileName = @"C:\Program Files (x86)\National Instruments\Vision\Utility\OCR Training Interface\OCR Training.exe";
string ocrpath = "\"" + [ocrfilepath] + "\"";
string imgpath = "\"" + [imagepath] + "\"";
pi.Arguments = @" /fontpath " + ocrpath + @" /imagespath " + imgpath;
Process.Start(pi);