You are viewing limited content. For full access, please sign in.

Question

Question

Quick Fields: How to get OCR to recognize underscores?

asked on October 27, 2022

I have a QF session that I'm trying to set up with OCR to read a text box on the top of the document:

Unfortunately the result has the underscores removed, so I can't use the Split function to index the values by underscore.  Is there a setting to make this work?

 

 

0 0

Replies

replied on October 27, 2022

Hi Mike,

I bounced this question off a few people. There's no magic button "recognize underscores" setting. However, there are at least two things you can potentially try:

 

  1. If you're doing any image processing to remove lines/grids, there's a chance the underscores are getting dropped out there before OCR runs. Try running OCR without that preprocessing step and see if it makes a difference.
  2. It's possible OCR is missing them because they're too light and it thinks they're noise. You could try fixing that with a local smooth (grow) operation before OCR and see if it makes a difference.

 

As a workaround, if OCR is reliably picking up spaces rather than underscores so the resulting string is:

"2870864 Recall Packet Acknowledgement 2022 Fall Yuma"

And the format is consistently something like:

"(numbers) (doc type words) (year numbers) (season word) (location word(s))"

You can likely do the split with regex for that pattern. Though a bit more complex than simply splitting on underscores, writing the regex pattern is likely much simpler than trying to game the Quick Fields OCR engine into recognizing the underscores if the two suggestions above don't work.

2 0
replied on October 28, 2022

I had deskew and color removal tasks in the preprocessing step; removing them did not make a difference.  I also tried adding smooth (grow 1 pixel) and that didn't work either.  I think we'll end up asking the users to create bar code text boxes instead.  Thank you for your input.

 

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.