Modified meanColor() function to take in user specified colorspace.
If no argument is given , meanColor() returns the result in (B,G,R) format
as before