50
Introduction to Molecular Biology Techniques Workshop 15C Image Analysis Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page 2 Instructions for the densitometric analysis of 1-D gels using ImageJ Fundamentals of densitometry page 3 What is ImageJ? page 7 Before We Analyze page 7 How to Use ImageJ for Densitometric Analysis of 1-D Gels page 11 Appendix A: Internal Standard page 22 Appendix B: Uncalibrated Standard page 23 Appendix C: External Standard page 24 Appendix D: Curve Fit page 26 Instructions for particle counting and analysis using ImageJ page 27

Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Introduction to Molecular Biology Techniques Workshop 15C Image Analysis

Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page 2 Instructions for the densitometric analysis of 1-D gels using ImageJ

Fundamentals of densitometry page 3 What is ImageJ? page 7 Before We Analyze page 7 How to Use ImageJ for Densitometric Analysis of 1-D Gels page 11 Appendix A: Internal Standard page 22 Appendix B: Uncalibrated Standard page 23 Appendix C: External Standard page 24 Appendix D: Curve Fit page 26

Instructions for particle counting and analysis using ImageJ page 27

Page 2: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page
Page 3: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

1

Workshop 15C: Image Analysis

Part I: Image basics, densitometry, and image analysis

Instructors: Margie Carter, Joel Nott, 119 Molecular Biology Building. Phone: 294-1011, e-mail: [email protected]

Introduction This workshop will serve as an introduction to some of the many available image analysis techniques and equipment. With image input devices such as flatbed scanners, slide scanners and digital cameras, images can be input into a computer from almost any source (microscopic slides, gels, 35mm slides and negatives, video tape, photographs, etc.) and digitized. Once these images have been digitized, they may be manipulated and enhanced on the computer. The images may also be labeled and incorporated into posters, presentations, and papers, or sent directly to computer publishing or a slide printer. The images can also be copied many times without any loss of image quality. Image Basics A scanned digital image is made up of a square or rectangular bitmap (or matrix) of touching small squares called pixels. Each of these pixels stores a value that most closely represents the original image. This value can be either solid black, white, different gray tones, or color. This is called the palette color of the pixel. To obtain a digital image that is an accurate representation of the original image, a large palette (many different colors or shades of grey available) should be used. In general, the larger the palette, the more accurate a representation the digital image is of the original image. Each digital image has four basic characteristics: • Resolution--the number of samples or readings recorded in a given distance. Resolution is

usually specified in pixels per inch (ppi). The physical size of the pixels in the image will change according to resolution.

• Dimensions--the size of the image in inches, centimeters, or pixels. Physical size can easily be determined from the resolution and pixel size. If an image is 600 ppi and the width and height are 600 pixels, the physical size is 1 inch (600 pixels/600 ppi). If the resolution is decreased to 300 ppi, the physical size doubles to 2 inches (600 pixels/300 ppi). Notice the number of pixels in the image has not changed, but the pixel size is now 4 times as big (double the height and width).

• Bit depth (pixel depth)--this defines the number of tones or colors every pixel in a bitmap is allowed to have. If an image has a bit depth of 1, only black and white can be represented (called a bilevel or flat bitmap). A bit depth of 2 allows black, white and two grey tones (four levels). Eight bit images can have 256 (28) different grey levels which provides a sufficient amount of levels to represent smooth gradation from black to white.

• Color model--to record colored pixels, information about the tone is required for each individual color channel. RGB (red, green, blue) images usually use 24 bit depth (8 bits for each color) allowing over 16 million different colors to be described. A CMYK (cyan, magenta, yellow, black) image requires a 32-bit depth (8 bits for each color).

Page 4: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

2

All four of these characteristics affect the file size of the digital image (the amount of disk space required to store the image). The greater the resolution and bit depth the greater the file size will be. For example a 24-bit RGB image will require 24 times as much disk space as a 1-bit image. If an image's resolution is doubled, the file size will increase by a factor of four (since there are twice the number of pixels in width and height). Output Basics Once an image has been digitized, enhanced and labeled, it may be desirable to print out the image. Basically this involves the conversion of the pixels in the digital image into printing pigments. The scanning resolution of a digital image is determined by the number of pixels per inch (ppi) that are recorded. An output device such as a laser printer, will produce a hard copy of the digital image information. This may be done either by applying small dots of pigment to a substrate such as paper (e.g. ink jet prints), or by using an intermittent light source to expose dots in a light-sensitive emulsion. The resolution of an output device is measured in dots per inch (dpi). Since in most cases the scanning resolution and the output resolution are not the same, the bitmapped image needs to be sampled to produce a new output grid. A common method of outputting an 8-bit greyscale image is to produce a grid or raster of varying size dots known as a halftone screen. These halftone dots and the white substrate will merge to create the different grey values in the image. The larger the halftone dot, the darker the tone will become. The distance between these halftone dots is expressed in lines per inch (lpi) and is called screen frequency or screen ruling. Most printers output a set spot size. To overcome this, varying numbers of spots can be grouped together to produce larger halftone dots. To produce a greyscale print with smooth tonal graduations, a minimum of 64 grey levels are required. This would mean that each halftone dot must be made up of at least 64 spots (an 8 x 8 matrix of spots). If the printer is a 400-dpi laser printer, a screen ruling of 50 lpi is the maximum that will allow an 8 x 8 matrix (400 dpi/8 spots = 50 lpi). If a screen ruling of 100 lpi is used, the number of grey levels will be reduced to 16 (100 lpi = 400 dpi/4 spots, 4 x 4 matrix = 16 grey levels). Basically, the maximum resolution of a halftone printer limits the clarity and the number of grey levels that can be produced from the digitized image. Color images can be printed by creating a separate halftone screen for each of the primary pigment colors. Resolutions up to 5000 dpi can be achieved by using photographic methods of image reproduction (such as a film recorder) rather than the halftone reproduction method. Some general rules for resolution are listed below: • Greyscale resolution: Conventional halftone printing Scan resolution = screen ruling X quality factor (qf) X sizing factor qf = 2 if screen ruling < 133 lpi qf > 1.5 if screen ruling > 133 lpi Sizing factor = desired size/original size • Color resolution Conventional halftone printing Scan resolution = screen ruling X quality factor (qf) X sizing factor qf = 2 if screen ruling < 133 lpi qf > 1.5 if screen ruling > 133 lpi

Page 5: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

3

Sizing factor = desired size/original size This section will serve as an introduction to the program ImageJ and its use in the densitometric analysis of 1-D electrophoretic gels. Fundamentals of densitometry It is possible to use a scaling system for pixels, which has a one to one correspondence to the concentration of what you are studying. Sample concentrations can be determined using optical, electronic, and most importantly for our purposes, a computer based imaging technique. Densitometric science was described originally by Bouguer and Lambert who described loss of radiation (or light) in passing through a medium. Later, Beer found that the radiation loss in a media was a function of the substance's molarity or concentration. According to Beer's law, concentration is proportional to optical density (OD). The logarithmic optical density scale, and net integral of density values for an object in an image is the proper measure for use in quantitation. By Beer's law, the density of a point is the log ratio of incident light upon it and transmitted light through it.

OD = Log10 (Io / I) There are several standard methods used to find the density of an object or a point on an image. Scanning densitometers have controlled or known illumination levels, then measure transmitted light through an object such as a photographic negative. Since both the incident and transmitted light are known quantities, the device can then compute this ratio directly. This is also the case of those who use a flat field imaging technique and capture two separate images. The first image is of an empty light box and the second is of the specimen to be evaluated. These two can then be used in computing a log ratio. In the case of a video camera/frame grabber combination, using a non flat field technique, several things are of note. With a camera, you do not measure OD values directly. The camera and frame grabber pixel values are linear with respect to Transmission (T), which is the anti-log of the negative of OD:

T = 10-OD

or:

OD = -log10 (T) = log10 (1 / T) Since this is often a source of confusion among those designing systems for densitometry you should again note that the camera does not measure T, nor does it measure OD. Camera systems, CCD's, and any frame grabber conversion values (pixel values) have been designed so that they are linear with respect to T. It isn't meaningful to take the minus log of the pixel value since these are not T values. Nevertheless, you want to do densitometry and need a scale (not pixel values) which correlates to concentration or OD. Further, it may not be convenient to measure the incident light and do a log ratio. Fortunately, you can use an external standard, such as an OD step tablet or a set of protein

Page 6: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

4

standards on a gel. NIH Image has the built in "Calibrate... " command to allow you to transform pixel values directly from a scale which is linear with respect to T and into a scale which correlates to OD or concentration. The calibrate command, used with standards, is best done with an exponential, rodbard or other fit since the relationship of OD to T is not a simple linear (y=mx+b) relationship (see equation above) and because the camera may not be perfectly linear with respect to T over the range of density values you use as standards. In other words you have both created a LUT of OD values for each linear to T pixel value and you help compensate for slight nonlinearities of the camera. A sample calibration curve fit:

There are several other points of note which you should adhere to in performing your densitometric analysis. Your standards should always exceed the range of data which you want to image and perform density measurements on. You should not use curve fit data (or the pixel values) which extend beyond the last, or before the first calibration point. Additionally, there is a point at which the camera can no longer produce meaningful output when additional light is input (saturation). You could also have a low light level condition where the camera or CCD can not produce a measurable output (under-exposure). You will notice that these data points do not fit well into an end of the curve, or could basically ruin the fit of the data. You should remove these points from your calibration data and not use the density values for these pixels in your measurements.

Page 7: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

5

The graph above may help in understanding the relationships involved in densitometric imaging. Along the top we see that transmission and pixel intensity are linearly related. However there is, in reality, a slight non linearity involved as well as under and over exposure factors. On the left,

Page 8: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

6

concentration and OD are linearly related. On the right the relationship between OD and T is shown. Factored all together the image processing system utilized by ImageJ for densitometry considers these in curve fitting OD to pixel intensity.

Adapted from NIH Image Engineering by Mark Vivino. References: Kodak Corporation, KODAK Neutral Density Attenuators, Kodak publication no P-114, Photographic Products Group, 1982 Kodak Corporation, Scientific Imaging with KODAK Films and Plates, Eastman Kodak publication no. P-315, 1987 Webster JG, Medical Instrumentation, Application and Design, Boston, Houghton Mifflin Company, 1978:95,518-9. Textbooks of Quantitative Chemistry

Page 9: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

7

What is ImageJ? ImageJ is a public domain Java image processing program inspired by NIH Image for the Macintosh. It runs, either as an online applet or as a downloadable application, on any computer with a Java 1.1 or later virtual machine. Downloadable distributions are available for Windows, Mac OS, Mac OS X and Linux at http://rsb.info.nih.gov/ij/index.html. It can display, edit, analyze, process, save and print 8-bit, 16-bit and 32-bit images. It can read many image formats including TIFF, GIF, JPEG, BMP, DICOM, FITS and "raw". It supports "stacks", a series of images that share a single window. It is multithreaded, so time-consuming operations such as image file reading can be performed in parallel with other operations. It can calculate area and pixel value statistics of user-defined selections. It can measure distances and angles. It can create density histograms and line profile plots. It supports standard image processing functions such as contrast manipulation, sharpening, smoothing, edge detection and median filtering. It does geometric transformations such as scaling, rotation and flips. Image can be zoomed up to 32:1 and down to 1:32. All analysis and processing functions are available at any magnification factor. The program supports any number of windows (images) simultaneously, limited only by available memory. Spatial calibration is available to provide real world dimensional measurements in units such as millimeters. Density or gray scale calibration is also available. ImageJ was designed with an open architecture that provides extensibility via Java plugins. Custom acquisition, analysis and processing plugins can be developed using ImageJ's built in editor and Java compiler. User-written plugins make it possible to solve almost any image processing or analysis problem. ImageJ is being developed on Mac OS X using its built in editor and Java compiler, plus the BBEdit editor and the Ant build tool. The source code is freely available. The author, Wayne Rasband ([email protected]), is at the Research Services Branch, National Institute of Mental Health, Bethesda, Maryland, USA. Before We Analyze Before we can do a densitometric analysis on any image, we have to have the subject in a form in which we can do the analysis. They are a number of ways in which one can capture images and store them on a computer. In the case of this tutorial, the image was captured using the AGFA Arcus II flatbed scanner. Immediately after an image is captured on a computer, it should be saved before doing anything else (unless it is obviously not the image desired - in that case, adjustments should be made either to the illumination, orientation, camera or other setting, before the image acquisition is repeated). When the image is saved (preferably in TIFF format so detail isn't lost), it can be edited, analyzed, viewed, enhanced, printed, or converted.

Page 10: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

8

The following is a short description of the tools available within ImageJ:

Area Selection Tools Use these tools to create area selections that will be operated on separately from the rest of the image. The contents of an area selection can be copied to the internal clipboard, cleared (to white), filled with the current drawing color, outlined (using Edit/Draw ), filtered, or measured. Use the backspace key as a shortcut for Edit/Clear . Use Image/Colors to set the drawing color. Double click on any line tool to change the line width used by Edit/Draw . Use the arrow keys to "nudge" a selection one pixel at a time in any direction.

Rectangle When creating the selection, drag with the shift key down to constrain it to a square. Use the small "handle" in the lower right corner to resize. Use the arrow keys with the alt key held down to change the width or height one pixel at a time. As a selection is created or resized, its location, width and height are displayed in the status bar.

Oval Creates an elliptical selection. Holding the alt key down forces the selection to be circular. Use the arrow keys with the alt key pressed to change the width or height. As the selection is created or resized, its width and height are displayed in the status bar.

Polygon Creates irregularly shaped selections defined by a series of line segments. To create the selection, click repeatedly with the mouse to create line segments. When finished, click in the small box at the starting point (or double-click), and ImageJ automatically draws the

Page 11: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

9

last segment.

Freehand The freehand tool lets you create irregularly shaped selections by dragging with the mouse.

Wand Tool Creates a selection by tracing objects of uniform color or thresholded objects. To trace an object, either click inside near the right edge, or outside to the left of the object. To visualize what happens, imagine a turtle that starts moving to the right from where you click looking for an edge. Once it finds the edge, it follows it until it returns to the starting point. Note that the wand tool may not be able to reliably trace a one pixel wide line unless it is first thresholded. Use the WandAutoMeasureTool macro to outline and automatically measure objects.

Line Selection Tools Use these tools to create line selections. Use Analyze/Measure to calculate the length of a line selection. Use Edit/Draw to permanently draw the line on the image. Change the drawing color by clicking in the Image/Colors window. Double click on any line tool to specify the line width. Use the arrow keys to "nudge" a line selection one pixel at a time.

Straight Line Use this tool to create a straight line selection. Holding the alt key down forces the line to be horizontal or vertical. To spatially calibrate an image, create a line selection corresponding to a known distance (e.g. 10mm), then enter that distance in the Analyze/Set Scale dialog box. PlugIns/Draw Arrow will draw an arrow based on a straight line selection.

Segmented Line Create a segmented line selection by repeatedly clicking with the mouse. Each click will define a new line segment. Double-click when finished.

Freehand Line Select this tool and drag with the mouse to create a freehand line selection.

Mark and Count Tool Use this tool to count objects. Clicking on a point in the image records its location and intensity and draws a mark in the current foreground color. The marks modify the image so it may be wise to work with a copy. Double-click on the crosshair icon in the tool bar to change the size of the mark. Set the mark width to zero to disable marking. Note that this tool marks the image immediately, unlike the other selection tools which require that you use the Draw or Fill command. Also note that color marks are only available with color

Page 12: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

10

images or grayscale images that have been converted to RGB.

Text Tool Use this tool to add text to images. It creates a rectangular selection containing one or more lines of text. Use the keyboard to add characters to the text and the backspace key to delete characters. Use Edit/Draw to permanently draw the text on the image. Use Edit/Options/Fonts , or double-click on the text tool, to specify the typeface, size and style.

Magnifying Glass Click on the image with this tool to zoom in. Alt-click (or right-click) to zoom out. The current magnification is shown in the image's title bar. Double-click on the magnifying glass icon to revert to 1:1 magnification. There are 11 possible magnification levels: 1:32, 1:16, 1:8, 1:4, 1:2, 1:1, 2:1, 4:1, 8:1, 16:1 and 32:1.

Scrolling Tool Allows you to scroll through an image that is larger than its window. When using other tools (except the text tool), you can temporarily switch to this tool by holding down the space bar.

Color Picker Sets the foreground drawing color by "picking up" colors from images. The color of this tool's icon changes to match the drawing color. Colors can "picked up" from the Image/Colors window using any tool. Alt-click in the Image/Colors window to change the background color. Double-click on this tool to display the Image/Colors window. The icon for this tool is drawn in the current foreground color and the frame around it is drawn in the current background color.

Page 13: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

11

How to Use ImageJ for Densitometric Analysis of 1-D Gels The following is one possible procedure for using ImageJ to analyze one dimensional electrophoretic gels. We will analyze a gel (542Cgel.tif) using the two most common methods of calibration. Hints for using ImageJ for densitometric analysis of 1-D electrophoretic gels: 1. Use the proper calibration type and do not make assumptions about what can be compared (i.e. you cannot compare bands on different images using the uncalibrated OD option). 2. When enclosing the area beneath the curve, be consistent in your peak definitions. Always try to define every peak in the same manner to help ensure the vaildity and repeatability of your results. 3. Since the area beneath the curve is hard to define exactly the same each time you analyze a gel, it is likely that different values will be obtained each time the whole densitometric process is performed. 4. It is a good idea to perform each analysis at least three times. The average of the measured values can then be used. This will help ensure the repeatability and the validity of your results. 5. When reanalyzing be sure to follow these steps: a. Save the measurements (or record them in a notebook) or save the plots image. b. Close all windows (except the image).

c. Use Clear Results under the Analyze menu to reset the measurements. d. Select Gels>Reset Counter under the Analyze menu.

d. Recalibrate and perform the analysis again.

Page 14: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

12

Instructions for densitometric analysis using ImageJ 1. Subtracting Backgrounds Open the ImageJ folder (located in the "Workshop 15 I" folder in the "542C" folder on the desktop). Double-click on the "ImageJ" icon to start the application. Open the image to work with by choosing Open from the File menu. Locate the file “542C_gel.tif”in the 542C folder (on the Desktop). Click Open. Under the Analyze menu, go to Gels>Gel Analyzer Options…. Place a check next to Outline lanes and make sure that Label with Percentages is NOT checked. By looking at the image captured, sometimes, enhancing the image by subtracting the background may help. If it is not needed, however, then this step should NOT be performed. There are some cases where a subtraction of the background can do more harm than good when it removes too much information from the image. It can be helpful for removing undesired noise in the image, such as uneven background levels, a background that contains a gradient, or effects from non-uniform light sources. The background subtraction process is done by using the "Subtract Background…" command from the Process menu. Set the Rolling Ball Radius to 50 and make sure White Background is checked. In the case where the bands are relatively wide, best results can be achieved by setting the ball radius to the width of the widest band. 2. Calibrate the Image Calibrating the image is a very important step for densitometric analysis and MUST NOT BE NEGLECTED. The software must be calibrated to a density standard. If not, measurements of transmittance will be linearly mapped to optical density - that would yield incorrect results! Optical density is actually related to transmittance through a logarithmic relation. A mapping of this relation can be calibrated directly from either an internal standard (described in Appendix A), an external standard (described in Appendix C), or an uncalibrated standard (described in Appendix B). Uncalibrated Standard The uncalibrated standard can be used to compare bands of gels within a single image. Uncalibrated OD should NOT be used to compare bands on different or separate images. For the first analysis we will use the Uncalibrated Standard method. To do this follow these instructions: a. Under the Analyze menu choose Calibrate…. b. Select Uncalibrated OD from the Function list and click Ok.

Page 15: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

13

c. A window will appear with a graphical representation mapping the pixel values to Uncalibrated OD units. Close this window.

Page 16: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

14

3. Outline the First Lane Using the Rectangular Selection Tool Use the rectangular selection tool to outline the first lane. You can work with lanes that are either horizontal or vertical. When acquiring images, it will be desired to capture them with the lanes straight and not diagonal. If the aquisitional process is too time consuming or difficult to set up, then minor adjustments to the orientation of the lanes can be made after the image is captured by rotating the entire image. This can be done by using the Scale… or Rotate> commands under the Image menu. 4. Select First Lane Mark the first lane by choosing Select First Lane from the Analyze>Gels Menu.

Selecting the First Lane A new window will appear with a copy of the image with the first lane marked with a "1". 5. Move the ROI (Region of Interest) to the next lane Move the rectangular selection to the next lane for plotting by placing the pointer inside the selected area and dragging the selection so that it encloses the next lane that is to be measured. Movement of the selection can be constrained to one direction by holding down the shift key while dragging the selected region of interest.

Page 17: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

15

6. Select Next Lane Choose Select Next Lane from the Analyze>Gels menu to analyze the lane selected by the rectangle drawn on the screen.

Selecting the Next Lane 7. Iterate Steps 5 and 6 should be iterated until all the lanes have been selected.

Selecting the lanes to be analyzed

Page 18: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

16

8. Plot Lanes After all the gel lanes have been selected, create "Plots" by choosing Plot Lanes from the Analyze>Gels menu.

A window will appear where the area of each band in each lane is represented with a peak.

Page 19: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

17

9. Enclose the Area Beneath the Curve Using the Line Drawing Tool Use the line drawing tool to draw base lines and drop lines so that each peak is defined by a closed area. Drop lines are vertical lines that can be drawn to separate two curves or specifically restrict the width of the measured curve. When drawing the drop lines, it may be helpful to hold down the Shift key so the lines are more easily drawn as vertical lines. The purpose of drawing the drop lines is to "seal" areas beneath and around the peak for measurement by the wand tool.

Drop lines to "seal" curves for measuring Note: When enclosing the area beneath the curve be consistent in your peak definitions. Always define every peak in the same manner to help ensure the validity of your results.

Page 20: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

18

10. Measure Using the Wand Tool The area of each peak is measured by using the wand tool. Select the wand tool. To measure the areas, click inside the enclosed area of each defined peak, moving from left to right for each lane.

Measuring each peak with the wand tool Note: Since the area beneath the curve is hard to define exactly the same each time you analyze a gel, it is likely that different values will be obtained each time the whole densitometric process is performed.

Page 21: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

19

11. Annotate the Graph These measured areas can now be automatically annotated to the graph. To do this select Label Peaks from the Analyze>Gels menu.

The area values of each peak will be annotated onto the plots image.

Page 22: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

20

12. Results Table The area measurements are also recorded in tabular form and are displayed in the "Results" window. These values can be saved as a text file by selecting the Results window and using the Save As … option under File. These results can then be used in other programs for additional data analysis. Save to the 542C folder on the Desktop. 13. Plots can be Saved The Plots can be saved by selecting the Plots window and choosing Save As>Tiff… from the File menu. Save to the 542C folder on the Desktop. 14. Image can be Saved The Image can be saved by selecting the "Lanes of…" image window and choosing Save As>Tiff… from the File menu. Do this if you made changes to the image and want them saved or if you want the image with the analyze rectangles drawn. Any edited image should be saved with a different name to preserve the original (so you can go back to the unedited version). The TIFF format should be used to save images so that no detail is lost when they are stored. Save to the 542C folder on the Desktop. 15. Reset Now reset all the measurements to prepare for the next analysis by performing the following steps. a. Save the measurements (or record them in a notebook) b. Close all windows (except the original gel image). c. Choose Reset Counter from the Analyze>Gels menu. d. Under the Analyze menu, choose Clear Results to reset the measurements.

Page 23: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

21

16. Recalibrating Using an External Standard If separate images are to be analyzed, but no known concentrations are available in the sample, then an external standard should be used to calibrate the software to a given illumination setting. A calibrated optical density step tablet (or step wedge as it is sometimes called) is used in this process. It is a transparent or opaque film with bands where the optical densities are known. These bands are measured and the corresponding known densities are entered (similar to the method used with internal standards) into the calibration table. The calibration table has already been created for you using a density step tablet. a. Choose Calibrate… from the Analyze menu. b. Change the Function to Rodbard and put in OD for the value of the Unit: field. c. Enter the values below into the calibration fields:

Left column Measured mean pixel values

Right column Calibration standard values

3.58 0.06 56.61 0.20 107.09 0.34 142.10 0.49 167.79 0.64 185.74 0.78 202.71 0.93 215.41 1.07 223.24 1.21 229.84 1.36

d. Place a check next to the Global Calibration box and click Ok.

e. A window will appear with the graphical representation of mapping pixel values to

external standard units. Close this window. 17. Second Analysis with the External Standard Repeat the analysis using the External standard by starting at Step 3 on page 14 and repeating Steps 3 through 15. Densitometric analysis of one dimensional gels is only one of the many image processing tasks that can be done using ImageJ. Other things ImageJ is good for includes: particle counting, enhancement, measurement, comparison, acquisition, conversion, filtering, editing, viewing, rendering, animating, and printing. Macro capability increases the power of ImageJ by allowing redundant or repetitive tasks to be automated.

Page 24: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

22

Appendix A. Internal Standard If concentrations are available from a set of bands where the concentrations are known, then the calibration process can be performed so the analysis yields quantitative values for protein concentrations. First, Clear Results should be chosen from the Analyze menu. Then bands from the known concentrations should be measured by selecting them with the rectangular selection tool and using Measure from the Analyze menu. The standards must be measured in order, starting from the lowest gray value (lightest), to the highest gray value (darkest) standard. Each region of interest should be measured in the order of increasing density until all the known concentrations have been measured or the measured values no longer increase (the darkest region of interest within measurable limits has been reached). When all of the regions have been measured, Calibrate can be chosen from the Analyze menu to enter the corresponding concentrations for each region measured. After entering the known values in the calibration dialog box, it is also a good idea to save the measured and known values for future reference and analysis A function should also be chosen to relate the measured gray values in the image to the known concentrations. Generally, the straight line and second degree polynomials should not be used, because the relation between transmittance and optical densities is more than linear

Page 25: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

23

B. Uncalibrated Standard If bands on gels are to be compared only with other bands, either on the same or different lanes of a single image, uncalibrated optical density units can be used for a relative, qualitative comparison. This is done by selecting Calibrate from the Analyze menu and choosing Uncalibrated OD from the Function list.

Uncalibrated OD should NOT be used for comparing bands on lanes that reside on different images because of the possibility of making an invalid comparison of images with different illumination settings. With Uncalibrated OD selected and after clicking on the OK button, a window will appear with the graphical representation of mapping pixel values to Uncalibrated OD units. This window can be closed if desired to get it out of the way.

Page 26: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

24

C. External Standard In the calibration process, it is often useful to calibrate to a set of external density standards, such as a calibrated optical density step tablet. To do this, the Clear Results command under the Analyze menu should be used to set the measurement counter to zero. Then, regions on the step tablet should be measured, starting from the lowest gray value (lightest), to the highest gray value (darkest). The lightest density band with a measurable value should be selected using the Selection Rectangle tool. Then Measure from the Analyze menu should be selected. After that, the next band up of greater density should be selected and measured.

Each band of the step tablet should be measured in the order of increasing density until the measured values no longer increase (the darkest band within measurable limits has been reached). Enhance contrast under the Process menu can be used to see the bands of the step tablet better. In addition, palette (LUT) tool can be used on the LUT to lighten the image so the darker values can be accurately selected. After all of the regions have been measured, Calibrate can be selected from the Analyze menu to bring up the calibrate dialog box. In the calibrate dialog box, the actual values can be entered into the right column of the calibration table.

Page 27: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

25

A function should be chosen to relate the measured gray values in the image to the known concentrations. Generally, the straight line and second degree polynomials should not be used, because the relation between transmittance and optical densities is more than linear. It is also a good idea to save the calibrated image of the density step tablet so that the calibrated density values can be propagated to the gel images being analyzed.

Page 28: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

26

D. Curve Fit A function should be selected to do a curve fit interpolate between the known values entered. The straight line and second degree polynomial functions are not usually appropriate, but the third degree, Exponential, and Rodbard function usually are. When a function has been chosen and the OK button pressed, another window appears which shows the curve fitted to the data. The curve that fits the best is the one where the autocorrelation value, R^2, is closest to one.

The points on the curve represent the measured data points (in the internal and external standards case). The formula used to fit the data is displayed in the top left corner of the graph with the parameters listed on the right margin. Since screen space is always limited, it may be convenient to close the window with the plot of curve fitted data. This can be done by clicking on the small close box in the top left corner of the window.

Page 29: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

27

Instructions for particle counting and analysis using ImageJ The following instructions will allow the count and determination of size distribution of a collection of echinoderm embryos. Make sure you close all the open windows in ImageJ and choose Clear Results from the Analyze menu. 1. Set the measurement scale a. Open the measurement scale image by choosing Open from the File menu. Locate the file “microm.jpg” in the 542C folder. Click Open. b. Use the line tool to draw a line over the entire distance of the scale. c. Select Set Scale… from the Analyze menu

d. Enter the distance value of 20 into the Known Distance box, change the Unit of Measurement to mm, check the Global box. Click Ok. Close the “microm.jpg” window.

Page 30: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

28

2. Open the embryo image Open the embryo image by choosing Open from the File menu. Locate the file “embryo.jpg” in the 542C folder. Click Open. Now convert the image to grayscale by choosing 8-bit from the Image>Type submenu.

8-bit embryo.jpg image

Page 31: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

29

3. Threshold the embryo image Use the automated threshold routine by choosing Threshold from the Process>Binary submenu.

Threshold image of embryo.jpg

Page 32: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

30

4. Analyze Particles Analyze the particles by choosing Analyze Particles… from the Analyze menu. Set the Minimum Size to 20, choose Outlines from the Show: menu. Place checkmarks next to Display Results, Exclude Edge Particles and Size Distribution.

Click Ok. The embryos will be analyzed and windows will appear that show the outlines of the embryos and the data results. The “Results” window will list the area for each embryo. The “Particle Size Distribution” window will give a count of the number of embryos in the image. Notice that some of the embryos are clumped together and are counted as one particle instead of 2 or 3 (see image on next page). These embryos will need to separated by manually editing the image.

Page 33: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

31

Analyzed image showing embryos that need to be separated NOTE: The editing will be done in the "embryos.jpg" window.

5. Edit the threshold image Close the “Drawing of embryos.jpg” window and the “Particle Size Distribution” window and make the “embryos.jpg” window active by clicking on its title bar. Double click the line tool icon and change the pixel width to 2. Use the line tool to draw a line between the touching embryos. After you have drawn the line, hit the Delete (Backspace) key to erase the touching particles. Do this for each of the touching embryos. 6. Re-analyze Particles When you have finished editing the image, clear the previous results by selecting Clear Results from the Analyze menu. Now choose Analyze Particles… from the Analyze menu. The parameters should stay the same. Click Ok. The image will be analyzed again.

Page 34: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

32

Re-analyzed image with touching embryos separated

Each of the embryos should now be counted separately. You should also see an increase of the count value in the “Particle Size Distribution” window. If you still have touching embryos, re-edit and repeat the analysis. This is only one possible use for analyzing images using ImageJ. It provides a rapid method for counting particles in an image and also gives the area data for each particle. This (and any) image analysis method should be manually validated before collecting any experimental data.

Page 35: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Introduction to Molecular Biology Techniques Workshop 15C Image Analysis

Part II: Image editing More image basics with the Resolution tutorial page 1 Enhancement and manipulation of digital images using Adobe Photoshop page 2 Merging fluorescent images using Adobe Photoshop page 13

Page 36: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page
Page 37: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

1

Workshop 15C: Image Analysis

Part II : Image editing Instructors: Margie Carter, Joel Nott, 119 Molecular Biology Building.

Phone: 294-1011, e-mail: [email protected] A. More image basics with the Resolution tutorial

1. On the desktop there will be a folder titled "Resolution". Double-click on the folder to open it.

2. Double-click on the "Resolution" icon (it will look like a film projector). The Resolution tutorial will start and you will be presented with some instructions on how to use the tutorial.

3. Go through each of the three tutorial topics. a. Image Resolution-tutorial on digital image resolution

b. Monitor Resolution-tutorial on resolution of computer monitors

c. Output Resolution-tutorial on printing resolution

d. There is also an Appendix with a glossary and some equations that are used in

calculating image characteristics.

4. When completed with the tutorial Quit the program by clicking on the "home" button, then the "quit" button.

5. Change the computer's screen resolution by clicking and holding on the monitor icon

located in the upper right corner of the screen. Choose "Millions" to reset the screen resolution.

Page 38: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

2

B. Enhancement and manipulation of digital images using Adobe Photoshop Adobe Photoshop can be used to perform a wide variety of enhancements and manipulations on a digital image. For example, contrast and brightness can be increased or decreased, the color levels can be changed or interfering background can be removed. There are many filters available within Photoshop that can greatly improve the quality of a particular image. However, there are also many filters that may change the digital image in a manner that is not desired. Note: If an enhancement is performed that is not desired, it can be reversed. To "undo" an enhancement use either Undo from the Edit menu or -Z. If an enhancement does not cause any noticeable difference in the image, it is a good idea to "undo" this enhancement. Multiple levels of "undo" can be obtained using the History palette. 1. Starting Photoshop and opening an image to work with

a. Open the “Adobe Photoshop CS” folder on the desktop. b. Double-click on the “Adobe Photoshop CS” icon to start Photoshop. c. Under the File menu, select Open. Locate the file “gel_for_photoshop.tif”, highlight the name and click Open.

2. The Photoshop work area The work area includes the command menu, the image window and the tools and palettes used to manipulate the image. Photoshop uses several palettes to help monitor and modify images. These palettes can be displayed or hidden by choosing the palette name under the Window menu. Depending on the work you are doing, you may have different palettes in your work area. The palettes available are: Actions, Brushes, Channels, Character, Color, File Browser, Histogram, History, Info, Layer Comps, Layers, Navigator, Options, Paragraph, Paths, Styles, Swatches, Tool Presets, Tools. Some of these palettes are grouped together in the same palette window.

Page 39: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

3

a. You will first need to setup some toolbars and panels to make the work easier. Open the following palettes by selecting the palette name in the Window menu:

Color History Info Layers Options Tools Your workspace should look similar to the following image:

Your workspace after setup

b. In Photoshop many of the image manipulations are done using tools. The following is a short description of the tools available within Photoshop. You select a tool from the toolbox by clicking the tool

Page 40: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

4

Page 41: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

5

Page 42: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

6

3. Changing the image size and resolution

a. Under the Image menu, select Image Size . . . . From this window it is possible to change the image's print size and resolution (and therefore change the image file size). b. Make sure the Constrain: Proportions and Resample Image: Bicubic boxes are checked. c. Change the Document Size: Width: of the image to be 1/2 of what it currently is. Notice that the file size decreases by a factor of four. d. Change the Resolution of the file to be 150 pixels/inch. The file size decreases by a factor of four again. e. If you click off the Resample Image box and then change the resolution, the width and height will change proportionately. If the width or height is changed, the resolution will change proportionately. Notice the relationship between the resolution, physical fill size, and hard disk space required to store a digital image. Click the Resample Image box on again. f. Change the Document Size: Width: to be 6 inches wide and the Resolution to be 300 pixels/inch. g. Click Ok.

Page 43: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

7

4. Cropping an image Cropping an image will eliminate the parts of the image that lie outside of the defined cropping area. This is sometimes useful if only a part of a particular image is actually desired.

a. To crop an image, click on the cropping tool icon in the tools box. b. Move the pointer to the image (it will change to the cropping tool icon). Draw a square around the area you are interested in by placing the pointer in the upper left of the area of interest and moving the pointer (while holding down the mouse button) down to the lower right of the area you are interested in. A dashed box will appear around the area of interest with drag-boxes on each corner. If the pointer is moved over any of the drag-boxes, it will change to a straight two-headed arrow. By holding the mouse button down over the drag-box, the area to crop can be adjusted. c. Once you are satisfied with the area to crop, place the pointer in the center of the highlighted area (the icon will change to a triangle) and click the mouse button twice. The parts of the image that were not in the highlighted area will be eliminated and the highlighted area will be resized in the image window. d. Save the image (choose Save from the File menu).

5. Adjusting the brightness and contrast

a. To adjust the brightness/contrast in an image, under the Image menu select Adjustments->Brightness/Contrast… A control panel will appear. Move the control panel so that most of the image can be seen. Make sure the Preview box is checked (this will allow you to view the changes you make in the image as you make them). Adjust the brightness and contrast to a level that you are satisfied with. b. Click Ok. c. Save the image.

6. Adjusting the levels

a. Under the Image menu, select Adjustments->Levels. The Level dialog window will appear. b. Make sure the Preview box is checked.

Page 44: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

8

c. This window will show a histogram. A histogram illustrates how pixels in an image are distributed by graphing the number of pixels at each color intensity level. This can show you whether the image contains enough detail in the shadows (shown in the left part of the histogram), midtones (shown in the middle), and highlights (shown in the right part) to make a good correction. The darkest pixels are at the left side of the histogram, the brightest at the right. The Input Levels shows the current values and the Output Levels show the desired output levels. If your image has more than one channel (e.g. RGB) you can adjust each individual channel separately. To adjust levels in the image the slider controls are used. d. Under Input Levels, the contrast can be increased by using the triangle slider controls. The black triangle will control the shadows, the gray triangle will control the midtones and the white triangle will control the highlights. For example if you drag the input levels black triangle to 40, pixels with brightness values of 40 will be mapped to 0 and the pixels with a higher brightness value will be mapped to corresponding darker values. This will darken the image and increase contrast in the shadowed areas. e. To decrease the contrast, the Output Levels slider controls can be used. The black triangle controls the shadows and the white triangle controls the highlights. For example, if the white triangle is dragged to 200, pixels with a value of 255 will be remapped to 200 and the pixels with a value less than 255 are lowered to the corresponding darker values. This darkens the image and decreases the contrast in the image.

Page 45: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

9

f. Adjust the input and output levels to a desired level and click Ok. Save your image. Note: You can also click on the Auto button to automatically correct the input and output levels.

7. Working with variations

a. Under the Image menu, select Adjustments->Variations….

b. The Variations dialog window will appear. Make sure the Show Clipping box is checked. The Show Clipping option shows a preview of the areas in the image that will be converted to pure white or pure black when the adjustment is applied. The Fine and Coarse slider is used to make the incremental changes in the clipping smaller or larger. One tick mark on the slider will double the increment. The two images at the top of the window show the original image or selection (Original) and the image or selection with the currently selected adjustments (Current Pick). When the window first appears, both of these images are the same. As adjustments are made, the Current Pick image will change to reflect these adjustments. Select Shadows, Midtones, or Highlights to adjust the dark, middle, or light areas of the image. Every

Page 46: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

10

time you click on Lighter or Darker that area of the image will become lighter or darker. To reset back to your original, unadjusted image, click the Original image. c. Adjust these areas of your image. When you are satisfied with how the image looks click Ok and then save the image.

8. Filters for image enhancement in Photoshop

There are a wide variety of filters available within Photoshop that can be used to add or reduce noise (pixels with randomly distributed color values), apply lighting effects, sharpen the image, distort the image and other visual effects. The general procedure for applying a filter is as follows: a. Select the part of the image you want to apply the filter using the marquee tool (the top left tool in the toolbox). If you don’t make a selection, the filter is applied to the whole image. b. Choose the filter you want to use by selecting the filter from the Filter menu. c. If required, enter values in the dialog box.

9. Applying noise filters

Under the Filter menu choose Noise> notice that there are several noise filters. The Add Noise… filter will apply random pixels to an image. The Despeckle filter will detect the edges in an image (areas where significant color changes occur) and blurs all of the selection except those edges, effectively removing noise while preserving detail. The Dust & Scratches… filter reduces the noise in the image by searching the radius of a selection of pixels. The Dust & Scratches dialog box has a preview window and allows you to change the Threshold: (how different the value of the pixels need to be in order to be eliminate or altered) or the Radius: (this option determines the smallest radius that will eliminate the defects). The Median… filter will reduce noise in an image by searching the radius of a selection of pixels and replacing the center pixel with the median brightness value of those pixels. a. Go to the Filter menu and apply the Noise>Despeckle filter. If no noticeable difference is seen, undo this filter. You may toggle between having the filter on and having the filter off by using the Undo command (under the Edit menu). b. Under the Filter menu, choose Noise>Add Noise…. A dialog box will appear. Make sure the Preview box is checked. c. Change the amount of noise to add to the image using the Amount: slider. You may choose from two different distributions, Uniform and Gaussian. The Uniform option distributes color values of noise by calculating random numbers between 0 and plus or minus the specified value. This will produce a more subtle effect. The Gaussian option

Page 47: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

11

distributes color values of noise along a bell-shaped curve. This will produce a more speckled effect. If you click Monochromatic the filter will be applied to only the tonal elements without changing the colors. d. Adjust the noise to a level that you are satisfied with and click Ok. e. Save the image. f. Feel free to apply any of the other filters that are available within Photoshop. The best way to see if a filter will produce the desired effect is to experiment. Remember if the filter does not appear to change the image or produces an undesirable effect, undo the filter’s effect (Edit, Undo). Other filters that are commonly used are the Sharpen filters. These filters can focus blurry images by increasing the contrast of adjacent pixels. g. After applying any additional filters, save the image.

10. Clone stamp tool

Unwanted noise or pixels can also be eliminated from your image by using the clone stamp tool. It may be easier to view and eliminate the unwanted noise if the image is magnified using the Zoom tool.

a. Click on the clone stamp tool (in the tools box). b. Place the pointer over an area of your image that is a good representation of the background. c. Hold down the option key (notice the clone stamp icon will change) and click the mouse button once. Release the option key and the mouse button. This defines the area for the clone stamp to clone. d. Now move the clone stamp icon to an area you wish to copy the background onto. Hold down the mouse button. Move the clone stamp icon over the area you wish to copy onto (the noise to eliminate). As you move the clone stamp icon, the crosshair will also move. This action is copying the pixel values from the area under the crosshair into the area under the clone stamp icon. If you copy over an area you did not wish to, you may undo the action using Undo from the Edit menu. e. Eliminate any unwanted noise in your image using the clone stamp tool. f. Save the image.

Page 48: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

12

11. More image manipulation

There are many different filters and image enhancement tools available within Photoshop. We have demonstrated the most common tools that can be used to enhance or adjust a scientific image. Photoshop can also be used for graphic design purposes to create computer artwork. If time permits, feel free to become acquainted with the other tools and options within Photoshop. There is a folder on the desktop called “Thymus” that contains color images to work with.

12. Saving the final image

a. When you are satisfied with how your image looks, save your image.

Page 49: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

13

C. Merging fluorescent images using Adobe Photoshop Merging fluorescent images can be useful when all of the fluorescent channels from an image need to be viewed at one time. The images must all be the same size for merging and must be RGB images. We will work with three different images from the red, green and blue channels. These images were captured by the Office of Biotechnology Confocal Microscopy Facility using a slide purchased from Invitrogen. 1. Open the three images to be merged in Photoshop

a. Under the File menu, select Open. Locate the file “confocalRed.TIF” (in the "merge_files" folder), highlight the name and click Open. Under the Image menu, choose Mode->RGB Color. b. Under the File menu, select Open. Locate the file “confocalBlue.TIF”, highlight the name and click Open. Under the Image menu, choose Mode->RGB Color. c. Under the File menu, select Open. Locate the file “confocalGreen.TIF”, highlight the name and click Open. Under the Image menu, choose Mode->RGB Color.

confocalRed.TIF confocalGreen.TIF confocalBlue.TIF

2. Save the merged file

a. Select the "confocalRed.TIF" image (choose it from the Window menu), and choose Save As… under the File menu. Name the file "merged.tif". Be sure the Format: is "TIFF" and click the Save button. b. Choose "NONE" for Image Compression and "IBM PC" for the Byte Order. Click the OK button.

3. Open the Channels palette

a. Under the Window menu, be sure there is a checkmark next to the Channels item. If there is not, select Channels. This will open the channels palette. You should see four entries in the palette: RGB, Red, Green and Blue.

Page 50: Introduction to Molecular Biology Techniques Workshop 15C ... · Part I: Image basics, densitometry and particle analysis Introduction page 1 Image basics page 1 Output basics page

Spring 2009

14

4. Copy the Green channel a. Select the "confocalGreen.TIF" image. In the Channels palette, click on the "Green" entry. The "confocalGreen.TIF" image should now be a greyscale image and the "Green" entry should be the only one visible. b. Under the Select menu, choose All. c. Under the Edit menu, choose Copy.

5. Paste the Green channel

a. Select the "merged.tif" file and on the Channels palette, click on the "Green" channel. b. Under the Edit menu, choose Paste. This will paste the green channel from the "confocalGreen.TIF" image into the "merged.tif" image. c. Click on the "RGB" entry in the Channels palette. You should now have a merged image with both the red and green images merged together.

6. Copy the Blue channel

a. Select the "confocalBlue.TIF" image. In the Channels palette, click on the "Blue" entry. The "confocalBlue.TIF" image should now be a greyscale image and the "Blue" entry should be the only one visible. b. Under the Select menu, choose All. c. Under the Edit menu, choose Copy.

7. Paste the Blue channel a. Select the "merged.tif" file and on the Channels palette, click on the "Blue" channel. b. Under the Edit menu, choose Paste. This will paste the blue channel from the "confocalBlue.TIF" image into the "merged.tif" image. c. Click on the "RGB" entry in the Channels palette. You should now have a merged image with all of the images merged together.

merged.tif

8. Quit Photoshop a. Quit Photoshop by choosing Quit Photoshop from the Photoshop menu.