Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
rainyl committed Oct 24, 2024
1 parent 43e6f9d commit 8c6822a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
32 changes: 24 additions & 8 deletions packages/dartcv/lib/src/imgproc/imgproc_async.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ Future<double> arcLengthAsync(VecPoint curve, bool closed) async {
///
/// For further details, please see:
/// https:///docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga014b28e56cb8854c0de4a211cb2be656
Future<Mat> convexHullAsync(VecPoint points,
{Mat? hull, bool clockwise = false, bool returnPoints = true}) async {
Future<Mat> convexHullAsync(
VecPoint points, {
Mat? hull,
bool clockwise = false,
bool returnPoints = true,
}) async {
hull ??= Mat.empty();
return cvRunAsync0(
(callback) => cimgproc.cv_convexHull(points.ref, hull!.ref, clockwise, returnPoints, callback),
Expand Down Expand Up @@ -218,8 +222,13 @@ Future<(bool, Point, Point)> clipLineAsync(Rect imgRect, Point pt1, Point pt2) a
///
/// For further details, please see:
/// https:///docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga9d7064d478c95d60003cf839430737ed
Future<Mat> bilateralFilterAsync(Mat src, int diameter, double sigmaColor, double sigmaSpace,
{Mat? dst}) async {
Future<Mat> bilateralFilterAsync(
Mat src,
int diameter,
double sigmaColor,
double sigmaSpace, {
Mat? dst,
}) async {
dst ??= Mat.empty();
return cvRunAsync0(
(callback) => cimgproc.cv_bilateralFilter(src.ref, dst!.ref, diameter, sigmaColor, sigmaSpace, callback),
Expand Down Expand Up @@ -1720,8 +1729,11 @@ Future<Mat> getPerspectiveTransformAsync(VecPoint src, VecPoint dst, [int solveM
///
/// For further details, please see:
/// https:///docs.opencv.org/master/da/d54/group__imgproc__transform.html#ga8c1ae0e3589a9d77fffc962c49b22043
Future<Mat> getPerspectiveTransform2fAsync(VecPoint2f src, VecPoint2f dst,
[int solveMethod = DECOMP_LU]) async {
Future<Mat> getPerspectiveTransform2fAsync(
VecPoint2f src,
VecPoint2f dst, [
int solveMethod = DECOMP_LU,
]) async {
final mat = Mat.empty();
return cvRunAsync0(
(callback) => cimgproc.cv_getPerspectiveTransform2f(src.ref, dst.ref, mat.ptr, solveMethod, callback),
Expand Down Expand Up @@ -2075,8 +2087,12 @@ Future<Mat> accumulateProductAsync(
///
/// For further details, please see:
/// https:///docs.opencv.org/master/d7/df3/group__imgproc__motion.html#ga4f9552b541187f61f6818e8d2d826bc7
Future<Mat> accumulateWeightedAsync(InputArray src, InputOutputArray dst, double alpha,
{InputArray? mask}) async {
Future<Mat> accumulateWeightedAsync(
InputArray src,
InputOutputArray dst,
double alpha, {
InputArray? mask,
}) async {
if (mask == null) {
return cvRunAsync0(
(callback) => cimgproc.cv_accumulatedWeighted(src.ref, dst.ref, alpha, callback),
Expand Down
2 changes: 1 addition & 1 deletion packages/dartcv/test/dnn/dnn_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void main() async {

test('cv.Net.fromTFLite', skip: true, () {
final model = cv.Net.fromTFLite("test/models/face_landmark.tflite");
print(model.getUnconnectedOutLayersNames());
expect(model.getUnconnectedOutLayersNames(), isNotEmpty);
checkTflite(model);
});

Expand Down

0 comments on commit 8c6822a

Please sign in to comment.