createAsync static method

Future<BackgroundSubtractorMOG2> createAsync({
  1. int history = 500,
  2. double varThreshold = 16,
  3. bool detectShadows = true,
})

Implementation

static Future<BackgroundSubtractorMOG2> createAsync({
  int history = 500,
  double varThreshold = 16,
  bool detectShadows = true,
}) async =>
    cvRunAsync(
      (callback) => cffi.BackgroundSubtractorMOG2_CreateWithParams_Async(
        history,
        varThreshold,
        detectShadows,
        callback,
      ),
      (c, p) => c.complete(BackgroundSubtractorMOG2(p.cast<cvg.BackgroundSubtractorMOG2>())),
    );