Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Simple question: Is there any built in function for images that acts similar to imagesc in matlab, i.e. take grayscale image scale it to use full [0,1] range and then use some kind of colorgradient to plot the image?

The one thing I use right now is to first use HistogramTransform to scale to full [0,1] range then obtain image data via ImageData and then use ArrayPlot with appropriate ColorFuntion:

ArrayPlot[image // HistogramTransform // ImageData, ColorFunction -> "TemperatureMap"]

Of course this works just fine, but I am curious if I overlooked some procedure operating directly on images.

share|improve this question
2  
Colorize does what you need? –  Kuba Aug 15 '13 at 12:50
2  
imagesc is like ImageAdjust –  bill s Aug 15 '13 at 13:29
    
Ok, thanks guys. For some reason I did not see that Colorize works directly with Images, too. So a combination of Colorize and ImageAdjust should do the job. –  Wizard Aug 15 '13 at 14:05

1 Answer 1

up vote 3 down vote accepted

As suggested in the comments ImageAdjust and Colorize is one way to go

img = ImageMultiply[ExampleData[{"TestImage", "Aerial"}], .1]
Colorize[ImageAdjust[img], ColorFunction -> "SunsetColors"]

Another way is to use the ImageApply and transform the colors with ColorData. On this occasion let me point out, that Blend can be used too (it's 4 characters shorter :-)

ImageApply[List @@ Blend["SunsetColors", #] &, ImageAdjust[img]]

Mathematica graphics

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.