November 5th, 2010 by ajx

I wrote up a proof of concept in MATLAB that performs the following steps:
Find edges in the image (note that this is different than finding lines, edges in our case occur on either side of a pen-on-paper line).
Blur these edges using a blur kernel whose width is parameterized based on the expected thickness of the lines (smaller for ball-point pens, larger for thick markers).
Threshold all values over some small amount in the blurred edges mask, also get rid of tiny regions.
Fill use this mask as “holes” to be filled in via Laplacian hole-filling. Notice we now have an approximation of the blank sheet of paper:
Subtract the paper from the original image and intensify the lines so the image is black on white (but not necessarily a binary image):
Results
Here are some results. I compare the original photograph or scan of the line drawing with my best clean up job using (only) Curves in Photoshop and my automatic script. For my script I am not adjusting the parameters for each input. I have found a set of parameters that work well for pen on paper inputs and I used this preset for all the images shown in the table.
Original | Photoshop Curves | MATLAB script |  |  |  | Page 2 of 5 | Previous page | Next page
Posted in art, code | 5 comments
You can leave a comment for this post.