Lecture 38 Image Processing II (2D and 3D plotting)

Report due Monday 4/16/18, Monday

In this lecture, you will use Matlab to process real microscopic fluorescent image data and count the number of positive droplets in the images.
If you were not in the lecture on Monday, watch the video and go through the slides to understand the background of this work.

This tutorial will go through the important 2D and 3D image processing commands/functions, prepare for the project on Friday.
2) Type the following command in your script to plot the image. Explain the code in your text, comment directly after the code, and put the code in the Appendix section.

You should get 3 figures pop up, add a title for each of the figrues and put them in your report. Put the code into your Appendix section.

The three figures looks like this:

The Z-axis in the 3D plot represents the intensity of the pixels.

3) Type the following code into your script file, add comments to the code and explain the code in your report. Compare the 3D plot you get this time to the 3D plot in 'Section 2)', explain the differences. Explain the code in your text, comment directly after the code, and put the code in the Appendix section.

You should see the following results. Add titles to the figures.

4) Separate the R, G, and B layers from the RGB image.
Type the following code in your script file and run the script. Explain the code in your text, comment directly after the code, and put the code in the Appendix section.

Note that, after being converted into gray scale images, the .png files still have 3 layers but the .jpeg files only have 1 layer.
You should see something like this:

Change the titles of your plots and put this figure into your report.

The 'green slice' has a high contrast, let's use the green sclice for further analysis. (the green slice has brighter positive droplets because the fluorescence here is green).
Type the following code in your script file, plot the intensity profile of the green slice. Exaplain the code in your report, comment

An example of the result is:

Let's use the similar way to set up the threshold intensity and show the threshold plane in the same figure:
Add a few lines to the previous code: Explain the code in your text, comment directly after the code, and put the code in the Appendix section.

The threshold plane (the black surface) will be plotted in the same figure:

Add the following code to the end to display the differences between the original intensity and the threshold

C=B-threshold;
figure(3)
mesh(X,Y,C);
xlabel('X-axis');
ylabel('Y-axis');
zlabel('Z-axis');
zlim([-20 20]);

Example of this result: Use the 'rotating tool' marked in the following figure to optimize the angle of the 3D plot.

5) What if the fluorescence of the positive droplets have different colors? (This is a very important 'multiplex' function of using different fluorescent dyes to mark different targets ).
Use the code you used for the previous examples to split the red, green, and blue slices of this figure.
You will probably get a result similar to the following figure:

You can select different RGB slices to detect different fluorescences. For example in the red slice, the positive droplet shows a higher intensity (closer to 255) compared to other droplets. The same concepts also work for the green and the blue slices.

Plot the 3D intensity profile for the three RGB slices individually.

Complete all the tasks and turn in a .doc file as your report (like an academic paper). You should have these sections: I. Introduction. II. Material and Methods. III. Results. IV. Discussion.
The figures should have a caption, your text should refer to the corresponding figure in the text. See my publications as examples on my website.