Ask Your Question
1

Remove motion blur on text

asked 2015-11-22 12:46:35 -0600

gvandyk gravatar image

I have images of scanned pages that has blurred text. I need some way of "unblurring" the text, or cleaning the text, so that it is ready of ocr'ing by something like tesseract.

A sample image can be seen below.

image description

Any help or pointers would be appreciated.

edit retag flag offensive close merge delete

Comments

Maybe you can try with Gaussian Diff (Java code):

Mat g0 = src.clone();
Mat g1 = src.clone();

Imgproc.GaussianBlur(g0, g0, new Size(21, 21), 0);
Imgproc.GaussianBlur(g1, g1, new Size(3, 3), 0); 
Core.subtract(g0, g1, nombreMat); // or absdiff
Core.normalize(nombreMat, nombreMat, 0, 255, Core.NORM_MINMAX);
// Invert 8UC
Mat white = new Mat(nombreMat.size(), CvType.CV_8UC1);
white.setTo(new Scalar(255));
Core.subtract(white, nombreMat, nombreMat);
Tonatiuh Morales gravatar imageTonatiuh Morales ( 2017-07-07 12:09:12 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-11-22 13:45:43 -0600

Eduardo gravatar image

updated 2015-11-22 13:48:57 -0600

I would first try to play with sharpening algorithms or enhance functions in raster graphics editor (Gimp, Photoshop, ...). If it works, you could search for an OpenCV function or an OpenCV implementation of the function.

If it doesn't work or it is not enough, you could look at deblurring softwares (SmartDeblur 1.27, DeconvDemo, ...) and then focus, search on deblurring algorithms implementations, methods (for example, Deblurring with OpenCV: Weiner filter reloaded).

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-11-22 12:46:35 -0600

Seen: 2,282 times

Last updated: Nov 22 '15