Contrast vs brightness vs gamma
Afficher commentaires plus anciens
Please help, somebody in here can explain about picture i sent

2 commentaires
Rik
le 13 Déc 2019
What exactly is your question? It also doesn't look like a Matlab question to me.
Nayuta Altria
le 13 Déc 2019
Réponse acceptée
Plus de réponses (1)
DGM
le 23 Mar 2022
0 votes
Regarding visualization, I find that it's helpful to use flat-shaded contour maps to represent the shift in values. At least I find it more intuitive than a set of line plots, given that the contour map is essentially a test image itself.
It's worth noting that different tools implement these adjustments differently. The nature of the parameters is often limited by a need to make them controllable via GUI sliders with finite extents. Consider a basic brightness-contrast-gamma adjustment scheme similar to that described in the question. Herein, brightness and contrast controls have a range of [-1 1], whereas gamma ranges from [0 Inf]. As the contour plots indicate, the null condition occurs when these three parameters are [0 0 1].


Note that brightness is purely additive; unless truncation occurs in a region of interest, local contrast is preserved. On the other hand, contrast changes slope with a midpoint pivot; local contrast is directly altered, but the global mean doesn't shift. Gamma shifts the distribution up or down without moving the endpoints of the curve, meaning black and white don't change.
Again, implementations vary. Consider as an example, the Brightness & Contrast adjustment tool used by GIMP. In this implementation, contrast behaves the same as above, but brightness is a piecewise function:

While this avoids the truncation of image values, it also means that the brightness control is also a contrast control. Raising or lowering brightness reduces both local and global contrast. In my opinion, it makes the tool confusing to use -- but it's an extant convention in a particular context.
Attached is a simple demo that allows the user to explore these behaviors.
Catégories
En savoir plus sur Gamma Functions dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!