Ask Your Question

Text cleaner in Opencv like ImageMagicK script

asked 2014-01-21 21:37:26 -0600

r4j gravatar image

updated 2017-10-18 20:48:33 -0600

I try to make text in image cleaner and clearer before run OCR with tesseract. In this link, they provided a good scripts to do it by ImageMagicK. I wonder is possible to convert this script and function into OpenCV code? For example, the script with arguments like this:

 -g -e none -f 15 -o 20

From the explanation:

 -g ...................... convert document to grayscale before enhancing
 -e .... enhance ......... enhance image brightness before cleaning;
                           choices are: none, stretch or normalize; 
 -f .... filtersize ...... size of filter used to clean background;
                           integer>0; default=15
 -o .... offset .......... offset of filter in percent used to reduce noise;
                          integer>=0; default=5

How can I do the same in OpenCV code? As I am a newbie in OpenCV, I just only know how to convert to grayscale. Any help would be appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-24 03:00:39 -0600

lmcgs gravatar image

You can find any way? I need same...

edit flag offensive delete link more

Question Tools


Asked: 2014-01-21 21:37:26 -0600

Seen: 2,134 times

Last updated: Aug 24 '14