Tesseract OCR相机 [英] Tesseract OCR Camera

查看:155
本文介绍了Tesseract OCR相机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iOS应用程序中使用Tesseract OCR 3.01,当我从手机库中选择图像时,我的数据准确率达到90%。但如果我使用相机中的相同图像,它会显示混乱的字母。我跟着本教程,请指导我,如果可以采取措施确保它适用于相机,因为它适用于图库图像。

I'm using Tesseract OCR 3.01 in my iOS application, it shows 90% accuracy for my data when I pick an image from my phone’s library. But if I use the same image from the camera, it is showing jumbled letters. I followed this tutorial, kindly guide me if something can be done to make sure it works from camera as it works for gallery images.

推荐答案

几乎可以肯定问题是方向。 Apple倾向于以一种位图形式创建图像 - 图像位布局就好像相机侧面有音量按钮的顶部和右侧。您看到的看起来比较宽的图像仍然如上所述,但图像中包含的EXIF对象中有一个方向。

Almost for sure the problem is "orientation". Apple tends to create images in one bit map form - the image bits are laid out as if the camera was on its side with the volume buttons top and right. Images that you see which appear taller than wider are still laid out as above, but there is an "orientation" in the EXIF object included with the image.

我是猜测tesseract没有看EXIF,但希望图像采用标准格式,以便文本处于阅读文本的人的位置。

I'm going to guess that tesseract does not look at the EXIF, but expects the image in a "standard" format so that text is in the position it would be for a person reading the text.

您可以使用右上方的音量按钮拍摄的相机图像来测试我的假设。

You can test my hypothesis by using camera images taken with volume button top right.

如果它们有效,那么您需要做的就是处理图像你自己,并根据方向设置重新排列位。这不是那么难,但需要你阅读vImage和/或位图上下文。

If they work, then what you will need to do is process the image yourself, and re-arrange the bits per the orientation setting. This is not all that hard to do but will require you to read up on vImage and/or bit map contexts.

这篇关于Tesseract OCR相机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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