SimpleBlobDetectorParams constructor

SimpleBlobDetectorParams({
  1. int? blobColor,
  2. bool? filterByArea,
  3. bool? filterByCircularity,
  4. bool? filterByColor,
  5. bool? filterByConvexity,
  6. bool? filterByInertia,
  7. double? maxArea,
  8. double? maxCircularity,
  9. double? maxConvexity,
  10. double? maxInertiaRatio,
  11. double? maxThreshold,
  12. double? minArea,
  13. double? minCircularity,
  14. double? minConvexity,
  15. double? minDistBetweenBlobs,
  16. double? minInertiaRatio,
  17. int? minRepeatability,
  18. double? minThreshold,
  19. double? thresholdStep,
})

Implementation

factory SimpleBlobDetectorParams({
  int? blobColor,
  bool? filterByArea,
  bool? filterByCircularity,
  bool? filterByColor,
  bool? filterByConvexity,
  bool? filterByInertia,
  double? maxArea,
  double? maxCircularity,
  double? maxConvexity,
  double? maxInertiaRatio,
  double? maxThreshold,
  double? minArea,
  double? minCircularity,
  double? minConvexity,
  double? minDistBetweenBlobs,
  double? minInertiaRatio,
  int? minRepeatability,
  double? minThreshold,
  double? thresholdStep,
}) {
  final p = calloc<cvg.SimpleBlobDetectorParams>();
  if (blobColor != null) p.ref.blobColor = blobColor;
  if (filterByArea != null) p.ref.filterByArea = filterByArea;
  if (filterByCircularity != null) {
    p.ref.filterByCircularity = filterByCircularity;
  }
  if (filterByColor != null) p.ref.filterByColor = filterByColor;
  if (filterByConvexity != null) p.ref.filterByConvexity = filterByConvexity;
  if (filterByInertia != null) p.ref.filterByInertia = filterByInertia;
  if (maxArea != null) p.ref.maxArea = maxArea;
  if (maxCircularity != null) p.ref.maxCircularity = maxCircularity;
  if (maxConvexity != null) p.ref.maxConvexity = maxConvexity;
  if (maxInertiaRatio != null) p.ref.maxInertiaRatio = maxInertiaRatio;
  if (maxThreshold != null) p.ref.maxThreshold = maxThreshold;
  if (minArea != null) p.ref.minArea = minArea;
  if (minCircularity != null) p.ref.minCircularity = minCircularity;
  if (minConvexity != null) p.ref.minConvexity = minConvexity;
  if (minDistBetweenBlobs != null) {
    p.ref.minDistBetweenBlobs = minDistBetweenBlobs;
  }
  if (minInertiaRatio != null) p.ref.minInertiaRatio = minInertiaRatio;
  if (minRepeatability != null) p.ref.minRepeatability = minRepeatability;
  if (minThreshold != null) p.ref.minThreshold = minThreshold;
  if (thresholdStep != null) p.ref.thresholdStep = thresholdStep;

  return SimpleBlobDetectorParams._(p);
}