Changing photo intensity without changes to color map
Show older comments
Just curious is it possible to change intensity/brightness without making changes to the color map itself?
Answers (2)
try "brighten":
subplot(121);
I = imread("pout.tif");
imshow(I);
subplot(122)
J = imadjust(I, [0.3 0.7]);
imshow(J)
1 Comment
adrian leung
on 13 Dec 2021
Image Analyst
on 13 Dec 2021
0 votes
Sure. For a gray scale image you can change it in a variety of ways like adding, subtracting, dividing, using imdjust(), adapthisteq(), etc. Gray scale images don't really have a colormap. When you do that, you're changing the image itself.
Indexed images have a colormap. If you change the image, the values will be different and will now be using a different color from the colormap. So you don't really normally want to do that. You could change the colormap itself, or you could use caxis() to zoom in on a particular part of the colormap and apply just that part. Changing the colormap on an indexed image only changes it's displayed appearance. The image itself does not change - only the colormap.
Categories
Find more on Blue in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!