Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

NI OCR Trainer in LabVIEW

Solved!
Go to solution

Hi friends,

I am trying to use NI OCR Trainer module in LabVIEW directly which is now only accessable in vision assistant. But it is not loadable and i am not able to open the VI from OCR library of vision assistant. Is there any possible method to call NI OCR Trainer from LabVIEW?

0 Kudos
Message 1 of 9
(8,142 Views)

The OCR Training Interface ships with Vision Development module as an executable.

You can it from your LabVIEW application using a System Exec call and even pass command line argument to load images, and character set file.

The executable is installed at the following location:

C:\Program Files (x86)\National Instruments\Vision\Utility\OCR Training Interface\OCR Training.exe

 

The help file C:\Program Files (x86)\National Instruments\Vision\Utility\OCR Training Interface\TrainOCR.chm details the possible command line arguments.

Look at the section "Using Command Line Arguments with the OCR Training Interface".

 

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"]

  • /fontpath ["File Path"]—Specifies a character set file path.
  • /imagespath ["Folder Path"]—Specifies a folder path of images to load.

Examples

Refer to the following examples of command line arguments for the NI OCR Training Interface:

Command line argumentResult
"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.
Message 2 of 9
(8,131 Views)

Thank you ChristopheC !

 

The solution you gave me works fine.Now i am able to launch NI OCR trainer with image folder and char set file path as inputs. Another help i need from your side is, receiving arguments from NI OCR trainer in LabVIEW. If there is any possible solutions please say me.

0 Kudos
Message 3 of 9
(8,118 Views)
Solution
Accepted by topic author Sakthimurugan_Elek

Currently, the command line arguments I mentioned is the only way to pass parameters between LabVIEW and the OCR Training executable.

Once you're done in the training interface, if you've made changes, the software will prompt you to save the character set file at the location you specified.

Back in LabVIEW, you can use the OCR VIs located in the Machine Vision>>OCR palette to open that character set file and get all the properties that were set in the training interface.

Look at the VIs IMAQ OCR Read Character Set File, IMAQ OCR Property.

 

Hope this makes sense.

 

Christophe

Message 4 of 9
(8,105 Views)

Thankyou ChristopheC Smiley Happy

It works fine.

 

Regards,

Sakthi.

 

0 Kudos
Message 5 of 9
(8,086 Views)

Hi ChristopheC,

 

I used attached LabVIEW 2014 vi, it can work on NI OCR Trainning Interface 2014. When I used in LabVIEW 2010 to call NI OCR Trainning Interface 2010, it shows could not be opened image folder and abc file. 

 

B/R

Ancle

0 Kudos
Message 6 of 9
(5,880 Views)

Command line arguments for the OCR Training Interface have been added in Vision Development Module 2011 SP1.

0 Kudos
Message 7 of 9
(5,871 Views)

Hi ChristopheC,

 

Thanks for reply.

 

B/R

Ancle

0 Kudos
Message 8 of 9
(5,854 Views)

請問NI工程師,OCR Training.exe 這支程式除了可以帶下面2個參數外,不知是否可以帶ROI的參數?

因為用 NI Vission Assistant 載入OCR Training.exe時,這ROI範圍和上一層是一樣的

 

 

/fontpath

/imagespath

 

 

0 Kudos
Message 9 of 9
(3,109 Views)