Friday, June 5, 2015

NI Vision Optical Character Recognition

 

Today is the turn for OCR or Optical Character Recognition, which is simply recognizing letters and numbers and some symbols in and image. I have done a program that it will recognize and specific password and it will recognize it and display a message of welcome or WRONG password.

The main program is in the picture below:

Main

Main2

 

Take into account that there are two states one is for the inspection and the other one is to display the welcome message if the password is recognize. I also added another step in the inspection that is look for an edge since I’m using cards, so when it detects the edge change it will look for a specific position of the password.

The most important thing is train NI Vision Builder to recognize your characters, to do that I used one type of font and a size, you can see what I used to train the program in the next picture:

Captura_Texto_final

I used this image as I said before to train the program, but how right? Well is quite simple. In the picture below I select the OCR option after I select acquire image:

select_text

Remember to acquire image before so you don´t get an error message.

Caracteres

This is the selection I did in order to train the program, and I input in “Text Read” each letter and in the order they are.

Caracteres1

This is the Character files that are stored on the system. And you can also edit them if you see that they don’t look that well.

In the next picture you can see how it doesn’t show the message because I’m using a specific space to recognize.

password

 

You can download the files in this link:

https://drive.google.com/folderview?id=0B7dtMeeMPK5rfnJCSVlRVTkxRzdSeHBMWDJ6THVPWmdHdm1kZ3NwNTYzSEJ5b0ZmdlFoMG8&usp=sharing

File name: OCR.zip

Version of NI Vision Builder 2013

2 comments:

  1. I find a free online ocr, it can recognize text from jpg, png, tiff, bmp and gif image.

    ReplyDelete
    Replies
    1. Thanks! Can you set ut an alert or something when it recognize the text you want?

      Actually this post is to show to the people how to do OCR and you could use it to make a variety of things when you get the text recognized.

      Delete