Using Auto Contrast in Volocity

I’ve had a lot of questions recently concerning the “auto-contrast” feature of Volocity Acquisition. So I thought I would put down some information here to refer people to in the future. Essentially the auto-contrast allows you to image very faint signals and still see them with relatively short exposure times. This can be useful in live cell imaging experiments, to keep the cells alive. Importantly, whether the auto-contrast is on or off doesn’t affect the pixel values that are saved as your image. That means that the qauntitative relationships among your pixels is valid regardless of the auto-contrast setting when the image was taken. With fixed cell imaging, you almost always want to maximise your pixel intensities (i.e. bright areas in your image should be close to the upper detection limit of your camera, which on our spinning disk systems, is 65,535). In this case, changing the auto-contrast will not change how your image looks on the screen – see below for an explanation.

The auto-contrast tickbox can be ticked to activate the auto-contrast feature, or unticked to deactivate this feature. Before I can explain the difference between these two settings, I have to explain a little about 8-bit images versus 16-bit images. A single image can be said to be an “8-bit” image if the intensity values in the image range from 0 (black) to 255 (white). There are 256 values in this range and that is equal to 28, hence the “8-bit” name. Similarly, an image is 16-bit if its values range from 0-65,535 (65536 values, 216). Again, whether your image is 8 or 16 bit doesn’t really matter, it’s the same image and has the same brightness. The only difference is how it’s measured. In one case we divide the difference between black and white up into 256 gradations (8-bit) and in the other, we divide the same absolute brightness difference into 65,535 gradations. In essence, we get smoother transitions between brightness values in the 16-bit case. You can imagine that you are measuring your signal from each pixel in a graduated cylinder and the number of graduations on the cylinder tells you whether you can record your intensity values as 8-bit (in this case you’ll have 255 graduation marks on your cylinder, and they’ll be relatively far apart) or 16-bit (here you’ll have 65,535 marks and they’ll be close together). In each case, because the cylinder is the same size,  your measurement is the same, but you are recording it with different units.

OK, now to the specific case of what the auto-contrast does for you on our spinning disk system. Both of our spinning disk systems have cameras which can record your fluorescence signal with 16-bit precision. That means, of course, that the values in your image have the potential to vary from 0 (black) to 65,535 (white). The key word in that last sentence was “potential”. Imagine that you have are looking at DAPI stained nuclei where the dark areas of your image have an approximate value of 1800, while the nucleus, where the signal is the brightest, has an approximate value of 10,000. In this case, the maximum value is lower than our maximum possible value (fixed by the camera at 65,535) due to acquisition parameters (exposure time, excitation laser power, and camera sensitivity, a.k.a. EM gain) used to capture the image. To optimise this image, you should change one or more of the acquisition parameters so that the value of the pixels in the nucleus is much closer to 65,535. How close? A good rule of thumb is to use at least 75 to 80% of the camera’s dynamic range. In this case, then you would increase the exposure time, laser power and EMCCD gain (aka camera sensitivity) so that the pixel values in the nucleus (because that’s the brightest area of your image) are around 50,000. If you check the areas in your image where there is no signal, the values will have increased as well, but not as much as the areas where there is signal, so the ratio between the signal and the background will be higher in the second case. You will have moved your signal further away from your background (in terms of intensity levels). You may also notice that your image, as displayed on the screen, hasn’t really changed. That’s because computer monitors are only 8-bit devices – whether your image is 8-bit or 16-bit, each pixel on the screen is only capable of displaying intensity values between 0 and 255 and this is why there is an auto-contrast feature (in truth, each pixel can display these 256 values for each of the three primary colours, and this is how we get 24-bit colour images, but that’s a different topic).

This is where the auto-contrast comes in to play. Somehow the computer display has to show us our image, but our image has 65,536 possible values, so how does the software deal with converting the 65,535 possible intensity values in our image to display them on a monitor that can only show 256 values? The auto-contrast changes way in which the software maps the 16-bit image information onto the 8-bit monitor. In the case where the auto-contrast is off, all 65,535 possible values are represented on the screen. Any pixel in your image with values from 0-255 will become 0 when displayed, and any that have values from 256-511 will be displayed with an intensity of 1 on the monitor. And so on, all the way up until pixels with intensity values from 65,279-65,535 will appear as 255 on the screen. Each group of 256 intensity values in your 16-bit image is displayed as a single one of the 256 intesity values possible on the monitor. Now compare this to the case when the auto-contrast is on. In this case, the software looks at the values in your image before it displays them and uses that information to decide how to map the 16-bit information of your image onto the 8-bit display. Volocity identifies both the brightest and darkest pixel in your image. It uses only the range between the brightest and darkest pixels to map onto the 8-bit screen. In the situation described earlier, where we were imaging a DAPI stained nucleus, before we had optimised the intensity in the image, let’s imagine that we had a minimum pixel value of 1696 somewhere in the image and a maximum intensity value of 10,345. For this image, then, if the auto-cotnrast feature is off, the pixel with the lowest value gets displayed at a value of 7 (1696/256) and the pixel with the highest value is displayed at a value of 40 (10,345/256). All intensity values higher than 40 are unused. Because of this, the image apears “faint” with very little contrast. But if the auto-contrast is on, then the pixel with the value of 1696 is displayed as black on the screen (value =0) and the brightest pixel, the one at 10,345 is displayed as if it had a value of 255. Now the entire range of screen display intensities are utilised, and your image appears “bright”, and has high contrasst. Note that your image hasn’t changed, it still has the same intensity values for the all pixels. Now contrast this to the what happens when we view the optimised image described above, where we can imagine that the image has a minimum pixel value of 2354 and a maximum pixel value of 52,313. In this case when auto-contrast is off, the dark pixel will have a screen display value of 9 (2354/256) and the bright pixel will be displayed at 204 (52313/256) and when it’s on, the values will be 0 and 255 respectively. There is much less of a difference in the “on screen brightness” of your image between the auto-contrast off and on cases in this situation.

Auto-contrast can help you when you have a signal that’s not very different from the background. There are two classic cases of this. First, when your cells are alive, you cannot afford to excite them with enough light to maximise the difference between the background and the signal. If you did, your cells would be dead. So you must limit the exposure time and/or the laser power to maintain cellular viability. Typically in this case you would have maybe about 2000 counts as background, and 3000 or 4000 counts as signal (notice we’re not using any of the values in the image between 4001 and 65,535). This is the perfect time to use auto-contrast. You can still see the fluorescence signal, even though it’s weak, because of the way Volocity converts the 16-bit image to the 8-bit display. Another case when auto-contrast comes in handy, is when you’re dealing with a signal that photobleaches rapidly. Again, you must protect your signal from excitation (either by lowering the laser power or the exposure time) to prevent signal loss. You can use the auto-contrast feature to see the fluorescence, even though you must maintain it at very low levels. When I’m imaging I usually have the auto-contrast feature on when I first start. I start with low laser power and low exposure times (~80msec). I have no idea what the relative brightness of my sample will be and so the auto-contrast allows me to see something even if it’s faint. Then after I’ve used the “Voxel Spy” to interrogate my image and get an idea of what the intensity values are in the background areas and in the signal areas, I increase the laser power or exposure time until my image has areas in it that are near the 65,535 end of the dynamic range and turn off the auto-contrast.

As always, every sample will behave differently and your experience with the auto-contrast may be different than mine. I hope that this explanation goes some way towards dispelling the myth about auto-contrast.