Threshold setting

Like most comparable softwares, Hemisfer analyses hemispherical pictures by classifying each pixel to either white = sky or black = canopy. (Areas marked with a colour to be ignored are not classified, neither portions of the picture towards the soil if there is a slope.) Determining the optimal threshold must be done for each picture and is a crucial step which affects all further calculations. The user can chose the threshold himself, but this subjective task gives hardly reproducible results. Instead, Hemisfer can automatically calculate the optimal threshold according to an algorithm which recognises edges on the picture (Nobis & Hunziker, 2005). Another available method consists in finding the median between the average of brightnesses in pixels classified either as white or as black (Ridler & Calvard, 1978). Hemisfer was the first software for LAI calculation to include these methods. Moreover, it takes the γ (gamma) factor of the picture into account, thereby correcting for the non-linearity between real light intensity and brightness coding in the picture file (Schleppi et al., 2007).

Several options affect the way the software calculates the threshold. They are set via the Options menu, or by clicking on the threshold button on the left-hand side of the main window:

fixed setting The value entered below as threshold will be used in any case.
from parameter file Uses the setting from the parameter file if available. Otherwise (no parameter file or no threshold in parameter file), the value entered below as threshold will be used.
automatic detection (same rings as LAI calculation) The threshold will be calculated on the colour channels chosen in the colour options and will take the γ (gamma) factor of the picture into account. The rings set for the LAI calculation will be used together to calculate the threshold. It is possible to set a range (minimum and maximum) for the threshold to avoid some abnormal results (very low values, for example, are mostly not the true threshold: that's why the minimum is set by default to 64, avoiding such erroneous results).
detection over a fixed number of rings The threshold will be calculated as above, but over a number of rings fixed here, regardless of the number of rings used for the LAI calculation.
detection separately for each ring The threshold will be calculated as above, but separately for each ring of the LAI calculation. This option can be useful if the brightness of the sky varies with the zenith angle.
gamma Here you can enter the γ value of the picture. The γ value indicates how the colour coding in the picture relates to the physical light intensity. This affects the calculation of the threshold. The most common γ value is 2.2

To set the threshold manually, it is recommended to have the picture in black-and-white mode (use the view menu or simply hit ALT-B). This way, when the value of the threshold is changed (the cursor moved), the effect can be seen immediately on the picture.

If the threshold is set to automatic, it can be calculated via the File menu or by clicking on the button . It will be calculated whenever necessary before the calculation of the LAI. The calculation according to Nobis & Hunziker (2005) requires the analysis of many pixel pairs and therefore takes some time. According to our experience, this method usually gives the best results. The threshold according to Ridler & Calvard (1978), on the other hand, is very fast, but requires that the colour frequencies are calculated first. It appears to give rather low threshold values, but is somewhat more robust if pictures were taken under an unfavourable sky with irregular cloudiness (blue and white sky). Taking pictures under good conditions and with a correct exposure should avoid problems in setting the threshold. If, however, you experience such problems, then displaying the graph of colour frequencies may help to understand the cause. Note that the calculation of the threshold uses the γ (gamma) parameter. If γ is set too low, then the threshold will also be too low, and conversely.