On Fri, May 17, 2013 at 12:15 PM, Brickle Macho <bricklemacho@gmail.com> wrote:
I porting a 8 line Matlab script.  

<snip> 

So what is the difference between converting an array to gray scale verse reading it in as grayscale?  Have I done something wrong?  Is there another way to convert a numpy array to grayscale?

Any help appreciated.

Michael.
--
 
Hi Michael,

They're just different color conversion factors. Based on http://www.mathworks.com/help/images/ref/rgb2gray.html, Matlab uses:
0.2989 R + 0.5870 G + 0.1140 B 

Based on the docstring for `color.rgb2gray`:
0.2125 R + 0.7154 G + 0.0721 B

Wikipedia (http://en.wikipedia.org/wiki/Grayscale) seems to suggest that Matlab's is an older standard while the one in scikit-image is a more recent spec.