-
-
Notifications
You must be signed in to change notification settings - Fork 25
mat show in statefullwidget #7
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
Comments
TL;DR, use cv.imencode() to get a encoded Uint8List and then use Image.memory() Take a look at example BTW, if you still use dart image library, you probably can also try to get Mat.data and construct a img.Image, note that Mat.data contains pixel values and have no headers for an image, so DO NOT pass Mat.data to Image.memory() directly! |
Thank you. I have checked the method and it shows that I have successfully displayed it, but I can only use the thread (flutter compute() method) to use opencv_dart, otherwise it will get stuck. Anyway, I can use it |
Asynchronous calls are not supported yet, so heavy computations should not be done in the main thread, you may need to use isolate, compute() also spawns a new thread. |
please explain how to show Mat image in flutter widget Pages
The text was updated successfully, but these errors were encountered: