colormap() not working in 2016b
Mostra commenti meno recenti
I have the following output:

but I want it to be as shown below:

if someone provides me with the code for this it will be a great help.
Thanks in advance.
Risposte (1)
Von Duesenberg
il 10 Giu 2018
I = imread('cameraman.tif');
imshow(I)
colormap jet
6 Commenti
DEVESH DANGI
il 10 Giu 2018
Walter Roberson
il 10 Giu 2018
I = imread('cameraman.tif');
imagesc(I)
colormap jet
In R2016b there was still only one colormap per figure instead of one for each axes. If you need to have different colormaps for each axes in those older versions, the easiest way is usually to use the File Exchange contribution freezeColors()
Von Duesenberg
il 10 Giu 2018
Sorry, I overlooked the info about your Matlab version...
Walter Roberson
il 10 Giu 2018
imshow acts kinda strangely in that release; I do not understand yet how it manages to stay black and white after the colormap call.
DEVESH DANGI
il 11 Giu 2018
Modificato: DEVESH DANGI
il 11 Giu 2018
Walter Roberson
il 11 Giu 2018
The code I provided earlier with imagesc() appears to return that upper left picture. I do not have the data for the lower right pictures, and your two lower right pictures appear to be different original images
There are a number of books about digital image processing, which is a common university course. I do not have any to recommend myself, but the Gonzalez and Woods book is considered a classic; https://books.google.ca/books/about/Digital_Image_Processing.html?id=MaYuAAAAQBAJ&source=kp_cover&redir_esc=y
Categorie
Scopri di più su Blue in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!