All Projects → westracer → flutter_native_opencv

westracer / flutter_native_opencv

Licence: MIT License
Using OpenCV natively in C++ in a Flutter app with Dart FFI

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
dart
5743 projects
ruby
36898 projects - #4 most used programming language
c
50402 projects - #5 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to flutter native opencv

Termux Ndk
android-ndk for termux
Stars: ✭ 91 (-12.5%)
Mutual labels:  android-ndk
swift-everywhere-toolchain
Automated workflow to compile Swift Toolchain, for making Android apps with Swift.
Stars: ✭ 85 (-18.27%)
Mutual labels:  android-ndk
Inimesed
An Android app that lets you search your contacts by voice. Internet not required. Based on Pocketsphinx. Uses Estonian acoustic models.
Stars: ✭ 65 (-37.5%)
Mutual labels:  android-ndk
Face Swap Android
Realtime Face Swap Android NDK app full source code. Developed with OpenCV (http://opencv.org) and Dlib C++ (http://dlib.net).
Stars: ✭ 111 (+6.73%)
Mutual labels:  android-ndk
Relinker
A robust native library loader for Android.
Stars: ✭ 2,612 (+2411.54%)
Mutual labels:  android-ndk
android-gcc-toolchain
Enable you to use NDK's standalone toolchain easily, quickly and magically for cross-compile
Stars: ✭ 49 (-52.88%)
Mutual labels:  android-ndk
Bugsnag Android Ndk
DEPRECATED - this project now lives at bugsnag/bugsnag-android
Stars: ✭ 42 (-59.62%)
Mutual labels:  android-ndk
native-libandroidthings
NDK library for exposing Peripheral I/O APIs in C/C++
Stars: ✭ 28 (-73.08%)
Mutual labels:  android-ndk
Jackknife
⚔️ 金轮法王,哦不,是轮子大师带你玩转Android,是时候尝试下MVVM了。这是一个Android应用开发全家桶库,支持Kotlin+MVVM+Dagger2+Retrofit架构。
Stars: ✭ 215 (+106.73%)
Mutual labels:  android-ndk
android tflite
GPU Accelerated TensorFlow Lite applications on Android NDK. Higher accuracy face detection, Age and gender estimation, Human pose estimation, Artistic style transfer
Stars: ✭ 105 (+0.96%)
Mutual labels:  android-ndk
Ffmpeg Android
FFmpeg for Android compiled with x264, libass, fontconfig, freetype, fribidi and lame (Supports Android 4.1+)
Stars: ✭ 1,554 (+1394.23%)
Mutual labels:  android-ndk
Android Ndk Rs
Rust bindings to the Android NDK
Stars: ✭ 200 (+92.31%)
Mutual labels:  android-ndk
WeChatQRCode
⛄ 基于OpenCV开源的微信二维码引擎移植的Android扫码识别库
Stars: ✭ 250 (+140.38%)
Mutual labels:  opencv-android
Cocos2d X 3rd Party Libs Src
Dependencies of cocos2d-x.
Stars: ✭ 107 (+2.88%)
Mutual labels:  android-ndk
gooid
Go bindings for Android NDK
Stars: ✭ 48 (-53.85%)
Mutual labels:  android-ndk
Ndcrash
A powerful crash reporting library for Android NDK. Don't forget to run git submodule update --init --recursive after checking out.
Stars: ✭ 91 (-12.5%)
Mutual labels:  android-ndk
pedax
Reversi Board with edax, which is the strongest reversi engine.
Stars: ✭ 18 (-82.69%)
Mutual labels:  dart-ffi
dlib-for-android
Compile and embed Dlib in your Android projects with ease.
Stars: ✭ 33 (-68.27%)
Mutual labels:  android-ndk
GTKAndroid
GTK+Android
Stars: ✭ 73 (-29.81%)
Mutual labels:  android-ndk
OpenCV-android
【开发中】OpenCV Android 实现人脸识别、图片处理、图片相似度检测、物体识别功能。(基于OpenCV Library v3.2.0)
Stars: ✭ 43 (-58.65%)
Mutual labels:  opencv-android

flutter_native_opencv

Using OpenCV natively in C++ in a Flutter app with Dart FFI. Tested with Flutter 2.5.2.

Read the full articles:

How to build & run

Android and iOS

Run init.sh script from a scripts folder or do the following steps manually:

  1. Download OpenCV for Android and iOS: https://opencv.org/releases/
  2. Copy or create symlinks:
    • opencv2.framework to native_opencv/ios
    • OpenCV-android-sdk/sdk/native/jni/include to native_opencv
    • Contents of OpenCV-android-sdk/sdk/native/libs/** to native_opencv/android/src/main/jniLibs/**

Windows

Run init_windows.ps1 PowerShell script from a scripts folder or do the following steps manually:

  1. Download OpenCV for Windows: https://opencv.org/releases/
  2. Unpack it. Set env. variable OpenCV_DIR to unpacked ...\opencv\build folder
  3. Create a hard link from native_opencv\ios\Classes\native_opencv.cpp to native_opencv_windows\windows\native_opencv.cpp
  4. Make sure native_opencv_windows\windows\CMakeLists.txt contains correct .dll names (OpenCV_DEBUG_DLL_NAME,OpenCV_RELEASE_DLL_NAME)

macOS

Before doing anything else, you need to download OpenCV source code and build a framework by running opencv/platforms/apple/build_xcframework.py script.

Run init_macos.sh script from a scripts folder or do the following steps manually:

  1. Create a hard link from native_opencv/ios/Classes/native_opencv.cpp to native_opencv_macos/macos/Classes/native_opencv.cpp
  2. Copy opencv2.xcframework to native_opencv/macos

Linux

Before doing anything else, you need to download OpenCV source code and build libraries by following the official tutorial.

After making a build, set up an environmental variable OpenCV_DIR to the build's folder.

Run init_linux.sh script from a scripts folder or do the following steps manually:

  1. Create a hard link from native_opencv/ios/Classes/native_opencv.cpp to native_opencv_linux/linux/native_opencv.cpp

Troubleshooting

  /snap/flutter/current/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
  # include <gnu/stubs-32.h>
            ^~~~~~~~~~~~~~~~
  1 error generated.
  ninja: build stopped: subcommand failed.

or

/snap/flutter/current/usr/bin/ld: warning: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crt1.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0008002
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Exception: Build process failed

Install flutter manually instead of from snap, see: https://flutter.dev/docs/get-started/install/linux#install-flutter-manually

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].