Ejemplo n.º 1
0
    public RGBChannels ApplyComparison(Bitmap image1, Bitmap image2, CompareType type)
    {
        if (comparer == null)
        {
            comparer = Comparer.Instance();
        }
        RGBChannels channels = ConvertBitmapToRGBChannels(image1);
        RGBChannels output   = channels;

        switch (type)
        {
        case CompareType.MSEandPSNR:
            comparer.CalculateMSEandPSNR(image1, image2);
            break;

        case CompareType.DifferenceImage:
            output = comparer.CalcDifferenceImage(image1, image2);
            break;
        }
        return(output);
    }