Example #1
0
        public static float EqualPixelRatio(ImageMatrix lhs, ImageMatrix rhs)
        {
            int eq = 0;

            for (int x = 0; x < lhs.Width; ++x)
            {
                for (int y = 0; y < lhs.Height; ++y)
                {
                    if (!(rhs.Get(x, y) ^ lhs.Get(x, y)))
                    {
                        eq++;
                    }
                }
            }
            return((float)eq / (lhs.Width * lhs.Height));
        }