© 2005 Plant Management Network.
Comparing Image Format and Resolution for Assessment of Foliar Diseases of Wheat
Karl Steddom, Associate Research Scientist, Texas Agricultural Experiment Station, Amarillo 79106; Marcia McMullen, Professor, Department of Plant Pathology, North Dakota State University, Fargo 58105; Blain Schatz, Director Carrington Research and Extension Station, North Dakota State University, Carrington 58421; and Charles M. Rush, Professor, Texas A&M University, Amarillo 79106
Steddom, K., McMullen, M., Schatz, B., and Rush, C. M. 2005. Comparing image format and resolution for assessment of foliar diseases of wheat. Online. Plant Health Progress doi:10.1094/PHP-2005-0516-01-RS.
For image analysis to be a useful method for assessment of foliar diseases, it must be robust with respect to changes in image resolution. In addition, the use of common compression methods such as JPEG allows for the use of low-cost digital cameras and reduces the storage requirements of the imagery. We have investigated the effect of image resolution and format on lesion area quantification with image analysis. Wheat leaves with various levels of rust and tan-spot were scanned on a flatbed scanner as TIFF images with a resolution of 8.4 million pixels per image. These images were then progressively reduced in resolution down to 858 pixels per image. The TIFF images were then converted to JPEG images with quality settings of 100, 75, 50, and 25 percent. The percentage of necrotic leaf area was then measured for each image, and correlated with the percentage of necrotic leaf area of the original 8.4 million pixel TIFF images. Image format had little effect on the results and image resolution did not affect results until the image resolution had dropped below the level at which it was difficult to discern lesions by eye. This suggests that low-resolution digital cameras with high JPEG compression levels are suitable for plant disease measurement using image analysis.
Disease evaluations are required for a number of agronomic studies. Visual evaluations tend to be the most common as they are fast and easy to perform. However, studies (3,5,6) have shown visual evaluations suffer from poor precision, accuracy, and repeatability. One of many alternative evaluation methods is image analysis (2,3). At one time, this method required specialized hardware, but the ready availability of powerful personal computers and low cost digital cameras and scanners makes this method appealing today. Software is also available at low cost to automate much of the process of image analysis.
Image analysis, in its simplest form, consists of selecting pixels that match certain criteria, also known as segmentation (4). Digital images are commonly stored in a red-green-blue format, where each pixel has a value for each of the colors. One of the most useful formats for image analysis is the hue saturation intensity (HSI) colorspace (4). Hue represents the pure color of a pixel, saturation varies from white to the pure hue, and intensity ranges from black to the pure color. In this color space, a leaf has a green hue regardless of the amount of shadowing present on the leaf; therefore segmentation based on hue is relatively unaffected by varying light conditions (4).
Digital images can be stored in a number of formats. These formats can be classified into two broad groups: lossey formats and lossless (4). A lossless format preserves all of the original information gathered by the imaging sensor, while a lossey format uses various schemes to discard some of the original information while still maintaining the appearance of the original image. The most common examples of these formats are the tagged image file format (TIFF), a lossless method, and the Joint Photographers Expert Group (JPEG), a lossey method designed to work best with photographs. In the JPEG method, a quality level specifies the aggressiveness of the compression algorithms with high quality levels retaining more of the original information than low quality levels (4). The JPEG method subdivides an image into 8-◊-8-pixel blocks before performing compression (4). Excessive compression on low resolution images results in a blocky pattern in the image. Assess software (American Phytopathological Society, St. Paul, MN) recommends using a lossless method such as TIFF due to the artifacts that the JPEG method can introduce into images. These artifacts are most apparent in the hue plane of JPEG images (4). TIFF images are substantially larger than the same image saved in the JPEG format and require more memory. Thus, the ability to save images in a lossless format is only available on expensive digital cameras with large amounts of storage memory. Taking images with a digital camera is much more practical than taking a scanner into the field. Therefore the requirement of a lossless format substantially increases the cost of the equipment required for digital image analysis, and the computational time required for analysis.
The objective of this study was to determine the impact of image size, format, and quality on image analysis results. In addition, the optimum sample size was computed to provide a reference for others hoping to implement these methods. With digital photographic equipment costs ranging from under one hundred US dollars to several thousand dollars, these questions are not trivial. While this study was performed with foliar wheat diseases, we hope the results will provide a starting point for other researchers to begin exploiting the power of image analysis methods for other crops and diseases.
Visual and Image Analysis Disease Assessments
To provide a range of disease severity levels, fungicide trials at two locations were utilized for this study. The first site was located on the campus of North Dakota State University, Fargo, and the second site was located at the Carrington Research and Extension Center, Carrington, North Dakota. The experimental design at both sites was identical, consisting of 14 fungicide treatments in a randomized complete block design with 4 replicates, resulting in 56 individual plots per site that presented a range of disease levels. The spring wheat cultivar Russ was planted at both sites. Russ is susceptible to both leaf rust and tan spot. Disease severity was visually evaluated on the whole plot and flag leaves were collected while the wheat was in the soft dough stage, just prior to leaf senescence. Visual assessments of foliar diseases consisted of ratings of the percentage of the flag leaf affected by either wheat leaf rust, or tan spot of wheat just prior to flag leaf senescence, when the diseases were at their maximum. Wheat leaf rust was not evaluated at Carrington due to low rust disease levels. Both leaf rust and tan spot were present at the Fargo site. Visual leaf necrosis was calculated by adding the estimated percentage of leaf area with tan spot to the estimated percentage of leaf area with leaf rust. Because both were estimated as a percentage of the flag leaf area, this gave an estimate of total leaf necrosis, which could be related to the image analysis results.
Ten flag leaves were collected throughout each treated plot. The 10 flag leaves were taped to a piece of white, US letter (8.5 inches ◊ 11 inches) paper with double stick tape to keep them flat (Fig. 1). The paper was then scanned on a flat bed scanner as a 216-◊-279-mm image at a resolution of 24 pixels per mm (600 pixels per inch) and 24 bits of color information per pixel in the TIFF format. The number of leaves was limited by the size of the platen of the flat bed scanner, providing further interest in using a digital camera. The resulting images had a resolution of 5102 ◊ 6600 pixels. These images were too large to be opened by Assess, so the resolution was reduced by 50% with bicubic sampling using Batch It! Ultra 3 (iRedSoft Technology, Inc., Sacramento, CA). The resulting 2551 ◊ 3300 pixel, or 8.4 million pixels (MP), images were processed in Assess following the methods for a white background in tutorial 14 in the Assess userís manual. Briefly, thresholds for leaf color were established in the HSI color space using saturation values between 41 and 200, the leaf area of interest was selected to restrict lesion selection to the leaf area, then thresholds for lesions were established in the HSI color space with hue values between 31 and 84. Images were segmented using these threshold values. Percent area was then calculated as lesion pixels/leaf pixels ◊ 100%. In this fashion a percent leaf necrosis value was determined for all 10 leaves as a single value. The threshold values for segmentation were determined empirically on images with distinct lesions using the methods described in the user manual for the software. Ten images from each sampling site were then tested to verify that the threshold values accurately separated the leaves from the background of the paper and tape, and separated the lesions from the healthy leaf tissue. The macro facilities of Assess were then used, as detailed in tutorial 16 of the Assess userís manual, to process all images with the same settings in a short period of time. Since the background and lighting were identical for all images and to avoid potential bias, the same settings were used for all images. Because percent area is a ratio of leaf pixels to lesion pixels, it was not necessary to perform a spatial calibration.
Results from visual evaluations and image analysis were subjected to analysis of variance for a randomized complete block design. Treatment F statistics and model coefficients of variation (CV) provided by the analysis of variance were compared between the two methods to determine if they were effective at treatment discrimination and free from high variability.
Both visual evaluations and image analysis methods effectively discriminated between treatments at both sites and were free from high variability. At the Fargo location, visual estimations of leaf spot ranged from 0.9% to 36.1% of the leaf area while visual estimations of leaf rust ranged from 0% to 13.9% of the leaf area. The Carrington location had higher disease pressure with visual estimations of leaf spot ranging from 1% to 95%. Treatment F statistics for both total plot visual evaluations and image analysis of the combined 10 flag leaves per plot were highly significant (P < 0.0001) at both sites. Thus both sites had enough of a range in disease severity levels to provide an adequate test for theses methods. Both visual and image analysis methods provided similar levels of treatment discrimination. Variability of the evaluation methods, as measured by model CV, was 38% and 22% for visual evaluations at the Carrington and Fargo sites, respectively. For the image analysis methods, CVís were 24% and 18% for the Carrington and Fargo sites, respectively. The reductions in CVís for the image analysis method supports past studies (2,3,5) that have shown image analysis methods to be more accurate and precise than visual evaluations. Correlations between flag leaf necrosis measured by image analysis on the 8.4 MP images and estimated by visual assessments were 0.75 at the Fargo site and 0.81 at the Carrington site. Scatter plots of leaf necrosis measured by image analysis against leaf necrosis measured by visual analysis did not suggest any regions of disease severity that had better or worse relationships than any other (data not shown). It should be noted that visual evaluations were performed on the entire plot while image analysis was conducted on ten leaves selected from each plot. To evaluate the repeatability of the scanning process, one sample was scanned repeatedly at the settings required for 8.4 MP. These images were then subjected to segmentation according to the methods described above, and then the mean and standard deviation of the resulting percent necrosis was computed. The mean percent necrosis for this sample was 10.28 and the standard deviation was 0.04; a relatively small level of variation.
Effects of Image Format, Resolution, and Compression
To determine the effect of image resolution and file format, 8.4 MP TIFF images were reduced in resolution using Batch It! Ultra3 to a series of resolutions down to 858 pixels per image. These TIFF images were then converted to the JPEG format with quality settings of 100, 75, 50, and 25 percent in Batch It! Ultra 3. For convenience these quality settings will be referred to as high, medium high, medium, and low quality JPEG images, respectively. These images were then processed in Assess using the same macro described above. The percent necrosis results from image analysis of these images were correlated to the visual estimates of leaf necrosis and to the original 8.4 MP TIFF images.
Correlations between visual disease assessments and percent necrosis from image analysis remained consistently high (0.75 at Fargo and 0.81 at Carrington, as reported above) until image resolution dropped below 21 thousand pixels per image (KP) at either site regardless of the image format or compression level. Better differentiation was seen when results from image analysis on the reduced images were correlated with the image analysis results of the original 8.4 MP TIFF images (Fig. 2). As image size decreased, the ratio of the number of pixels classified as necrotic to the number of pixels classified as healthy leaf remained nearly constant until the resolution was so low that the lesions could not be distinguished in the images (Fig. 3). The same held true for the TIFF images converted to JPEG images with various levels of compression. Correlations with the original 8.4 MP TIFF images were above 0.98 for TIFF images above 7.6 KP, high and medium high quality JPEG images above 21 KP, medium quality JPEG images above 84 KP, and low quality JPEG images above 337 KP (Fig. 2).
The artifacts mentioned by Russ (4) can be seen in Figs. 3 and 4, where they appear as repeating tick marks. These artifacts did not appear to impact the correlations, but were more noticeable on images with low quality compression and low resolution. This is something that researchers should take into consideration in future studies. Russ (4) gives a thorough coverage of this topic.
Image size was dramatically smaller for the JPEG images than the TIFF images with the 8.4 MP TIFF images requiring 24 megabytes per image while the low quality 8.4 MP JPEG images required only 235 kilobytes per image (Fig. 5). This difference is most dramatic on full-size images with high quality JPEG compression. Image size was not reduced appreciably between the medium high, medium, and low quality JPEG settings. Since the low quality JPEG settings showed a noticeable increase in artifacts, this setting should be avoided. The medium high quality settings used here are probably closest to the high quality settings on most digital cameras. There is little practical use for the 100% setting used here for the high quality setting. At 24 MB per image, only 10 images can be stored on a 256 MB memory card, while at 1 MB per image, 256 images can be stored. This makes studies with large numbers of samples practical.
Optimum Sample Size
The optimum number of leaves required for adequate analysis in future studies was determined by cutting individual leaves out of the original 8.4 MP TIFF images and saving them as separate TIFF image files with PhotoStudio 5 (ArcSoft, Inc, Fremont, CA). These files were then segmented with the macro and thresholds described above. This provided the percentage of leaf necrosis for each of the ten individual leaves for each plot from both study sites, a total of 1,118 leaves. The mean percentage leaf necrosis and associated standard deviation were calculated for each plot from both sites. The optimum sample size for each plot was determined as the 95% confidence interval that the mean leaf necrosis of the sampled leaves would fall within 10 percent of the mean of the original 10 leaves, using the formal probability statement from Neher and Campbell (1). The optimum sample size for each plot was then subjected to analysis of variance as described above.
The optimum number of leaves to collect was significantly effected by the treatments at both sites (P = 0.0033 at Carrington and P = 0.0004 at Fargo). At Carrington, the optimum leaf number ranged from 3.2 leaves for the untreated control, to 9.1 leaves for a strobilurin fungicide applied at flag leaf emergence (Feekes 10). Optimum leaf number at the Fargo site ranged from 2.3 leaves for the untreated control to 18.6 for a strobilurin at first flower emergence (Feekes 10.5). With the moderate to heavy disease pressure at both sites, the untreated control plots had large amounts of leaf necrosis with very little variance, requiring few leaves to obtain an adequate measure of disease in these plots, where as plots with adequate control had more variability in leaf necrosis.
Digital image analysis has a number of desirable qualities for disease assessment. Previous studies have shown image analysis methods to be very accurate and precise (2,3,5). Images can be acquired quickly in the field or brought back to the lab and imaged with a scanner or camera and processed later at the researcherís convenience. The only requirements are a scanner or digital camera, a computer, and analysis software. Assess image analysis software recommends using TIFF images since this is a lossless image format. However, since TIFF images do not incorporate compression, the image file sizes are large. For large studies, this requires a great deal of memory. In addition to the cost of memory for a digital camera, the ability to store images in a lossless format such as TIFF or RAW is usually not found in lower priced digital cameras. These factors combine to greatly increase the cost of using digital image analysis. The purpose of this study was to determine the impact of image resolution, image format, and compression settings on the actual results achieved with digital image analysis.
The lossey JPEG format and reduced image resolution significantly reduced file size. The JPEG compression algorithm was seen to cause artifacts as noted by Russ (4). However, in this study these artifacts did not appear to impact results. Results for image analysis with JPEG compression were not different from the original 8.4 MP TIFF images until resolution dropped below the point where small necrotic lesions could be distinguished. At image resolutions below 0.8 MP, small necrotic lesions became visibly blurred. When images are blurred, it is difficult to determine the correct parameters to use for analysis, but once those parameters are determined, much lower quality images are still useful. This suggests a high degree of robustness in this method. We found that if the image was of sufficient quality to visualize the lesion, then it was of sufficient quality for image analysis. Image size and quality should be selected with these factors in mind. We expect similar trends for other plant diseases.
The number of leaves imaged was limited due to the size of the flat bed scanner. Ten leaves was sufficient for all treatments at the Carrington site, where disease was severe. At the Fargo site, an optimum number of leaves approached 20 for some treatments. However, the sample size of ten leaves was adequate to give highly significant treatment affects and only affected those treatments with highly variable leaf symptoms. Larger numbers of leaves could be used by placing leaves on a uniform background, such as a piece of blue poster board, and capturing an image with a digital camera mounted to a tripod. This method can even be used in the field as samples are collected, if the weather is conducive. We conclude that the image analysis method of segmentation available in Assess is very robust and amenable to low cost digital cameras readily available at this time. Using a scanner, each sample required on average 30 seconds to tape to a sheet of paper and scan, so this method is probably not useful on large numbers of plots. Also, this method of sampling is destructive, but since only 10 flag leaves were collected it is unlikely that repetitive sampling would be a problem unless plots were very small.
The authors wish to thank Casey Childers for technical assistance and Lakhdar Lamari for critical review of this manuscript. This work was supported by the Texas Precision Agriculture Legislative Initiative.
1. Neher, D. A., and Campbell, C. L. 1997. Determining sample size. Pages 12-15 in: Exercizes in Plant Disease Epidemiology. L. J. Francl and D. A. Neher, eds. American Phytopathological Society, St. Paul, MN.
2. Nilsson, H.-E. 1995. Remote sensing and image analysis in plant pathology. Annu. Rev. Phytopathol. 15:489-527.
3. Nutter, F. W., Jr., Gleason, M. L., Jenco, J. H., and Christians, N. C. 1993. Assessing the accuracy, intra-rater repeatability, and inter-rater reliability of disease assessment systems. Phytopathology 83:806-812.
4. Russ, J. C. 1998. The image processing handbook, 3rd ed. CRC Press, Boca Raton, Florida.
5. Sherwood, R. T., Berg, C. C., Hoover, M. R., and Zeiders, K. E. 1983. Illusions in visual assessment of Stagonospora Leaf Spot of orchardgrass. Phytopathology 73:173-177.
6. Shokes, F. M., Berger, R. D., Smith, D. H., and Rasp, J. M. 1987. Reliability of disease assessment procedures: A case study with late spot of peanut. Oleagineux 42:245-251.