AdityaMulgundkar / flutter_opencv

Flutter plug-in providing (a few) basic bindings to OpenCV-4.x. OpenCV methods implemented without the Core packages. WIP.
https://pub.dev/packages/opencv
Other
125 stars 55 forks source link

Why not use dart:ffi? #6

Open MohiuddinM opened 4 years ago

MohiuddinM commented 4 years ago

The android and ios versions are just wrappers over opencv c++ library. Won't it be beneficial if you can use dart:ffi to create bindings directly to c++. That way you won't have to deal with writing platform specific codes, and at the same time make your library work with not just android and ios, but also on desktop platforms.

flutter-clutter commented 4 years ago

I agree, this is a good alternative. I used this technique in my project: https://github.com/flutter-clutter/flutter-simple-edge-detection - however, it's only about edge detection. So if you want to implement the whole bindings using dart:ffi, feel free to have a look into my code and copy off the relevant parts @AdityaMulgundkar