Skip to content

Commit

Permalink
add photo module
Browse files Browse the repository at this point in the history
  • Loading branch information
rainyl committed Feb 29, 2024
1 parent 97ddf5b commit 5b479db
Show file tree
Hide file tree
Showing 12 changed files with 900 additions and 384 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ __pycache__
*.a
*.lib
.cache/
small2.mp4

# Files and directories created by pub
.dart_tool/
Expand Down
1 change: 1 addition & 0 deletions .pubignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ coverage/
*.dll
*.so
*.dylib
*.lib
src/opencv/.github/
src/opencv/
src/opencv_contrib/
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 0.4.0

* :rocket: add support for `photo` module

## 0.3.0

* Please use 0.3.0 or later, tested for android, linux, and windows

## 0.2.0

* :tada: add android `arm64-v8a`, `armeabi-v7a`, `x86`, `x86_64` prebuild binaries, e.g., `dart run opencv_dart:setup -p android -a arm64-v8a` to download prebuilt binaries for android arm64-v8a
Expand Down
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,28 @@ prebuilt binaries.
- `platform`: `auto` `android` `linux` `windows`
- `arch`: `auto` `x86` `x64` `x86_64`(android only) `arm64-v8a`(android only) `armeabi-v7a`(android only)

**Please use v0.3.0 and later version.**

## Status

| module | Binding status | Test status | description |
| ---------- | ------------------ | ----------------------- | ----------------------- |
| aruco | :white_check_mark: | :white_check_mark: | ArUco module |
| core | :white_check_mark: | :white_check_mark: | Core module |
| features2d | :white_check_mark: | :white_check_mark: | Features2D module |
| highgui | :white_check_mark: | :white_check_mark: | HighGUI module |
| imgcodecs | :white_check_mark: | :white_check_mark: | ImageCodecs module |
| imgproc | :white_check_mark: | :white_check_mark: | ImageProc module |
| objdetect | :white_check_mark: | :white_check_mark: | Object Detection module |
| svd | :white_check_mark: | :white_check_mark: | SVD module |
| video | :white_check_mark: | :white_check_mark: | Video module |
| videoio | :white_check_mark: | :ballot_box_with_check: | VideoIO module |
| asyncarray | :x: | :x: | AsyncArray module |
| calib3d | :x: | :x: | Calib3D module |
| dnn | :x: | :x: | DNN module |
| photo | :x: | :x: | Photo module |
| cuda | :x: | :x: | CUDA module |
| contrib | :x: | :x: | Contrib module |
| module | Binding status | Test status | description |
| ---------- | ------------------ | ------------------ | ----------------------- |
| aruco | :white_check_mark: | :white_check_mark: | ArUco module |
| core | :white_check_mark: | :white_check_mark: | Core module |
| features2d | :white_check_mark: | :white_check_mark: | Features2D module |
| highgui | :white_check_mark: | :white_check_mark: | HighGUI module |
| imgcodecs | :white_check_mark: | :white_check_mark: | ImageCodecs module |
| imgproc | :white_check_mark: | :white_check_mark: | ImageProc module |
| objdetect | :white_check_mark: | :white_check_mark: | Object Detection module |
| svd | :white_check_mark: | :white_check_mark: | SVD module |
| video | :white_check_mark: | :white_check_mark: | Video module |
| videoio | :white_check_mark: | :white_check_mark: | VideoIO module |
| asyncarray | :x: | :x: | AsyncArray module |
| calib3d | :x: | :x: | Calib3D module |
| dnn | :x: | :x: | DNN module |
| photo | :white_check_mark: | :white_check_mark: | Photo module |
| cuda | :x: | :x: | CUDA module |
| contrib | :x: | :x: | Contrib module |

- :x: : not finished
- :ballot_box_with_check: : almost finished
Expand Down Expand Up @@ -66,6 +68,7 @@ More examples are on the way...
- [ ] add more examples
- [ ] modify C wrapper to catch exceptions
- [ ] Native Assets
- [ ] async?

## For Developers

Expand Down Expand Up @@ -99,7 +102,7 @@ This package is in heavy development, dynamic libraries for Windows and linux ha

6. compile this package along with gocv, windows: `./scripts/build.ps1`, linux: `./scripts/build.sh`, this will generate `libopencv_dart.dll` or `libopencv_dart.so`
7. copy libs to corresponding platform directorys, i.e., `libopencv_dart.dll` to `windows`, `libopencv_dart.so` to `linux`. this is necessary for dart and flutter to load the dynamic library.
8. If you want to test using vscode, add dynamic library path to `"dart.env"` in `settings.json`
8. If you want to test using vscode, add dynamic library path to `"dart.env"` in `settings.json`

## Acknowledgement

Expand Down
15 changes: 1 addition & 14 deletions bin/setup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,7 @@ void main(List<String> args) async {
defaultsTo: "auto",
help: "Platform to setup",
);
parser.addOption(
"arch",
abbr: "a",
allowed: [
"auto",
"x86",
"x64",
"x86_64",
"arm64-v8a",
"armeabi-v7a",
],
defaultsTo: "auto",
help: "Architecture to setup",
);

final argsParsed = parser.parse(args);
final platform =
argsParsed["platform"] == OS.auto ? Platform.operatingSystem : argsParsed["platform"] as String;
Expand Down
14 changes: 14 additions & 0 deletions lib/src/constants.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1941,3 +1941,17 @@ const int HOMOGRAPY_ALL_POINTS = 0;
const int HOMOGRAPY_LMEDS = 4;

const int HOMOGRAPY_RANSAC = 8;

const int RECURS_FILTER = 1;

const int NORMCONV_FILTER = 2;

const int INPAINT_NS = 0;

const int INPAINT_TELEA = 1;

const int NORMAL_CLONE = 1;

const int MIXED_CLONE = 2;

const int MONOCHROME_TRANSFER = 3;
1 change: 1 addition & 0 deletions lib/src/opencv.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export 'imgcodecs/imgcodecs.dart';
export 'imgproc/imgproc.dart';
export 'objdetect/objdetect.dart';
export 'svd/svd.dart';
export 'photo/photo.dart';

export 'video/video.dart';
export 'video/videoio.dart';
Loading

0 comments on commit 5b479db

Please sign in to comment.