uncontaminated by the surrounding trees. For the tree endmember, the soil background of the orchard was replaced by a perfectly absorbing background, to minimize the influence of the background on the tree signature. A $5$cm resolution image of $4$m by $4$m was rendered above a canopy with one row. Only the pixels containing a tree fraction greater than $0.95$ were retained and averaged to provide the pure tree signature. As such, the tree spectral signatures are an integration of all components of a tree, including sunlit and shaded leafs, branches and stems. For the weed endmember spectral signature, a similar approach to the tree endmember was used, replacing the soil background with a perfectly absorbing background, and removing all trees from the orchard. A $4$m by $4$m image with $1$cm resolution was rendered over a weed patch, selecting only those pixels with a weed fraction greater than $0.95$. Finally, these pixels were averaged to provide the spectral signature of the weeds. The resulting endmember spectra are depicted in Fig. \[fig:orchard\_endmembers\].

![Two- and three-endmember orchard synthetic dataset. Endmember spectra: soil (black), weed (red) and tree (green).[]{data-label="fig:orchard_endmembers"}](endmembers_orchard.pdf){width="0.75\columnwidth"}

The orchards have been constructed with a row spacing of $4.5$m, tree spacing of $2$m, 