how to create a colormap to represent an image with negative pixels

Hello,
After some operations on two images I1 and I2 , you create a third image M such that M=(I1-I2/(I1+I2). M would contain negative pixels and positive pixels with values ranging between -1 to 1. How one could create a colormap that represent these pixel values in colors?
Thank you!

 Réponse acceptée

Image Analyst
Image Analyst le 24 Juil 2014
Use colormap() and colorbar(). Use caxis() to specify what numerical values correspond to the ends of the colorbar.

Plus de réponses (0)

Catégories

En savoir plus sur Color and Styling dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by