INTRODUCTION

CAN_EYE is a free software developed at the EMMAH laboratory (Mediterranean environment and agro-hydro system modelling) in the French National Institute of Agricultural Research (INRA). The authors remind that this software is a didactic product made only for pedagogic uses. It is protected in France by Intellectual Property Regulations and abroad by international agreements on the copyright. It can be downloaded at http://www6.paca.inra.fr/can_eye. For any information, question or bug report, please contact can_eye-paca@inra.fr

CAN_EYE specific features

CAN_EYE is an imaging software (Operating system: only Windows) used to extract the following canopy structure characteristics from true color images (either acquired with a fish-eye or with a classic objective) * PAI : Plant Area Index * ALA : Average Leaf inclination Angle * FAPAR : Fraction of Absorbed Photosynthetically Active Radiation * FCOVER : Vegetation cover fraction * Bidirectional & mono-directional gap fraction CAN_EYE is designed to process several images corresponding to a given plot at once with optimal performances. The images can be either RGB images or binary. It can be used to process:

1. DHP: Digital hemispherical photographs (derivation of PAI, ALA, FAPAR, FCOVER and gap fraction) acquired with a fish-eye+ camera system 2. DP57: Digital images acquired with a classic camera inclined at 57.5° from the vertical (measurement of PAI, and Gap fraction at 57.5°) 3. DP0: Digital Images acquired at nadir (vertical camera) to estimate the vegetation cover fraction (FCOVER)

CAN_EYE has a set of specific features that improves its efficiency, accuracy, flexibility and traceability:

 Efficiency: a series of images is typically processed within 2 to 20 minutes, depending on the complexity of the images, the experience of the user and the performances of the used computer.

 Accuracy: the image conversion into a binarized image (green vegetation/other is performed through an interactive classification process. This provides more flexibility to separate green elements from the sky or the soil and allows acquiring images from both above or below the canopy.

 Flexibility: CAN_EYE allows calibrating the imaging system, as well as defining the area of interest. Interactive masking tools allow the user to eliminate parts of the photos contaminated by undesirable objects. Interactive zooming tools are also included.

 Portability : CAN_EYE is very easy to install  Traceability: CAN_EYE was developed such as all the processing steps are tracked. For these purposes, an html report and output documents (excel format) as well as intermediate results are automatically generated by the software.

CAN_EYE basic principles

Figure 1 provides an overview of the different steps required to process series of images with CAN_EYE:

Set up of the processing

The user first selects the menu corresponding to the type of images he has acquired (DHP, DP57, DP0), if they are in RGB colors or binary and acquired upward (looking at the sky) or downward (looking at the soil).

After selecting the directory where the images to be processed are stored, the user has to define the characteristics of the processing. This setup configuration can be saved and used to process another series of photos (Figure 1, step 1). Note that for hemispherical images, a calibration method is proposed to characterize most of the fish-eye lens +camera systems.

When selecting binary images, the following steps are not required and CAN_EYE can be used in batch processing (by selecting the directory that contains all the series of images to be processed) to automatically generate the outputs.

Pre-processing the images (in case of RGB images)

The images are loaded and displayed in a window. It is possible to remove interactively the images that the user does not want to process. At this stage, it is possible to mask parts of the images that are undesirable. In addition, the 'gamma' factor can be changed to brighten or darken the images and provide a better visual discrimination between the vegetation elements and the background (Figure 1, step 2).

Segmentation (in case of color images -RGB)

The segmentation is the most critical phase. It is an interactive step since the colors associated to each class depend on the illumination conditions and on the objects themselves. Further, some shaded (downward looking) or overexposed (upward looking) areas may make the distinction between green vegetation and background more difficult. The number of classes must be first set up (Figure 1, step 3). The user can choose between:

• 2 classes: green vegetation and background: the user must classify all the pixels of one of the two classes and all the unclassified pixels are considered to belong to the other class. It is generally more efficient and fast to choose the class that corresponds to the one represented with the less number of colors.

• 3 classes: green vegetation, background and mixed pixels: for both classes, the user selects the corresponding pixels. The remaining non classified pixels are considered as mixed and are processed as such during the binarisation process. This segmentation method is more tedious and time demanding than the one with 2 classes only. Note that at the beginning of the classification process, the user can use indices to roughly classify the images by thresholding methods (Figure 1, step 4) and can then interactively refine his segmentation (Figure 1, step 5). Once the color allocation to classes is completed, the images are transformed into binary images.

Generation of the outputs

This last step is automatic and does not require interaction with the user. The images are binarised using the segmentation results (Figure 1, step 6). A series of files are produced and stored in a directory located where the initial images were stored. The outputs (Figure 1, step 7) include a report file (html format) where all the elements of the processing are described. Additional text files (EXCEL or ASCII format) are also created where gap fractions, computed PAI, ALA, FAPAR and FCOVER are saved, depending on the type of processed images. Optionally, intermediate results can also be stored, allowing CAN_EYE to run in batch mode to perform new or additional processing. Note that there is also a possibility to summarize the results from series of CAN_EYE results in an excel file. Hardware and software requirements CAN_EYE is a software developed under MATLAB© and can be installed on any computer working under windows OS system. It is a compiled version that does not require to install MATLAB© on the computer. However, to use CAN_EYE, the Matlab Component Runtime (MCR) is mandatory. The MCR is a collection of libraries required to run compiled MATLAB© codes and is downloaded for free. Note that each CAN_EYE version is associated to a given MCR version indicated in the name of the CAN_EYE installation file. The required MCR version should be automatically installed when installing CAN_EYE. However, sometimes, the automatic installation of the matlab component runtime can be very slow or does not work due to specific firewall or anti-virus settings. Therefore, the installation must be achieved manually after downloading (http://fr.mathworks.com/products/compiler/mcr/). Refer to section 2 or the CAN_EYE website for more information (http://www6.paca.inra.fr/can_eye). Note that CAN_EYE is no more supported on 32bits machine since version 6.43 (that can still be downloaded from the web site).

1.4.

Copyright and limitations of responsibility The CAN_EYE software and the accompanying documentation described herein are provided as freeware. INRA reserves the right to make changes to this document and software at any time and without notice. INRA shall not be liable for any direct, consequential, or other damages suffered by the use of the CAN_EYE software package or its documentation.

1.5.

Upgrading the version A dedicated web site is available for the CAN_EYE software at the address: http://www6.paca.inra.fr/can_eye. This site is regularly updated and new versions are available as well as a small FAQ. When downloading CAN_EYE, you are asked to provide your e-mail. You will then be automatically informed of new releases. You can also subscribe to News on the web site.

1.6.

Bug report CAN_EYE is aiming at being free from bugs. However not all the situations have been tested, and possible remaining bugs may exist. It is therefore recommended to use always the latest CAN_EYE version available.

To report a bug, send a bug report to can_eye-paca@inra.fr. The file "CAN_EYE_LogFile.txt" located in the directory C:\Users\username\AppData\Local\CAN_EYE (where username corresponds to the login name of the windows session) must also be attached to your message. The user may also add an example of the processed images and the lens calibration parameters. Note that the time required to fix the bug will vary depending on its nature, and the workforce availability at INRA. We will try to do our best to answer rapidly.

To facilitate the understanding of the bug report, the bug report may also contain additional information on the previous steps achieved before the bug happens: number of processed images, type, size, format, number of classes, etc... Send also eventually your parameter file (located in C:\Users\username\AppData\Local\CAN_EYE\Param_V6 where username corresponds to the login name of the windows session).

INSTALLATION

 Check the system type: 32 bits/64 bits: Select the "My Computer" icon on your desktop. Right-click the icon and select Properties from the menu. Check the item "system type".

 Download the CAN_EYE installation file compatible with your system. Click twice on the CAN_EYE_VX.xx_Web_RYYYYy_ZZbits, (X.xx is the version number, YYYYy is the year and version of the matlab component runtime, and ZZ is your system type).  Once the installation is prepared, the CAN_EYE installer automatically opens. Note that you need to be connected to internet, otherwise use the connection settings button on the top right of the windows. Click "NEXT>"

 Choose the installation directory. You can also choose to have a shortcut on your desktop (check the box). Then click "NEXT>"

 The system is checking if the compatible Matlab Component Runtime (MCR) is already installed on your computer. o If the MCR is not installed, the following window opens, select the installation folder, Then click "NEXT>"

Read the license agreement and select yes to continue the installation o If the MCR is already installed, the following window opens, then click "NEXT>"

The system then confirms the installation (including the MCR installation if necessary). You can cancel or go back or install by clicking "INSTALL"  A waitbar is then displayed, showing the progress of the installation (note that it can take several minutes, especially if the MCR is installed) and a confirmation window is displayed.

 Click on "FINISH"

 To be able to run CAN_EYE from the windows startup menu or from your desktop icon, you need to perform one last manipulation. On the desktop icon CAN_EYE, right click, "properties", "shortcut" tab. Copy/Paste the character string from the "Target" item into the "start in" item (which should be empty at first) and delete CAN_EYE.exe" at the end. If the program is installed in C:\Program Files\, then o the target path will be: "C:\Program Files\CAN_EYE\application\CAN_EYE.exe" o the starting path will be: "C:\Program Files\CAN_EYE\application\" You need to do the same for the CAN_EYE icon in the windows start menu. If the Icon does not appear in the list, then look for it in "all programs"  Click twice on the CAN_EYE icon to run the software. After a moment, the CAN-EYE main menu appears.

USING CAN_EYE STEP BY STEP

Choosing the image type to be processed

Series of images (either 'jpg' or 'TIF' format) to be processed at once must be stored in the same directory (Figure 2). These images are assumed to correspond to the same ESU (Elementary Sampling Unit) inside a field.

CAN_EYE accepts only TIF and JPEG images. The images can be of any size (resolution). However, all the images to be processed concurrently and stored in a single directory should have the same format, size, camera setup (zoom, …), as well as the same direction (upward or downward). If this is not the case, create as many directories as combinations of format, size (as well as camera set-up and direction).

The illumination conditions should be about the same within a series of images. If there are large differences in illumination conditions (such as strong direct light or strong diffuse conditions), it is recommended to split the series of images into homogeneous sub-series.

No more than 25 images can be processed by CAN_EYE at once. Consequently, if more than 25 images are available for the same ESU, the user must split them into 2 or more directories.

Note that considering the assumptions made in CAN_EYE (Poisson model), it is not correct to estimate the Plant Area index from the gap fraction using a single image. A minimum of 8 to

The image naming convention requires no special characters (such as '.' '&',…). The postfix should be either .TIFF (TIF) or .JPG (JPEG). The image name is then tracked later through the processing and report files.  Color DHP (RGB) (jpeg or TIF) acquired with the system: o upward : camera on the ground looking towards the sky o downward : camera above the canopy looking towards the soil Select the images to be processed. Results will be stored in a sub-directory created in the image directory and called CE_P180_imagedirectoryname  Binary DHP i.e, images that have already been classified by the user with another tool than CAN-EYE. These images must be a gray level image (Red Channel=Green Channel=Blue Channel) in TIF format, unsigned integer 8 bit (uint8). Only 3 values are possible: 0 indicates that the pixel is vegetation, 100 indicates the pixel is a gap, 255 indicates a masked pixel. All the images corresponding to the same ESU (Elementary Sampling Unit) must be stored in a zip file. Select the directory where the zip files are stored. All the zip files will be processed, and results will be stored in subdirectories called CE_P180_zipfilenames. DP57: Digital Photographs acquired with a camera inclined at 57. 5°

Select 'Digital Photos at 57°'. This Menu allows the processing of images acquired with a camera inclined at 57.5° from the vertical. For this particular direction the gap fraction is independent on leaf inclination angle [START_REF] Weiss | Methods for in situ leaf area index measurement, part II: from gap fraction to leaf area index: retrieval methods and sampling strategies[END_REF]. This allows the derivation of PAI only.

It is possible to directly process:  Color DP57 (RGB) (jpeg or TIF) acquired with the system: o upward : camera on the ground looking towards the sky o downward : camera above the canopy looking towards the soil Select the images to be processed are stored. Results will be stored in a sub-directory created in the image directory and called CE_P157_imagedirectoryname  Binary DP57 i.e, images that have already been classified by the user with another tool than CAN-EYE. These images must be a gray level image (Red Channel=Green Channel=Blue Channel) in TIF format, unsigned integer 8 bit (uint8). Only 3 values are possible: 0 indicates that the pixel is vegetation, 100 indicates the pixel is a gap, 255 indicates the pixel is masked. All the images corresponding to an ESU (Elementary Sampling Unit) must be stored in a zip file. Select the directory where the zip files are stored. All the zip files will be processed, and results will be stored in subdirectories called CE_P57_zipfilenames. o upward : camera on the ground looking at the sky o downward : camera above the canopy looking at the soil Once the user has chosen one of these two options, he is asked to choose a series of images (either 'jpg' or 'TIF' format) that he wants to process at the same time. Then the user is asked to provide the CAN_EYE processing parameters. Results are stored in a subdirectory called CE_NADIR_Directoryname.

Defining the processing parameters

Once the directory containing the images to be processed is selected, the user must provide the processing parameters (including optics characterization and CAN_EYE specific parameters) that differ depending on the camera/lens type and settings. Information must be manually entered in a specific window (described hereafter).

For hemispherical images, some pre-computation are performed and saved in order to save time when processing new directories with images acquired with the same system and settings. The processing parameters are then stored in the Param_V6 subdirectory (C:\Users\username\AppData\Local\CAN_EYE, where username corresponds to the login name of the windows session), with a default proposed name.

Processing parameters for DHP

This window allows defining all the camera+fish-eye lens characteristics (optical center, projection function), as well as the characteristics required for the processing (angular resolution, FAPAR computation). This allows making some pre-computation that are saved to speed-up the processing when using the system for another set of images acquired in the same conditions. Note that CAN_EYE supports only polar projection function or equidistant projection function that is the most common for fish-eye lenses: the angular distances (in degrees) in the object region are proportional to radial distances in pixels on the image plane [START_REF] Hughes | Accuracy of fish-eye lens models[END_REF]. To allow derivation from this polar projection, it is possible to use a polynomial of order 2 or 3. CAN_EYE proposes a method to determine the characteristics of a given system. For more information, see section 5.

Description of the processing parameter window for DHP

 User Name: by default will display the "user name" environment system variable (login name of the windows session) of the computer  Comment: add any useful comment (will be written in the processing report & output files)  Image size: automatically filled in by CAN_EYE  Optical center & Projection function: these characteristics can either be loaded from a matlab file generated with the CAN_EYE calibration menu or directly provided by the user (see hereafter)  COI is the limit of the image in degrees used during the processing. By default, set to 0°-60° (zenith angles higher >60° are not taken into account due to large occurrence of mixed pixels in these areas).  Sub Sample Factor: If there are too many images or they are too big, the computer may not have enough memory. A possibility is to perform the processing using only one pixel over 2 (Sub Sample Factor=2) or one pixel over 3 (Sub Sample Factor=3).  Angular Resolution in the zenith (θ) and azimuth (ϕ) directions (°) determines the angles for which the Gap Fraction will be computed. Low values induce higher computation time, but more accuracy. By default, it is set to the lowest value (highest resolution) for both angles.  FCover (in degrees) defines the size of the solid angle used to compute the cover fraction (i.e the gap fraction in the nadir direction). By default it is set to 10 degrees.  Clumping Parameter: when computing the clumping parameter, each zenithal ring is divided into cells (see section 4.1, p39). No gap in a cell (saturated cell) theoretically corresponds to an infinite PAI. The infinite PAI is then replaced by the PAISat value.

Note that the number of saturated cells found during the computation is provided with the results.  FAPAR is computed as the integral of (1-gap fraction) during the sun course. The latter is determined for a given day provided in the day number of the year (default is the acquisition date of the image) at a given latitude in degrees (default is 43° but you need to provide the latitude of your experiment site)  SAVING DATA: results can be written in an excel file or ascii file or both  SAVE: click on this button once you have finished filling the parameters. The parameter file will be saved in the directory C:\Users\mweiss\AppData\Local\CAN_EYE\Param_V6. This parameter file can be used later on to process images issued from the same system (camera + fish-eye lens). Note that this allows performing some pre-computations and speed up future processing.  The default parameter file name for the specific window shown here as an example is: P180_2112_2816_Cent_1063_1390_ProjFuncDeg1_COI60_Sub1_Teta5_Phi20_FCov1 0.mat Where: P180 : indicates that the parameter file is for a camera+fish-eye system 2112_2816 : is the resolution of the image (lines -rows) Cent_1063_1390 : are the coordinates of the optical center

ProjFuncDeg1

: 1 is the polynomial degree of the projection function COI60

: the limit of the circle of interest is 60° Sub1 : subsample factor is 1 (image not degraded) Teta5

: The zenith angular resolution for gap fraction is 5° Phi20 : The azimuth angular resolution for gap fraction is 20° Fcov10

: The vegetation cover fraction is estimated using the ring from zenith angle =0° to zenith angle =10° When pressing the create button in the CALIBRATION PARAMETERS subsection, the user must enter the characteristics of the lens used to acquire the images:  Optical Center: location of the optical center along the lines (Y) and rows (X) knowing that the upper left corner of the image has coordinate (1,1) and the lower right corner is located at the (NbLines, NbRows)  Projection function: the radius of the image (in degree) is considered as a polynomial function (maximum order = 3) of the distance between a pixel of the image to the optical center (if the degree of the polynomial is 1, then the projection is assumed to be polar or equidistant). Be very careful when entering the coefficient to sort them in the right order (descending power). Note that after entering the polynomial coefficient, the polynomial function is plotted so that the user is able to check if it is correct.

Figure 9. Creating projection function and optical center characteristics

If the camera can not calibrated, it can be assumed as perfect. In this case, the lens characteristics can be computed as the following:

• the optical sensor is at the center of the image: its coordinates are therefore half the number of lines and the number of rows • the projection function is equidistant (polynomial order 1). The P1 coefficient is then computed as the ratio of the maximum field of view of the fish-eye lens (𝐹𝐹𝐹𝐹𝐹𝐹 𝑚𝑚𝑚𝑚𝑚𝑚 ) divided by the length of the portion of the diagonal (𝐿𝐿 𝐷𝐷 ) of the image that does not include background fill color. The maximum field of view of the fish-eye lens is provided in the fish-eye technical specifications and corresponds to the field of view We recommend not to use these default parameters and to calibrate the system in order to get the most accurate results. A calibration method is proposed in section 6 for equidistant projection. Note that implementing the calibration experiment should not take more than half a day. When pressing the 'Load from matlab file' button in the CALIBRATION PARAMETERS subsection, the user must provide the file (extension '.mat') created with the CAN_EYE calibration menu (see section 6).

Processing parameters for digital images acquired at 57° (DP57)

This window allows defining all the camera characteristics (field of view), as well as the characteristics required for the processing of images acquired with the camera inclined at 57.5° (no fish-eye lens):

 User Name: by default will display the "user name" environment system variable of the computer  Comment: add any useful comment (will be written in the processing report & output files)  Image size: automatically filled by CAN_EYE from the properties of the images  Sub Sample Factor: in case you are processing very high resolution images, and/or a low field of view camera, and/or a high number of images, your computer may be "out of memory". Use the subsample factor (SSF) to process only one pixel over SSF of the images.  Focal Length: Automatically filled by CAN_EYE from the properties of the images  CCD Type: Provide the camera CCD type. This is indicated in the camera technical specifications. It is expressed as a fraction of an inch, with a one in the numerator, and a decimal number in the denominator. This "inch" system brings a result approximately 1.5 times the length of the diagonal of the sensor. Due to inch-based sensor formats being not standardized, their exact dimensions may vary, this is the reason why the camera CCD width and height must also be indicated. This allows computing the actual sensor field of view. For a given CCD Type, CAN_EYE provides typical CCD width and height. However, the actual values must be checked in the camera technical specifications.  CCD Width (mm): Provide the camera CCD width. For a given CCD Type, CAN_EYE provides typical CCD width. However, the actual values must be checked in the camera technical specifications.  CCD Height (mm): Provide the camera CCD height. For a given CCD Type, CAN_EYE provides typical CCD width. However, the actual values must be checked in the camera technical specifications.  Field of View (FOV °): this allows extracting the useful part of the images, i.e, 0°

±FOV° to compute the cover fraction at 57°.  Cell Size: the true leaf area index is computed using the Lang & Xiang average logarithm method. The Cell Size in pixels corresponds to the size of the cell where local PAI is computed and the medium is assumed turbid. Default Value is 30 pixels.  Output Format: results can be written either in an excel file or ascii file or both

SELECTING PERTINENT IMAGES

Once the processing parameters are defined, a window is opened, showing all the images contained in the processing directory. Some of the images may not be pertinent for the processing (fuzzy or overexposed images for example): they must be eliminated. TRASH IMAGE: click on this button and select the image(s) that will not be used in the processing with the left mouse button. End your selection by clicking the right mouse button.

The selected images will become white, indicating that they won't be used for the processing.

UNDO: click on this button to cancel your last selection.

RESET: click on this button to reset the selection (in that case all the images in the directory are selected).

DONE: click on this button when you have finished your selection.

MASKING IMAGES

Some parts of the images should not be processed by the user because:

 They do not correspond to vegetation or background (Operator or undesired object, are present on the images) 

They will be hardly classified (Presence of some over-exposed areas in the images : both leaves or soil or sky appear completely white)

This part of the processing allows masking these areas so that they will not be taken into account in the image processing.

There is also the possibility to apply a gamma correction factor to the image. This correction is just a visual correction to help the user to better discriminate between vegetation and background. It will not impact the model inversion results.

Once the pertinent images are selected, the user gets access to the following windows. Note that only the useful part of the images that were not trashed are displayed. The useful part is determined thanks to the CAN_EYE processing parameters (for DHP: COI, optical center and projection function, for standard images: CCD sensor type, width, and length, as well as FOV).

GAMMA: Gamma Correction

Select this button to get access either to a frame where you can put you gamma value (left side of the window), either to the slider changing the gamma value. The gamma can be reset to its initial value (reset button). Click OK when the image appears easily classifiable for you. SELECT: Selection of one image to define a mask After clicking on this button, the user has to select the image to mask (mouse left click on the desired image). The image then appears solely on the window, with 3 buttons available

MASK:

After clicking on this button, the user has to define a polygon (corresponding to the masked area on your image) by clicking the left mouse button to indicate the polygon vertices. The user can then visualize the drawn polygon (see figure below). To end the masking, the user just clicks on the right mouse button. The user can add as many masks as he wants (by selecting again the mask button). The mask appears in black, as the background of the image. Tip: when defining the polygon on the circular border, extend the polygon to the black background to make sure that all the border is masked.

UNDO:

Clicking on his button cancels the last mask that was designed.

DONE:

Click on this button when you have finished the masking process on the image

APPLY ALL: Apply the last mask to all images

When clicking on this button, the last mask that has been drawn is applied to all the images (see figure below). This can be very useful if the object to be masked is always at the same place in the images (such as the operator for example). UNAPPLY ALL: Delete the last mask applied to all images

Clicking on this button deletes the last mask applied to all the images.

UNDO: Undo last mask

Clicking on this button deletes the last mask that was defined. It is possible to click x times on this button to delete the last x masks that were defined.

RESET: Reset all the masks

Clicking on this button resets all the masks for all the images.

DONE: End the masking

Clicking on this button ends the masking process and leads to the next step, e.g. image classification

CHOICE OF THE INTERACTIVE CLASSIFICATION METHOD

Once the masking step is achieved, CAN_EYE runs the image indexation to speed the processing time. The CLASS DEFINITION window allows indicating the way you intend to achieve the interactive classification with CAN_EYE. Two choices are possible depending if you consider mixed pixels or not.

No mixed pixels (2 classes)

This option allows you to classify pixels belonging to one class only (background or vegetation) and all the pixels that remain unclassified are assumed to belong to the other class (vegetation or background). In this example, the user chose to select only picels corresponding to the vegetation. Note that if the user is processing images acquired downward, the background is named 'soil', while if he is processing upward images, it is named 'sky'.

Classes + Mixed Pixels

In this case, the unclassified pixels will be considered as mixed. The user will have to classify  all the pixels that, for sure, belong to the background  all the pixels that, for sure, belong to the green vegetation  all the remaining pixels are considered as mixed and will be processed later as such The gap fraction will be computed as the weighted average between background (0) and green vegetation (1). Weights are computed as the distance in terms of color between the pixels and the two classes.

Classifying the images

Once the classes are defined, the classification window appears on the screen. Note that if no radio button is selected in the bottom menu, the user can zoom on a particular image simply by clicking on it. Then, he can zoom on this particular image by clicking the left mouse button, or by dragging a rectangle. To zoom out, click the right mouse button and use the contextual menu.

To go back and display all the images, select the DISPLAY ALL button.

Class MENU (bottom)

This menu is composed of two parts, one dedicated to the vegetation (left) , and one to the background (right).  Class name: Each class name is provided on a button with the percentage of pixels classified in this class for all the images together displayed. The background color of the button indicates the color in which the pixels belonging to this class will be shown (when the CLASSIF menu is active on the toolbar). Clicking on this button allows changing the color attributed to the class to ease the visualization for the classification. Select the color of your choice with the left mouse button.  Round radio button on the left of the class name: select this button, and then pick up one or several pixels that belongs to this class with the left mouse button.

To end the selection, use the right button. All the pixels of all the images that have the same color as the ones selected by the user are then also classified in the chosen class. The images are updated and classified pixels appear in the color of the selected class (when the CLASSIF menu is active on the toolbar). The percentage of classified pixels is also updated.  Square radio button on the left of the class name: select this button, and then draw a polygon to delimit an area that belongs to this class using the left mouse button. End the selection with the right mouse button. Then all the pixels included in the polygon will belong to this class, as well as all the pixels in the other images that have the same color as one of these pixels. The image is updated and classified pixels appear in the color of the selected class (when the CLASSIF menu is active on the toolbar). If the interactive classification method is no mixed pixels, note that one class will be displayed in a given color while the other one will not be displayed (Figure 21).  Square radio button on the right of the class name: select this button, and then draw a polygon to delimit an area that belongs to this class using the left mouse button. End the selection with the right mouse button. Then all the pixels included in the polygon will belong to this class, but, conversely to the square radio button on the left, this will have no impact outside this polygon and on the other images.

The image is updated and classified pixels appear in the color of the selected class (when the CLASSIF menu is active on the toolbar). This may be useful for example when some over exposed parts of leaves are classified as sky (since they appear very bright as the sky in other part of the image) while the user knows that these pixels belong to leaves. This option should be used sparingly since it increases the window refreshing time during the classification process.

Class pre-selection (first click on any radio button)

To speed up the classification process, when clicking the first time (or after resetting the classification process) on one of the radio buttons located around the class names, an automatic pre-classification based on color indices is proposed. CAN_EYE uses a thresholding technique based 3 common color indices (ExcessGreen, ExcessBlue for sky background and ExcessRed for soil background) to pre-compute the classification [START_REF] Meyer | Verification of color vegetation indices for automated crop imaging applications[END_REF]. The user can refine this pre-classification by using the sliders for each index in the Class Preselection window (Figure 21). The result is automatically displayed on the image. The percentage of pixels belonging to each class are updated once the OK button is selected.

Main MENU (right)

 ? : display the help page on this step.  UNDO : undo last pixel selection  RESET: reset all the classification process  DISPLAY ALL: this button is enable when only one image (among all the images that are processed at the same time) is displayed in the center of the windows. It allows displaying all the images at the same time  DONE: click on this button when the classification process is achieved. CAN_ETE then checks if the user really want to end the classification process. Selecting yes implies that CAN_EYE will binarise the images and compute all the outputs. Some figure showing the results are shortly displayed on the screen and are saved in the output directory.

CAN_EYE OUTPUT DESCRIPTION

The following sections describe CAN_EYE outputs as well as the theoretical background allowing the estimations.

Definitions and theoretical background

Introduction

Leaf area index indirect measurement techniques are all based on contact frequency [START_REF] Warren-Wilson | Analysis of the spatial distribution of foliage by two-dimensional point quadrats[END_REF] or gap fraction [START_REF] Ross | The radiation regime and architecture of plant stands[END_REF] measurements. Contact frequency is the probability that a beam (or a probe) penetrating inside the canopy will come into contact with a vegetative element. Conversely, gap frequency is the probability that this beam will have no contact with the vegetation elements until it reaches a reference level (generally the ground). The term "gap fraction" is also often used and refers to the integrated value of the gap frequency over a given domain and thus, to the quantity that can be measured, especially using hemispherical images. Therefore, measuring gap fraction is equivalent to measuring transmittance at ground level, in spectral domains where vegetative elements could be assumed black. It is then possible to consider the mono-directional gap fraction which is the fraction of ground observed in a given viewing direction (or in a given incident direction).

The objective of this section is to provide the theoretical background used in the CAN_EYE software to derive canopy biophysical variables from the bi-directional gap fraction measured from the hemispherical images.

Modeling the Gap Fraction

LAI definition

The leaf area density, l(h) at level h in the canopy is defined as the leaf area per unit volume of canopy. The leaf area index (LAI) corresponds to the integral of l(h) over canopy height. It is therefore defined as the one sided leaf area per unit horizontal ground surface area [START_REF] Watson | Comparative physiological studies in growth of field crops. I: Variation in net assimilation rate and leaf area between species and varieties, and within and between years[END_REF]. Although this definition is clear for flat broad leaves, it may cause problems for needles and non-flat leaves. Based on radiative transfer considerations, [START_REF] Lang | Application of some of Cauchy's theorems to estimation of surface areas of leaves, needles, and branches of plants, and light transmittance[END_REF] and [START_REF] Chen | Defining leaf area index for non-flat leaves[END_REF] and Stenberg (2006) proposed to define LAI as half the total developed area of leaves per unit ground horizontal surface area. This definition is therefore valid regardless vegetation element shape. As defined above, leaf area index, LAI, defined as at a level H in the canopy is related to the leaf area density through:

Eq. 1 ∫ = H dh h l LAI 0 ) (

From LAI to Gap Fraction

Following [START_REF] Warren-Wilson | Analysis of the spatial distribution of foliage by two-dimensional point quadrats[END_REF], the mean number of contacts between a light beam and a vegetation element at a given canopy level H in the direction is:

Eq. 2 where is the projection function, i.e. the mean projection of a unit foliage area at level h in direction . When the leaf area density and the projection function are considered independent of the level h in the canopy, Eq. 2 simplifies in Eq. 3:

Eq. 3

v v v v v LAI G L N θ ϕ θ ϕ θ cos . ) , ( ) , , ( =
The projection function is defined as follows:

Eq. 4

where is the probability density function that describes leaf orientation distribution function. This induces the two normalization conditions given in Eq. 5a and Eq. 5b.

Eq. 5

The contact frequency is a very appealing quantity to indirectly estimate LAI because no assumptions on leaf spatial distribution, shape, and size are required. Unfortunately, the contact frequency is very difficult to measure in a representative way within canopies. This is the reason why the gap fraction is generally preferred. In the case of a random spatial distribution of infinitely small leaves, the gap fraction ( )

v v P ϕ θ , 0 in direction ( ) v v ϕ θ ,
is related to the contact frequency by: Eq. 6

) cos( / ) , ( ) , ( 0 ) , ( v v v v v LAI G N v v e e P θ ϕ θ ϕ θ ϕ θ ⋅ - - = =
This is known as the Poisson model. Conversely to the contact frequency that is linearly related to LAI, the gap fraction is highly non linearly related to LAI. [START_REF] Nilson | A theoretical analysis of the frequency of gaps in plant stands[END_REF] demonstrated both from theoretical and empirical evidences that the gap fraction can generally be expressed as an exponential function of the leaf area index even when the ) , , (

v v H N ϕ θ ( ) v v ϕ θ , ∫ = H o v v v v v dh h l h G H N θ ϕ θ ϕ θ cos ) ( ) , , ( ) , , (
( ) v v h G ϕ θ , , (
)

v v ϕ θ , ( ) ( )      - + = = ∫ ∫ (b) ) cos( sin sin cos cos cos ) a ( sin , cos 2 1 , 2 0 2 0 l v l v l v l l l l l v v d d g G ϕ ϕ θ θ θ θ ψ ϕ θ θ ϕ θ ψ π ϕ θ π π ) , ( l l g ϕ θ ( ) ( )        = = ∫ ∫ ∫ ∫ (b) 2 1 sin , 2 1 (a) 1 sin , 2 1 2 0 2 0 2 0 2 0 π π π π ϕ θ θ ϕ θ π ϕ θ θ ϕ θ π v v v v v l l l l l d d G d d g
random turbid medium assumptions associated to the Poisson model are not satisfied. In case of clumped canopies, a modified expression of the Poisson model can be written:

Eq. 7 ) cos( / ) , ( 0 0 ) , ( v v v LAI G v v e P θ ϕ θ λ ϕ θ ⋅ ⋅ - =
where λo is the clumping parameter (λo <1).

Modeling the leaf inclination distribution function

As shown previously, the gap fraction is both related to the leaf area index and the leaf inclination distribution function (LIDF). It is thus necessary to model the leaf inclination distribution function. The azimuthal variation of the LIDF is often assumed uniform and this is the case in the CAN_EYE software, i.e. the probability density function depends only on the leaf normal zenith angle. This assumption is verified in many canopies but may be problematic for heliotropic plants like sunflowers [START_REF] Andrieu | Evaluation of structure description requirements for predicting gap fraction of vegetation canopies[END_REF]. Among existing models, the ellipsoidal distribution is very convenient and widely used [START_REF] Campbell | Extinction coefficients for radiation in plant canopies calculated using an ellipsoidal inclination angle distribution[END_REF][START_REF] Campbell | Derivation of an angle density function for canopies with ellipsoidal leaf angle distributions[END_REF][START_REF] Wang | Mean leaf angles for the ellipsoidal inclination angle distribution[END_REF]: leaf inclination distribution is described by the ratio of the horizontal to the vertical axes of the ellipse that is related to the average leaf inclination angle (ALA variable in CAN_EYE) knowing that and that is the probability density function that verifies the normalization condition (Eq. 5).

Estimating leaf area index and leaf inclination from gap fraction measurements

Use of a single direction: LAI57

Considering the inclined point quadrat method, [START_REF] Warren-Wilson | Inclined point quadrats[END_REF] has proposed a formulation of the variation of the contact frequency as a function of the view zenith and foliage inclination angles. Using this formulation, [START_REF] Warren-Wilson | Estimation of foliage denseness and foliage angle by inclined point quadrats[END_REF] showed that for a view angle of 57.5° the G-function (Eq 4) can be considered as almost independent on leaf inclination (G = 0.5). Using contact frequency at this particular 57.5° angle, [START_REF] Warren-Wilson | Estimation of foliage denseness and foliage angle by inclined point quadrats[END_REF] derived leaf area index independently from the leaf inclination distribution function within an accuracy of about 7%. [START_REF] Bonhomme | The use of hemispherical photographs for determining the leaf area index of young crops[END_REF] applied this technique using the gap fraction measurements and found a very good agreement between the actual and estimated LAI values for young crops. Therefore, for this particular viewing direction, LAI can be easily deduced from gap fraction: Eq 8 93 . 0

)) 5 . 57 ( ln( )) 5 . 57 cos( / 5 . 0 exp( ) 5 . 57 ( °- = ⇔ °- = °Po LAI LAI Po
The CAN_EYE software proposes an estimate of the LAI derived from this equation, called LAI57.

Use of multiple directions: LAIeff, ALAeff

Among the several methods described in [START_REF] Weiss | Methods for in situ leaf area index measurement, part II: from gap fraction to leaf area index: retrieval methods and sampling strategies[END_REF], the LAI estimation in the CAN_EYE software is performed by model inversion since, conversely to the use of the Miller's formula, it can take into account only a part of the zenith angle range sampled by hemispherical images. This is very useful since there is a possibility to reduce the image field ( ) l l of view to less than 90° zenith. This feature is very important due to the high probability of mixed pixels in the part of the image corresponding to large zenith view angles. LAI and ALA are directly retrieved by inverting in CAN_EYE using Eq 6 and assuming an ellipsoidal distribution of the leaf inclination using look-up-table techniques [START_REF] Knyazikhin | Synergistic algorithm for estimating vegetation canopy leaf area index and fraction of absorbed photosynthetically active radiation from MODIS and MISR data[END_REF][START_REF] Weiss | Investigation of a model inversion technique to estimate canopy biophysical variables from spectral and directional reflectance data[END_REF]. A large range of random combinations of LAI (between 0 and 10, step of 0.01) and ALA (10° and 80°, step of 2°) values is used to build a database made of the corresponding gap fraction values (Eq 6) in the zenithal directions defined by the CAN_EYE user (parameter window definition during the CAN_EYE processing). The process consists then in selecting the LUT element in the database that is the closest to the measured Po. The distance (cost function Ck) of the k th element of the LUT to the measured gap fraction is computed as the sum of two terms: CAN_EYE V5.1 : Eq. 7

(
)

2 ) ( _ _ 1 2 ) ( 30 60 )) ( ( ) ( ) (                           Term Second k LUT Term First i MES o MOD Dir Zenith Nb i i MES o i k LUT o i k ALA P P P w J         - + - = ∑ = θ σ θ θ CAN_EYE V6.1: Eq. 8 ( )                             Term Second PAI k LUT Term First i MES o MOD Dir Zenith Nb i i MES o i k LUT o i k PAI PAI P P P w J 2 57 57 ) ( _ _ 1 2 ) ( )) ( ( ) ( ) (         - + - = ∑ = σ θ σ θ θ
The first term computes a weighted relative root mean square error between the measured gap fraction and the LUT one. The weights wi take into account the fact that some zenithal directions may contain a lot of masked pixel and therefore, the corresponding gap fraction may not be very representative of the image: Eq. 9

∑ = = - = Dir Zenith Nb i i i i i i w NPix Nmask NPix w _ _ 1 1 ,
The relative root mean square error is divided by a "modelled" standard deviation of the measured gap fraction derived from the empirical values

)) ( ( i MES o P θ σ
computed from the images corresponding to the same plot for each zenithal direction I, when estimating the measured gap fraction after the CAN_EYE classification step. In order to smooth σ zenithal variations, a second order polynomial is fitted on

)) ( ( i MES o P θ σ to provide )) ( ( i MES o MOD P θ σ .
The second term of Eq. 7 and Eq. 8 is the regularization term (Combal et al, 2002), that imposes constraints to improve the PAI estimates. Two equations are proposed:

 Constraint used in CAN_EYE V5.1 on the retrieved ALA values that assumes an average leaf angle close to 60° ±30°.  Constraint used in CAN_EYE V6.1 on the retrieved PAI value that must be close from the one retrieved from the zenithal ring at 57°. This constraint is more efficient and not does not suppose any assumption than in Eq 7 but it can be computed only when the 57° ring is available (COI≥60°)

The LUT gap fraction that provides the minimum value of Jk is then considered as the solution. The corresponding LAI and ALA provide the estimate of the measured CAN_EYE leaf area index and average leaf inclination angle. As there is no assumption about clumping in the expression of the gap fraction used to simulate the LUT (Eq. 6), the foliage is assumed randomly distributed, which is generally not the case in actual canopies. Therefore, retrieval of LAI based on the Poisson model and using gap fraction measurements will provide estimates of an effective LAI, LAI eff , and corresponding average inclination angle ALAeff that allows the description of the observed gap fraction assuming a random spatial distribution.

Note that CAN_EYE also proposed other ways of computing PAIeff and ALAeff, using Miller's formula [START_REF] Miller | A formula for average foliage density[END_REF], which assumed that gap fraction only depends from view zenith angle :

Eq. 10 [START_REF] Welles | Instrument for indirect measurement of canopy architecture[END_REF] proposed a practical method to compute the integral of Eq.10 from gap fraction measurements in several directions for the LAI2000 instrument. CAN_EYE proposed the effective PAI estimates using both Miller and LAI2000 measurements. For LAI2000, the ring angular response is taken into account and the computation is made of 3, 4 and 5 rings [START_REF] Weiss | Methods for in situ leaf area index measurement, part II: from gap fraction to leaf area index: retrieval methods and sampling strategies[END_REF].

∫ - = 2 / 0 sin cos ) ( ln( 2 π θ θ θ θ v v v v o d P PAI

From effective leaf are index to true LAI

The "true LAI", that can be measured only using a planimeter with however possible allometric relationships to reduce the sampling [START_REF] Frazer | A method for estimating canopy openness, effective leaf area index, and photosynthetically active photon flux density using hemispherical photography and computerized image analysis technique[END_REF], is related to the effective leaf area index through: Eq. 11

LAI eff = λo LAI
where λo is the aggregation or dispersion parameter [START_REF] Nilson | A theoretical analysis of the frequency of gaps in plant stands[END_REF]Lemeur and Blad, 1974) or clumping index [START_REF] Chen | Defining leaf area index for non-flat leaves[END_REF]. It depends both on plant structure, i.e. the way foliage is located along stems for plants and trunks branches or shoots for trees, and canopy structure, i.e. the relative position of the plants in the canopy. The shape and size of leaves might also play an important role on the clumping.

In CAN_EYE, the clumping index is computed using the Lang and Yueqin (1986) logarithm gap fraction averaging method. The principle is based on the assumption that vegetation elements are locally assumed randomly distributed. Each zenithal ring is divided into groups (called cells) of individual pixels. The size of the individual cells must compromise between two criterions: it should be large enough so that the statistics of the gap fraction are meaningful and small enough so that the assumption of randomness of leaf distribution within the cell is valid. For each cell, Po is computed as well as its logarithm. If there is no gap in the cell (only vegetation, i.e, Po=0), Po is assumed to be equal to a sat o P value derived from simple Poisson law, using a prescribed . Then the same algorithm, as described previously for effective LAI ( §0), is applied by building a LUT using the modified Poisson model (eq 7) to provide LAI true and ALA true as well as the corresponding clumping parameter.

LAI or PAI?

Claiming that devices and associated methods based on gap fraction measurements provide an estimate of the leaf area index is not right since indirect measurements only allow assessing plant area index. Further, it is not possible to know if some leaves are present behind the stems, branches or trunk. Therefore, masking some parts of the plants (which is possible using CAN_EYE) to keep only the visible leaves is not correct and could lead to large under-estimation of the actual LAI value, depending on the way leaves are grouped with the other parts of the plant. Therefore, all CAN_EYE outputs correspond to plant area index and not leaf area index. Note also that the term GAI (Green Area Index: total area of green elements within the canopy) can also be sued if only the green elements are selected during the classification process.

Cover fraction computation

Cover fraction (fCover) is defined as the fraction of the soil covered by the vegetation viewed in the nadir direction:

Eq 12. ) 0 ( 1 o P fCover - =
Using hemispherical images, it is not possible to get a value in the exact nadir direction, and the cover fraction must be integrated over a range of zenith angles. In CAN_EYE, the default value for this range is set to 0-10°. The user can change this value when defining the CAN_EYE parameters (which also concerns the description of the hemispherical lens properties) at the beginning of the processing.

FAPAR computation

FAPAR is the fraction of absorbed photosynthetically active radiation (400-700nm) by the vegetation. It varies with sun position. As there is little scattering by leaves in that particular spectral domain due to the strong absorbing features of the photosynthetic pigments [START_REF] References Andrieu | Indirect methods of estimating crop structure from optical measurements[END_REF], fAPAR is often assumed to be equal to fIPAR (fraction of Intercepted photosynthetically active radiation), and therefore to the gap fraction. The actual fAPAR is the sum of two terms, weighted by the diffuse fraction in the PAR domain: the 'black sky' fAPAR that corresponds to the direct component (collimated beam irradiance in the sun direction only) and the 'white sky' or the diffuse component. The closest approximation to white sky fAPAR occurs under a deep cloud cover that may generate an almost isotropic diffuse downward. Following Martonchik et al {, 2000 #578), the adjectives black and white are not related to the color of the sky, but rather to the angular distribution of light intensity.

Providing the latitude and the date of the image acquisition, the CAN_EYE software proposes three outputs for FAPAR:

1. The instantaneous 'black sky' FAPAR (FAPAR BS ): it is the black sky FAPAR at a given solar position (date, hour and latitude). Depending on latitude, CAN_EYE computes the solar zenith angle every solar hour during half the day (there is symmetry at 12:00). The instantaneous FAPAR is then approximated at each solar hour as the gap fraction in the corresponding solar zenith angle:

( ) Miller, LAI2000, 3,4,5 rings). Details of the computation and meaning of the variables is provided in section 4.1. Note that for the computation of PAItrue, the value of PAIsat is set to the value given in the parameter window (see LAItrue). The percentage of saturated cells (considered as corresponding to a PAI of PAISat) used for the computation of the clumping index and true PAI is also given as an indication of the sensitivity to PAISat.

)
Note that if the FCOVER can be estimated for each image, this is not the case for the other variables that are derived from the mono-directional gap fraction averaged over all the processed images.  CLASSIFICATION RESULTS: screen copy of the working window after the classification step. It contains the binary images.

Images acquired at 57°

Images at 57° results are contained in a subdirectory called 'CE_P57_xxx', where xxx is the name of the directory that contains the images to be processed.

Images acquired at Nadir

Images acquired at nadir results are contained in a subdirectory called 'CE_NADIR_xxx', where xxx is the name of the directory that contains the images to be processed. The Summary Menu allows gathering CAN_EYE result processing Excel file in a single one. After selecting the processing type (DHP=P180, images acquired at 57°=P57 and images acquired at NADIR), the user is asked to choose a directory to proceed. The chosen directory should contain CAN_EYE processing results sub-directories (all called CE_P180*** or CE_P57*** depending on the processing type). The user is then asked to provide a name for the summary excel file in which all the results will be stored.

DHP "CALIBRATION" MODULE

Optical systems are not perfect and at least two main characteristics are required to perform an accurate processing of hemispherical images:

• The coordinates of the optical center • The projection function. In CAN_EYE, the projection function is assumed to be a polar projection: (angular distances (in degrees) in the object region are proportional to radial distances in pixel on the image plane). Because in some situations the focal length may be manipulated by acting on the zoom system, the projection function must be also known for each focal length used.

A simple method is proposed by the CAN_EYE calibration menu to characterize these features (Figure 28). It requires to fill in an excel file located in the "Calibration_Data" directory. This file contains 4 sheets named "Start", "Optical Center", "Projection Function" and "Results". Inside each sheet, grey cells must remain unchanged while yellow cells must be filled the data corresponding to a given calibration. Note that, for a given camera+fish-eye system, it is required to make a calibration experiment for each image resolution that will be used with the fish-eye. In order to reduce the problem of mixed pixels, it is highly recommended to use the highest resolution providing jpg or TIF files. The "Start" sheet describes the calibration experiment for traceability (Figure 29): Name of the user, Name of the CAMERA, Reference, and the image resolution in columns (X direction) and lines (Y resolution). This can be achieved by looking at an image file properties in the window explorer or with any image processing software. The "Results" sheet contains the calibration parameter of your camera+fish-eye system derived from the calibration process: the optical center position as well as the maximum field of view (FOV in degrees) and the corresponding radius (in pixels) of the image. These values can be directly entered in the CAN_EYE parameter window during the processing of hemispherical images (see Filling CAN_EYE window parameter ). The contents of the two other sheets, as well as the principles of the measurement, are described in the following.

System Definition

An image can be defined by (Figure 30)

• The number of pixels in the horizontal direction (Xsize)

• The number of pixels in the vertical direction (Ysize)

• The coordinates of the optical center [XO, YO]

• The projection function, P, i.e. the function θ=P(R) that relates the view angle θ (relative to optical axis) to the distance to the optical center R.

Optical center characterization

The optical center is defined by the projection of the optical axis onto the CCD matrix where the image is recorded. This point should therefore be invariant by rotation of the system along this optical axis. A simple method to get the optical center consists in observing the coordinates of a point when it rotates along this axis. This could be achieved by drilling a small hole in the cap of the fish-eye, and acquiring photographs for a series of positions. This is illustrated by The rotation positions must be if possible as symmetric as possible in order to minimize possible biases in the estimation of the optical center. Once the photos are acquired (10 to 20 positions are enough), the different holes (as well as the image upper left corner) coordinates must be extracted through an image processing software (e.g. Paintshop, Microsoft Photo Editor).

Then, the user has to fill the "Optical Center" sheet of the excel file (Figure 33). It consists in typing the 3 hole coordinates (in the X and Y directions) for the different positions of the fisheye cap. Once the "Optical Center" sheet is filled, the user must run CAN_EYE, then go in the Calibration Menu and then select '"Optical Center". CAN_EYE asks then to select the excel file, computes automatically the optical center position and fill the "Results" sheet. Figure 36 shows an example of optical center fitting in the case where three holes were considered. Results show very consistent estimates of the coordinates of the optical center that is known with accuracy better than one pixel.

Projection function characterization

This section describes how to perform the measurements and fill the "Projection Function" sheet of the calibration excel file. The experimental design is described in Figure 35. It consists in a frame of 50*50cm 1.5cm thick from which a 30*30cm square is excavated from the middle of one of the side. The three sides of this gap are equipped with 30cm long rulers.

The camera is set horizontally as well as the experimental design. The camera is aligned along the main axis of the design using the front nail and background line. Hemispherical photographs are taken at two distances (H and H'=H+∆) from the center of the design and along the optical axis. The calibration excel file sheet is shown in Figure 35. Note that it is required to have run the "optical center' menu before being able to compute the projection function. Let us assume that the two images are named Im1(H ) and Im2 (H'). Im1 must be the image for which ruler ticks are the most readable. Then, you have to look at the image using an image processing software (e.g. Paintshop, Microsoft Photo Editor) to read pixels coordinates in the image.  Read the optical center position in cm on the rulers of Im1 and Im2 and fill cells B4, C4 and B5, C5 of the excel file ("Projection Function" sheet)



The quantity ∆ can be easily measured by looking at one direction on the lateral ruler (Xp1,Yp1, cells C10, D10) on Im1 reading the corresponding value h in cm (cell E10) for distance H. Then for the distance H+∆, the same point on Im2 corresponds to a value h' (cell E11) on the lateral ruler. It comes simply that ∆ = h'-h.



On the perpendicular ruler, select two fixed directions (Xp2,Yp2, cells C16, D16) and (Xp3,Yp3, cells F16, G16) on Im1 read the corresponding values x in cm (cell E16 and H16) on the perpendicular ruler. Do the same for Im2 (cells E17, H17). It is then possible to compute the actual distance H if ∆ is known.



Once the distance H is known, the calibration of the projection function can be achieved if the coordinates on one of the 2 images (select the one that is the most readable) are associated to the actual distance read on the rulers. The coordinates have to be read on the line passing through the optical axis, for the three rulers. This can be achieved for each cm tick. The following equations are used to derive the angle from the values read on each ruler: This process allows computing the coefficient a that relates the radius (in pixel) in the image to a corresponding viewing direction (in degrees). Then, the maximum field of view of the camera+fish-eye lens system can be computed by fitting a circle to the image (Figure 37). Once the "Projection Function" sheet is filled, the user must run CAN_EYE, go in the Calibration Menu and then select '"Projection Function". CAN_EYE asks then to select the excel file, computes automatically the projection function parameters and fill the "Results" sheet.

4. 1 .Figure 1 .

 11 Figure 1. Overview of the CAN_EYE processing of a series of images ................................... 9 Figure 2. CAN_EYE main menu ............................................................................................. 15 Figure 3. Example of the « SugarBeet » directory containing a series of 12 images (.JPG) corresponding to one ESU and to be processed concurrently .................................................. 16 Figure 4. CAN_EYE Menu for digital hemispherical photographs (fish-eye lens) ................. 17 Figure 5. CAN_EYE Menu for digital photographs acquired with a camera inclined at 57.5 18 Figure 6. CAN_EYE Menu for digital photographs acquired with the camera at the vertical (nadir viewing) ......................................................................................................................... 19 Figure 7. Processing parameter window for hemispherical images ......................................... 21 Figure 8. Defining calibration parameters in the Processing parameter window .................... 22 Figure 9. Creating projection function and optical center characteristics ................................ 22 Figure 10. Determining the default projection function parameter of two different systems. On the left: fish-eye length with a large field of view (around 60°). On the right fish-eye length with a large field of view (around 60°). The diagonal is shown in red, 𝑳𝑳𝑳𝑳 is the length of the portion shown in blue. .............................................................................................................. 23 Figure 11. Processing parameter window for images acquired at 57.5° .................................. 24 Figure 12. Processing parameter window for images acquired at nadir (0°) ........................... 26 Figure 13. Selecting pertinent images ...................................................................................... 27 Figure 14. Main masking window: the button name appearing in light gray indicate that the functionalities are not available at this step of the processing. ................................................ 28 Figure 15. Gamma correction value (masking step) ................................................................ 29 Figure 16. Secondary masking window (after having selected the image to be masked). The mask appears in black bordered by red color. .......................................................................... 29 Figure 17. Applying a mask to all images. The same masked areas appear in black on all images. ...................................................................................................................................... 30 Figure 18. Choice of the interactive classification method ...................................................... 31 Figure 19. Classification window ............................................................................................. 32 Figure 20. Choice of a color for a class .................................................................................... 32 Figure 21. Using vegetation color indices to pre-classify the vegetation (No mixed pixel classification method: classified vegetation pixels appear in light green. The other pixels are considered to belong to the soil). ............................................................................................. 34 Figure 22. Example of classification results ............................................................................ 42 Figure 23. Example of average gap fraction polar plot. ........................................................... 43 Figure 24. Figure showing the results for the computed clumping factor (CAN-EYE version 5 in green and Version 6 in red). Model is shown in dashed lines while measured value (extracted from the binary images) is shown in symbols. ........................................................ 43 Figure 25. Results of PAI and ALA estimation with CAN_EYE. RMSE value between the mono-directional gap fraction computed from the images and the closest one found in the LUT (red line). Green line shows the corresponding value. .................................................... 44 Figure 26. Measured (green) and modelled gap fraction when considering (red) or not (dark grey) the clumping factor. ........................................................................................................ 44 Figure 27. CAN_EYE summary menu .................................................................................... 46 Figure 28. CAN_EYE DHP calibration menu ......................................................................... 48 Figure 29. Example of the "Start " sheet of the calibration excel file ...................................... 49 Figure 30. Image coordinate system......................................................................................... 50

Figure 1 .

 1 Figure 1. Overview of the CAN_EYE processing of a series of images

Figure 2 .

 2 Figure 2. CAN_EYE main menu

Figure 3 .

 3 Figure 3. Example of the « SugarBeet » directory containing a series of 12 images (.JPG) corresponding to one ESU and to be processed concurrently

Figure 4 .

 4 Figure 4. CAN_EYE Menu for digital hemispherical photographs (fish-eye lens)

Figure 5 .

 5 Figure 5. CAN_EYE Menu for digital photographs acquired with a camera inclined at 57.5

Figure 6 .

 6 Figure 6. CAN_EYE Menu for digital photographs acquired with the camera at the vertical (nadir viewing)

Figure 7 .

 7 Figure 7. Processing parameter window for hemispherical images

Figure 8 .

 8 Figure 8. Defining calibration parameters in the Processing parameter window

  in the diagonal of the image. 𝑃𝑃 1 = 𝐹𝐹𝐹𝐹𝐹𝐹 𝑚𝑚𝑚𝑚𝑚𝑚 𝐿𝐿 𝐷𝐷 . When the image is not circular (Figure 10, right part), 𝐿𝐿 𝐷𝐷 = �𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿ℎ 2 + 𝑊𝑊𝑊𝑊𝑊𝑊𝐿𝐿ℎ 2

Figure 10 .

 10 Figure 10. Determining the default projection function parameter of two different systems. On the left: fish-eye length with a large field of view (around 90°). On the right fish-eye length with a narrower field of view (around 60°). The diagonal is shown in red, 𝑳𝑳 𝑳𝑳 is the length of the portion shown in blue.

Figure 11 .

 11 Figure 11. Processing parameter window for images acquired at 57.5°

Figure 13 .

 13 Figure 13. Selecting pertinent images

Figure 14 .

 14 Figure 14. Main masking window: the button name appearing in light gray indicate that the functionalities are not available at this step of the processing.

Figure 15 .

 15 Figure 15. Gamma correction value (masking step)

Figure 16 .

 16 Figure 16. Secondary masking window (after having selected the image to be masked). The mask appears in black bordered by red color.

Figure 17 .

 17 Figure 17. Applying a mask to all images. The same masked areas appear in black on all images.

Figure 18 .

 18 Figure 18. Choice of the interactive classification method

Figure

  Figure 19. Classification window

Figure 20 .

 20 Figure 20. Choice of a color for a class

Figure 21 .

 21 Figure 21. Using vegetation color indices to pre-classify the vegetation (No mixed pixel classification method: classified vegetation pixels appear in light green. The other pixels are considered to belong to the soil).

P

  over the azimuth and over the images for each zenithal ring. The averaging still takes into account the masked areas using wi . The ratio of these two quantities provides the clumping parameter CF or λo for each zenithal ring: is simulated using the Poisson model, it depends on the value chosen for both sat LAI and the average leaf inclination angle, the clumping parameter is computed for the whole range of variation of ALA and a sat LAI varying between 8 and 12 (Note that all the results in the CAN_EYE html report are provided for 10 = sat LAI

Figure 22 .

 22 Figure 22. Example of classification results  AVERAGE GAP FRACTION: polar plot of the average bi-directional gap fraction: rings correspond to zenithal directions. Masked areas are shown in red.

Figure 23 .

 23 Figure 23. Example of average gap fraction polar plot.  CLUMPING FACTOR: graph showing the comparison between the computed clumping factor (green points) and the modeled one (red line) as a function of view zenith angle for the computation of true PAI. Average leaf inclination value as well as the RMSE between computed and modelled clumping factor are indicated (see here).

Figure 24 .

 24 Figure 24. Figure showing the results for the computed clumping factor (CAN-EYE version 5 in green and Version 6 in red). Model is shown in dashed lines while measured value (extracted from the binary images) is shown in symbols.  MEASURED GAP FRACTION VS LUT GAP FRACTION & AVERAGE PAI, ALA, FCOVER: o top graph shows the RMSE value between the mono-directional gap fraction computed from the images and the closest one found in the LUT (red line), as a function of average leaf inclination angle value. The green line shows the corresponding PAI value (that provides the lowest RMSE) as a function of average leaf inclination angle.

Figure 25 .o

 25 Figure 25. Results of PAI and ALA estimation with CAN_EYE. RMSE value between the mono-directional gap fraction computed from the images and the closest one found in the LUT (red line). Green line shows the corresponding value.o The bottom graph shows the mono-directional gap fraction measured from the images (determined by the classification step) as a function of view zenith angle (green line). The dark gray line indicates the mono-directional gap fraction of the LUT element that is the closest from the measurements (assuming no clumping effect, i.e, when estimating PAIeff and ALAeff). In red, the same is shown for the mono-directional gap fraction when considering the clumping factor (PAItrue, ALAtrue).

Figure 26 .

 26 Figure 26. Measured (green) and modelled gap fraction when considering (red) or not (dark grey) the clumping factor.

  Figure 27. CAN_EYE summary menu

Figure 28 .

 28 Figure 28. CAN_EYE DHP calibration menu

Figure 29 .

 29 Figure 29. Example of the "Start " sheet of the calibration excel file

Figure 30 .

 30 Figure 30. Image coordinate system.

Figure 31 .Figure 31 .

 3131 Figure 31. Illustration of the holes drilled in the fish-eye cap. The red arrow indicates the rotation of the cap.

Figure 33 :

 33 Figure 33 : Example of an excel file sheet to be filled to determine the optical center of a system.

Figure 34 .

 34 Figure 34. Example of a projection function sheet for the calibration excel file.

o

  For the different reading in cm on the left lateral rulers (cells A23 to AXX), report the column number of the pixel in the image (cells B23 to BXX). Perform the same for the perpendicular and lateral rulers.

Figure 35 .

 35 Figure 35. Experimental design scheme.

Figure 36 .

 36 Figure 36. Example of an image of the experimental design taken with the hemispherical camera and used for the calibration of the projection function. The horizontal doted yellow line corresponds to the diameter of the image passing through the optical center (defined by its coordinates as measured previously). It must be aligned as much as possible with the 3 rulers since the camera should be aligned thanks to the front nail and background line.

Figure 37 .

 37 Figure 37. Left: example of a CAN_EYE optical center calibration output, showing the fitting of the circles to the holes positions in the case of three holes. The actual optical center is shown by the red cross. Right: determination of the projection function. The different colored points correspond to the 3 rulers and the 3 lines to the 3 derived models (polynomial of order 1,2,or 3).

Table 1 . CAN_EYE output variable acronyms that can be derived from different acquisitions: hemispherical images, images at 57° and images acquired at nadir. Click on the link to directly access to the paragraph describing the variable computation.

 1 Table 1 presents the variables that CAN_EYE derives from the set of digital images.

	Variable	Acronym	DHP P57 NADIR
	Effective Plant Area Index estimated	PAI57		x	x
	from Po(57°)
	Effective Plant area index	PAIeff	x
	Effective average plant inclination	ALAeff	x
	angle
	True plant area index	PAItrue	x	x
	True average leaf inclination angle	ALA true	x
	Clumping Factor	CF		x
	Cover Fraction	FCOVER	x	x
	Instantaneous 'black sky'FAPAR	FAPAR BS	x
	White sky FAPAR	FAPAR WS	x
	Daily black Sky FAPAR	fAPAR	BS Day	x

   SELECTED IMAGES: table containing the list of the image file names used for the processing, as well as the corresponding FCOVER estimates  NUMBER OF CLASSES: number of classes that was selected (2 or 2+ mixed, see section 3.5)  AVERAGE BIOPHYSICAL VARIABLES: variables estimated from the series of images: PAI, ALA, FCOVER and FAPAR. Different PAI and ALA estimates (effective, true) from different methods (CAN_EYEV5.1, CAN_EYE V6.1,

				fAPAR	BS	θ	s	=	1	-	o P	( θ	s
	2. The daily integrated black sky (or direct) FAPAR is computed as the following:
								sunrise
										∫	-	o
					BS Day	=	sunrise sunset
											∫
											sunset
	fAPAR	WS	π	P o	θ	θ				θ d	d	P o	d
	4.2.	Description of CAN_EYE output directory content
	During the processing, a CAN_EYE output subdirectory is automatically generated in the
	directory containing the images to be processed. It contains:
	 a html report of the processing: screen copies of the different steps (Masking,
	Classification, Resulting graphs), a table with the processing characteristics and a
	table containing the CAN_EYE output variable estimates.
	 An excel or ascii file (depending on the CAN_EYE characterization parameters, see
	section 3.2) providing all the output variable estimates.
	Hemispherical images
	DHP results are contained in a subdirectory called 'CE_P180_xxx', where xxx is the name of
	the directory of the images that have been processed.
	The html report is named 'CE_P180_Report_xxx.html'. It contains 10 sections:
	 GENERAL INFORMATION (CAN_EYE version, User, processing Date, Processing
	Duration)
	 GENERAL PARAMETERS: Angular resolution, Circle of Interest, FCOVER
	integration domain, sub sampling factor, see §3.2
	 CALIBRATION PARAMETERS: Optical Center, projection Function, Coefficients,
	see §3.2

  GAP FRACTION: Plot of P57 (black), effective (green) and true PAI (red) values as a function of individual image number. Note that for the computation of the true PAI, different value of PAISat are used (see LAItrue).

	The html report is named 'CE_P57_Report_xxx.html'. It contains 10 sections:
	 GENERAL INFORMATION (CAN_EYE version, User, processing Date, Processing
	Duration)
	 CALIBRATION PARAMETERS: image size, resolution for clumping, camera model,
	CCD size (height and width), sub sampling factor, resolution for clumping
	 SELECTED IMAGES: table containing the list of the image file names used for the
	processing, as well as the corresponding gap fraction at 57° estimates and
	corresponding PAIs
	 NUMBER OF CLASSES: number of classes that were selected (2 or 2+ mixed, see
	section 3.5)
	 PROCESSED IMAGES + MASK: screen copy of the working window after the
	masking step
	 CLASSIFICATION RESULTS: screen copy of the working window after the
	classification step
	 The excel file named 'CE_P57_Report_xxx.xls'. Contains several sheets:
	 CAN_EYE P57 parameters: description of the parameters used for the processing
	(GENERAL PARAMETERS and CALIBRATION PARAMETERS in the html
	report)
	 CAN_EYE P57 Results: table with P57, effective and true PAI values

  Effective ALA: columns contents are, in order: directory name, CE_P180 file name, CEV6.1 ALA estimate, CEV5.1 ALA estimate, Miller ALA estimate, LAI2000 3, 4 and five rings estimates, processing date.  True PAI: columns contents are, in order: directory name, CE_P180 file name, CEV6.1 PAI estimate, CEV5.1 PAI estimate, Miller PAI estimate, LAI2000 3, 4 and five rings estimates, processing date.  True ALA: columns contents are, in order: directory name, CE_P180 file name, CEV6.1 ALA estimate, CEV5.1 ALA estimate, Miller ALA estimate, LAI2000 3, 4 and five rings estimates, processing date.  FCOVER: columns contents are, in order: directory name, CE_P180 file name, CEV6.1 FCOVER estimate, processing date  Daily FAPAR: columns contents are, in order: directory name, CE_P180 file name, measured direct FAPAR estimate, measured modelled FAPAR estimate, estimated direct FAPAR estimate, estimated direct FAPAR estimate, processing date Two sheets are generated  Mean: columns contents are, in order: directory name, CE_P57 file name, average gap fraction value at 57°, effective PAI, True PAI for different PAISAT values (see LAItrue), Processing date  columns contents are, in order: directory name, CEP57 file name, image name, individual gap fraction value at 57° (for the image name), effective PAI, True PAI for different PAISAT value (see LAItrue) ,Processing date

	Images acquired at 57. 5° (DP57)
	Images acquired at Nadir (DP0)
	Two sheets are generated
	 Mean: columns contents are, in order: directory name, CE_NADIR file name, average
	FCOVER value
	 columns contents are, in order: directory name, CE_NADIR file name, image name,
	individual FCOVER value for the corresponding image, Processing date
	Digital Hemispherical Images (DHP)
	Six sheets are generated

 Effective PAI: columns contents are, in order: directory name, CE_P180 file name, CEV6.1 PAI estimate, CEV5.1 PAI estimate, Miller PAI estimate, LAI2000 3, 4 and five rings estimates, processing date.



images is required to characterize an ESU (Elementary Sampling Unit)[START_REF] Weiss | Methods for in situ leaf area index measurement, part II: from gap fraction to leaf area index: retrieval methods and sampling strategies[END_REF]. It is not possible also to determine the PAI of a single tree or plant with CAN_EYE.