Batch analysis of digital images to evaluate turfgrass characteristics.
Under normal use of SigmaScan Pro, each image must be processed manually, which may take several minutes and limit large-scale use of the techniques. However, SigmaScan Pro is enabled with a macro language so that users may automate software processes. The development of a user-friendly, easily attainable macro to batch analyze large numbers of turf images should broaden the use of digital image analysis techniques and result in more objective evaluations of turfgrass trials. The objective of the following work was to develop such a macro.
MATERIALS AND METHODS
A SigmaScan Pro macro named "Turf Analysis" was written by the authors (in visual basic for applications language) that is capable of batch analyzing turf images. The macro may be freely downloaded from the University of Arkansas web site: http://www.uark.edu/campus-resources/turf/turfmacro; verified 11 March 2005. SigmaScan Pro must be installed on the same PC containing the macro for proper operation.
Before executing the macro, the images to be analyzed must all share the same file extension and be named so that they share a root name and each image contains a unique, consecutive number at the end of the file name (example: Plot01.jpg, Plot02.jpg, Plot03.jpg ...). Most digital image archiving software packages that are sold with digital cameras are capable of naming or renaming image files similar to the format described above. In addition, there are many freeware file renaming software packages currently available for download (Nonags. com, 2004). The macro will function correctly with or without leading zeros at the end of the file name and with any image file extension that SigmaScan Pro recognizes (.jpg,.bmp,.tif, etc ...).
The macro is executed by selecting "File > Open > Macro" from within SimgaScan Pro. Upon selecting the "Turf Analysis" macro file and then pressing the "F8" key to begin macro execution, a dialog box named "Turf Analysis Settings" is opened (Fig. 1) to customize the macro settings for a specific analysis of a batch of images.
[FIGURE 1 OMITTED]
Image Files Information
The parent folder, shared root name of the images, image file extension, and the first and last file numbers are defined within the "Image Files Information" box. If the image files contain leading zeros, these should be included in the text boxes defining the first and final image numbers. In the example analysis settings shown in Fig. 1, a batch of 489 images of tall rescue (Festuca arundinacea L.) plots diseased with brown patch (Rhizoctonia solani Kuhn) is to be analyzed. The files are named "Plot001.jpg" through Plot489.jpg" and are located in the folder, "C:\Documents and Settings\KARCHER\ My Documents\Research\NTEP Tall Fescue\Brown Patch Images."
An analysis of turf color will be performed on the images if the "Perform color analysis" (Fig. 1) checkbox is selected. Either entire images may be used to determine average color or a color threshold may be used to determine average color from selected pixels. In the example analysis settings, color analysis of the brown patch images will be performed using threshold settings so that only green pixels (representing nondiseased turf) are used to calculate average color. The default macro settings perform a color analysis using the entire image to calculate average color.
An analysis of percent turf cover will be performed on the images if the "Perform cover analysis" (Fig. 1) checkbox is selected. Three options are available for determining the total number of pixels in each image, which is subsequently used to calculate percent cover: The first option is to separately measure the total pixel number for each image, which is the slowest option, but is necessary if total pixel numbers vary among the images within a batch. This would be the case if pictures within a batch were taken with different resolution settings or if images were cropped before analysis. The second option is to only measure the total pixel number for the first image and use that value as the total pixel number for all subsequent images, which is appropriate if all images within an analysis batch were taken with identical camera settings, not cropped, and thus share the same number of total pixels. The third and fastest option, which may be used if all images share the same number of total pixels, is to manually enter the shared total pixel number in the text box provided. The default macro settings analyze images for percent cover and only measure the first image to determine total pixel numbers.
The "Threshold Settings" box (Fig. 1) is used to adjust the hue and saturation levels that are used to select pixels representing green turf for the cover and color analyses. Before executing the macro, it is important to open a few representative images in SigmaScan Pro and select "Image > Threshold > Color Threshold" to determine the precise hue and saturation levels that will select the pixels of interest within the images. The appropriate threshold settings will vary depending on factors such as turf species and variety, management practices, light conditions present when images were collected, and camera model and settings. The default settings are hue levels from 30 to 100 and saturation levels from 0 to 100.
If the "Save output as Excel file in image folder" box (Fig. 1) is checked, the macro output will be automatically saved to the folder containing the batch of images to be analyzed. The default macro setting is to save the output as a Microsoft Excel file. Clicking the "OK" button will begin the image analysis process.
RESULTS AND DISCUSSION
The results from analyzing the batch of 489 brown patch images from executing the "Turf Analysis" macro are shown in Fig. 2. The spreadsheet is automatically saved as "Turf Analysis [DATETIME STAMP]" and in this example, the spreadsheet was saved on 17 Sept. 2004 at 2058 h and 45 s. The spreadsheet was saved in, "C:\Documents and Settings\KARCHER\My Documents\Research\NTEP Tall Fescue\Brown Patch Images," the same folder containing the analyzed images.
[FIGURE 2 OMITTED]
Column A contains the file path information of each image analyzed. Column B contains the total pixels of each image analyzed and in this example all of the images contained 307 200 pixels (camera resolution was set to 640 x 480). Column C contains the number of pixels representing green turf as determined from the threshold settings. In this example, the first three images have 232093, 190246, and 202 479 green turf pixels, respectively. Column D contains the calculated percent turf cover as the quotient of selected pixels to total pixels. In this example, the first three images have 75.6, 61.9, and 65.9% green turf cover, respectively. Columns E through J contain the average color information from either the entire image or the selected pixels, depending on the macro settings. In this example, only the selected pixels representing green turf were used to determine average color (Fig. 1). From the macro output, average turf color may be described using either the red/green/ blue or hue/saturation/brightness color model (Karcher and Richardson, 2003).
The example analysis accomplished with the "Turf Analysis" macro, which evaluated 489 images for percent turf cover and turf color, required less than one minute of manual execution. At an average rate of three minutes per image to manually evaluate percent cover and color in SigmaScan Pro, the "Turf Analysis" macro saved more than 24 h of manual, tedious labor. Although the macro can be executed in less than one minute, the analysis will complete at a rate from <5 s to 1 min. per image, depending on the resolution of the images and the computer processing speed.
Although the "Turf Analysis" macro was developed for the analysis of turf images, its utility may be extended to analyze virtually any plant species. Through collaboration efforts with colleagues from the departments of Horticulture and Crop, Soil, and Environmental Sciences at the University of Arkansas, Fayetteville, the macro has been tested successfully in quantifying the colors of poinsettia (Euphorbia pulcherrima Willd.) and petunia (Petunia spp. Juss.) flowers, spinach leaves (Spinacia oleracea L.) and quantifying soybean [Glycine max (L.) Merr.] canopy coverage.
Horst, G.L., M.C. Engelke, and W. Meyers. 1984. Assessment of visual evaluation techniques. Agron. J. 76:619-622.
Karcher, D.E., and M.D. Richardson. 2003. Quantifying turfgrass color using digital image analysis. Crop Sci. 43:943-951.
Nonags. com. 2004. File renaming tools--freeware. Available at http:// www.tusafe.com/nonags/fileren.html. (verified 11 March 2005)
Richardson, M.D., D.E. Karcher, and L.C. Purcell. 2001. Quantifying turfgrass cover using digital image analysis. Crop Sci. 41:1884-1888.
SPSS Inc. 1998. Sigma Scan Pro 5.0. SPSS Science Marketing Department, Chicago, IL.
Douglas E. Karcher * and Michael D. Richardson
Dep. of Horticulture, Univ. of Arkansas, 316 Plant Sciences Bldg., Fayetteville, AR 72701. Received 21 Sept. 2004. * Corresponding author (firstname.lastname@example.org).
|Printer friendly Cite/link Email Feedback|
|Author:||Karcher, Douglas E.; Richardson, Michael D.|
|Date:||Jul 1, 2005|
|Previous Article:||Minimizing thatch and mat development in a newly seeded creeping bentgrass golf green.|
|Next Article:||Development and evaluation of a mini core collection for the U.S. peanut germplasm collection.|