Accord.Imaging.GrayLevelDifferenceMethod.max C# (CSharp) Method

max() private static method

private static max ( int width, int height, int offset, byte src ) : int
width int
height int
offset int
src byte
return int
        unsafe private static int max(int width, int height, int offset, byte* src)
        {
            int maxGray = 0;
            for (int y = 0; y < height; y++)
            {
                for (int x = 0; x < width; x++, src++)
                    if (*src > maxGray) maxGray = *src;
                src += offset;
            }

            return maxGray;
        }