I have a pupillometry experiment with 2 image conditions. I want to measure image luminance so I can control for it in my lm to make sure any differences I find in pupil size depend solely on my image conditions and not their luminance variability.
I have tried to measure luminance by:
Loading images on GIMP and extracting the mean luminance histogram value (the linear, non-linear and perceptual options gave the same mean luminance values). These luminance values correlate with my pupil sizes in that larger luminance correlates with smaller pupil sizes (as expected).
However, I compared these values with a colleague who used photoshop and GIMP’s values seemed to be different (e.g. for a given image GIMP is 0.286 and photoshop 232.57), and I cannot work out what the differences are between the two measures. I also haven’t been able to find any information on the calculation of luminance on either GIMP nor photoshop.
I converted my images to grayscale on MATLAB and, for some reason my transparent background was read as a white background so I masked it out:
grayImage = im2gray(img);
% Masked out white background pixels
mask = grayImage < 250;
meanGrayLevels(i,1).values = mean(grayImage(mask));
These mean gray level values, however, do not correlate with my pupil sizes in the expected direction and give completely different results than GIMP.
Therefore, what is the best approach for measuring luminance values? What is the “gold standard” approach for vision research?
You cannot determine the luminance of stimuli within the confines of the computer. As it depends on your monitor settings and graphics settings. Comparing images between yours and a colleagues will differ based on the different monitor settings, or even ambient room lighting (dark vs dim vs bright).
In our lab for luminance and brightness measures (and all vision research that cares about it), we use a colorimeter/luminance measuring tool. Without it, you cannot have an objective measure of luminance within the context of the testing environment.
The issue with SHINE, based on my understanding, is that it only normalizes luminance within a single experiment/computer setup across variables. You would not be able to compare those values to those obtained in a different setup.
This is why it is important to report the physical characteristics of both the testing environment and the display setup, along with measurements obtained using a light meter. Ideally, researchers should report ambient illuminance, monitor calibration and settings, viewing distance, and the physical luminance produced by the stimuli. However, these details are often not reported.
Thanks. My experiment will likely involve presenting 3D images using Augmented Reality hence further complicating being able to measure the item’s luminance through the glass lense during experimental set up. I do have an external ambient light sensor. For this reason, I wanted to explore the broader option of measuring luminance on MATLAB or GIMP.
However, if anyone has any further suggestions, I’d be happy to hear them.
It is very tricky trying to measure PS in real-world or virtual type environments. In your situation. You also have participants moving closer and further away from the pictures? This is an added dimension.
I think you have the answer there. With an external ambient light sensor, just set it up in the same context, location, and distance as you would a participant. If there is a glass lense, then put that at the appropriate distance from the sensor.
There is way too many external variables to rely on internal measurements to obtain a meaningful measurement. You already see this via the interaction between pupil dilation and GIMP.
I should note, you should add in some level of control for cognitive load (processing 3D images in AR would constitute that I imagine), as that will have a large impact on pupil dilation that can override minor luminance effects. Or at least be aware that is a possible criticism a reviewer may have.