09-24-2008 06:58 PM
I have an OCR application and certain characters will always be numbers and certain characters will always be letters. I have tried using the "valid Characters" parameter in LabVIEW and it doesn't seemtomake any difference. I am sure I am doing something wrong. If anyone has any suggestions,pleaseHELP!
JJ
09-25-2008 05:36 PM
Hi JJ
When using OCR always be sure to have a tight ROI focused just over the region where you will be identifying the numbers or the letters. In this manner you could use one ROI for the numbers and another for the letters.
09-25-2008 11:49 PM
Thanks for the response. But my problem is that the product moves by more than the width of the Lot Code so it's difficult to make the ROI small. I have attached an image from the application for you to look at.
Thanks again!!
JJ
09-29-2008 11:03 AM
Hi JJ
Valid characters identifies the manner in which the OCR looks for character strings to read. For example say we choose to identify number, our OCR will only look for strings starting with numbers. If you are placing an OCR surrounding the entire line of several of the barcodes its possible that this may be causing the misnomer.
10-04-2008 08:29 PM
In Vision Assistant, you can set up a pattern for the OCR to use. In the Read Options tab, there is a button "Specify Text Pattern". You can make the first character Alpha, the second character Numeric, third character Alphanumeric, etc. You can pretty much set up any pattern you need.
I am sure there is an equivalent input in LabVIEW, but I don't know what it is offhand. If you can't find it, you could specify a pattern in Vision Assistant then create a LabVIEW vi, which would show you how to do the same thing in LabVIEW.
Bruce
07-18-2013 06:02 PM
I know this is 5 years old, but in cae somebody else is looking:
Use the IMAQ_OCR_Set_Valid_Characters.vi to set the types of characters for which you want the OCR to search. The input is in a form of an array (each recognized OCR character corresponds to an index in the array). These are the options:
Any Character (0) |
Any ASCII character |
User-defined Characters (1) |
Uses characters you specify in the User-defined characters string. |
Alphabets (2) |
A-Z a-z |
Alphanumeric (3) |
A-Z a-z 0-9 |
Uppercase Letters (4) |
A-Z |
Lowercase Letters (5) |
a-z |
Decimal Digits (6) |
0-9 |
Hexadecimal Digits (7) |
0-9 A-F |
Pattern (8) |
Any Pattern |
Force Space (9) |
Ignores the read character and forces a space at the corresponding position |
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'