User Tools

Site Tools


ledcolorimaging

How to Acquire and Process Color Images on the High Speed Microscope

The high speed microscope uses an RGB LED to capture color images on a grayscale camera by taking three sequential images, with the red, green, and blue LEDs. This returns three grayscale images that then need to be calibrated and combined to produce a color image.

To acquire a color image on this system, follow the following steps.

  1. Set the brightness of the red, green, and blue LEDs with no sample present. Typically, you would use a relatively short exposure time, like 10-15 ms. Ideally you want the LEDs bright enough to use most of the dynamic range of the camera, but the camera should not have any saturated pixels.
  2. Set up your multidimensional acquisition. In the channels tab, select the brightfield - blue, brightfield - green, and brightfield - red channels, and the exposure time you were using above. The channel order does not matter but you must be consistent throughout.
  3. Put your sample on, focus, and acquire a three channel image. The color balance will be incorrect at this step; don't worry about it. Check to see that the image is reasonably bright and that there are no saturated pixels. If there are saturated pixels, go back and adjust the LED brightness.
  4. Take your sample off, and acquire flat-field correction images. These are just images with no sample present; we'll use these later to white balance the image and correct for non-uniform illumination. I typically do a 25 point timelapse (no delay) with all three channels so that I can average all 25 images together to reduce noise.
  5. Next, take a set of dark images. These are just images with no light going to the camera. I typically record these with the image directed to the eyepiece and take a 25 image timelapse in a single channel. This image will be used to subtract off the camera offset and set the black level in the image.
  6. Now, put your sample on and acquire your images. This could be a multiposition tiling set, a single image or a set of multiple images of different samples.
  7. Save all your data and proceed to the analysis.

To analyze this data, we need to do a few things. First, we need to calculate (I - Idark) / Iflat, where Idark and Iflat are the dark and flat-field images we recorded earlier. This will both correct for the camera offset and non-uniform illumination, and white balance your image such that an image that transmits equal amounts of red, green, and blue will show up as uniform gray. Then, we need to convert the individual grayscale images to a three-channel RGB image.

This matlab code does this. It makes several assumptions about the data structure, but should work with a little tweaking for most image files. The main code is here; flatfielding is done in a separate function.

However, this image analysis isn't complete - while it will white balance the images, it doesn't guarantee that the colors come out looking right. To do this we need to color calibrate the microscope. Unfortunately, this isn't a simple process - see for example, the wikipedia pages on color calibration and color balance - but we're working on it.

You can see some examples of the results of this RGB imaging at the following links:

/var/www/html/dokuwiki/data/pages/ledcolorimaging.txt · Last modified: 2013/10/23 12:27 (external edit)