On-the-Fly Tree Caliper Measurement

In fruit and shade tree nurseries, there is a need to count and measure caliper for trees frequently so as to have an accurate inventory sufficiently before harvest since disease, pests and climate can change the yield from year to year. In some tree nurseries it is common practice to count the entire stock three times a year and to caliper them once a year. Both tasks are very labor intensive, involving crews of workers counting trees by hand over several weeks. Experience indicates that calipering and counting millions of trees manually can be error prone. There is a strong need to automate these tasks in the tree nursery industry to decrease labor cost and to improve inventory management. We have developed a device to count trees and to measure caliper while the trees are in the field. The device is designed to be mounted on a carrier passing through rows of trees in a nursery. Tedious tasks are reduced to a simple drive through that could be done simultaneously with tasks such as spraying or mowing. Here we describe the device and results from tests conducted in nurseries in Pennsylvania in 2010. Our experiments show that it is reasonable to expect an accuracy of approximately ±1 mm indoors and ±2.5 mm outdoors.


Introduction
Tree caliper is an important indicator of growth and yield. In forestry, a metric called "diameter at breast height" has been used to provide an estimate of the volume of timber that can be expected from a tree [Brickell 70]. In shade and fruit tree nurseries, trees are graded and their value is determined primarily by their caliper measurement. Therefore, nurseries need reliable means of measuring caliper, ideally while the trees are still in the field so that they can continually estimate their stock. It is desirable that the caliper measurement be made without requiring precise positioning relative to a specific tree-an ideal sensor would be mounted to a vehicle continually moving through a nursery. Such technology would help match inventory to orders ahead of time and could also help pinpoint growth problems in specific areas.
Upchurch et al. have described a system that uses an ultrasonic transducer for measuring tree trunk diameters [Upchurch 92]. Diameters of circular objects were calculated using the time interval for sound waves to travel from the transducer to the object and back to the sensor. A "V"-shaped hook was used to fix the back of the tree trunk relative to the sensor and the distance between the transducer and object decreased as the diameter increased. Such a device requires careful positioning by hand before a measurement can be taken. In previous work, we have reported an apparatus for determining a cross-sectional area of an object that could be used as a hand-held calipering device [Singh 00]. This device uses a number of lowcost infrared LEDs to measure the profile of a tree trunk in a plane. While this device has now been commercialized, it also requires manual positioning around a tree trunk.
Henning et al. have described a method to use a laser scanner to estimate tree diameter [Henning 06]. Thies et al. have also shown a similar system to measure taper and lean of trees [Thies 04]. Laser scanners produce range and bearing to objects in the scene albeit at a resolution that such scanning is only practical for larger trees that must be surveyed in forestry applications. Trees in nurseries range from ½ inch to 3 inches; at these calipers most commercial laser scanners cannot produce accurate caliper measurements since the angular resolution for most laser scanners is at best at ¼ degree. In previous work we have developed a system that used a combination of passive vision and laser ranging [Byrne 98]. Passive vision was used to determine the edges of a tree trunk while the distance to the tree was measured with a time-of-flight laser. This method requires careful calibration of the camera lens and works well in even lighting conditions. Strong shadows, however, can cause the trunk edge detection to fail because shadow edges can be visually stronger than the natural edges of a tree trunk.
Delwiche et al. have described a system to count and size fruit and nut trees in commercial nurseries [Delwiche 03]. An optical sensor was designed using a high-power infrared laser for illumination to allow operation with varying light conditions, including direct sunlight. The optical sensor was mounted on a cart and a rotary encoder was coupled to one of the wheels for displacement measurement. Signals from the optical sensor and rotary encoder were analyzed to determine trunk diameter, and running counts were maintained for the standard nursery size grades. Calibration tests showed that the system could measure trunk diameter with a standard deviation of 0.65 mm from a distance of 15 to 23 cm from the tree line.
The system that we have developed and tested doesn't require any motion to make a caliper measurement. This allows it to be used in a stationary or mobile application. Lens calibration is typically not necessary. Caliper is estimated from a single image of structured light projected into the scene. Multiple measurements of a tree from separate images can be median-filtered to produce a reliable and accurate estimate of caliper. This is comparable to the repeatability of a manual measurement made with an accurate electronic caliper.

Safety Emphasis
Our device uses laser diodes rated as Class III. These diodes have well-understood eye safety issues associated with them [Sliney 97]. Sustained exposure to the laser source such as in the case a person places their eye at the aperture of the caliper device can cause injury. There are several ways to mitigate such effects:  Operate at night when much lower power lasers (completely eye safe) can be effective.
 Use visible lasers with color imaging instead of infrared lasers. The advent of low-cost, high-resolution color imaging makes it possible to use visible lasers that operate with much lower power.
 Use an interlock that disables the laser when the device is not moving in the field.
We intend to investigate some of these options in the future.

Approach
We use a relatively simple approach to estimating caliper. Two planes of laser light are projected onto the scene and imaged with a camera. Caliper is computed as the average of the line widths found in the corresponding image. Since it is not possible to guarantee a fixed distance between the sensor and tree, we calculate a scale factor S that relates pixels in the image to actual distance. S is computed in each image simply as the ratio p/v, where p is the distance between the two planes of light in the image (in pixels), and v is their actual physical distance (Figure 1). The chief task of our computer vision algorithm is the robust computation of W t and W b , the widths in pixels of the projected lines on the tree in the corresponding images. While this is a simple computation in theory, robustly locating these lines is difficult given that the camera does not remain completely horizontal as it moves through the field and the presence of low branches and leaves produces extraneous reflections.
Once S has been computed, caliper is then computed as the average of W t /S and W b /S.

Results
Here we report results from two controlled tests conducted in April and May 2010 at Eisler and Adams County nurseries in Pennsylvania. Tests at Adams County Nursery were conducted inside a storage warehouse without control of ambient lighting but in the absence of direct sunlight. Tests at Eisler Nurseries were conducted outdoors in bright daylight conditions.

Indoor testing
In these tests the caliper device was placed on a table and kept stationary for the length of the experiment. Trees were individually moved in front of the laser as shown in Figure 3.
This process was used to measure 120 trees twice. Caliper estimates were logged for later analysis. Each tree was also measured using a handheld digital caliper and were graded by nursery professionals into standard grades. Figure 3. For indoor testing the caliper device was placed on a table and individual trees were moved (right to left) in front of the caliper to replicate the relative motion of the caliper. In our data set, we get 5-9 measurements per tree. Figure 4 shows each data point logged by the system, including multiple estimates of individual tree caliper. Figure 5 shows the data after multiple readings of each tree have been medianfiltered. Both figures show errors in estimation of caliper-this is the difference between caliper measurement using a hand caliper and the estimate from our device. The data in this plot show several items: • The error seems to be relatively unchanged over trees that range from 7 mm to 25 mm.
• There is a small (0.65 mm) bias (constant with tree size) of overestimating caliper. This is most likely due to "blooming" in the camera where the charge from saturated pixels spread into neighboring pixels.
• The standard deviation of the error is 0.68 mm.
Since our method delimits all the readings from a single tree, we can use a median filter to improve our estimates. Figure 5. Error (mm) in caliper estimation vs. ground truth after filtering. The multiple measurements made for each tree were median-filtered to yield a single result per tree. Also, the bias (mean error) has been removed. The standard deviation in the error is now 0.56 mm.

Outdoor testing
For outdoor testing, we attached the caliper device to a small cart using a four bar linkage that was kept at constant height using a rubber wheel. Figure 6 shows the caliper as it was deployed in the field. In one experiment, we calipered 50 trees while the caliper was moved at approximately 3 mph. We repeated this experiment 5 times to get a total of 250 caliper estimates. Figure 6. For outdoor testing the caliper was mounted on a four bar linkage and attached to a small cart that was towed through a field nursery. Figure 7 shows error in caliper estimates after they have been median-filtered. At 3 mph, the number of hits on a tree is smaller (typically 2-3) and because the ground is not even, it is not possible to keep the caliper pointing to the same place on the tree, so the data show a larger spread than with the indoor experiments. This chart shows a noticeable linear trend in the error. Since these trees have wider diameter, it is possible that the edges are not detected accurately. However we can adjust for this as a known bias. Figure 7. Error (mm) in caliper estimates vs. ground truth after median filtering. These data show a noticeable trend in the error as a function of the tree diameter. Without adjustment, the standard deviation is 3.2 mm. Figure 8 shows the same data as above after the trend and bias have been removed. This processing is able to reduce the standard deviation by a factor of 2.

Conclusion
Here we have reported first results with a device that can measure tree caliper "on-the-fly" in shade and fruit tree nurseries to automatically generate a database of tree caliper. Because the device is capable of determining when one tree leaves the field of view and the next one comes into view, it can also count trees. We have tested the device both indoors and in the field. Since our device uses infrared lasers, the significant differences between the indoor and field experiments have to do with ambient lighting conditions and with the ability to position the device to measure a tree trunk at the same position repeatedly. Generally much less laser power is necessary when operating indoors and low-cost components can be used. Our experiments show that it is reasonable to expect an accuracy of approximately ±1 mm indoors and ±2.5 mm outdoors. It should be possible to get more accurate data by increasing the frame rate of the system (faster data acquisition) or conversely by slowing down the motion of the caliper. In the near future we plan to test the device in large nurseries in Washington, Oregon and California and gather significantly larger datasets.