Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

NI-IMAQ Vision and LabVIEW Automate Seedling Analysis

  Print

Author(s):
Anne Menendez - GTFS

Industry:
Imaging Equipment

Products:
Vision, LabVIEW

The Challenge:
Developing a flexible software-based image processing system for monitoring the quality of seedlings and predicting counts of good seedlings at final day of germination.

The Solution:
Creating the CASA program, developed with IMAQ Vision software (formerly Concept V.i) and LabVIEW, to count seedlings, measure their leaf area, and generate reports.

"Another importatn benefit of using LabVIEW for such an application is the ability to integrate it with other LabVIEW-based instrument conrol systems, such as a motorized conveyor belt or soil analyzers, if needed."

Introduction
GTFS, a National Instruments Alliance Program member, was charged with coming up with a software program for Goldsmith Seeds that counted test seedlings placed on a tray, measured leaf area, and calculated a quality or uniformity factor for the tray.

The software program needed to be flexible enough to process trays of several varieties of seedlings with different leaf size, color, and shape, and germinated in soils with different color and texture. In addition, the application had to be easy to adapt to new measurements and functions requested by the plant breeders as they gained experience and confidence with the system. The choice of  NI-IMAQ Vision software and LabVIEW proved ideal for designing and implementing the program, which we called Computer Automated Seed Analysis (CASA). Using the LabVIEW graphical user interface (GUI), we created an easy-to-use operator interface for setting the parameters of the application, developing a data-base of configuration files per variety of seedlings, and presenting results. The LabVIEW Data Analysis Library offered numerous possibilities for calculating measurements using linear algebra, statistics, regression, and more. Finally,        NI-IMAQ Vision added the vision functions necessary for the video capture, image display, image processing, and analysis.

The Image Processing System
The system is composed of a Pentium computer equipped with a color frame-grabber board and color camera. The camera is mounted vertically on top of a bench. Operators move the trays of seedlings one at a time on the bench and place them at a fixed location defined by metal brackets. The bench is covered with a black tarp to attenuate fluctuations of luminosity in the greenhouse as daylight and weather conditions change. From the CASA main menu, the operator initiates the capture of an image and enters the serial number of the tray. The image appears on the screen and the leaves identified by the program are highlighted in red. The operator accumulates their count, sizes and statistical data in a report that can display, save, and print at any time. Statistics include the average leaf area and standard deviation as well as standard and weighted uniformity factors. Prior to this automated analysis, the operator has to select (or load from disk files) several parameters defining how the program should identify the seedlings to measure.

Setting an Experiment
The application settings are critical to running an experiment. These include (1) configuring the image acquisition card, (2) delimiting the portion of the tray to analyze, (3) defining the color of the leaves to analyze and, if necessary, (4) defining an image processing sequence to filter unwanted objects and prepare the leaves for measurement. Operators can save the definition of these settings so that they can quickly launch an experiment when analyzing a variety of seedlings previously studied.

With analysis functions of the NI-IMAQ Vision library, the CASA system can detect and measure objects in an image, provided that they can be converted into binary objects. This conversion is performed by isolating pixels that belong to a color range using an operation called thresholding, and, if necessary, retouching the resulting binary objects to correct for unwanted selections and shape alterations. The image functions used for this process are called binary morphology functions.

Operators can combine them to define an image processing sequence automatically applied to the image prior to its analysis. Typical corrections include opening, closing, eroding, and dilating binary objects; filling holes; separating touching objects; and filtering with respect to size or to the ratio of size to the average size of objects. For example, if white spots appear on leaves because of a defect or light reflection, thresholding a color range from the green of the darkest leaves to white will isolate full leaves. However, this choice causes problems if the soil contains white grains of fertilizer. An alternative is to limit the threshold interval to the green shades, generate binary objects showing holes if any white spots are on the leaves and to fill these holes later. After evaluation of the best imaging sequence, the operator has to make the decision on how to restore the full leaf area of the seedlings and remove all unwanted objects in the entire image. From a set-up menu, operators can edit this sequence by combining functions presented in a list box along with their appropriate input parameters and apply it to sample images for testing.

Operators can validate leaf color choice and then easily study an associated image processing sequence. First, the operator points at a leaf in the image. The program highlights all other objects with the same color plus or minus a tolerance range after executing the image processing sequence in use. The operator can then perform the following adjustments until he or she is satisfied with the selection of the leaves: (1) change the tolerance range of a color component, (2) switch the representation of the color components from RGB to HSI, (3) click at another point in the image, or (4) change the image processing sequence.

Conclusion
We have used the CASA program at Goldsmith Seeds (Gilroy, CA) since May 1995 and have already made several modifications to address new demands of the researchers. For example, we added a measurement to the output report that was accidentally discovered based on the observation of existing results. We also added a new adaptive filter to the list of functions available to define an image processing sequence. The LabVIEW-based program made it easy to implement these changes - we can implement many other extensions as the definition of seedling quality criteria evolves. Another important benefit of using LabVIEW for such an application is the ability to integrate it with other LabVIEW-based instrument control systems, such as a motorized conveyor belt or soil analyzers, if needed.

For more information, contact:

 Anne Menendez

GTFS Inc.

2455 Bennett Valley Road, Suite 100c

Santa Rosa, CA, 95404

Tel: (707) 579-1733

Fax: (707) 578-3195

E-mail: gtfs@crl

Browse All Case Studies »

  Print