Jet colormap to grayscale

Guillaume CALMETTES guillaume.calmettes at gmail.com
Sun Nov 25 23:37:54 EST 2012


Hi Stefan,

Works perfectly.

However, I'm not sure why but I had to initialize the jet colormap object to create the _lut array.

I replaced:
lut = plt.cm.jet._lut[..., :3]

By:
jet = plt.cm.jet
jet._init()
lut = jet._lut[..., :3]

Thanks a lot.

Guillaume

On Nov 25, 2012, at 8:25 PM, Stéfan van der Walt <stefan at sun.ac.za> wrote:

> Hi Guillaume
> 
> On Thu, Nov 22, 2012 at 8:08 PM, Guillaume CALMETTES
> <guillaume.calmettes at gmail.com> wrote:
>> Do someone has any trick to convert a "jet image" to grayscale?
> 
> Here's a snippet that does it by brute force lookup:
> 
> https://gist.github.com/4146612
> 
> Hope that helps!
> Stéfan
> 
> -- 
> 
> 




More information about the scikit-image mailing list