LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Filtering

I have an OCR application that is provided the image below, after some processing. The numbers can shift left to right, and top to bottom, so I do a "find edge" to find the line to the left of the number, then from that, build my roi for ocr. The problem is, sometimes, I have the garbage along the border. I'd like an easy way to delete, or mask anything black that is touching the border.

 

before.png

 

Ideally, I'd want to delete all the garbage, as below.

 

after.PNG

But, if not, this should work too.

good.PNG

 

Any suggestions? The finder line could potentionally move farther left, so I can't just do a blind mask.

0 Kudos
Message 1 of 2
(1,861 Views)

Hi Jim,

 

There are a couple of things that could potentially work for you.  Are the numbers always going to be in the same location relative to the line?  You could create an ROI that would only include the region with the numbers.  The ROI would be created relative to that line.

 

You may also be able to do some sort of particle filter that would eliminate large areas.  This wouldn't get rid of all the "garbage" but it would eliminate the largest sections similar to your last image.

Justin D.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(1,844 Views)