Skip to content

rainyl/opencv_dart

Repository files navigation

opencv_dart

OpenCV Bindings for Dart Language. Support both asynchronous and synchronous!

Star on Github License: Apache-2.0
Native Assets Build Discord Server
Package Link Description
dartcv4 OpenCV bindings for Dart Language.
opencv_core OpenCV for Flutter, without videoio
opencv_dart OpenCV for Flutter, with all modules

Note

WIP, APIs may change in the future, contributions are welcome!

Demos

Screenshot Link
example example
videoio texture renderer
dnn_minist DNN MNIST inference
stitching stitching

Supported Platforms

Platform Supported Tested Platforms
Android x86_64, arm64-v8a, armeabi-v7a
iOS arm64, x64(Simulator)
Linux x64, arm64
Windows x64, arm64
macOS x64, arm64

Status

Core Modules

module Binding status Test status description
core Core module
calib3d Calib3D module
dnn DNN module
features2d Features2D module
gapi GAPI module
highgui HighGUI module
imgcodecs ImageCodecs module
imgproc ImageProc module
ml ML module
objdetect Object Detection module
photo Photo module
stitching ☑️ ☑️ Stitching module
svd SVD module
video Video module
videoio VideoIO module

Contrib Modules

module Binding status Test status description
aruco ArUco module
img_hash Image hashing module
cuda
wechat_qrcode
bgsegm
superres
xfeatures2d
ximgproc
xobjdetect
xphoto
quality
  • ❌ : not finished
  • ☑️ : partially supported
  • ✅ : finished
  • modules not in the above table are not considered, contributions are welcome
  • videoio: cv.VideoCapture from file is not supported yet supported now.

Usage

Pure Dart

import 'package:dartcv4/dartcv.dart' as cv;

void main() {
  final img = cv.imread("test/images/lenna.png", flags: cv.IMREAD_COLOR);
  final gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY);
  print("${img.rows}, ${img.cols}");

  cv.imwrite("test_cvtcolor.png", gray);
}

Flutter

see awesome-opencv_dart and share yours

TODO

  • compile libs for android, linux
  • support for iOS, macOS
  • add more examples
  • documentation
  • modify C wrapper to catch exceptions
  • Native Assets, see native-assets branch
  • async
  • more/full test coverage
  • directly include opencv source code, refactor cmakelists.txt

Contributors

rainyl
rainy liu
abdelaziz-mahdy
Abdelaziz Mahdy
einsitang
爱因斯唐
Jiinwoo
JinWoo Jung
mdeleau
mdeleau
totemat
Matteo T.

Acknowledgement

Star History

Star History Chart

License

Apache-2.0 License