What processing steps should I use to clean photos of line drawings?

前端 未结 3 1736
既然无缘
既然无缘 2020-12-02 14:47

My usual method of 100% contrast and some brightness adjusting to tweak the cutoff point usually works reasonably well to clean up photos of small sub-circuits or equations

3条回答
  •  春和景丽
    2020-12-02 15:35

    How about detecting edges? That should pick up the line drawings.

    Here's the result of Sobel edge detection on your image:

    alt text

    If you then threshold the image (using either an empirically determined threshold or the Ohtsu method), you can clean up the image using morphological operations (e.g. dilation and erosion). That will help you get rid of broken/double lines.

    As Lambert pointed out, you can pre-process the image using the blue channel to get rid of the grid lines if you don't want them in your result.

    You will also get better results if you light the page evenly before you image it (or just use a scanner) cause then you don't have to worry about global vs. local thresholding as much.

提交回复
热议问题