I've added a quick example to show where I am at. I would like to display the second image with the colors of the first one. Matteo On Thursday, January 28, 2016 at 9:14:32 AM UTC-7, Matteo wrote:
Can something like this (which by the way I can't get to work) be done using scikit-image?
http://stackoverflow.com/questions/3114925/pil-convert-rgb-image-to-a-specif...
I've done similar things in Matlab before:
https://mycarta.wordpress.com/2012/04/05/visualization-tips-for-geoscientist... but I'd really like to be able to do it in Python.
What I would like to do currently is: 1) Import an RGB image, which would have its own colormap - say this one for example:
https://upload.wikimedia.org/wikipedia/commons/b/b3/Jupiter_new_hubble_view_...
2) convert it to intensity, say like this:
intnst = 0.2989 * rgb[:,0] + 0.5870 * rgb[:,1] + 0.1140 * rgb[:,2] # get the intensityintensity = np.rint(intnst) # rounds up to nearest integer
3) display the intensity color-mapped to the same colours the original RGB had.
Any tips, ideally withrcode or pseudocode would be greatly appreciated.
Thanks, Matteo