compute method

  1. @override
double compute(
  1. Image image
)
override

Implementation

@override
double compute(img.Image image) {
  double lbpSum = 0;
  final width = image.width;
  final height = image.height;

  for (int y = 1; y < height - 1; y++) {
    for (int x = 1; x < width - 1; x++) {
      double lbpValue = _calculateLBP(image, x, y);
      lbpSum += lbpValue;
    }
  }

  return lbpSum / ((width - 2) * (height - 2));
}