opencv_dart 0.0.4
opencv_dart: ^0.0.4 copied to clipboard
OpenCV4 bindings for Dart language and Flutter, using dart:ffi.
opencv_dart #
OpenCV Bindings for Dart Language.
!!!This package is experiment and APIs may change in the future!!!
Many tests unfinished, contributions are welcome!
Prebuilt binaries for Linux and Windows are available, for other platforms, you have to build them your self.
IMPORTANT
After added to pubspec.yaml
or install by commandline,
please run dart run opencv_dart:setup -p <platform>
to download
prebuilt binaries, for now, platform
supports auto
, linux
and windows
.
Status #
module | Binding status | Test status | description |
---|---|---|---|
aruco | ✅ | ❌ | ArUco module |
core | ✅ | ✅ | Core module |
features2d | ✅ | ❌ | Features2D module |
highgui | ✅ | ✅ | HighGUI module |
imgcodecs | ✅ | ✅ | ImageCodecs module |
imgproc | ✅ | ✅ | ImageProc module |
objdetect | ✅ | ✅ | Object Detection module |
svd | ✅ | ✅ | SVD module |
video | ✅ | ❌ | Video module |
videoio | ✅ | ☑️ | VideoIO module |
asyncarray | ❌ | ❌ | AsyncArray module |
calib3d | ❌ | ❌ | Calib3D module |
dnn | ❌ | ❌ | DNN module |
photo | ❌ | ❌ | Photo module |
cuda | ❌ | ❌ | CUDA module |
contrib | ❌ | ❌ | Contrib module |
- ❌ : not finished
- ☑️ : almost finished
- ✅ : finished
Usage #
import 'package:opencv_dart/opencv_dart.dart' as cv;
final img = cv.imread("test/images/lenna.png", flags: cv.IMREAD_COLOR);
final gray = cv.Mat.empty();
cv.cvtColor(img, gray, cv.COLOR_BGR2GRAY);
print("${img.rows}, ${img.cols}");
cv.imwrite("test_cvtcolor.png", gray);
More examples are comming...
TODO #
- ❌ compile libs for android, linux
- ❌ support for iOS, macOS
- ❌ add more examples
- ❌ modify C wrapper to catch exceptions
- ❌ Native Assets
Develop #
This package is in heavy development, dynamic libraries for Windows have been compiled, for other platforms, you need to compile it yourself.
- compile opencv
- compile this package along with gocv
- copy libs
Acknowledgement #
gocv
project: https://github.com/hybridgroup/gocv License: Apache-2.0
License #
Apache-2.0 License