You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Second issue here is that Dart does not seem to care about the LD_LIBRARY_PATH. I have it set, confirmed by echo $LD_LIBRARY_PATH, but it still not found. The given path is not searched for the lib.
I then symlinked the lib to the current directory, where it is found and end up with this error:
Second issue here is that Dart does not seem to care about the LD_LIBRARY_PATH. I have it set, confirmed by echo $LD_LIBRARY_PATH, but it still not found. The given path is not searched for the lib.
Yep, I found that too. Have not found a proper solution to this but once the Native Assets feature makes it to the stable Dart version, this won't be an issue anymore.
voidshowFrame() {
if (!_read()) throwCameraReadException();
nativeLib.imshow(_image);
}
Are you using isolates by any chance? If not, it could be that Dart's FFI mechanisms use threads somehow. I can ask around, but I don't know what's causing the issue nor do I have a Mac to debug it.
If you know your way around C/C++, may I suggest:
Writing your own script to #include src/opencv_ffi.h
Using VideoCapture_read and imshow in your C/C++ code
building OpenCV, opencv_ffi, and your code to try to reproduce the error
Just ran this through @mraleph, seems this is an issue with Dart's FFI. Not sure what your next move should be, sorry, but for me, I found it useful to avoid imshow/showFrame altogether and stream the bytes directly to some other I/O, like Flutter's Image widget, or saving them to a file. After all, you can't control much of the OpenCV window, and I mostly just included it as a debug feature.
Here is an issue whose last comment explains the difficulties in this. If you feel imshow() is worth it to you and you understand what they're saying and how to go about it, feel free to try that solution. If not, it doesn't look like this will be fixed anytime soon (although this other issue notes that this should be solved for Flutter soon, it's just native Dart that won't work).
Closing as this is out of scope for this package, but feel free to subscribe or post your use-case to the above issues.
Same problem as #17 (at least on an ARM based Mac, the library is named
libopencv_ffi.dylib
, so the first change needed is this:Second issue here is that Dart does not seem to care about the
LD_LIBRARY_PATH
. I have it set, confirmed byecho $LD_LIBRARY_PATH
, but it still not found. The given path is not searched for the lib.I then symlinked the lib to the current directory, where it is found and end up with this error:
The text was updated successfully, but these errors were encountered: