小编Sat*_*rar的帖子

如何检测android中的密钥保护状态

我有一个应用程序需要在调用之前检测密钥保护的先前状态,disableKeyguard()reenableKeyguard()由用户设置!有没有办法完成这项任务?

android android-service

4
推荐指数
1
解决办法
2524
查看次数

识别java中图像中的数字

我想识别下图中的数字

在此输入图像描述

我目前在eclipse java项目中使用Tess4J库,但它只能识别平面颜色背景中的字符.对于此图像,它甚至无法识别此图像上是否有字符(数字).帮我找到完成这项任务的方法.

这是我目前的代码:

import net.sourceforge.tess4j.*; 
import java.io.File; 

public class Main { 
  public static void main(String[] args) { 
    File imageFile = new File("image.png"); 
    Tesseract instance = Tesseract.getInstance(); 
    try { 
      String result = instance.doOCR(imageFile); 
      System.out.println(result); 
    } catch (TesseractException e) {
      System.err.println(e.getMessage()); 
    } 
  } 
}
Run Code Online (Sandbox Code Playgroud)

如果有办法计算黄线分隔的方块.

Thank you

java ocr tesseract image-processing

1
推荐指数
1
解决办法
6479
查看次数