【问题标题】:Firebase Android ML Kit: Way to hide display values on QR codeFirebase Android ML Kit:在 QR 码上隐藏显示值的方法
【发布时间】:2019-04-18 16:38:21
【问题描述】:

我正在使用 Firebase ML Kit 进行二维码扫描。我已经成功实施它并且工作正常。现在我只需要找到一种方法来隐藏二维码图像上显示的信息(url、ids、显示值等)。 下面是可以看到url的图片

【问题讨论】:

  • 这取决于你的实现。你可以分享代码,或者参考你用来获得截图结果的内容吗?
  • 我使用了谷歌的Quick Start。结果在截图上方

标签: java android firebase kotlin firebase-mlkit


【解决方案1】:

库可让您随心所欲:在屏幕上显示 url 或只是在代码中并以不同方式处理它。通常,您有图像的 Bitmap 对象并将其提供给 Barcode Recognizer 类,它会为您提供 String 值:

FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);

More Detailed Instructions here

您显示的屏幕只是谷歌的实现,其中编写了代码以显示读取值。他们在BarcodeGraphic类中绘制白色矩形和url,你可以评论URL部分,它不会被绘制:

【讨论】:

  • 有时候想的比我们想的要简单。非常感谢。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-06-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多