Taking a screenshot after loading gamma table

Hello,

  I'm trying to take a screenshot of my stimuli after applying a gamma table using LoadNormalizedGammaTable. GetImage works fine, but the image it outputs doesn't look right, i.e. it looks the way it would look if I hadn't applied a gamma table at all. It seems like this must be a common problem, but I didn't see it addressed in the "Screenshots or Recordings" FAQ. I've attached a sample script in case it isn't clear what I mean. I would appreciate any help or insight you can provide.


John Erik Vanston

Department of Psychology

University of Nevada, Reno

The screenshot you take is from the display framebuffer, but the hardware gamma tables affect the video signal on the way from the framebuffer to the video outputs, so they won't affect anything but the video signal that actually leaves your computer.

You can either manually apply those gamma tables to the Matlab image matrix you got from 'GetImage'.

Or you don't use the hardware gamma tables (ie. run LoadIdentityClut to set them to an identity mapping), but instead gamma correction via our image processing pipeline. That will preprocess/gamma correct the image before it ends in the framebuffer. The downside is slightly higher processing overhead, and only 8 bits per color correction output accuracy, unless you use a high precision framebuffer mode on suitable operating systems and graphics cards. However, on standard 8 bpc digital panels that doesn't matter. BitsPlusCSFDemo.m and AdditiveBlendingForLinearSuperpositionTutorial.m  demonstrate use of that gamma correction method. BitsPlusCSFDemo.m even has a doScreenShot variable you can set. See the help for PsychColorCorrection for the different ways to do gamma and color correction this way.

best,
-mario