Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【提案】智能镜头对外暴露二维码扫描接口 #224

Open
2 tasks
Gaubee opened this issue Sep 12, 2024 · 0 comments
Open
2 tasks

【提案】智能镜头对外暴露二维码扫描接口 #224

Gaubee opened this issue Sep 12, 2024 · 0 comments

Comments

@Gaubee
Copy link
Contributor

Gaubee commented Sep 12, 2024

利用智能镜头原生高性能的体验,提供对外接口

  • GET /barcodeSupportedFormats
  • SSE/WS /barcodeDetection

    在扫描过程中,数据会不停地返回,不需要用户去“点击打开二维码”,程序可以直接拿到已经扫码的结果二维码,只要发现是自己所需的二维码,接着就可以关闭 request,这意味着结束扫描。
    未来我们可以实现 canvas-worklet,从而实现在 Compose-Canvas 上使用 js 做自定义绘制。

注意接口设计,因为在未来,智能镜头会加入更多的图形检测功能,特别是很多已经成为行业内的标准的稳定接口,都可以进行提供。
可以考虑的实现路径是我们的动态内核模块实现,这样的功能并不会增加包的体积。而是会去动态加载原生动态库:Android 动态加载.so、macos 动态加载.dylib(需要解决签名问题?)、windows 动态加载.dll、ios 使用系统内置 CoreML。

另外,随着窗口多图层的实现,我们也可以让应用程序直接在应用内嵌智能镜头的视图界面来实现扫描。

参考资料

Barcode Detection API
TensorFlow.js 模型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant