From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

remove image background noise for OCR

Hi

I am trying to perform OCR on the image that captured on the radio/handphone screen. The problem is, the pixels of the radio/handphone affecting the quality of OCR reading. Therefeore I plan to remove all the background pixels/colors, so that only the characters/texts remain in the image.

 

For example in above screen, I just want the date, "MDC","Same PL","Zone","Chan","VMUTE" to be detected using OCR, but too bad, the background pixel make the OCR not able to perform well.

 

I am trying to use color extraction + manual threshold to remove the background, it works ok but applicable to this screen only, if other screen having other background color e.g. red, green etc, this will fail, I have to create another VI for other threshold value. But we need automatic background removal because we have lots of camera station and each camera station might have different settings. We dont want to always come back and change the threshold value.

 

Anyone here can show some light?

 

Appreciated much!!

 

Thanks

 

Khasing

0 Kudos
Message 1 of 2
(3,586 Views)

I would recommend filtering the image before processing it.  Filtering would smooth out the pixel values and remove the small gaps between the pixels.  You can try a variety of filters and see what works best.  Right now I would consider a smoothing filter, a median filter, a dilation + erosion (close) filter, perhaps others.

 

This should clean up the image for you.  I would also suggest using automatic thresholding so you don't have to determine the threshold value yourself.  Using a window around the area of interest will probably help the automatic threshold work better.

 

Last thing - You don't indicate which color plane you extract.  I would recommend using the intensity plane so you don't have to change it if the screen color changes.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 2
(3,572 Views)