BackgroundSubtractorMOG2.create constructor

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

Implementation

factory BackgroundSubtractorMOG2.create({
  int history = 500,
  double varThreshold = 16,
  bool detectShadows = true,
}) {
  final p = calloc<cvg.BackgroundSubtractorMOG2>();
  cvRun(
    () => cffi.BackgroundSubtractorMOG2_CreateWithParams(
      history,
      varThreshold,
      detectShadows,
      p,
    ),
  );
  return BackgroundSubtractorMOG2(p);
}