File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,27 @@ class EdgeDetection {
107
107
);
108
108
}
109
109
110
+ static Future <bool > processImage (String path, EdgeDetectionResult result) async {
111
+ DynamicLibrary nativeEdgeDetection = _getDynamicLibrary ();
112
+
113
+ final processImage = nativeEdgeDetection
114
+ .lookup <NativeFunction <process_image_function>>("process_image" )
115
+ .asFunction <ProcessImageFunction >();
116
+
117
+
118
+ return processImage (
119
+ Utf8 .toUtf8 (path),
120
+ result.topLeft.dx,
121
+ result.topLeft.dy,
122
+ result.topRight.dx,
123
+ result.topRight.dy,
124
+ result.bottomLeft.dx,
125
+ result.bottomLeft.dy,
126
+ result.bottomRight.dx,
127
+ result.bottomRight.dy
128
+ ) == 1 ;
129
+ }
130
+
110
131
static DynamicLibrary _getDynamicLibrary () {
111
132
final DynamicLibrary nativeEdgeDetection = Platform .isAndroid
112
133
? DynamicLibrary .open ("libnative_edge_detection.so" )
You can’t perform that action at this time.
0 commit comments