Interface ImageCalculator.Operation

Enclosing class:
ImageCalculator

public static interface ImageCalculator.Operation
General interface for defining an operation that combines the values of two pixels to create a new one. Contains also static instances corresponding to classical operations.
Author:
David Legland
  • Field Details

  • Method Details

    • applyTo

      int applyTo​(int v1, int v2)
      The method to override to make it possible to use an operation.
      Parameters:
      v1 - value of pixel in first image
      v2 - value of pixel in second image
      Returns:
      the result of the combination of the two pixel values
    • applyTo

      float applyTo​(float v1, float v2)
      The method to override to make it possible to use an operation.
      Parameters:
      v1 - value of pixel in first image
      v2 - value of pixel in second image
      Returns:
      the result of the combination of the two pixel values