Color imaging with RGB LEDs and a grayscale camera

As readers of this blog will know, we’ve been putting a lot of work into doing stitching of large numbers of brightfield images to acquire large fields of view. You will also have noticed that all the images I’ve shown so far were grayscale. That’s because we have a grayscale camera. However, many biological samples that people want to image are color. Rather than buy a color camera (and because color camera support in Micro-Manager is poor right now) we’ve instead tried using a red/green/blue (RGB) LED source from ScopeLED to generate color images. It works pretty well:ScopeLED_color

The ScopeLED illuminator is a pretty simple device – it bolts on to your brightfield illumination pillar and has arrays of red, green, and blue LEDs. You can turn these on and off separately to get monochrome illumination, or you can turn all three on at the same time to get white light. By varying the intensity of the three colors, you can change the color temperature of the light. Importantly, for our purposes, there is a Micro-Manager driver for it (although it leaves some things to be desired).

The ScopeLED illuminator.

To acquire color images with the ScopeLED, then, all we need to do is take three images in succession, one in each color. Overlaying them then gives us the RGB (color) image. There’s just one little problem, which is that we need to scale the brightness of the images appropriately so that white comes out white. This is known as white balancing, and there are a lot of ways to do it. Fortunately for us, the simplest thing I tried works well, which is to flat field each color channel using a flat-field image acquired for that channel and a global dark-field image. After this process, a point in the sample that didn’t absorb any light will have an intensity of (1,1,1) in the three channels, hence white. This process gives us both flat-fielded and white-balanced images.

Micro-Manager doesn’t yet have much support for color images, so I do this processing offline in Matlab. That’s how the image above was processed. I can post the code if it’s of interest to anyone. Now, we’re working on integrating this with stitching to get large color images of samples.

I think that as RGB LED illuminators become more common, this will become an increasingly common approach for capturing color images. It saves money (assuming you already have a camera you’re using for fluorescence). It also generally produces higher quality images, since the fluorescence cameras are generally better and you avoid using a Bayer mask and deBayering.

7 thoughts on “Color imaging with RGB LEDs and a grayscale camera

  1. Interesting way to get color from a mono camera. I was wondering if you have tried using a machine vision camera with a single CCD and turning the interpolation on and off in the camera as well?

  2. We have played around with a color camera with a Bayer mask (a Raptor Photonics Osprey) but it’s not clear to me how turning off the deBayering helps – each pixel still has a different wavelength response. Or maybe I’m misunderstanding your question?

  3. Nicely done,
    We have done a similar approach except using software to automatically trigger LEDs via TTL and reconstitute the RGB image in live preview.
    Coupling these LEDs with high resolution sCMOS cameras such as Hamamatsus Flash 4 LT makes for very nice images, albeit much more expensive then a standard colour camera.

    Technical Sales/Support
    Quorum Technologies

    • We have not tried using filters for RGB imaging. There isn’t a lot of demand in color brightfield work, so we haven’t pursued this much. However, it seems like the astronomy LRGB filters would probably work. If you do try this I’d be curious to hear your results.

  4. We are trying to to the same exact thing and have run into issues. Could you please post your white balancing Matlab code?

Comments are closed.