我的想法是:
1.0. [unsolved, hard image-detection] Breaking image into squares and removing borders, surely other techniques!
1.1. [unsolved] Imagemagick: crop (instructions here), remove certain borders -- this may take a lot of time to locate the grid, image detection problem (comparing white/black here) -- or there may be some magic wand style filter.
1.2. [unsolved] Python: you probably need this
from PIL import Image
.
显然,Gimp的橡皮擦是解决这个问题的错误方法,因为它速度慢而且容易出错。如何以编程方式删除网格?在
p.s.关于这个问题的非正式讨论图形.SEhere包含更多物理和机械黑客。
如果所有图像都由灰色网格上的黑线组成,则可以调整白色阈值以移除网格(例如,使用ImageMagick):
你可能需要试验一下确切的阈值。80%的人用你的样品图片为我工作。这将使线条像素化。但也许再抽样可以将其降低到可接受的程度,例如:
^{pr2}$对答案的反馈:emulbreh和fraxel
拼图:以移除右手角为例
必备知识
所以我们可以设置一个比你的图像更亮的滤光片。使用
PIL
它可以如下所示:使用此代码处理上载的图像可以得到:
{1美元^
在这种情况下,这是一个相当好的结果。如果您的图形比网格暗,您应该能够使用此方法而不会出现太多问题。在
相关问题 更多 >
编程相关推荐