【问题标题】:How to convert Bitmap into a Frame?如何将位图转换为框架?
【发布时间】:2016-11-19 19:19:07
【问题描述】:

目前我正在使用 Mobile Vision 开发一个 android 程序。我正在使用“TextRecognizer”类,其中一种方法是 .detect(Frame frame)。现在我有一个我想输入的图像,但是,图像是文件类型“位图”。我试图通过投射将其转换为“框架”,但没有奏效。如果有人有任何建议,将不胜感激。

【问题讨论】:

  • Android API 中没有TextRecognizer 类。您使用的是哪个库?
  • 我正在使用 Google Play Services Mobile Vision API @Henry
  • @Henry com.google.android.gms.vision.text 在 Google Play 服务移动视觉 API 中

标签: android bitmap ocr android-vision


【解决方案1】:

Frame.Builder 类中使用setBitmap 方法:

Frame outputFrame = new Frame.Builder().setBitmap(myBitmap).build();

【讨论】:

    猜你喜欢
    • 2011-11-04
    • 2012-03-11
    • 2020-06-04
    • 1970-01-01
    • 2023-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-07
    相关资源
    最近更新 更多