rainyl / opencv_dart

OpenCV bindings for Dart language and Flutter.
https://pub.dev/packages/opencv_dart
Apache License 2.0
78 stars 10 forks source link

Using imencode and Mat.fromList throws error #111

Closed arozdorozhniuk closed 1 week ago

arozdorozhniuk commented 1 week ago

Question

When trying to use imencode function I keep getting error:

Usage: imageData is Uint8List representing jpeg image. final mat = imdecode(imageData, IMREAD_UNCHANGED);

Error: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol 'VecUChar_NewFromPointer': dlsym(RTLD_DEFAULT, VecUChar_NewFromPointer): symbol not found

Also I've tried to convert Uint8List to Mat using Mat.fromList constructor, but it throws an error as well.

Usage: final mat = Mat.fromList(height, width, MatType.CV_8UC1, imageData.toList());

Error: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol 'Mat_NewFromBytes': dlsym(RTLD_DEFAULT, Mat_NewFromBytes): symbol not found

I'm not getting it. Is something wrong with my bytelist or it its something with implementation of those methods?

rainyl commented 1 week ago

Looks like your dynamic library is broken, please update to the newest version or run setup manually with -f flag to overwrite the existed library and try again.

arozdorozhniuk commented 1 week ago

It was so easy.. OMG, thank you!

rainyl commented 1 week ago

Never mind~