我正在尝试对数千个扫描文件进行排序,并根据类型将它们分类到文件夹中(即:如果其中一个文件是 formA 的扫描副本,那么它应该进入 formA 文件夹,如果它是 formB 的扫描副本,那么它应该进入 formB 文件夹等...)。我觉得匹配文件和类型的最佳方法是基于它们的文本轮廓,但我对图像处理完全陌生,所以如果有更好的解决方案,那么我会洗耳恭听。
我在 python 中工作。有什么最好的方法来做到这一点的想法吗?太尔?开放式CV?图像魔法?
提前致谢...
I'm trying to sort through several thousand scanned files and sort them into folders based on type (ie: if one of the files is a scanned copy of formA, then it should go in the formA folder, if it's a scanned copy of formB, then it should go in the formB folder, etc...). I feel like the best way to match the files and types is based on their text outlines, but am totally new to image processing, so if there's a better solution, then I'm all ears.
I'm working in python. Any ideas of a best way to do this? PIL? OpenCV? imageMagick?
Thanks in advance...
发布评论
评论(2)
您可能对这个库感兴趣 -
http://code.google.com/p/ocropus/
它由 googlers 制作,可让您通过 python 进行 OCR 和布局分析。
我在安装它时遇到了一些麻烦,但那是很久以前的事了,所以现在事情可能已经解决了。
This library is probably of interest to you -
http://code.google.com/p/ocropus/
Its made by googlers and lets you do OCR and layout analysis from python.
I had some trouble installing it, but that was quite a while back, so things may have gotten fixed by now.
我不知道您扫描的文档是什么格式,但是 pdfminer 可以对pdf进行布局分析。我想它会符合你的目的,只要你得到的文档是相当不错的pdf格式(如果你只有“纯图像”,它不会对你有任何好处)
I don't know in what format you've got the scanned documents, but pdfminer can do layout analysis for pdf. I guess it would fit the bill for your purpose, provided you get the documents in somewhat decent pdf format (if you've just got "pure images", it won't do you any good)