User Tools

Site Tools


ledcolorimaging

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ledcolorimaging [2013/10/23 17:08]
kthorn
ledcolorimaging [2013/10/23 17:27]
kthorn
Line 15: Line 15:
 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. 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.
  
 +[[https://​github.com/​kthorn/​MatlabMM/​tree/​master|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 [[https://​github.com/​kthorn/​MatlabMM/​blob/​master/​RGB_process.m|here]];​ flatfielding is done in a [[https://​github.com/​kthorn/​MatlabMM/​blob/​master/​flatField.m|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 [[http://​en.wikipedia.org/​wiki/​Color_calibration|color calibration]] and [[http://​en.wikipedia.org/​wiki/​Color_balance|color balance]] - but we're working on it.
 +
 +You can see some examples of the results of this RGB imaging at the following links:
 +  * [[http://​nic.ucsf.edu/​blog/?​p=678#​more-678|A blog post I made about this process]]
 +  * [[http://​gigapan.com/​gigapans/​137537|A 2.3 gigapixel image of a spleen section]]
 +  * [[http://​gigapan.com/​gigapans/​141993|A 290 megapixel image of an ovary section]]
/var/www/html/dokuwiki/data/pages/ledcolorimaging.txt · Last modified: 2013/10/23 12:27 (external edit)