如何使用Opencv进行文件识别与OCR? [英] How to use Opencv for Document Recognition with OCR?

查看:555
本文介绍了如何使用Opencv进行文件识别与OCR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是计算机视觉的初学者,但我知道如何在opencv上使用某些功能。我尝试使用Opencv进行文档识别,我想帮助找到它的步骤。

I´m a beginner on computer vision, but I know how to use some functions on opencv. I´m tryng to use Opencv for Document Recognition, I want a help to find the steps for it.

我想使用opencv示例find_obj.cpp,但文件,例如护照,有一些变量,名称,生日,图片。所以,我需要一个帮助来定义它的步骤,如果可能的话我必须在步骤中使用它的功能。

I´m thinking to use opencv example find_obj.cpp , but the documents, for example passport, has some variables, name, birthdate, pictures. So, I need a help to define the steps for it, and if is possible how function I have to use on the steps.

我不是要问整个代码,但如果有人有任何示例链接,或者你只需​​输入一个演练,那就非常有帮助。

I'm not asking a whole code, but if anyone has any example link or you can just type a walkthrough, it is of great help.

推荐答案

这里涉及两个截然不同的步骤。一个是检测你的对象,另一个是分析它。

There are two very different steps involved here. One is detecting your object, and the other is analyzing it.

对于物体检测,你只是想弄清楚物体是否在框架中,并且大约是它所在的位置。 OpenCv功能框架非常适合这种情况。有关一些教程和全面的示例代码,请参阅OpenCv features2d教程,尤其是功能匹配教程

For object detection, you're just trying to figure out whether the object is in the frame, and approximately where it's located. The OpenCv features framework is great for this. For some tutorials and comprehensive sample code, see the OpenCv features2d tutorials and especially the feature matching tutorial.

对于分析,您需要深入研究光学字符识别(OCR)。 OpenCv不包括OCR库,但我建议查看 tesseract-ocr ,这是一个很棒的OCR图书馆。如果您的文档具有固定的结构化(文本字段的一致布局),那么tesseract-ocr就是您所需要的。有关更高级的分析,请查看 ocropus ,它使用tesseract-ocr但添加了布局分析。

For analysis, you need to dig into optical character recognition (OCR). OpenCv does not include OCR libraries, but I recommend checking out tesseract-ocr, which is a great OCR library. If your documents have a fixed structured (consistent layout of text fields) then tesseract-ocr is all you need. For more advanced analysis checking out ocropus, which uses tesseract-ocr but adds layout analysis.

这篇关于如何使用Opencv进行文件识别与OCR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆