Hello, I am looking to convert an image saved with the jet colormap to grayscale. I tried to play a bit with the color module of skimage, but for the moment I couldn't manage to to map the jet colormap to linearly go from dark to light shades of gray. The main problem when applying a basic rgb2gray conversion is that the min/max values (blue and red) converge to the same dark value in the grayscale image, while the mid-range values (yellow/green) become the brightest. Do someone has any trick to convert a "jet image" to grayscale? Thanks a lot Guillaume PS: I have attached a picture as an example if you're willing to play with it ;)
Hi,
this might be a way to achieve this:
1. create jet colormap
2. convert color map to HSV-space and sort according to hue
3. use sorted jet color map as lookup table / colormap for image
I hope this helps.
Johannes Schönberger
Am 23.11.2012 um 05:08 schrieb Guillaume CALMETTES
Hello,
I am looking to convert an image saved with the jet colormap to grayscale. I tried to play a bit with the color module of skimage, but for the moment I couldn't manage to to map the jet colormap to linearly go from dark to light shades of gray. The main problem when applying a basic rgb2gray conversion is that the min/max values (blue and red) converge to the same dark value in the grayscale image, while the mid-range values (yellow/green) become the brightest.
Do someone has any trick to convert a "jet image" to grayscale?
Thanks a lot
Guillaume
PS: I have attached a picture as an example if you're willing to play with it ;)
--
Hi Johannes,
Thanks, I'll try!
Guillaume
On Nov 23, 2012, at 9:39 AM, Schönberger Johannes
Hi,
this might be a way to achieve this:
1. create jet colormap 2. convert color map to HSV-space and sort according to hue 3. use sorted jet color map as lookup table / colormap for image
I hope this helps.
Johannes Schönberger
Am 23.11.2012 um 05:08 schrieb Guillaume CALMETTES
: Hello,
I am looking to convert an image saved with the jet colormap to grayscale. I tried to play a bit with the color module of skimage, but for the moment I couldn't manage to to map the jet colormap to linearly go from dark to light shades of gray. The main problem when applying a basic rgb2gray conversion is that the min/max values (blue and red) converge to the same dark value in the grayscale image, while the mid-range values (yellow/green) become the brightest.
Do someone has any trick to convert a "jet image" to grayscale?
Thanks a lot
Guillaume
PS: I have attached a picture as an example if you're willing to play with it ;)
--
--
Hi Guillaume
On Thu, Nov 22, 2012 at 8:08 PM, Guillaume CALMETTES
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
participants (3)
-
Guillaume CALMETTES
-
Schönberger Johannes
-
Stéfan van der Walt