Interface FitnessFunction<E,​I>

  • Type Parameters:
    E - Type of Elements in features of the feature
    I - Type of Image wrapped by ImageWrapper
    All Known Implementing Classes:
    OpenCVFitnessFunction

    public interface FitnessFunction<E,​I>

    This interface provides metrics for example `SumOfSquareDifferences` to compute the similarity of two images.

    Since:
    1.0
    Author:
    Christoph Praschl
    • Method Detail

      • getFitness

        double getFitness​(ImageWrapper<I> a,
                          ImageWrapper<I> b,
                          RGBColor dataToIgnore)
        This function is used to calculate similarity of two images
        Parameters:
        a - The image which should be compared with b.
        b - The image which is used for comparison.
        dataToIgnore - Data which should be ignored fo fitness calculation (e.g. Background color of an image). Can be null. Then no data will be ignored.
        Returns:
        Returns a metrics representing the difference of a and b. (0 = no differences)
      • getFitness

        double getFitness​(ImageWrapper<I> a,
                          ImageWrapper<I> b)
        This function is used to calculate similarity of two images
        Parameters:
        a - The image which should be compared with b.
        b - The image which is used for comparison.
        Returns:
        Returns a metrics representing the difference of a and b. (0 = no differences)
      • getFitness

        double getFitness​(FeatureWrapper<E> a,
                          FeatureWrapper<E> b)
        This function is used to calculate similarity of two features.
        Parameters:
        a - The feature which should be compared with b.
        b - The feature which is used for comparison.
        Returns:
        Returns a metrics representing the difference of a and b. (0 = no differences)