How can i correct brightness of a monochrome image using arithmetic operations?
8 views (last 30 days)
Initially i started by following this link and everything went fine. Now, I can't make a function which takes the following as arguments:
- A monochrome image
- Brightness percentage
- A parameter which indicates the required correction(brighten, dark)
I was thinking if I should implement linear or non-linear operation on the image but don't know how.
How can that be done?
Image Analyst on 18 Nov 2018
Histogram equalization is lousy - don't use that. It's pretty much just a mathematical curiousity and should not be used in practice even though everyone says to use it, until they realize it's no good.
To adjust brightness, you can add an offset to the image, or you can multiply the image by some factor, or both multiply and add which is the most general situation. Depends on what you want to achieve. All of those methods change the contrast of the image as well as the brightness. You can't change one without the other.
DGM on 20 Jun 2022
For basic brightness/contrast controls, see this demo.
For other ways of adjusting "brightness", see:
The takeaway here is that 'brightness' and 'contrast' are not necessarily independent. Addition does not influence contrast unless clipping occurs. Multiplication without offset will simultaneously change brightness and contrast to the same degree. The aforementioned demo is similar to simple adjustment tools as found in image editors.