Monitor Gamma Calibration (manual and grayscale)
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yuval
am 12 Jun. 2025
Bearbeitet: Adam Danz
am 17 Jun. 2025
Hello everyone,
Would like your help with monitor gamma calibration:
- Does anybody have a script that helps doing gamma calibration manually with a photometer (grayscale, not colors), and creates a gamma table which can be used in experiments?
- I created a script with GPT, did a calibration with a photometer and got gamma value of 1.98. when I use the gamma table in my experiment, the the monitor seems much brighter and the stimuli are harder to distinct (it seems like the contrast decreased). Does it make sense?
Thanks in advance :)
2 Kommentare
Adam Danz
am 12 Jun. 2025
I have a few ideas that would explain the results you describe but rather than speculating, how are you using this gamma value?
Akzeptierte Antwort
Adam Danz
am 12 Jun. 2025
Bearbeitet: Adam Danz
am 12 Jun. 2025
I believe this describes your setup; please correct me if I'm wrong.
- You sent grayscale RGB values from MATLAB to your monitor. e.g. [.2 .2 .2]; [.7 .7 .7]; etc
- In a controlled dark room you used a photometer orthogonal to the monitor surface to measure the luminance of the monitor for each grayscale value.
- The relationship between the rgb inputs and outputs resulted in a gamma value of 1.98 which is within a reasonable range.
- You applied a gamma correction to the RGB inputs in MATLAB using a power of 1/1.98. This essentially linearlizes the relationship between the RGB values sent from MATLAB and intensity outputs of the monitor.
If that's the case, you could use the photometer with the gamma corrected RGB values to confirm a gamma value at or near 1.0. That would confirm that the RGB values are directly controlling pixel intensity.
Let's see what that looks like. Here's a grayscale image at baseline.
I=imread('pout.tif');
Idbl = double(I)./double(intmax(class(I))); % normalized values [0,1]
imshow(I)
And here's the linearized result.
Ilin = Idbl .^ (1/1.98);
imshow(Ilin)
If the calibration and gamma correction were applied correctly, and if the monitor doesn't have any unepxected settings etc, then the range of intensities in this image are linearlized meaning that there's a linear relationship between the grayscale inputs and the intensity measured by the photometer.
But why does it appear lighter?
Human vision applies it's own version of a gamma transformation to light intensities. Our vision is much more sensitive to lower intensities. An example of this nonlinearity: a room lit by two candles is brighter than a room lit by one candle but a room lit by 51 candles is not perceptually different from a room lit by 50 candles (but it would be different for a photometer). See also the Weber-Fechner law.
By applying the gamma correction (1/1.98) to the RGB values you are controling the physical luminance of the stimuli and linearlizing the relationship between the inputs (RGB values) and outputs (physical intensity) such that a change in grayscale values is proportional to the physical change in light intensity. This shifts intensities upward and negates the monitor's gamma transformation that we typically rely on to perceive the intended pixel intensities.
Does this match your setup? If so, after applying the gamma correction, use the photometer and calibration process again to confirm that your gamma value is ~1.0.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!