android中最好的OCR(光学字符识别)示例

时间:2021-11-07 09:01:55

I want a running example of OCR in android, I have done some research and find an example that implements OCR in android.

我想在android中运行OCR的一个例子,我已经做了一些研究并找到了一个在android中实现OCR的例子。

https://github.com/rmtheis/tess-two and in it there are three projects files...

https://github.com/rmtheis/tess-two其中有三个项目文件......

  1. eyes-two
  2. 眼睛二
  3. tess-two
  4. 苔丝二
  5. tess-two-test
  6. 苔丝个测试

I have executed the "tess-two-test" project by importing the three project files but "tess-two-test" does not include any activities so it will not run.

我通过导入三个项目文件执行了“tess-two-test”项目,但“tess-two-test”不包含任何活动,因此不会运行。

Can anybody suggest me a better example?

有人能给我一个更好的例子吗?

1 个解决方案

#1


105  

Like you I also faced many problems implementing OCR in Android, but after much Googling I found the solution, and it surely is the best example of OCR.

像你一样,我在Android中实现OCR也遇到了很多问题,但经过大量谷歌搜索后我找到了解决方案,这肯定是OCR的最佳例子。

Let me explain using step-by-step guidance.

让我解释一下使用分步指导。

First, download the source code from https://github.com/rmtheis/tess-two.

首先,从https://github.com/rmtheis/tess-two下载源代码。

Import all three projects. After importing you will get an error. To solve the error you have to create a res folder in the tess-two project

导入所有三个项目。导入后,您将收到错误消息。要解决此错误,您必须在tess-two项目中创建res文件夹

android中最好的OCR(光学字符识别)示例

First, just create res folder in tess-two by tess-two->RightClick->new Folder->Name it "res"

首先,只需通过tess-two-> RightClick-> new Folder->将其命名为“res”,即可在tess-two中创建res文件夹

After doing this in all three project the error should be gone.

在所有三个项目中执行此操作后,错误应该消失。

Now download the source code from https://github.com/rmtheis/android-ocr, here you will get best example.

现在从https://github.com/rmtheis/android-ocr下载源代码,在这里您将获得最佳示例。

Now you just need to import it into your workspace, but first you have to download android-ndk from this site:

现在您只需将其导入您的工作区,但首先您必须从此站点下载android-ndk:

http://developer.android.com/tools/sdk/ndk/index.html i have windows 7 - 32 bit PC so I have download http://dl.google.com/android/ndk/android-ndk-r9-windows-x86.zip this file

http://developer.android.com/tools/sdk/ndk/index.html我有Windows 7 - 32位PC,所以我下载了http://dl.google.com/android/ndk/android-ndk-r9 -windows-x86.zip这个文件

Now extract it suppose I have extract it into E:\Software\android-ndk-r9 so I will set this path on Environment Variable

现在提取它假设我已将其解压缩到E:\ Software \ android-ndk-r9所以我将在环境变量上设置此路径

Right Click on MyComputer->Property->Advance-System-Settings->Advance->Environment Variable-> find PATH on second below Box and set like path like below picture

右键单击MyComputer-> Property-> Advance-System-Settings-> Advance-> Environment Variable->在Box下面的第二个找到PATH并设置如下图所示的路径

android中最好的OCR(光学字符识别)示例

done it

完成了

Now open cmd and go to on D:\Android Workspace\tess-two like below

现在打开cmd并转到D:\ Android Workspace \ tess-two,如下所示

android中最好的OCR(光学字符识别)示例

If you have successfully set up environment variable of NDK then just type ndk-build just like above picture than enter you will not get any kind of error and all file will be compiled successfully:

如果你已经成功设置了NDK的环境变量,那么就像上面的图片一样输入ndk-build而不是输入你不会得到任何类型的错误并且所有文件都将被成功编译:

Now download other source code also from https://github.com/rmtheis/tess-two , and extract and import it and give it name OCRTest, like in my PC which is in D:\Android Workspace\OCRTest

现在也从https://github.com/rmtheis/tess-two下载其他源代码,并提取并导入它并命名为OCRTest,就像在我的PC中的D:\ Android Workspace \ OCRTest

android中最好的OCR(光学字符识别)示例

Import test-two in this and run OCRTest and run it; you will get the best example of OCR.

在此导入test-two并运行OCRTest并运行它;您将获得OCR的最佳示例。

#1


105  

Like you I also faced many problems implementing OCR in Android, but after much Googling I found the solution, and it surely is the best example of OCR.

像你一样,我在Android中实现OCR也遇到了很多问题,但经过大量谷歌搜索后我找到了解决方案,这肯定是OCR的最佳例子。

Let me explain using step-by-step guidance.

让我解释一下使用分步指导。

First, download the source code from https://github.com/rmtheis/tess-two.

首先,从https://github.com/rmtheis/tess-two下载源代码。

Import all three projects. After importing you will get an error. To solve the error you have to create a res folder in the tess-two project

导入所有三个项目。导入后,您将收到错误消息。要解决此错误,您必须在tess-two项目中创建res文件夹

android中最好的OCR(光学字符识别)示例

First, just create res folder in tess-two by tess-two->RightClick->new Folder->Name it "res"

首先,只需通过tess-two-> RightClick-> new Folder->将其命名为“res”,即可在tess-two中创建res文件夹

After doing this in all three project the error should be gone.

在所有三个项目中执行此操作后,错误应该消失。

Now download the source code from https://github.com/rmtheis/android-ocr, here you will get best example.

现在从https://github.com/rmtheis/android-ocr下载源代码,在这里您将获得最佳示例。

Now you just need to import it into your workspace, but first you have to download android-ndk from this site:

现在您只需将其导入您的工作区,但首先您必须从此站点下载android-ndk:

http://developer.android.com/tools/sdk/ndk/index.html i have windows 7 - 32 bit PC so I have download http://dl.google.com/android/ndk/android-ndk-r9-windows-x86.zip this file

http://developer.android.com/tools/sdk/ndk/index.html我有Windows 7 - 32位PC,所以我下载了http://dl.google.com/android/ndk/android-ndk-r9 -windows-x86.zip这个文件

Now extract it suppose I have extract it into E:\Software\android-ndk-r9 so I will set this path on Environment Variable

现在提取它假设我已将其解压缩到E:\ Software \ android-ndk-r9所以我将在环境变量上设置此路径

Right Click on MyComputer->Property->Advance-System-Settings->Advance->Environment Variable-> find PATH on second below Box and set like path like below picture

右键单击MyComputer-> Property-> Advance-System-Settings-> Advance-> Environment Variable->在Box下面的第二个找到PATH并设置如下图所示的路径

android中最好的OCR(光学字符识别)示例

done it

完成了

Now open cmd and go to on D:\Android Workspace\tess-two like below

现在打开cmd并转到D:\ Android Workspace \ tess-two,如下所示

android中最好的OCR(光学字符识别)示例

If you have successfully set up environment variable of NDK then just type ndk-build just like above picture than enter you will not get any kind of error and all file will be compiled successfully:

如果你已经成功设置了NDK的环境变量,那么就像上面的图片一样输入ndk-build而不是输入你不会得到任何类型的错误并且所有文件都将被成功编译:

Now download other source code also from https://github.com/rmtheis/tess-two , and extract and import it and give it name OCRTest, like in my PC which is in D:\Android Workspace\OCRTest

现在也从https://github.com/rmtheis/tess-two下载其他源代码,并提取并导入它并命名为OCRTest,就像在我的PC中的D:\ Android Workspace \ OCRTest

android中最好的OCR(光学字符识别)示例

Import test-two in this and run OCRTest and run it; you will get the best example of OCR.

在此导入test-two并运行OCRTest并运行它;您将获得OCR的最佳示例。