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

How to use with ImageStream #4

Closed
thewh1teagle opened this issue Oct 28, 2022 · 5 comments
Closed

How to use with ImageStream #4

thewh1teagle opened this issue Oct 28, 2022 · 5 comments

Comments

@thewh1teagle
Copy link

thewh1teagle commented Oct 28, 2022

In camera module we have an option to get stream of frames
_controller.startImageStream( CameraImgae image => { } )
How can I decode it from that CameraImage object?
In your example you decode it from Xpic file, but I prefer to decode it with stream because it should be more efficient for live decode

In addition, when I get the results, does it possible to get the positions of each result? like we can in flutter_zxing lib.

@shirne
Copy link
Owner

shirne commented Oct 29, 2022

  1. I add a demo page that decode from CameraImage(yuv data) only test on android e953866
  2. Each result has a resultPoints

return points related to the barcode in the image. These are typically points identifying finder patterns or the corners of the barcode. The exact meaning is specific to the type of barcode that was decoded.

@thewh1teagle
Copy link
Author

Thank you very much for the example.
I tried it on my machine,
it looks like it takes more than 400ms to decode image.
and that's strange because the original zxing library of flutter takes less than 1ms
My goal is to create animation on the positions of detected qr's in live,
is there a way to reduce the time it takes?

@shirne
Copy link
Owner

shirne commented Oct 29, 2022

Currently , it's hard.
If you are only use for standard qrcode , you can set single decoder mode and close inverse mode.

Or I recommand you to use mk_kit , there's also some plugin on pub.

@shirne
Copy link
Owner

shirne commented Oct 31, 2022

@thewh1teagle
I improved CameraImage decode fundation to use a persistent isolate.
And thanks for your remind, decode CameraImage is more faster then a capture image.

@shirne shirne closed this as completed Oct 31, 2022
@thewh1teagle
Copy link
Author

Is it significantly faster? if not, what makes it hard to make it fast as zxing?

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

2 participants