Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

ocr issue

Hi folks,

I'm using NI vision 8.2.1. I'm doing OCR training for LCD segmented display, where i'm facing the issue like a single letter is found as more than one object within defined ROI. How to merge those and can be found as single object.

 

Thanks in advance.....

0 Kudos
Message 1 of 6
(3,130 Views)
You can use a threshold and then erode the image if you want. Can you post an image?
0 Kudos
Message 2 of 6
(3,129 Views)

Hello ilabview,

 

As Muks has already suggested, post the image on what is required as the end result in comparison to what is happening now... We should be able to get a solution once that is clear...

 

Cheers!

0 Kudos
Message 3 of 6
(3,107 Views)

There is a parameter in OCR that lets you specify the max spacing between character segments.  If the spacing between two pieces is less than this amount, they are considered a single character.  Of course, the spacing between adjacent characters needs to be larger than this amount or all the characters will be combined into a single item.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 6
(3,093 Views)

I have the issue, that within the defined ROI, the OCR sometime recognize two character as single character, but sometime on another image OCR can accurately

recognize the character. I have set the character spacing parameters but still had no effect.

 

I've attached the sample image and Vision Assistance script for consideration.

 

Please help

0 Kudos
Message 5 of 6
(2,702 Views)

I would recommend not thresholding the image prior to calling the OCR step. The OCR step contains advanced threshold parameters that will segment the characters better than the threshold step.

Bruce gave the right recommendation. You need to specify the max character width for the algorithm to work fine.

Here's the modified script and character set file that segments the characters properly.

 

Hope this helps.

 

Best regards,

 

-Christophe

0 Kudos
Message 6 of 6
(2,696 Views)