Function to convert an RGB image to a grayscale image. Default behaviour is the same as MATLAB's (IP toolbox) RGB2GRAY, but MRGB2GRAY also has several other convertion schemes.
I think there's a bug with your program. The 'mean' and 'min' methods return the same values , which might be happening because you're using the 'min' function in the 'mean' method.
Just what i have been looking for :-)
A minor cleanup of the code - no functionality added or changed.