Fluorescent Imaging Overlay

From OpenWetWare
Jump to navigationJump to search

Back to documents


In response to several questions, here is the outline of an algorithm for overlaying your fluorescent image on top of the bright field image.

· Load the fluorescent onion image.

· Apply flat field correction.

· Adjust the contrast/histogram, if needed.

· Apply a global threshold to generate a mask. (useful function: im2bw)

· Multiply corrected fluorescent onion image by mask.

· Convert to a color image in RGB. (Example, for a red image: colorMaskedImage(:,:,1) = maskedImage; colorMaskedImage(:,:,2) = zeros(480,640); colorMaskedImage(:,:,3) = zeros(480,640);)

· Load the bright field onion image.

· Adjust contrast/histogram, if needed.

· Multiply by the complement of the mask (1 – mask).

· Convert to RGB grayscale image. (You can use the function im2RGB. There is a predefined color map called “gray” in Matlab.)

It is helpful to display the image after each step so you can debug any errors in your code.