Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

repeated characters in OCR read

Hello every body my project is (visual PCB inspection using OCR to search the ICs by ist part number).

my question is:

  • I want to read characters from more then one img (templete), one img is read but the characters are repeated in the indicator, the other img is read without repeat but there is (?) after all characters read in the read string indicators.
  • Please say if there is any error in my attached program, there are also 2 img attached fo test on two templetes.
Eman
0 Kudos
Message 1 of 9
(5,212 Views)
Please i need help, any body help me?
what is wrong in my code?
Eman
0 Kudos
Message 2 of 9
(5,178 Views)
Hello Eman,

There a few reasons as to why your VI would produce this error. The concatenated string that is used as the 'Character Value' input to the 'IMAQ OCR Train' VI is not produced correctly, if you want to train every character that is recognized to one value. What are you trying to define as the 'second row' of training characters? In your VI, two characters are in the 'Character Value' input in every iteration of the for loop. You want to train each character recognized to one specific value.

I have attached a modified version of your VI to show how this could be done. In this case, you will have to change the 'first row of training characters' to include all the letters or numbers in the image. The 'second row of training characters'  is not used at all. This is assuming that all you want to do is train all the characters, and then check if the read string matches the character values you entered.

I hope this helps!
Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 3 of 9
(5,138 Views)
Hello Eman,

Please refer to my reponse in this link : your second forum post

Thank you.
Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 4 of 9
(5,136 Views)
  1. At first thank you for reply.Smiley Very Happy
  2. I solved the training problemm using OCR training in vision folder of NI  folder in start menu and i trained all what i want in a char set file.
  3. But i want the file that you  talked abou in your reply (you said: I have attached a modified version of your VI to show how this could be done.)Smiley Wink
Eman
0 Kudos
Message 5 of 9
(5,099 Views)
Hello Eman,

I am glad that you solved your problem!

I have attached the modified version of your VI to this post. This does not produce any question marks in the output as long as the right training characters are given. I hope this helps.
Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 6 of 9
(5,083 Views)
Dear; Vivek Nath
  • Realy thank you for your reply.
  • And thank you for attaching the modefied file.
  • If i have any quistion i will ask you.
Thank you .


Eman
Eman
0 Kudos
Message 7 of 9
(5,062 Views)
Hello,Vivek Nath

I tried to open the modified file but it is in later version and i have labview (8.0).

so i can't open it, please send me it in this version (8.0).

Thank you.

Eman
0 Kudos
Message 8 of 9
(5,060 Views)
Hello Eman,

Sorry about that! The attached copy is for version 8.0.


Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 9 of 9
(5,038 Views)