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<cvideo.BackgroundSubtractorMOG2>();
  cvRun(
    () => cvideo.BackgroundSubtractorMOG2_CreateWithParams(
      history,
      varThreshold,
      detectShadows,
      p,
    ),
  );
  return BackgroundSubtractorMOG2(p);
}