# Single Leaf Area Measurement Using Digital Camera Image

Baisong Chen, Zhuo Fu, Yuchun Pan, Jihua Wang, Zhixuan Zeng

► To cite this version:

Baisong Chen, Zhuo Fu, Yuchun Pan, Jihua Wang, Zhixuan Zeng. Single Leaf Area Measurement Using Digital Camera Image. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.525-530, 10.1007/978-3-642-18336-2_64. hal-01562764

HAL Id: hal-01562764

https://inria.hal.science/hal-01562764

Submitted on 17 Jul 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Single Leaf Area Measurement
Using Digital Camera Image

Baisong Chen<sup>1,2</sup>, Zhuo Fu<sup>3</sup>, Yuchun Pan<sup>2</sup>, Jihua Wang<sup>2*</sup>, Zhixuan Zeng<sup>2</sup>

<sup>1</sup> School of geography, Beijing normal university, Beijing 100875, China

<sup>2</sup> National Engineering Research Center for Information Technology in Agriculture,
Beijing 100097, China

<sup>3</sup> Satellite Environmental Application Center, Ministry of Environmental Protection
of the People's Republic of China, Beijing 100029, China

E-mail: First author: fage978@126.com; Corresponding author: wangjh@nercita.org.cn

**Abstract.** Leaf area index is one of the most important parameters in ecological and environmental studies. This paper presents a method for single leaf area measurement based on the counting of the leaf pixels in digital leaf image. Initially, the target leaf is put on a piece of white paper on which four endpoints of an equal-length and orthogonal cross are printed. A background color threshold is then set to separate the white background pixels from the leaf pixels. After the removal of the background pixels, the leaf pixels are left; and the ratio of the number of leaf pixels to the number of pixels of the reference facet formed by the four control endpoints is equal to that of their areas. The single leaf area can then be computed easily based on this proportional relation. Analysis and experimental results indicate that the proposed method is an efficient and precise method for single leaf or leaf-like object area measurement.

**Keywords:** Digital camera; Leaf area; Area measurement; Image processing

## 1 Introduction

Leaf is a key functional organ of photosynthesis and transpiration, the size of left area impacts greatly on the physiological function of the plants. LAI (Leaf Area Index) is also an important input parameter of some plant, ecology and environment models [1, 2], thus fast and accurate estimation of leaf area is significant. The currently available approaches for single leaf area measurement are mainly including: using leaf area measuring tools, grids approximation, weighing [3], using planimeter [4], displacement volume computation [5], regression models [6-8], and image processing [9-11], and so on. Among them, using leaf area measuring tools or planimeter is highly accurate, however, with high cost of equipments as well. And other methods such as the grids estimation, weighing, displacement computation and regression models are available for different kinds of leaves and low in cost, but their accuracy is low too. Considering the cost of tools, applicability, accuracy, efficiency, and the convenience for outdoor measurement, the image processing method can be a
considerable method. Based on this, this paper proposes a method for computing
single leaf area by separating the background and counting the leaf pixels.

## 2 Materials and method

### 2.1 Leaves for experiment and their areas

Thirty pieces of Japan Euonymus leaves with different shapes were selected as experimental materials. They were numbered and put on a 10×10cm white referent paper, respectively. And then they were scanned with a high resolution, respectively. The number of pixels $N_B$ in the entire 10×10cm region was then counted in Photoshop, and the number of non-background pixels $N_L$ were then computed by removing the white background pixels. Because the scanner images objects in a progressive and orthographic projection manner, the proportion of the area of leaf $S_L$ and the area of background $S_B$ will equate to that of the number of leaf pixels and the number of background pixels.

$$ \frac{S_L}{S_B} = \frac{N_L}{N_B}. \qquad (1) $$

Using equation (1), we can compute the actual area of every leaf respectively, and their areas are then considered as true values in the validation section.

### 2.2 Method and procedures

The principle of this proposed method is the same as that of the above method for measuring leaf area by a scanner, that is, using the proportions of the area and the number of pixels. For the convenience of taking pictures on field, we use a common digital camera rather than a scanner. And for the convenience of program processing and the insurance of accuracy, the referent paper is replaced by four endpoints of an equal-length and orthogonal cross printed on a piece of paper. So the main procedures are as follows:

1) Four endpoints of an equal-length (10×10cm) and orthogonal cross are initially printed on the middle of a piece of common A4 paper. Leaves are then put onto this paper respectively, unwrapped with its centre lapping on that of the cross, leaving four endpoints uncovered. If the leaf cannot be unwrapped naturally, a cut or clip is then needed.

2) Choose suitable settings and parameters for the camera, and then take pictures of leaves respectively, bearing in mind that the primary optical axis should be perpendicular to the background paper with its focus aiming at the centre of the leaf. This ensures the correctness of above equation (1).

3) After the above image acquisition, we obtain images with white background, green leaf, and four black dots. Initially, we find the coordinates of the four endpoints
on an image. And from these coordinates, we can compute the distances and included
angle of the four endpoints. Because we had 4 endpoints of an equal-length and
orthogonal cross printed on the paper, then their corresponding points in an image
should also be equal-length and orthogonal, if the positions of camera and leaf are
right when the picture is taken. Thus, the difference of the in-image distance and the
actual distance should not be larger than a threshold, say, 1% of the longer distance.
Also, the difference of the included angle should be less than one degree. If they do
not meet these conditions, then the positions of the camera and the leaf may be wrong
during taking picture, for example, the camera would be in a gradient position. If this
is the case, then, equation (1) would no longer hold in such images, and thus they
need to have picture retaken. If the image is available, a further operation can then be
performed to remove the background. The background is white (RGB: 255, 255, 255),
but it will be slightly changed due to the color error of the CCD, thus we can set a
color threshold, say RGB greater than 230, to filter those background pixels. After the
background pixels are counted, there are pixels of leaf and those four endpoints left.
And the four points can be very tiny, so we can ignore their area. This means these
non-background pixels can be considered as leaf pixels. Thus, we can compute the
numbers of background and leaf pixels, and the area of background (10×10cm).
Finally, the area of the interested leaf can be computed via equation (1).

## 2.3 Flowchart for the image processing

Based on the above descriptions, we can conclude the main image processing
procedures as: 1) coordinates acquisition, 2) distances and included angle
computation, 3) error detection, 4) separation of background, 5) left pixels count, 6)
leaf area computation. And then the flowchart for programming could be as follows.

<figure><img src="image_2.png" /><figcaption>**Fig. 1.** The flowchart for the image processing of single leaf area measurement</figcaption></figure>

Here are some details need to notice during programming: 1) after four endpoints
are picked, two distances can be computed, then the included angle can be calculated
by: $\cos\alpha = (\text{vector1} \cdot \text{vector2}) / (|\text{vector1}| * |\text{vector2}|)$. Again, the differences of
distances and included angle should not be exceeding, otherwise the program should
give an alert and terminate; 2) the RGB threshold for background separation can be
different because of different lighting situations and camera settings, based on many
experiments, we recommend RGB (230, 230, 230) as a threshold, pixels with R, G,
and B values all greater than this can be considered as background; 3) if the
differences of distance and included angle are not exceeding, then the average number
of pixels should be used to compute the number of pixels of the 10×10cm square; 4)
leaf area computed by equation (1) is just one side area of the leaf area, if area of double sides is wanted, a multiplication with two is then needed.

## 3 Results and discussions

For the convenience of program processing, based on the above method, we developed a program within VC 6.0 and its MFC and an open JPEG lib called JpegLib. To test the accuracy and efficiency of this method, all the selected leaves were measured by this program, then, we computed the RMSE for every single leaf via the following formula:

$$RMSE = \sqrt{\frac{1}{n} \sum_{i=1}^{n} (S_{m} - S_{t})^{2}} . \qquad (2)$$

Where n is total number of leaves, $S_m$ is the area of a numbered leaf measured by program, $S_t$ is its corresponding true value of area. To find a best resolution for this type of leaf, we took pictures of these leaves with different resolutions, and then we computed the RMSE and recorded the average processing time for every image, results are showed in the Table 1 below.

<table><caption>**Table 1.** The RMSE and processing time for single leaf area calculation at different image resolutions</caption><thead><tr><td>Resolution</td><td>RMSE (cm²)</td><td>Average processing time (ms)</td></tr></thead><tbody><tr><td>640×480</td><td>0.07</td><td>23</td></tr><tr><td>1024×768</td><td>0.04</td><td>78</td></tr><tr><td>1600×1200</td><td>0.02</td><td>221</td></tr><tr><td>2048×1536</td><td>0.02</td><td>617</td></tr><tr><td>2272×1704</td><td>0.02</td><td>1387</td></tr></tbody></table>

Configurations: CPU Pentium D3.2G, 2G DDR2 800RAM, WinXP; The best resolution would vary for different objects.

As indicated by Table 1, the RMSE remains the same when the resolution is higher than 1600×1200; instead, higher resolution image demands larger storage space and longer processing time. A Jpeg decoding is needed in every time when the program reads the image file, also, a full traverse of all pixels is needed when the program tries to count the amounts of the background and leaf pixels. Thus, there is no benefit to using a resolution higher than 1600×1200 for leaves like Japan Euonymus's. Therefore, the best image-taking resolution is 1600×1200.

To test the stability of this method, we took 20 pictures for a single leaf using the best resolution, and then we computed the area for every picture, and based on the results, we got the following basic statistics in Table 2.

As shown in Table 2, the coefficient of variation and mean relative error are both small, indicating that the areas are mostly approximate, and this method is highly accurate and stable.

The principle of this proposed method is quite similar to that of the reference [9]. To compare these two methods, we took one picture for every selected leaf at the best
resolution, and then we computed areas using both methods, respectively. The results are shown in Fig. 2 below.

<table><caption>Table 2. The statistical results of 20 area measurements for a single leaf at resolution of 1600×1200</caption><thead><tr><th>True area(cm²)</th><th>Min(cm²)</th><th>Max (cm²)</th><th>Mean(cm²)</th><th>Standard deviation(cm²)</th><th>Coefficient of variation</th><th>Mean relative error</th></tr></thead><tbody><tr><td>5.26</td><td>5.16</td><td>5.35</td><td>5.27</td><td>0.06</td><td>1.1%</td><td>0.2%</td></tr></tbody></table>

Note: Mean relative error = |measured area - true area| / true area × 100%.

<figure><img src="image_3.png" /><figcaption>**Fig. 2.** The comparison of measurements of 30 pieces of leaves using two different methods</figcaption></figure>

As shown in Fig. 2, the results of the two methods are quite similar, with high correlation too. But, there is still an improvement in accuracy in our method. Because of the virtual equal-length and orthogonal cross, the program can determine if the positions of camera and the leaf are correct when the picture is taken. This ensures the correctness of equation (1) and thus avoids the gross error and improves the accuracy.

Our method distinguishes the leaf pixels from the background ones by means of their color difference. This brings additional benefits such as: automatic removal of the holes and the slear or ill spots. This method can also be used to measure areas of some leaf-like slices such as paper money and so on.

## 4 Conclusion

This paper proposes a method for single leaf area measurement by means of counting of the background and leaf pixels. In this method, a virtual equal-length and orthogonal cross is adopted to avoid the potential gross error and improve the accuracy of leaf area measurement. Experiments indicate that the best image resolution for moderate or small leaves is 1600×1200. This method is also available for the area measurement for any leaf-like slice.
**Acknowledgments.** This work was supported by the National Key Technology R&D Program of China (No. 2008BAJ08 B03). The authors would also like to thank the anonymous reviewers for their constructive comments and suggestions.

**References**

1. Chen, J.M., Pavlic, G., Brown, L., et al: Derivation and Validation of Canada-Wide Coarse-Resolution Leaf Area Index Maps Using High-Resolution Satellite Imagery and Ground Measurements. Rem Sens Environ. 80: 165-184 (2001).

2. Jongschaap, R.E.E.: Run-Time Calibration of Simulation Models by Integrating Remote Sensing Estimates of Leaf Area Index and Canopy Nitrogen. Eur J. Agron, 24(4): 316-324 (2006).

3. Diao, J., Lei, X.D., Hong, L.X., Rong, J.T., Shi, Q.: Single Leaf Area Estimation Models Based on Leaf Weight of Eucalyptus in Southern China. J Forest Res. 21(1): 73-76 (2010).

4. Gist, C.S., Swank, W.T.: An Optical Planimeter for Leaf Area Determination. Am. Midi. Nat.. 92 213-217 (1974).

5. Chen, J.M., Rich, P.M., Gower, S.T., Norman, J.M., Plummer, S.: Leaf Area Index of Boreal Forests: Theory, Techniques, and Measurements. J. Geophy. Res. 102 (D24): 29,429-29,443 (1997).

6. Williams, L., III, Martinson, T.E.: Nondestructive Leaf Area Estimation of ‘Niagara’ and ‘Dechaunac’ Grapevines. Sci Hortic-Amsterdam. 98(4): 493-498 (2003).

7. Vertessy, R.A., Benyon, R.G., O'Sullivan, S.K., Gribben, P.R.: Relationships between Stem Diameter, Sapwood Area, Leaf Area and Transpiration in a Young Mountain Ash Forest. Tree Physiol. 15: 559-567 (1995).

8. Kumar, R.: Calibration and Validation of Regression Model for Non-Destructive Leaf Area Estimation of Saffron (Crocus Sativus L.). Sci Hortic-Amsterdam. 122: 142-145 (2009).

9. Xiao, Q., Ye, W.J., Zhu, Z., Chen, Y., Zheng, H.L.: A Simple Non-Destructive Method to Measure Leaf Area Using Digital Camera and Photoshop Software. Chinese Journal of Ecology. 24(6): 711-714 (2005). (in Chinese with English abstract).

10. Caldas, L.S., Bravo, C., Piccolo, H., Faria, C.R.: Measurement of Leaf Area With a Hand-Scanner Linked to a Microcomputer. Revista Brasileira de Fisiologia Vegetal 4 (1): 17-20 (1992).

11. Li, M., Zhang, C.L., Fang, J.L.: Extraction of Leaf Area Index of Wheat Based on Image Processing Technique. Transactions of the CSAE. 26(1): 205-209 (2010). (in Chinese with English abstract).