# How can you brighten certain portions of an image while keeping the other portions with their respective original brightness?

2 views (last 30 days)
Alexandar on 1 Jul 2022
Commented: DGM on 4 Jul 2022
I am trying to increase the brightness of a brain atlas. I am trying to brighten the areas 17, 18, and 19 to be brighter than the other areas. I was given to problem to work on and the example given to me was: image(55,35) = 17. Then that pixel of (55,35) is the area of 17. But this does not make sense to me because how can you notice the difference in brightness of just one pixel out of the entire image (note that the atla I am working on is 91, 109, 91).

Image Analyst on 1 Jul 2022
I don't know which areas/regions in your image are labeled 17, 18, and 19. Are they certain regions of the brain comprised of thousands of pixels each?
Or are you talking about the intensity values?
Or does the image values somehow represent an area of something else?
It is possible to visually notice a difference of one gray level in an image under ideal conditions but it's very challending. Of course it's easy to get a difference of one gray level - a map of where the difference is more than 1 gray level but you have to define what your reference gray level is or where it comes from.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
Alexandar on 4 Jul 2022
@DGM How does (6,:) only target the orange triangle? Also, what does adding .2 do to it? Thank you again for your help in advance.
DGM on 4 Jul 2022
It doesn't target only the orange triangle. It targets all regions with the index 5. The orange triangle happens to be the only object of that color.
The color map looks like:
map =
0 0 0
0.1686 0.6824 0.7843
0.7333 0.7843 0.1686
0.7843 0.1686 0.5569
0.1686 0.7843 0.6706
0.7843 0.4471 0.1686
0.2039 0.1686 0.7843
0.5490 0.1686 0.7843
0.7843 0.2078 0.1686
0.2824 0.7843 0.1686
0.7843 0.1686 0.3647
0.4549 0.1686 0.7843
Since array indexing is 1-based and color indexing in indexed images is 0-based, a pixel with the color index 5 is filled with the sixth color from the color map.
Adding or subtracting a scalar value from a color is the most basic interpretation of "adjusting the brightness". I just picked an arbitrary amount. It doesn't have to be 0.2.

### Categories

Find more on Image Segmentation in Help Center and File Exchange

R2022a

### Community Treasure Hunt

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

Start Hunting!