条形码扫描
plat_ios
plat_android

利用机器学习套件的条形码扫描 API,您可以读取使用大多数标准条形码格式编码的数据。条形码扫描在设备上执行,不需要网络连接。
条形码是将现实生活中的信息传递到应用的一种便捷方式。具体来讲,使用 QR 码等 2D 格式时,您可以对结构化数据(例如联系信息或 Wi-Fi 网络凭据)进行编码。由于机器学习套件可自动识别和解析这些数据,因此当用户扫描条形码时,您的应用能以智能方式做出响应。
iOS
Android
如果您是 Flutter 开发者,那么您可能会对 FluteFire 感兴趣,它包含一个适用于 Firebase 的 ML Vision API 的插件。
主要功能
读取大多数标准格式 |
- 线性格式:Codabar、Code 39、Code 93、Code 128、EAN-8、EAN-13、ITF、UPC-A、UPC-E
- 2D 格式:Aztec、Data Matrix、PDF417、QR 码
|
自动格式检测 |
一次扫描所有受支持的条形码格式,而无需指定所需的格式。或者,限制检测器仅扫描您感兴趣的格式,以提高扫描速度。
|
提取结构化数据 |
系统会自动解析使用某种受支持的 2D 格式存储的结构化数据。受支持的信息类型包括网址、联系信息、日历活动、电子邮件地址、电话号码、短信提示、ISBN、Wi-Fi 连接信息、地理位置以及 AAMVA 标准驱动程序信息。
|
支持任意方向 |
无论条形码的方向如何(正置、倒置或侧置),系统都可识别并扫描条形码。
|
在设备上运行 |
条形码扫描完全在设备上执行,不需要网络连接。
|
示例结果
|
结果 |
角点 |
(49,125)、(172,125)、(172,160)、(49,160) |
原始值 |
2404105001722 |
|
|
结果 |
角点 |
(87,87) (612,87) (612,612) (87,612) |
原始值 |
WIFI:S:SB1Guest;P:12345;T:WEP;; |
WiFi 信息 |
SSID |
SB1Guest |
密码 |
12345 |
类型 |
WEP |
|
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-08-06 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]