High Precision for Leaf Area Measurement and Instrument Development

Based on embedded technology and image processing technology, the study presents a memory minimizes algorithm, named as IBRA. Measurement of plant leaf area is an important parameter in the modern precision agriculture. How to fast, accurately, low-costly measure the leaf area, is a long-term project to be researched. A new measuring instrument of leaf area with low-cost and portable has been developed. It is a highaccuracy, portable measuring instruments for plant leaf area measurement.


INTRODUCTION
Leaf area is one of the important indicators of measuring crop canopy structure and a prominent parameter of diagnosing plant growth status as well as forecasting the growth model, which is also a valuable reference for practical management (Wilhelm et al., 2000;Ewert, 2004;Jonckheere et al., 2004).
Leaf area measurement instrument is a basic indispensable tool in modern precision Agriculture.How to measure the leaf area precisely and easily is extremely crucial for knowing well of growth and nutrient status.It also has a guiding significance for developing a productive, premium and efficient cultivation technology (Corney et al., 2012).
Using the computer technology to measure the leaf area can promote the accuracy and reliability, compared with the original coordinate paper method, coefficient method, copying weighing method, sampling method, estimation and other traditional methods (Hosoi and Omasa, 2009).
Currently, the methods of using a computer to detect are image detection and spectral scanning method, (Green et al., 2012) S. Malone and ZuoXin have presented a method based on image processing for measuring leaf area respectively (Malone et al., 2002;Zuo et al., 2006).
The method for measuring leaf area is highly accurate and non-destructive, but it is pretty complicate and every attempt should be done in similar distances in order to get the image, which is difficult and expensive.Therefore, to measure the leaf area, it is significant to develop an instrument which is efficient, highly accurate, low cost and portable.
Based on embedded technology and image processing technology, the study presents a memory minimizes algorithm, named as IBRA.Measurement of plant leaf area is an important parameter in the modern precision agriculture.How to fast, accurately, lowcostly measure the leaf area, is a long-term project to be researched.A new measuring instrument of leaf area with low-cost and portable has been developed.It is a high-accuracy, portable measuring instruments for plant leaf area measurement.

MEASUREMENT DESIGN
The rapid development of embedded technology and image processing technology provide a powerful support to the implementation of image processing.The main methods for acquiring image are photography and scanning.
Camera method seems effortless and easy to do, but it is hard to fix the distance accurately between the camera and leaves.So that, we must add a reference frame of the standard size and because of low virtual optical resolution, image dithering, aberration and other factors the measurement accuracy is not desirable.What's more, the camera equipment is costly which can meet the needs of accurate measurement, so scanning mode is more suitable for high precision measurement of leaf area (Zhao et al., 2012).
The main scanners are handheld scanner and flatbed scanner.Currently, the area measuring instruments developed by handheld scanners are much more popular, such as CI-203 portable laser leaf area analyzers.Handheld scanners are miniature and portable, but its disadvantages are obvious.For example, when measuring, people need to pull the measured items at a uniform velocity.This method fails to guarantee the measurement accuracy, especially when the leaf is too large, too small or too thin.
Compared with the cameras and handheld scanners, flatbed scanner has many advantages, for example, a fixed distance between the measured leaf and the photosensitive sensor and is easy to resolve the leaf curl problem.This study uses the miniature and portable flatbed scanner to develop a high-precision measurement instrument for plant leaf area.
Software and hardware design: The control parts of the measuring instrument use ARM9 or other more advanced embedded system.ARM9 board connects the scanner through a USB interface.The software parts use embedded Linux and QT platform and some software module such as Libusb and Scan image.After the ARM9 board powered on, it will start the Linux kernel first and then run the measuring software written by the QT platform.The system went to the graphical interface quickly, so the system can enter into the working state immediately after powered on.
In the process of area measurement, the system gets a large number of image lattice data transferred by the scanner from the USB port.The scanner has fixed distance between the measured object and its photosensitive sensor, so there are high correlation between the scanned leaf image points and leaf area.The scanner DPI (Dots per Inch) parameter shows the number of pixels per inch and according to the DPI value we can easily calculate the area of the blade.
Measurement algorithm: First, make a median filtering of the grayscale images got by the scanner in order to eliminate the noise and then process with Binarization method, convert the leaf part into black, then convert the wormhole and blank section into white (Diago et al., 2012).Thus the image will have a lot of black and white blocks.Measurement algorithms process is shown in Fig. 1.Finally, calculating the amount of pixel of each block separately and then we can work out the leaf and wormhole area.
Median filter: Median filtering is a nonlinear filtering technology of high efficiency and low memory consumption proposed by Tukey.
Median filtering can overcome the problem of image detail fuzzy caused by the linear filter such as neighborhood average filtering and least-mean-square algorithm and is effective to filter impulse interference and scanned image noise.It can filter the cusp wave interference noise perfectly and meanwhile, it can better protect the target image edge, which is paramount to accurate measurement of leaf area.Median filtering uses a sliding window which contains an odd number of Fig. 1: Algorithm flowchart points and uses the median of grayscale value of each point in the window to substitute the grayscale value of the specified point (Morillas et al., 2011a).
Currently, the typical and effective methods are one-dimensional/two-dimensional median filtering, maximum median filtering, window weighted median filtering, self adaptive median filtering and multiple median filtering, etc., (Morillas and Gregori, 2011b).
This study adopts the concise and fast planar median filtering algorithm processes the scanned image preliminarily and then uses an efficient algorithm to filter the interference caused by the stains.The definition of one-dimensional median filtering is: Extend the concept of median filtering to planar median filtering.The concept of the median filter to the two-dimensional, {x ij (i, j) ∈ I 2 } said digital image points of gray values, the filter window is A. In the window A, y ij is the median value of x ij points, then: Window A's shape can be a square, circle, or cross, etc.Through median filtering, the image data carries on binarization process.Black and white images generated, stored in a file, the data storage capacity reduced eight times as the measurement data saved in the flash-rom.

Isolation block recognition algorithm:
Next, use the isolation block recognition algorithm to identify the binary image file so as to distinguish the leaf and wormhole and then calculate their area.In the segmentation of isolation blocks, count the number of black points in each block.The small number represents smudge and the large number of black and white blocks which are not on the border are leaf and wormhole.Then, based on the scanner DPI, we can figure out each block-area.
Labeling algorithm is a basic method to determine the connected area of binary image (Swaraj Raman and Sukanya, 2012).According to the adjacent pixels in the image, mark each block.The maximum number of the blocks is the maximum value of the label.The maximum value must be analyzed clearly beforehand; otherwise it can lead to a memory overflow error.
In order to ensure measurement accuracy, the scanner resolution is set at more than 300 dpi.
Pixel matrix of A4 size image is 3531*2575, which contains about 9.1 M 8-bit grayscale values of the pixel.For such a large number of image data processing, use the ordinary methods of image processing will consume large amounts of RAM space.How to achieve high efficiency of measurement calculation with low RAM consumption deserves in-depth study.
This study presents a memory minimizes labeling algorithm, which solves this problem effectively with only a two-line buffer.
Mark each isolated block and then calculate the points of each block, meanwhile, record some useful information about the block's starting point coordinate and see whether it is in the picture edge, etc. Main approach of the algorithm is: First, Scan the black pixel of the binary image line by line from the top, mark each black image block and store the number into the buffer.The first line of the two-line buffer store the image processed intermediate results of the previous line while the second line store the intermediate results of the current line.Then merge the connected blocks in the two-line buffer, calculate the pixel number of each block and add them to a counter array based on a block number index.Last, copy the data of the second line in the buffer to the first line, then process the next line's image data circular until the end of all image data processing.The algorithm will get the color-block number of the color value and the pixel number of each block, the starting coordinate, whether it is at the border as well as other useful information.After the entire image has been transferred, swap the definition of the black and white block, repeat the same algorithm to get details of all the white blocks.The buffer used in processing the image information is only two lines, which can significantly reduce the memory consumption.
Apparently, the black and white block is background and the block which has a small number of pixels is smudge.Remove all this blocks and the rest blocks are leaves.The white block is wormhole which is not on the edge.Finally, according to the DPI value, it is easy to work out each area.

INTEGRATION OF INSTRUMENT
Adopt this proposal and algorithm to develop the measuring software and then port it successfully to ARM9 Samsung s3c2440 microprocessor platform.This study adopts the Canon lide200 flatbed scanner with the USB interface.

Selection of scanner parameters:
The resolution of the scanner software can be controlled by software, apparently, the greater resolution value, the more accurate the measurement precision is.The greater resolution value substantially increase scan time consuming and the greater amount information that need to be processed.
If we set the scanner resolution at 300 DPI and the horizontal and vertical spacing at 0.085 mm, then we can realize the precision of 0.1 mm measurement resolution and 0.01 mm² area measurement resolution.So in this study, we set the scanner resolution at 300 DPI.
Instrument calibration is paramount to the precision of the measuring instrument; this study references the following technical specifications: • JJF 1001-1998 common metrology terms and definitions • JJF 1059-1999 evaluation and expression of uncertainty measurement • JJF 1094-2002 evaluation of the Characteristics of Measuring Instruments At ambient temperature 20°C and relative humidity under 50 rh, use the precision is 0.02 mm vernier caliper as a calibration reference.Adjust the vernier caliper at 100.000 mm and put them horizontally and vertically on the scanner respectively.Set the scanner resolution at 300 DPI, count the number of horizontal and vertical pixel points of every 100 mm scanned image.After calibration of the measuring instrument, the horizontal and vertical resolution of the measuring accuracy and area measurement can reach 0.1 mm and 0.01 mm².
A new instrument was been manufactured for leaf area measuring.Figure 2 shows an actual measurement.In the measuring result, each leaf area and wormhole Fig. 2: One practical measurement area was given.Each leaf length, width and aspect ratio was calculated too.The whole measuring process takes about 20 sec.Then we can go ahead for the actual measurement and comparison.

COMPARISON OF RELEVANT INSTRUMENTS
In the current leaf area measurement instruments or measuring methods, many of them have the shortcoming of large accidental errors or large meansquare deviation of the measured values.
Here, we carry on the actual survey with many blocks and leaves and compare with the CI-203 portable laser leaf area analyzer.
Comparison using the known area block: Carry on the survey contrast with a square block.Use the block area measured by the vernier caliper as the actual value of the block area.
Choose three different sizes of square blocks to measure.The comparison between measuring results are show in Fig. 3 and Table 1.
During repeated measurements with a physical quantity, its measurement results for the normal distribution, that is, Gaussian distribution.We describe two parameters (x and σ) of Gaussian distribution to estimate random errors.Located in a set of measurements, measurement values for n: (3) Standard deviation σ x in Table 1 is calculated using Eq. ( 4), that is, the Bessel formula:    where, σ x : A measurement of standard deviation It represents the degree of dispersion of measurement results, being measured under the same conditions to the same limited measurement for n times.Small standard deviation σ x represents a measurement value-intensive, that is higher measurement precision and vice versa.
Precision indicates the extent of proximity between measurement results on the same physical quantity in the same conditions.That is repeatability of measurement, measuring the degree of diffusion of data.Measurement precision reflects random error of measurement, higher measuring precision indicate lesser accidental errors.We can study the standard deviation σ x of the actual measurement values in the Table 1, this leaf area measuring instrument has higher measurement precision than the CI-203.The result is clear.The relative error is determined by the difference between the measured value and the real value, which divided by the real value and then multiplied by 100%.The max relative error in the Table 1 is the maximum relative error value of the current measuring row.
Actual measurements with multiple blades: Then we use multiple blades to carry on the actual measurement comparison.Table 2 shows the comparison of leaf area of the actual measurement results.
We have 3 leaves several times to measure, the results are as shown in Table 2.
In the actual measurement, we found that the CI-203 fails to measure the thinner leaves, while this instrument has no requirement for the thickness of the leaf.Leaf 3 is larger than Leaf 2, but it is too thin to be measured by CI-203.According to the standard deviation σ x of the actual leaf area measurement, we can get the same conclusion: this leaf area measuring instrument has higher measurement precision than the CI-203.

CONCLUSION
This study uses ARM9 panel and scanner to realize the design of leaf area measuring instrument, with higher measurement precision and excellent repeatability and can keep the measurement from the influence of leaf shape, thickness and color.The scanner and ARM9 panel are lightweight, portable and battery-powered, which can measure multiple blades at one time.This study presents a memory minimizes labeling method with a concise and accurate algorithm as well as efficient code execution, greatly reduces the system demand for RAM and the product cost, provides a kind of new high-accuracy and portable measuring instrument for the measurement of leaf area.

Table 2 :
Comparison of leaf area of the actual measurement results (mm²) ‫̅ݔ‬