19

I have been trying to find a Flutter OpenCV library. I'm looking to handle facial recognition through eye positioning. I need this to be for both android and iOS. I found one for C++ which I think Flutter compiles to as well as Swift/Objective C libraries. I am wondering which route would be the best to go or if there is a better option.

McCadi
  • 229
  • 1
  • 2
  • 9

4 Answers4

11

Flutter is still beta and there is no OpenCV available for flutter unfortunately. But you can integrate the OpenCV native libs or sdk for both Android and IOS and invoke them through platform channels

Hope that helped!

Hemanth Raj
  • 32,555
  • 10
  • 92
  • 82
  • I tried this solution but I've got errors with JNI while setting up OpenCV native libs for Android on Windows : https://stackoverflow.com/questions/54450398/how-to-fix-gradle-task-appmergedebugjnilibfolders-in-flutter-gradle-build-fo – Jérémy Jan 30 '19 at 22:34
6

Flutter plugin package is avialable - https://pub.dartlang.org/packages/flutter_opencv

You can try this and it might be helpful.

Manoj Arun S
  • 543
  • 5
  • 17
3

Now there seems to be a pretty new opencv package providing a binding to OpenCV-4.x, published in April 2020.

However at the moment it is not a full binding yet.

matkv
  • 652
  • 1
  • 7
  • 18
1

If you want to use OpenCV in you C++ code (because, e.g., you need more heavy C++ manipulation instead of simply calling functions), then have a look at this answer: How to use OpenCV 4 in native C++ of Flutter? at July 2020.

Disclaimer: I wrote that answer.

ch271828n
  • 15,854
  • 5
  • 53
  • 88