Skip to main content

Enabling high-throughput quantitative wood anatomy through a dedicated pipeline

Abstract

Throughout their lifetime, trees store valuable environmental information within their wood. Unlocking this information requires quantitative analysis, in most cases of the surface of wood. The conventional pathway for high-resolution digitization of wood surfaces and segmentation of wood features requires several manual and time consuming steps. We present a semi-automated high-throughput pipeline for sample preparation, gigapixel imaging, and analysis of the anatomy of the end-grain surfaces of discs and increment cores. The pipeline consists of a collaborative robot (Cobot) with sander for surface preparation, a custom-built open-source robot for gigapixel imaging (Gigapixel Woodbot), and a Python routine for deep-learning analysis of gigapixel images. The robotic sander allows to obtain high-quality surfaces with minimal sanding or polishing artefacts. It is designed for precise and consistent sanding and polishing of wood surfaces, revealing detailed wood anatomical structures by applying consecutively finer grits of sandpaper. Multiple samples can be processed autonomously at once. The custom-built open-source Gigapixel Woodbot is a modular imaging system that enables automated scanning of large wood surfaces. The frame of the robot is a CNC (Computer Numerical Control) machine to position a camera above the objects. Images are taken at different focus points, with a small overlap between consecutive images in the X-Y plane, and merged by mosaic stitching, into a gigapixel image. Multiple scans can be initiated through the graphical application, allowing the system to autonomously image several objects and large surfaces. Finally, a Python routine using a trained YOLOv8 deep learning network allows for fully automated analysis of the gigapixel images, here shown as a proof-of-concept for the quantification of vessels and rays on full disc surfaces and increment cores. We present fully digitized beech discs of 30–35 cm diameter at a resolution of 2.25 \(\upmu\)m, for which we automatically quantified the number of vessels (up to 13 million) and rays. We showcase the same process for five 30 cm length beech increment cores also digitized at a resolution of 2.25 \(\upmu\)m, and generated pith-to-bark profiles of vessel density. This pipeline allows researchers to perform high-detail analysis of anatomical features on large surfaces, test fundamental hypotheses in ecophysiology, ecology, dendroclimatology, and many more with sufficient sample replication.

Background

Information about environmental fluctuations is recorded in trees over their lifetime as a result of the impact thereof on their growth. Decoding this information relies on quantitative analysis, and therefore detailed digitization of wood is essential. Digitization of wood surfaces [1, 2] is becoming the standard for wood research, not only to perform on-image tree-ring width measurements, but also to quantify anatomical features such as vessel size and density, that can be derived from the surface of wood.

However, there is a need for preparation of these surfaces, imaging thereof and subsequent analysis of the images. To capture the variability inherent to trees, we need to be able to do this for large collections and / or large surfaces.

Conventionally, microtomy is a widely used technique for visualizing wood anatomy at a cellular level, providing excellent material for high-resolution imaging [3]. Thin sections of wood are cut with a microtome and digitized with transmitted light microscopy. While microtomy reveals fine details, it is labour-intensive and prone to tissue distortion (e.g. cell wall rupture) due to varying cell properties [4], but superb quality can be obtained [5]. With specialized tools, long cross-sections can be made, yet its section size is mostly limited to less than 10 cm and harder wood species are more difficult to process, complicating the analysis of pith-to-bark cross-sections. UV laser machining offers an innovative alternative by using ultraviolet laser beams to remove surface material without mechanical contact [6]. While this method achieves excellent surface quality, it is limited to small areas, making it impractical for large wood samples without specialized equipment [7]. Single-point diamond fly-cutting is an alternative that addresses those limitations [4]. This technique uses a rotating diamond edge to create smooth surfaces on large cross-sections without distorting the specimen, and it significantly reduces preparation time compared to microtomy. However, careful tool configuration is essential to prevent surface damage, particularly in anisotropic wood, and it is not widespread in use. Sanding and polishing still remains one of the most accessible and versatile techniques, favoured in dendrochronology for preparing large surfaces such as full stem discs [4]. Sanding smooths the wood surface, enhancing the visibility of both macroscopic and microscopic anatomical features. Unlike microtomy, which requires extensive preparation and tissue softening, sanding can quickly produce high-quality surfaces with minimal setup [8]. The sanding quality is critical for ensuring the clarity and accuracy of the features visible on the captured images. This requires maintaining consistent pressure across the surface to avoid permanent scratches and inconsistencies and is a major challenge with manual sanding. The introduction of robotic sanding effectively mitigates this, providing consistent and reliable sanding across large and complex surfaces [9]. This innovation makes sanding an excellent technique for large-scale wood anatomy visualization, offering both accessibility and excellent surface quality for a range of studies.

To image large wood surfaces in tree-ring science, flatbed scanners have traditionally been and are still used nowadays, due to the low cost, ease of operation and availability as a consumer product. Such scanners typically have a maximum optical resolution which is often sufficient for tree-ring width measurements [10] and blue intensity measurements [11], yet it is not sufficient for species with very narrow rings or for quantitative wood anatomy studies (e.g. [12]). Furthermore, such scanners require a flat surface to be in touch with the scanner plate, in order to achieve best image quality. Specifically for the imaging of increment cores and smaller discs, custom-built systems have been developed such as CaptuRing [13], ATRICS [14], the Skippy system developed at WSL (e.g. [15]) and the system developed by [16]. In addition to these custom-built systems, high-end commercial systems exist for scanning of large surfaces by image stacking and stitching, used for example in the research of [1]. This system, which uses a digital reflex camera as imaging tool, allows for high resolution imaging of large surfaces, reaching resolutions down to 1.28 µm. Other commercial systems exist as well, which can achieve even higher resolutions because they are based on digital microscopy, such as in the recent work of [17]. In addition, techniques such as confocal microscopy [18], SEM [19] and X-ray CT [20] exist as well, but are in most cases limited to smaller surfaces or volumes and require specialised equipment.

While conventional image analysis has proven to be very useful to quantify wood anatomical features e.g. [5, 21], recent advancements in deep learning have demonstrated significant potential for broader application in image-analysis workflows and is particularly interesting here due to its robustness, relative to conventional methods, when trained accordingly. Pre-trained models - like the Segment Anything Model [22], Detectron2 [23], and YOLOv8 [24]—can achieve high levels of segmentation quality while requiring limited amounts of additional use-case specific training data. Neural network-based approaches are increasingly prevalent in dendrochronology and wood anatomy. In dendrochronology, these techniques are used for automatic tree ring detection [25,26,27], while in dendro-anatomy, they facilitate wood anatomical segmentation [28,29,30,31].

While all tools are available separately, we combine them here into a single, functional workflow. The pipeline we present in this paper consists of a robotic sander, a custom-built imaging robot (further referred to as Gigapixel Woodbot), and a Python-based deep learning routine for large image analysis. We detail the different steps of polishing to obtain a high surface quality, digitizing at high resolution and quantifying vessels and rays of the full surface of 5 beech discs and 5 beech increment cores, showing a proof-of-concept of the potential achieved by automation.

Methods

Materials

The five beech discs used as in this paper were collected by the Institute for Nature and Forest Research (INBO: https://ror.org/00j54wy13) as part of the Intensive Monitoring Forest Ecosystems Measurement Network (International Co-operative Programme on Assessment and Monitoring of Air Pollution Effects on Forests level II). These discs (Tw81397, Tw81403, Tw81405, Tw81408, Tw81410) are part of the Tervuren xylarium, the wood collection curated at the Royal Museum for Central Africa, Belgium (https://ror.org/001805t51).

The five beech increment cores were already collected for a dendro-ecological study on beech from the Sonian forest [32] and are glued to a standard wooden holder.

Robot for automated polishing of surfaces

Fig. 1
figure 1

Robotic sander with working surface and detailed view of fixation of a beech stem disc (upper-right corner)

Figure 1 presents a detailed view of the robotic sander, which is a prototype developed through a collaboration between Imbema Belgium NV and Gibas Automation BV. This machine is specifically designed to sand and polish wood surfaces with high precision and consistency by applying consecutively finer grits of sandpaper.

Components

The machine has two integrated components: (1) a Cobot UR10e (Universal Robots, Denmark) collaborative robot arm. The arm features six rotating joints (6 Degrees of Freedom) with a payload of 12.5 kg and a reach of 1300 mm. The arm is controlled by a cable-connected touchscreen with a PolyScope graphical user interface; (2) the Automated Industrial Orbital Sander from Mirka, model Airos 650 CV with a 150 mm sanding pad diameter.

Control and automation

The control system for the orbital sander has been integrated into the PolyScope 5 software. This integration allows users to manage key aspects of the sanding process, ensuring optimal performance and consistency. Key controllable parameters include contact pressure, sanding speed, rotation speed and sanding pattern.

The robot measures applied force and torque during movements (X-Y-Z) with respective ranges of 100 N and 10.0 Nm, precision of 5.0 N and 0.2 Nm, and accuracy of 5.5 N and 0.5 Nm. The pressure exerted by the sander in the Z-direction can be adjusted manually according to the density and shape of the wood specimen. Higher density wood requires greater force to achieve the same surface quality without compromising contact time. The shape of the specimen, particularly its thickness and width, also influences the removal of wood by the applied pressure. For this reason, (thin) increment cores require less pressure to avoid excessive tissue removal.

The speed at which the orbital sander moves across the wood surface is adjustable and consists of the speed for moving between samples and the speed for actual sanding of the sample (standard of 60 mm/s).

The rotational speed of the sanding pad can be tuned between 4000 rpm and 10 000 rpm. Higher rotation speeds increase the process speed but may cause defects (e.g. fissures) in specimens with higher internal moisture content due to increased friction and heat.

The pattern of movement of the sander can be programmed to achieve consistent and comprehensive sanding coverage. Lateral and circular movements can be adjusted to reduce pattern effects on the finished surface.

Surface preparation

Before sanding, the surface must be flattened using milling or belt sanding. Belt sanding is recommended for small, low-density wood surfaces, due to the high speed of this technique. Router milling is better for high-density wood and large surfaces to avoid scorching of cross-sectional surfaces.

Specimen fixation

Specimens must be securely fixed onto the general work table to prevent wobbling due to vibrations by using rubber feet, screws, and washers (see Fig. 1) or direct screwing to the table of the supports.

Sanding grits

The following grits, expressed as number of abrasive grains per square inch, were used for sanding: 40, 60, 80, 120, 180, 240, 320, 400, 500, 800, 1000, 2000, and 4000 (see also [16]). For stem discs, grit 40 was used as starting point for milled surfaces while grit 60 serves as starting point for belt sanded surfaces. For increment cores, belt sanding is the fastest and easiest method to flatten the surfaces before eccentric sanding. Grit 120 was used as starting point for the eccentric sanding, as the increment core surfaces are thin and therefore sensitive to excessive removal of wood at grits with more abrasion. It is advised to use sand paper with a mesh design, which offers enhanced dust removal and flexibility, and a longer lifespan. This makes it more suited for long sanding processes aiming for high-quality and consistent sanding, than perforated sand papers.

Sanding up to grit 240 was noted as the minimum requirement for visualizing macroscopic anatomical features. At this grit level, the surface is sufficiently smooth to discern primary structural elements such as growth rings, vessel arrangements, and grain patterns. For accurately measuring wood anatomical features (e.g. vessel diameter and ray width), a smoother wood surface is often needed. We polished up to grit 4000 sandpaper to ensure high-level surface quality at the end.

Standard procedure

The time required to acquire the necessary sanding quality depends on the aforementioned settings of pressure, speed, rotation speed, spacing, circularly movements, and also on the specimen shape and wood species and remaining quality of the sanding paper.

Every sample surface is programmed separately and consists of the same steps (see Appendix A).

Polishing of beech discs and increment cores

All beech discs were mounted on the table, and polishing was programmed using a pressure of 80 N, a sanding speed of 60 mm/s, a rotation speed of 8500 rpm, a spacing of 30 mm with 10 loops. Subsequent grits were used: 40, 60, 80, 120, 180, 240, 320, 400, 500, 800, 1000, 2000, and 4000. The sample holder with increment cores was also mounted on the table, and polishing was programmed using a pressure of 35 N, a sanding speed of 60 mm/s, a rotation speed of 8500 rpm, a spacing of 30 mm with 3 loops. Subsequent grits were used: 120, 180, 240, 320, 400, 500, 800, 1000, 2000, and 4000.

Gigapixel Woodbot for automated imaging

The custom-built setup is shown in Fig. 2. The Gigapixel Woodbot consists of a CNC (Computer Numerical Control) machine with camera system and laser distance sensor attached to the tool head. The camera system consists of a camera, a telecentric lens and ring lighting. The entire set-up is controlled via a GUI on a workstation (see Appendix B).

Fig. 2
figure 2

The Gigapixel Woodbot (left) and 3D rendering (AutoDesk Fusion 360®) of the toolhead with laser, camera, ring light and telecentric lens (right)

Hardware

CNC motion platform

The High-Z S-1000T CNC machine (CNC-STEP, Germany) is used for the motion of camera system and laser. The travel ranges in X-, Y- and Z-direction are 1000 mm, 600 mm and 110 mm, respectively. The maximum speed of the X- and Y-motors is 12000 mm/min, while the motor of the Z-axis has a maximum speed of 1800 mm/min. The repeat accuracy is 0.01 mm and the backlash (slack in gears causing inaccurate positioning) ± 0.015 mm.

Camera system

A camera system is attached to the toolhead of the CNC machine. The camera system combines a Genie camera NanoXL-C4090 (Teledyne Dalsa, Canada), a telecentric lens TC4M009-F (Opto-Engineering, Italy), a OM70-P0140.HH0100.EK laser distance sensor (Baumer, Germany) for depth estimation and a HPR2-75SW-IU ring light (CSS Europe NV, Belgium) (Fig. 2).

The camera is industrial-grade and takes RGB images with a size of 4096 x 4096 pixels, controlled via an Ethernet connection. The telecentric lens allows only parallel light beams to pass through, limiting distortion of the recorded image. The lens has a focal distance of 63.3 mm, a Depth of Field of 0.3 mm and a magnification of factor 2. The combination of the camera and telecentric lens, assembled by Stemmer Imaging (Germany), results in images of 4096 x 4096 pixels where each pixel corresponds to 2.25 µm x 2.25 µm. Due to the fixed focal length and Depth of Field, multiple images are needed when imaging an area with height differences to create a single sharp image, a principle which is known as extended focus imaging. For this purpose, the Gigapixel Woodbot is equipped with a laser sensor. The accuracy of the sensor (1.2–2.5 µm) thus enables to measure height differences smaller then the Depth of Field. A topology map of the sample surface is first created by the laser, after which the number of images to be taken per position is calculated. The ring light ensures uniform illumination close to the object, providing a cold white light with a colour temperature of 6000 K. The diffusivity of the light facilitates imaging polished objects that are reflective and shiny.

Workstation

The Gigapixel Woodbot is controlled by a workstation, coordinating and controlling the entire process, including communication with the CNC machine, camera and laser sensor. The workstation runs Ubuntu 20.04.6 LTS (Focal Fossa), features an RTX 3090 GPU (NVidia, USA) with 24GB VRAM, allowing image acquisition and subsequent stacking and stitching to be performed efficiently and quickly. The workstation has 256 GB RAM and two 12 TB hard drives as storage media. The workstation also includes a parallel PCIe interface card (Digitus DS-30040-2) that allows the CNC machine to be controlled via a parallel DB25 cable.

Software architecture

The acquisition process for gigapixel images, which consists of an acquisition and a processing phase, is shown as a diagram in Figure 10 in Appendix C.

In the acquisition interface, a height map of the object is created by the laser sensor to determine the number of images to be taken at each position, considering the Depth of Field of the camera system. Due to the complex 3D interconnection of the images, both the positional information as well as other metadata are stored in the Document Image Store (DIS), a document-oriented database. Note that the Gigapixel Woodbot can also take images at a fixed Z-height, or with a fixed number of images per position, without the need for a laser height map. In the analysis interface, the metadata of an acquisition task is retrieved from the DIS. Extended depth of focus is obtained by combining the set of images taken on the same position. These images are further corrected for vignetting - an optical phenomenon occurring when light rays do not pass evenly through the lens of a camera or other optical instrument and the edges of the image appear darker than the centre - and stitched together to a single gigapixel image.

The software makes use of Docker, which is an open source platform used to package software applications into containers, which are lightweight and portable environments in which applications can run, with all its dependencies regardless of the environment in which it is placed. The domain diagram (Figure 11) and details on the different containers can be found in Appendix C.

To control the Gigapixel Woodbot, a GUI is available that runs in a separate container. The graphical user interface, with 4 tab pages (control, acquisition, analysis and calibration) is described step-by-step in Appendix B.

Imaging of beech discs and increment cores

The beech discs were mounted and imaged separately on the Gigapixel Woodbot, and the five beech increment cores were imaged sequentially without user intervention using a specific acquisition protocol for increment cores. The principle is illustrated in Fig. 12 in Appendix D.

Deep learning for quantitative wood anatomy

Deep learning segmentation model

The full images from the Gigapixel Woodbot were subdivided in non-overlapping patches measuring 640 x 640 pixels, and 150 of these patches, from 2 different discs, were randomly selected to be used as training data for a deep learning segmentation model. All vessels and rays were annotated on these images using Roboflow [33]. The resulting annotated dataset for training the YOLOv8 network represents approximately 17.000 vessels and 500 rays, requiring 3 days of manual annotation. We split the dataset in 90 training images, 30 validation images, and 30 test images, and trained a YOLOv8 deep learning segmentation model [24] for 500 epochs. Performance metrics of the resulting model can be found in Appendix E.

Segmentation of stem discs

The resulting YOLOv8 segmentation model was applied to full stem disc gigapixel images using a moving window approach. This moving window takes a 640 x 640 crop, segments it, and adds the resulting mask to an empty binary image with the same size as the original full image. It subsequently moves to the next 640 x 640 crop, with a user-defined overlap area (in most cases 10–25%). This process is repeated until the entire image is segmented. In the current approach, sufficient RAM is needed to segment gigapixel images, approximately two times the original size of the image. The segmentation process results in two large binary masks, one for vessels and one for rays. To count the number of vessels, the detection bounding boxes from the YOLO model outputs were combined and filtered with non-maximum suppression to remove duplicate detection using the same moving window approach. The described routine was implemented in Python 3.11.7 [34] using mainly following packages: torch, cv2, pyometiff, torchvision.ops. Training and segmentation was performed on another workstation than the one used to control the Gigapixel Woodbot, running Microsoft Windows 10 Pro for Business equipped with an Intel Xeon W-2265 processor, 256 GB of DDR4 RAM and an NVIDIA RTX A4000 GPU.

Segmentation of increment cores

The previously mentioned routine of digitisation and segmentation was also performed on five beech increment cores. The resulting masks were analysed using the X-ray CT toolchain [20, 35,36,37] (software packages available at www.dendrochronomics.ugent.be) to calculate profiles of vessel area fraction and ray area fraction considering tilted ring boundaries. This software was developed for X-ray micro-CT volumes of increment cores but can also be used for two-dimensional masks. The vessel area profile was corrected by dividing vessel area by the area not covered by rays, as this better represents yearly vessel area fluctuations.

Results

Table 1 summarizes all timings for mounting, sanding up to grit size 4000, image acquisition, analysis and also the image and data size of the five beech wood discs and increment cores. One batch of five 30 cm increment cores takes only approximately 30 min to digitize, and not 5 times 10 min, because of the parallelization mentioned in the Methods section (stacking, lens correction and stitching can be initiated in parallel with image acquisition of the next object), which is approximately a 2 times speed up compared to a serial execution of the imaging steps. For a single beech disc of 30–35 cm diameter, it takes approximately 7 h to digitize in total.

Figure 3 compares the difference in image quality between a gigapixel image of the same sample sanded up to 120 and up to 4000 grit size, and the same sample sanded up to 4000 grit but imaged with a flatbed scanner. Clearly, the center image obtained with the Gigapixel Woodbot (11289 dpi (2.25 \(\upmu\)m)) is much sharper than the flatbed scan (2400 dpi (10.58 \(\upmu\)m)) on the right, which confirms the improved resolution of the image acquisition system with this specific combination of lens and camera. Additionally, the sanding quality strongly determines the visibility of the anatomical features at any resolution, as the difference between polishing to grit 4000 and sanding to grit 120 only is evident when comparing the image at the left with the image in the center, both acquired with the Gigapixel Woodbot.

Fig. 3
figure 3

Zoom on the same part of a Fagus sylvatica surface, acquired with the Gigapixel woodbot (left and center) and EPSON Perfection V750 Pro (right). The surface was sanded till grit P120 (left) and P4000 (center and right). Images were corrected for brightness and contrast using Fiji [38]

Table 1 Overview of the range of timings of the different steps for sanding and polishing, imaging and analysis of the beech discs and increment cores and the resulting dimensions and size (in GB) of the final images. Note that mounting, programming and polishing of increment cores is given for the entire batch, as they are small enough to be polished at once. K = \(10^3\), M = \(10^6\)

Figure 4 shows the gigapixel image and resulting vessel and ray segmentation of one of the beech discs. Close to 9 million vessels were counted on this disc, considering that smaller vessels and thin rays are (potentially) not detected and that vessels close to one another might be segmented as one. Figure 5 shows one of the increment cores. A profile of vessel area fraction is shown as a possible product of this dataset.

Fig. 4
figure 4

Top: 24.000 megapixel (24 gigapixel) image of a 30 cm beech disc and two subsequent magnifications. Note the black areas: no images were taken there as informed by the laser height map, which saves time. Bottom: mask of the same disc made by the YOLOv8 model, indicating the vessels (approx. 8.86 million) in blue and the rays in red

Fig. 5
figure 5

A beech increment core at 2 magnifications. A mask indicating the vessels (blue) and rays (red) is shown under each Gigapixel Woodbot image. A profile of vessel area fraction is plotted below the masks. This profile accounts for varying ring border angles and excludes rays

Discussion

The full pipeline reported here allows analysis of large amounts of large sample surfaces with minimal human intervention. This is essential if we want to unlock detailed information in large wood collections, not only to understand population trends, but also to increase our understanding of individual tree responses [39] and including such data in an individualistic approach [40]. The different steps of this pipeline are essential to achieve this purpose.

Surface polishing with the robotic sander

Proper sanding and polishing are key steps for optimal surface quality, as shown in Fig. 3. In literature, interesting embedding techniques are reported to further improve sanding quality at cell level (e.g. [8]), yet these are not applicable to large surfaces. Although the entire procedure takes several hours and changing sandpaper between grits currently still requires a human operator, human intervention is low given the automated procedure of the robotic sander, allowing multiple samples to be processed at once. Sanding and polishing have been performed manually in many studies, which is sufficient for tree-ring width studies or to visualize larger vessels [41], yet achieving a consistent high quality on large areas to enable high-resolution imaging of the wood anatomy is very difficult. We have polished up to and including grit 4000 to ensure high surface quality, yet we have not investigated whether, for quantifying features such as vessels and rays, all the grit sizes are needed. Future work could include a systematic study on the impact of grit size on the analysis results; it could well be that time for robotic sanding could be reduced further. While sanding produces detailed anatomical visualizations, we have not tested the measurement of for example features at cell wall level, such as cell wall thickness of fibres. It might be that smooth surfaces that are microtomed [17] or cross-sections obtained by microtomy are still needed to achieve the highest possible quality [5], yet that still has to be tested. The commercially available robotic sander, while user-friendly, does of course require training due to the complexity of its parameters. This includes careful programming to prevent collisions, particularly when handling multiple samples. Thorough specimen fixation is essential to prevent movement during sanding and polishing. Although robotic sanding is needed to achieve the highest surface quality, careful manual sanding (see among others [16]) could still result in a quality sufficient for imaging of smaller wood surfaces, yet is difficult to achieve on larger surfaces such as entire wood discs. Furthermore, for increment cores for example the use of a core microtome (e.g. [42]) can be used as well to obtain a very high surface quality.

Imaging with the Gigapixel Woodbot

When properly sanded and polished, high-resolution imaging using the Gigapixel Woodbot enables to visualize vessels and rays clearly, of similar quality as can be obtained with for example the commercial GIGAmacroTM system described in [1] (this system can achieve a higher resolution than the Gigapixel Woodbot) and the ATRICS system [14]. Of course, there is significant time needed for high-resolution imaging compared to flatbed imaging. A higher image resolution comes with a time cost, and the Gigapixel Woodbot is not optimized for speed, but for automation, which is one of the main advantages of the system. The parallelization of image acquisition, stacking, lens correction and stitching, when scanning multiple objects at once, does speed up the imaging process. Good calibration of the camera is key (see Appendix B.4) to avoid image blur after extended focus imaging. Preferentially, the user selects a value between 10 % and 25 % overlap to allow for good stitching results. We implemented the MIST algorithm for stitching [43] in a seamless workflow, yet commercial packages such as PTGui (New House Internet Services B.V., the Netherlands) or tools under the hood of Fiji, such as the one developed by [44], are able to perform the stitching as well. With a maximal image resolution of 2.25 \(\upmu\)m, the minimal feature sizes that can be quantified are approximately 5–6 \(\upmu\)m, which means that smaller vessels are likely not to be segmented properly. Then yet, the modularity of the system allows for mounting a higher-resolution camera if needed, similar to commercial systems, which comes with a cost of longer acquisition times and larger imagery (N times more images, \(N^2\) the image size). Resente and colleagues [28], for example, show the potential of deep learning (Mask-RCNN) for quantitative wood anatomy on cross-sections imaged with light microscopy, obtaining as such a much higher detail than the resolution obtained by the Gigapixel Woodbot, although on a much smaller surface. The size of the object is also limited by the size of the CNC, although this can be solved by either mounting the system on a larger CNC or re-positioning large discs underneath the entire set-up and stitch larger subsections together. Of course, the size of these images then becomes very large and the need for optimized high-performance computation is even more important then.

Automated analysis using the YOLO architecture

Numerous image analysis techniques exist in literature for quantitative analysis of wood anatomical traits. Conventional image processing tools such as WinCELL [45] and ROXAS [46] have shown great value (e.g. [47, 48]). Fiji [38], with for example the Trainable WEKA segmentation tool [49], is an example of machine learning-based analysis ([50]), as well as the open-source Qupath package [51] used in [52]. More recently, deep learning-based automation has been improved by the release of tools such as ROXAS AI [30]. The open-source accessibility of deep learning networks for image segmentation such as the YOLO framework used here is a game-changer in terms of ease-of-use and their potential for generalization with rather limited training datasets, compared to aforementioned approaches. Also, optimizing the surface preparation procedure by for example high-pressure water blasting to remove tyloses and wood dust inside lumina, as used in [41], was not needed here given such a DL-framework, once trained sufficiently, should be able to handle variability induced by dust and tyloses in lumina. We haven not tested the pipeline yet on a wide variety of species, so it remains to be seen if such high-pressure water-blasting would be beneficial for certain species. Although computation time is quite long, no human intervention is needed and the code can still be optimized for speed if need be. The proof-of-concept shown here of vessel and ray segmentation in beech is just one of several possible anatomical features to be segmented. Different species have unique anatomical structures of interest, for example earlywood vessels in oak, parenchyma bands in tropical species, or even complete tree rings along the full circumference of the disc could be segmented. The DL-driven approach can be adapted to study a wide range of anatomical features across various species, enhancing our understanding of wood anatomy and functional ecology. Obviously, DL networks do require a substantial amount of training data, therefore we need to train species-specific models, and probably will in time be able to move towards a general model able to analyze all wood species. In few cases, where only a limited number of samples is available per wood species, when several wood species have to be analyzed and when the surface area to be studied is small enough, it might still be more efficient to use conventional tools for image analysis or rely on cross-sections if feasible. Nonetheless, the DL-approach is also applicable on cross-sections if sufficient training data is available. It must be stressed that gathering training data using tools such as Roboflow is very interesting in that respect, given that one can import pre-trained models to assist in annotation, which reduces the annotation effort tremendously, compared to tedious efforts using software packages such as QuPath, (previous versions of) PhotoShop and (previous versions of) Image-Pro Plus (Media Cybernetics, USA), etc (e.g. [51, 53]). An advantage of aforementioned packages is the potential to interact with the segmentation data and correct if and where needed. In that respect, many of the aforementioned commercial packages have integrated or are integrating AI. One can of course question the feasibility of correcting analyses with millions of vessels. A sensitivity study might be interesting in that respect. One of the current limitations of the Python segmentation routine is its high demand for RAM. In our workstation with 256GB RAM we can process images up to 140–160 GB approximately, but not larger with the current approach. This issue can be addressed by either using cloud compute solutions, increasing RAM capacity, increasing the swap file, yet as such lowering the speed of processing, or, at software side, by implementing block processing. Finally, even with simplified versions of the systems described above, for example using a more manual approach for polishing or using a core microtome, image acquisition with other equipment (e.g. [14], GIGAmacroTM, HiroxTM, etc) as well as stacking and stitching with other software (see above), one can still exploit the potential of DL-based wood anatomical analysis and the software approach presented here.

Conclusions

The proposed method allows for unprecedented analysis of entire stem discs, as these can be imaged and segmented in one go. The entire pipeline of automated surface preparation, image acquisition and segmentation thus enables the study of a large number of large wood surfaces.

The main advantage of the robotic sander is its ability to maintain consistent pressure and speed. This consistency is crucial for high-quality sanding using multiple grits, ensuring a smooth and uniform surface. Additionally, the machine’s capacity to handle a wide variety of wood types makes it an invaluable tool for research, ensuring a surface quality that surpasses manual capability. Naturally, the automation potential is key for preparing a large numbers of samples.

The Gigapixel Woodbot system allows to digitize large collections of increment cores and wood discs in an automated way, similar to commercial systems. The modularity of the Gigapixel Woodbot, thanks to the container approach, allows for the addition of other camera systems, which makes it possible to further increase the resolution to reach that of a digital microscope, and to optimize image quality for specific applications, e.g. making use of hyperspectral cameras to map the macromolecular chemistry at high resolution. Given that the motion control runs independently from the imaging, any type of contact or non-contact sensor could be added to the toolhead as well that could be of use in the study of increment cores and wood discs.

The deep learning-based segmentation routine presented here enables automated analysis for quantitative wood anatomy with minimal human intervention (training data) and, when trained on a diverse range of wood species, could be a general tool for quantitative wood anatomical analysis.

As such, with automated robotic sanding, automated image analysis and DL-based segmentation, quantitative wood anatomy on a large number of samples and on large samples is within reach, opening up new research avenues.

Availability of data and materials

The increment core images as well as the vessel and ray masks of the increment cores are available on Zenodo (Increment cores images). The disk images and the vessel and ray masks thereof are available on the BioImage Archive (Disk images). The trained YOLOv8 model and the training data are available on Zenodo (YOLOv8 model and training data). All code of the Gigapixel Woodbot and the code for the analysis using the trained YOLOv8 model are also available on Zenodo (Gigapixel-Woodbot and YoloAnatomy respectively). The docker containers of the Gigapixel Woodbot software are available on Docker hub.

References

  1. Griffin D, Porter ST, Trumper ML, Carlson KE, Crawford DJ, Schwalen D, et al. Gigapixel macro photography of tree rings. Tree-Ring Res. 2021;77(2):86–94.

    Article  Google Scholar 

  2. De Blaere R, Lievens K, Van Hassel D, Deklerck V, De Mil T, Hubau W, et al. SmartWoodID-an image collection of large end-grain surfaces to support wood identification systems. Database. 2023;2023:baad034.

    Article  PubMed  PubMed Central  Google Scholar 

  3. Tardif J, Conciatori F. Microscopic examination of wood. In: Yeung E, Stasolla C, Sumner M, Huang B, editors. Sample preparation and techniques for light microscopy. Cham: Springer; 2015. p. 331–44.

    Google Scholar 

  4. Spiecker H, Schinker MG, Hansen J, Park Y, Ebding T, Döll W. Cell structure in tree rings: Novel methods for preparation and image analysis of large cross sections. IAWA Journal. 2000;21(3):361–73. https://doiorg.publicaciones.saludcastillayleon.es/10.1163/22941932-90000253.

    Article  Google Scholar 

  5. Von Arx G, Crivellaro A, Prendin AL, Čufar K, Carrer M. Quantitative wood anatomy-practical guidelines. Front Plant Sci. 2016;7:781.

    Google Scholar 

  6. Fukuta S, Nomura M, Ikeda T, et al. UV laser machining of wood. Eur J Wood Wood Prod. 2016;74:261–7. https://doiorg.publicaciones.saludcastillayleon.es/10.1007/s00107-016-1010-9.

    Article  CAS  Google Scholar 

  7. Guo X, Deng M, Hu Y, Wang Y, Ye T. Morphology, mechanism and kerf variation during CO2 laser cutting pine wood. J Manufact Process. 2021;68:13–22. https://doiorg.publicaciones.saludcastillayleon.es/10.1016/j.jmapro.2021.05.036.

    Article  Google Scholar 

  8. Arzac A, López-Cepero JM, Babushkina EA, Gomez S. Applying methods of hard tissues preparation for wood anatomy: Imaging polished samples embedded in polymethylmethacrylate. Dendrochronologia. 2018;51:76–81. https://doiorg.publicaciones.saludcastillayleon.es/10.1016/j.dendro.2018.08.005.

    Article  Google Scholar 

  9. Nagata F, Kusumoto Y, Fujimoto Y, Watanabe K. Robotic sanding system for new designed furniture with free-formed surface. Robot Comput Integrat Manufact. 2007;23(4):371–9.

    Article  Google Scholar 

  10. Arenas-Castro S, Fernández-Haeger J, Jordano-Barbudo D. A method for tree-ring analysis using DIVA-GIS freeware on scanned core images. Tree-ring Res. 2015;71(2):118–29.

    Article  Google Scholar 

  11. Rydval M, Larsson LÅ, McGlynn L, Gunnarson BE, Loader NJ, Young GH, et al. Blue intensity for dendroclimatology: should we have the blues? Exp Scotland Dendrochronologia. 2014;32(3):191–204.

    Article  Google Scholar 

  12. Seftigen K, Fonti MV, Luckman B, Rydval M, Stridbeck P, Von Arx G, et al. Prospects for dendroanatomy in paleoclimatology-a case study on Picea engelmannii from the Canadian Rockies. Clim Past Discuss. 2022;2022:1–32.

    Google Scholar 

  13. García-Hidalgo M, García-Pedrero Á, Colón D, Sangüesa-Barreda G, García-Cervigón A, López-Molina J, et al. CaptuRING: a do-it-yourself tool for wood sample digitization. Methods Ecol Evol. 2022; 1–7.

  14. Levanič T. ATRICS-a new system for image acquisition in dendrochronology. Tree-Ring Res. 2007;63(2):117–22.

    Article  Google Scholar 

  15. Klesse S, Wohlgemuth T, Meusburger K, Vitasse Y, von Arx G, Lévesque M, et al. Long-term soil water limitation and previous tree vigor drive local variability of drought-induced crown dieback in Fagus sylvatica. Sci Total Environ. 2022;851:157926.

    Article  CAS  PubMed  Google Scholar 

  16. Cerre JC. Incident light microphotography at high depth of focus. IAWA Journal. 2016;37(3):506–10.

    Article  Google Scholar 

  17. Rydval M, Björklund J, von Arx G, Begović K, Lexa M, Nogueira J, et al. Ultra-high-resolution reflected-light imaging for dendrochronology. Dendrochronologia. 2024;83: 126160.

    Article  Google Scholar 

  18. Liang W, Heinrich I, Helle G, Liñán ID, Heinken T. Applying CLSM to increment core surfaces for histometric analyses: a novel advance in quantitative wood anatomy. Dendrochronologia. 2013;31(2):140–5.

    Article  Google Scholar 

  19. Huang W, Li Y. Practical guidelines for quantitative wood anatomy on Ginkgo biloba L. IAWA Journal. 2022;1(aop):1–20.

    Google Scholar 

  20. Van den Bulcke J, Dhaene J, Denis V, Hoorebeke L, Boone M, Boone M, et al. Advanced X-ray CT scanning can boost tree-ring research for earth-system sciences. Ann Bot. 2019;124:837–47. https://doiorg.publicaciones.saludcastillayleon.es/10.1093/aob/mcz126.

    Article  PubMed  PubMed Central  Google Scholar 

  21. Fonti P, Solomonoff N, García-González I. Earlywood vessels of Castanea sativa record temperature before their formation. New Phytol. 2007;173(3):562–70.

    Article  PubMed  Google Scholar 

  22. Kirillov A, Mintun E, Ravi N, Mao H, Rolland C, Gustafson L, et al. Segment anything. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV). 2023;4015–4026.

  23. Wu Y, Kirillov A, Massa F, Lo WY, Girshick R.: Detectron2. https://github.com/facebookresearch/detectron2.

  24. Jocher G, Chaurasia A, Qiu J.: Ultralytics YOLO. https://github.com/ultralytics/ultralytics.

  25. Fabijańska A, Danek M. DeepDendro—a tree rings detector based on a deep convolutional neural network. Comput Electron Agric. 2018;150:353–63. https://doiorg.publicaciones.saludcastillayleon.es/10.1016/j.compag.2018.05.005.

    Article  Google Scholar 

  26. Kim D, Ko C, Kim D. Method for detecting tree ring boundary in conifers and broadleaf trees using Mask R-CNN and linear interpolation. Dendrochronologia. 2023;79: 126088. https://doiorg.publicaciones.saludcastillayleon.es/10.1016/j.dendro.2023.126088.

    Article  Google Scholar 

  27. Poláek M, Arizpe A, Hüther P, Weidlich L, Steindl S, Swarts K. Automation of tree-ring detection and measurements using deep learning. Methods Ecol Evol. 2023;14(9):2233–42. https://doiorg.publicaciones.saludcastillayleon.es/10.1111/2041-210X.14183.

    Article  Google Scholar 

  28. Resente G, Gillert A, Trouillier M, Anadon-Rosell A, Peters RL, von Arx G, et al. Mask, train, repeat! artificial intelligence for quantitative wood anatomy. Front Plant Sci. 2021. https://doiorg.publicaciones.saludcastillayleon.es/10.3389/fpls.2021.767400.

    Article  PubMed  PubMed Central  Google Scholar 

  29. Ergun H. Segmentation of wood cell in cross-section using deep convolutional neural networks. J Intell Fuzzy Syst. 2021;41(6):7447–56. https://doiorg.publicaciones.saludcastillayleon.es/10.3233/JIFS-211386.

    Article  Google Scholar 

  30. Katzenmaier M, Garnot VSF, Björklund J, Schneider L, Wegner JD, von Arx G. Towards ROXAS AI: deep learning for faster and more accurate conifer cell analysis. Dendrochronologia. 2023;81: 126126. https://doiorg.publicaciones.saludcastillayleon.es/10.1016/j.dendro.2023.126126.

    Article  Google Scholar 

  31. Garcia-Pedrero A, García-Cervigón AI, Olano JM, García-Hidalgo M, Lillo-Saavedra M, Gonzalo-Martín C, et al. Convolutional neural networks for segmenting xylem vessels in stained cross-sectional images. Neural Comput Appl. 2020;32(24):17927–39. https://doiorg.publicaciones.saludcastillayleon.es/10.1007/s00521-019-04546-6.

    Article  Google Scholar 

  32. Verschuren L, De Mil T, De Frenne P, Haneca K, Van Acker J, Vandekerkhove K, et al. Heading for a fall: the fate of old wind-thrown beech trees (Fagus sylvatica) is detectable in their growth pattern. Sci Total Environ. 2023;903: 166148. https://doiorg.publicaciones.saludcastillayleon.es/10.1016/j.scitotenv.2023.166148.

    Article  CAS  PubMed  Google Scholar 

  33. Dwyer B, Nelson J, Hansen T, et al. Roboflow. https://roboflow.com.

  34. Van Rossum G, Drake FL. Python 3 reference manual. Scotts Valley, CA: CreateSpace; 2009.

    Google Scholar 

  35. De Ridder M, Van den Bulcke J, Vansteenkiste D, Van Loo D, Dierick M, Masschaele B, et al. High-resolution proxies for wood density variations in Terminalia superba. Ann Bot. 2011;107(2):293–302. https://doiorg.publicaciones.saludcastillayleon.es/10.1093/aob/mcq224.

    Article  PubMed  Google Scholar 

  36. De Mil T, Vannoppen A, Beeckman H, Van Acker J, Van den Bulcke J. A field-to-desktop toolchain for X-ray CT densitometry enables tree ring analysis. Ann Bot. 2016;117:mcw063. https://doiorg.publicaciones.saludcastillayleon.es/10.1093/aob/mcw063.

    Article  Google Scholar 

  37. Van den Bulcke J, Wernersson ELG, Dierick M, Van Loo D, Masschaele B, Brabant L, et al. 3D tree-ring analysis using helical X-ray tomography. Dendrochronologia. 2014;32(1):39–46. https://doiorg.publicaciones.saludcastillayleon.es/10.1016/j.dendro.2013.07.001.

    Article  Google Scholar 

  38. Schindelin J, Arganda-Carreras I, Frise E, Kaynig V, Longair M, Pietzsch T, et al. FIJI: an open-source platform for biological-image analysis. Nat Methods. 2012;9(7):676–82.

    Article  CAS  PubMed  Google Scholar 

  39. Rita A, Camarero JJ, Colangelo M, de Andrés EG, Pompa-García M. Wood anatomical traits respond to climate but more individualistically as compared to radial growth: analyze trees, not means. Forests. 2022;13(6):956.

    Article  Google Scholar 

  40. Carrer M. Individualistic and time-varying tree-ring growth to climate sensitivity. PLoS One. 2011;6(7): e22813.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  41. Fonti P, García-González I. Suitability of chestnut earlywood vessel chronologies for ecological studies. New Phytol. 2004;163(1):77–86.

    Article  PubMed  Google Scholar 

  42. Gärtner H, Nievergelt D. The core-microtome: a new tool for surface preparation on cores and time series analysis of varying cell parameters. Dendrochronologia. 2010;28(2):85–92.

    Article  Google Scholar 

  43. Chalfoun J, Majurski M, Blattner T, Bhadriraju K, Keyrouz W, Bajcsy P, et al. MIST: accurate and scalable microscopy image stitching tool with stage modeling and error minimization. Sci Report. 2017;7(1):4988.

    Article  Google Scholar 

  44. Preibisch S, Saalfeld S, Tomancak P. Globally optimal stitching of tiled 3D microscopic image acquisitions. Bioinformatics. 2009;25(11):1463–5.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  45. Guay R. WinCELL 2013 for wood cell analysis. Ontario: Regent Instruments Canada Inc; 2013.

    Google Scholar 

  46. Von Arx G, Carrer M. ROXAS-A new tool to build centuries-long tracheid-lumen chronologies in conifers. Dendrochronologia. 2014;32(3):290–3.

    Article  Google Scholar 

  47. Wiśniewská K, Šilhán K. Quantitative anatomy or macroscopic parameters of compression wood of Picea abies (L.) H. Karst.? Defining the optimal parameters for dendrogeomorphic purposes. IAWA Journal. 2022;44(1):21–35.

    Article  Google Scholar 

  48. Castagneri D, Regev L, Boaretto E, Carrer M. Xylem anatomical traits reveal different strategies of two Mediterranean oaks to cope with drought and warming. Environ Exp Bot. 2017;133:128–38.

    Article  Google Scholar 

  49. Arganda-Carreras I, Kaynig V, Rueden C, Eliceiri KW, Schindelin J, Cardona A, et al. Trainable Weka Segmentation: a machine learning tool for microscopy pixel classification. Bioinformatics. 2017;33(15):2424–6.

    Article  CAS  PubMed  Google Scholar 

  50. De Mil T, Tarelkin Y, Hahn S, Hubau W, Deklerck V, Debeir O, et al. Wood density profiles and their corresponding tissue fractions in tropical angiosperm trees. Forests. 2018;9(12):763.

    Article  Google Scholar 

  51. Bankhead P, Loughrey MB, Fernández JA, Dombrowski Y, McArt DG, Dunne PD, et al. QuPath: open source software for digital pathology image analysis. Sci Reports. 2017;7(1):1–7.

    CAS  Google Scholar 

  52. Keret R, Schliephack PM, Stangler DF, Seifert T, Kahle HP, Drew DM, et al. An open-source machine-learning approach for obtaining high-quality quantitative wood anatomy data from E. grandis and P. radiata xylem. Plant Sci. 2024;340:111970.

    Article  CAS  PubMed  Google Scholar 

  53. Ziemińska K, Butler DW, Gleason SM, Wright IJ, Westoby M. Fibre wall and lumen fractions drive wood density variation across 24 Australian angiosperms. AoB Plants. 2013;5:PLT046.

    Article  PubMed Central  Google Scholar 

  54. Forster B, Van De Ville D, Berent J, Sage D, Unser M. Complex wavelets for extended depth-of-field: a new method for the fusion of multichannel microscopy images. Microscopy Res Tech. 2004;65(1–2):33–42.

    Article  Google Scholar 

  55. Peng T, Thorn K, Schroeder T, Wang L, Theis FJ, Marr C, et al. A BaSiC tool for background and shading correction of optical microscopy images. Nat Commun. 2017;8(1):14836.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

Download references

Acknowledgements

We acknowledge Caspar De Rodder for the first design of the system, Toon Gheyle, Stijn Willen and Ferre Carron for their technical assistance.

Funding

This work was supported by the UGent Special Research Fund (BOF Starting Grant BOFSTG2018000701), the Research Foundation Flanders (FWO) through the ACTREAL (G019521N) and XyloDynaCT (G009720N) projects and the Belgian Science Policy Office through the BRAIN-be 2.0 program (Belgian Research Action through Interdisciplinary Networks PHASE 2-2018-2023) project SmartWoodID (B2/202/P2/SmartWoodID) and ENFORCE (RT/22/ENFORCE).

Author information

Authors and Affiliations

Authors

Contributions

Jan Van den Bulcke: Conceptualization, Investigation, Methodology, Supervision, Software, Resources, Funding acquisition, Data curation, Visualization, Writing-original draft, Writing-review and editing. Louis Verschuren: Conceptualization, Investigation, Methodology, Software, Visualization, Writing-original draft, Writing-review and editing. Ruben De Blaere: Investigation, Methodology, Visualization, Writing-original draft, Writing-review and editing. Simon Vansuyt: Investigation, Methodology, Software, Visualization, Writing-original draft, Writing-review and editing. Maxime Dekegeleer: Supervision, Writing-review and editing. Pierre Kibleur: Supervision, Writing-review and editing. Olivier Pieters: Conceptualization, Methodology, Supervision, Software, Visualization, Writing-review and editing. Tom de Mil: Writing-review and editing. Wannes Hubau: Resources, Funding acquisition, Writing-review and editing. Hans Beeckman: Resources, Funding acquisition, Writing-review and editing. Joris Van Acker: Resources, Funding acquisition, Writing-review and editing. Francis wyffels: Conceptualization, Methodology, Supervision, Software, Writing-original draft, Writing-review and editing.

Corresponding author

Correspondence to Jan Van den Bulcke.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Consent for publication

Not applicable.

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix A Standard procedure for polishing with the robotic sander

  • Initialization: the Cobot moves the sander towards the wood surface via predefined waypoints to avoid collisions.

  • Rotation Activation: the rotation speed is set, and the sander initiates rotation. A waiting function ensures that the sander waits until the set rpm is reached and stable.

  • Force Calibration: the Cobot calibrates its force measurement with two 0.1-second waiting periods for accuracy.

  • Sanding Path Execution: the rotating sander moves downward towards the surface, adjusting speed based on set force. The sanding path, defined by a loop function (number of repetitions), force control (applied pressure), and movement pattern (lateral movements, spacing, and speed), is executed.

Appendix B Tab pages of the Gigapixel Woodbot GUI

B.1 Control

The control tab (Fig. 6) allows the user to easily control the various components of the robot, such as the CNC machine and camera. The tab consists of three parts: motor control, camera control and laser sensor control.

An overview of the robot’s current position, its current speed and the currently measured height of the height sensor is shown in the motor control part. On the right side of the tab are several buttons that allow the user to control the system. The user can enter coordinates and move the camera system to those coordinates. The blue buttons with pointers allow the user to adjust the position of the robot head for each axis with adjustable step size. In addition, the user can set the current speed of the robot using sliders.

In the camera control part the user can select the available cameras (if implemented) and then click on ‘Update View’. The robot will take a picture of the current view. The user can then download this image as a TIFF file by clicking on ‘Download Current View’. Live view is currently not possible because the Python library Harvester (GitHub repository genicam/harvesters) only supports processing individual images and not video streams.

In the laser control section the measured value of the laser is displayed. In addition, there is a button to change the position of the laser to the centre of an in-focus image.

B.2 Acquisition

In the acquisition tab (Fig. 7), users can start several acquisition tasks with different options:

  • several scan jobs are initialized based on user-defined input: image acquisition can be performed either at a fixed Z-height, either with a predefined number of images at each position. For these scan jobs there is no need to use the laser. The user will need to define the start and end coordinates.

  • a sparse height map is created when selecting the ’Make base scan’ option. This height map is then displayed (’Current surface’) as an image on which the user can select one or several specific areas for which the laser sensor then will make detailed height maps later and will acquire the necessary images according to the laser data.

The proper camera can be selected and each scan job has a separate name. The percentage overlap between adjacent images can be defined as well.

Once the scan job has been implemented, the acquisition starts.

At the bottom of the acquisition tab, an overview of the current task and the tasks yet to be performed is listed. In this way, the user has a clear view of the progress and can easily manage the sequence of tasks.

B.3 Analysis

The analysis tab (Fig. 8) provides the user with an overview of all acquisition tasks performed. For each task, the status of stacking, lens correction and stitching is displayed, which can either be marked as ‘Done’ or ‘Pending’. A user can re-run the analysis by pressing the ’Start’ button.

The user can acquire new images while analysis tasks are still running, as both run independently. Of course, since both require compute resources, the acquisition might take longer then.

B.4 Calibration

The calibration tab (Fig. 9) allows the user to align laser and camera position, which only has to be performed once, or when another camera is mounted on the system. When the robot measures a height value with the laser height sensor, this value must be matched with the corresponding position of the camera. Therefore, it is necessary to determine the position of the laser relative to the camera along the X- and Y-axis (XY Calibration). This can be done using for example a microscopy calibration slide. By iteratively swapping camera and laser, the position of both can be aligned. In addition, the camera must be positioned along the Z-axis such that the object is in focus (Z calibration). Autofocus is not implemented, thus requiring this manual procedure. Therefore, multiple images are taken along the Z-direction and the user can decide on the sharpest image, guided by a sharpness calculation.

Fig. 6
figure 6

Control tab of the Gigapixel Woodbot

Fig. 7
figure 7

Acquisition tab of the Gigapixel Woodbot

Fig. 8
figure 8

Analysis tab of the Gigapixel Woodbot

Fig. 9
figure 9

Calibration tab of the Gigapixel Woodbot

Appendix C Docker containers of the Gigapixel Woodbot software

Figure 10 shows the flow of acquisition and processing of images.

Fig. 10
figure 10

Flow diagram of acquisition and processing of images

Figure 11 shows the domain diagram of the software. Communication between the different containers is indicated by arrows, which are listed in Table 2.

We briefly describe the main functionality of the different containers.

Fig. 11
figure 11

Domain diagram of the software architecture of the Gigapixel Woodbot. Each rectangle represents a container. The numbers at the arrows represent the communication between containers and are explained in Table 2

Table 2 Overview of the communication interfaces illustrated by arrows in Fig. 11

Python acquisition container

The Python acquisition container communicates directly with the camera and laser sensor. In addition, the container establishes a connection with the LinuxCNC container, to operate the CNC machine. All images are stored on the local hard drive of the workstation. When image acquisition finalises, the metadata of these images is sent to the DIS. This allows the analysis container to retrieve them later. Finally, all acquisition functionality is available via REST (REpresentational State Transfer) calls. This makes the acquisition functionality addressable via the GUI.

LinuxCNC container

The LinuxCNC container provides control of the CNC machine. LinuxCNC is an open source software platform that is widely used for CNC machines and robotic applications that provides a Python library to write automated scripts for the machine to execute.

Document image store container

To manage the large amount of images, the system has a Document Image Store or DIS container. This container runs a MongoDB database and receives metadata from images taken via the acquisition container. The advantage of using a DIS is that it is easy to scale and the stored data can be managed in a structured manner. The metadata of images can be queried by other containers, such as the analysis container and the GUI container, which later retrieves the images.

Python analysis interface container

Once the acquisition task has finished, the images pass through an analysis pipeline. A container ensures that this pipeline is executed and observes the DIS for new or changed data. If a new document is added or an existing document is changed, the container will notice this change. The Python analysis interface container communicates with the EFI, lens correction, and stitching containers via REST calls. Additionally, this analysis container has a REST API that enables interaction with the GUI (see Appendix 7).

When the container detects a change in the DIS, it forwards the tasks to the appropriate container.

Extended focus imaging container

This container controls the Extended Focus Imaging (EFI) algorithm developed by Petteri Aimonen (GitHub repository PetteriAimonen/focus-stack), and is based on the work of [54]. The application is written in C++, uses OpenCV and is GPU accelerated by the use of the OpenCL API.

Lens correction container

This container controls the lens correction algorithm, correcting for vignetting. The telecentric lens is designed to work optimally with camera sensors that have a diagonal size of 21.5 mm, yet the camera used has a sensor size of 26 mm which therefore results in mechanical vignetting. It also shows optical vignetting due to the shape of the lens.

Mechanical vignetting was solved by cropping the detector size to 3380 x 3380 pixels (instead of the original 4096 x 4096 pixels), and optical vignetting was solved for by correcting the images using flat-field images from a uniform object and correcting them by use of the BaSiC Python library [55].

Stitching container

The final step is performed in the stitching container. The stitching algorithm used is the Microscopy Image Stitching Tool (MIST) [43]. It is an algorithm that is direct-based and is written in Java. It is a hybrid implementation that uses both the CPU and the GPU. The communication with the GPU is done via NVIDIA® CUDA. By communication with the GPU, the stitching is fast and efficient.

GUI container

To control the Gigapixel Woodbot, a GUI runs in a separate container. The application is hosted by an NGINX web server, a popular web server widely used and known for its high performance, reliability and scalability. The application is written in HTML, CSS, and Javascript and uses the open-source toolkit Bootstrap for basic theming. Bootstrap’s pre-styled components make the development tool easy to use and lead to faster development.

Appendix D Gigapixel Woodbot image acquisition procedure for increment cores

The laser sensor measures two lines perpendicular to the orientation of the increment cores and the peaks are determined. Based on the peaks left and right, the scan lines are determined (blue lines in Fig. 12). Note that when multiple objects are imaged (e.g. in this case multiple increment cores), the software can start to perform stacking, lens correction and stitching of an object once the image acquisition is finished, while at the same time starting the image acquisition of a another object in parallel, as such saving time.

Fig. 12
figure 12

Procedure for imaging of increment cores in a typical sample holder: the laser sensor measures the heights across line 1 and 2 (top) and based on the peaks (bottom, only the results of line 1 are shown) the blue lines (top) are defined along which the laser sensor measures detailed heights to inform the camera the number of images to take at each position

Appendix E Deep learning model statistics

The different deep learning statistics are presented in Fig. 13, Fig. 14 and Fig. 15 for respectively the statistics during training, of the independent test set and on bounding boxes and segmentation masks.

Fig. 13
figure 13

Performance statistics of the YOLOv8 segmentation model during training. B stands for bounding boxes, M for masks

Fig. 14
figure 14

Performance statistics of the YOLOv8 segmentation model on the independent test set. Bounding box statistics

Fig. 15
figure 15

Performance statistics of the YOLOv8 segmentation model on the independent test set. Segmentation mask statistics

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Van den Bulcke, J., Verschuren, L., De Blaere, R. et al. Enabling high-throughput quantitative wood anatomy through a dedicated pipeline. Plant Methods 21, 11 (2025). https://doiorg.publicaciones.saludcastillayleon.es/10.1186/s13007-025-01330-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doiorg.publicaciones.saludcastillayleon.es/10.1186/s13007-025-01330-7

Keywords