# Large-Scale Permanent Slide Imaging and Image Analysis for Diatom Morphometrics
## 4 Discussion
There are two main reasons why images captured in a single focus position determined from a grid interpolation are often not optimally sharp: first, minute local variation in frustule positions in the \(Z\) direction on a preparation often exceeds the depth of focus of even relatively low-resolution (\(10\times,20\times\)) objectives. Second, in the case of several taxa, relevant morphological information is located in different focal planes across a single valve (for instance, the outline is often best discernible in a different \(Z\) position than valve face structures like striation). One of the possible measures to improve this situation is conducting a renewed autofocusing at each image position, which enhances the quality of the resulting images (more homogeneous sharpness), but comes at the cost of increased processing time. Another possible measure to address local variation in object \(Z\) positions is to capture and combine an image stack at each (\(X\), \(Y\)) position. If this is performed over a range that covers the heterogeneity in \(Z\) positions across the slide, the quality of the stacked images can be comparable to or even better than those captured after renewed autofocusing even if a second autofocusing step is omitted. The trade-off for this measure is a substantially increased processing time. In our experience, however, it is difficult to estimate in advance the degree of \(Z\) position heterogeneity before a scan. We found, therefore, that the most generally applicable procedure is to combine a renewed autofocusing with image stacking (as opposed to capturing a single image only at each position). Renewed autofocusing ensures that the images are taken in a \(Z\)-range that fits the object height distribution in the specific field-of-view. On the other hand, capturing and combining images at multiple focus depths ensures that differences in object height within a single field-of-view do not lead to only those objects being pictured sharply which dominate the autofocus function in that field of view (which can be the largest or the most contrasting objects and are not necessarily the object of interest). Focus stacking also improves single-specimen images in the sense that features of the valve lying in different focus depths (for instance, valve outline as well as valve face) are visualised sharply, although in the case of diatoms with complex three-dimensional valve structures, this might create disturbing artefacts. We note that it is not necessary to combine (stack) images taken at different \(Z\) but identical (\(X\), \(Y\)) positions into an extended depth-of-focus image. It is also possible to keep the individual \(Z\)-position images and analyse them separately or in a combined manner in downstream processing. However, we currently do not see that this could lead to an improvement in the quality of the low-resolution area scan analysis, and so decided to only keep the stacked images for further processing in this case, which helps saving disk storage space. In the case of high-resolution images, we see a strong potential in analysing image stacks as opposed to stacked extended depth-of-focus images, but development of methods specifically suited to the former is substantially more challenging than analyses of stacked images and currently is not part of our workflow. **Investigated Features**: During the ADIAC project, a large variety of morphometric features (e.g., Gabor features or Legendre polynomials) were measured and classified for taxonomic identification of diatoms, utilizing a compilation of mostly prototyped methods. In contrast, SHERPA investigates less and partly different features (e.g., elliptic Fourier descriptors [6]) and focuses on finding, imaging and measuring diatoms based on their shape as part of a routine workflow for morphometry purposes. **Data economy:** An area scan, as described above, can in principle be performed with any user-selected objective, including oil immersion objectives.