Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to recognize space in a string by using OCR.

Hi

I'm using LabVIEW with OCR for recognizing characters on a dot matrix display. I have a problem that when the string is "123 456", the result will be "123456". How can I change the OCR to recognize a space. I tried to do that but it didn't work. Are there any methods for doing that because I need to match the whole string, not only all characters. Thanks.

Bill
Message 1 of 4
(4,910 Views)
I don't think that functionality is currently supported. Although you could monitor the spacing between chartacters and recognize it as a space if it goes over some threshold value. IMAQ OCR Read Text's character reports output will give you an array of clusters, which hold information on the coordinates of recognized characters. You can compare the distance between characters to a threshold value (i.e. 50 pixels) and insert a space character in your string if the threshold is exceeded.
hope this helps!

HI_Z
Message 2 of 4
(4,910 Views)

Sir I can't get the solution to find the spaces between the strings .. sir pls help me with that sir and if possible how can I contact you.

If I need a designed Vi of that I will send u sir..

 

0 Kudos
Message 3 of 4
(3,547 Views)

Instead of reading just read string from the IMAQ OCR Read text 4 , read Character reports and use math algorithm to find the distance between charactes and provide an offset to define whether it is space.

Else while training Character set file fix minimum space distance as your requirement.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 4 of 4
(3,482 Views)