The XyloPhone: toward democratizing access to high-quality macroscopic imaging for wood and other substrates

One rate-limiting factor in the fight against illegal logging is the lack of powerful, affordable, scalable wood identification tools for field screening. Computer vision wood identification using smartphones fitted with customized imaging peripherals offers a potential solution, but to date, such peripherals suffer from one or more weaknesses: low image quality, lack of lighting control, uncontrolled magnification, unknown distortion, and spherical aberration, and/or no access to or publication of the system design.To address cost, optical concerns, and open access to designs and parameters, I present the XyloPhone, a 3D printed research quality macroscopic imaging attachment adaptable to virtually any smartphone. It provides a fixed fo-caldistance,exclusionof ambientlight,selectionof visiblelightorUVillumination, uses the lens from a commercially available loupe, is powered by a rechargeable ex-ternal battery, is fully open-sourced, at a price point of less than USD 110 is a highly affordable tool for the laboratory or the field, and can serve as the foundational hardware for a scalable field-deployable computer vision wood identification sys-tem.


The need for forensic wood identification to combat illegal logging
Calls for various forms of scientific timber testing to combat illegal logging and prevent fraud are well established in the literature (Johnson & Laestadius 2011;Dormontt et al. 2015;Expert Group UNODC 2016;Lowe et al. 2016;Schmitz et al. 2019Schmitz et al. , 2020;;Wiedenhoeft et al. 2019).Answers to those calls necessarily focus on the underlying biological variation inherent in wood itself and therefore address questions not of paperwork or permits, but rather of the botanical identification ("species"), the geographic origin, or individualization (log to stump, board to log, etc.) of wood.There are two broad sources of variation in wood that are relevant for scientific timber testing, molecular variation, and structural or anatomical variation.
Methods interrogating molecular variation in wood are almost all limited to a laboratory setting and for the foreseeable future cannot be expected to have practical field deploy ability (e.g., mass spectrometric methods, DNA barcoding, DNA-based individualization, DNA-based population assignment, other chemometric methods such as LIBS, Laser Induced Breakdown Spectroscopy; pyrolysis mass spectrometry; DART-ToF, Direct Analysis in Real Time-Time of Flight mass spectrometry), but what these methods lack in field relevance, they may provisionally make up for in the promise to resolve species-level identification, identification of geographic origin, and individualization.The one molecular-based technique with a demonstrated potential for real-time field deployment is near-infrared spectroscopy (Snel et al. 2018).Limits to field deployability of NIRS (Near Infra-Red Spectroscopy) are primarily the comparatively narrow range of taxa for which published models exist (Pastore et al. 2011;Bergo et al. 2016;Soares et al. 2017;Silva et al. 2018), and the rather high per-unit costs for field equipment (approximately USD 10k).
Methods making use of the structural variation in wood include human-based wood identification using various forms of macroscopy and microscopy in the laboratory (Gasson et al. 2011;Koch et al. 2011;Koch et al. 2015;He et al. 2020), human-based field identification of wood using a loupe (Miller et al. 2002(Miller et al. , 2004(Miller et al. , 2005;;Wiedenhoeft 2011;Ruffinatto et al. 2015;Yin et al. 2016;Arévalo et al. 2020;Ruffinatto & Crivellaro 2020), and computer vision wood identification which can be implemented in the laboratory or in the field (Khalid et al. 2008, Martins et al. 2013;Filho et al. 2014;Figueroa-Mata et al. 2018;Ravindran et al. 2018Ravindran et al. , 2019;;de Andrade et al. 2020;Lopes et al. 2020;Olschofsky & Kohl 2020;Ravindran & Wiedenhoeft 2020;Souza et al. 2020).Wood anatomy, even with full access to reference collections and microscopic modes of evaluation, is rarely accurate to the species level when performed by human analysts (Gasson 2011), and field-level wood identification is typically expected to be less accurate still.Research using machine learning in wood identification demonstrates that species-level resolution may be possible based on wood anatomy, either by employing machine learning in conjunction with human expertise (Esteban et al. 2009(Esteban et al. , 2017;;He et al. 2020) or by computer vision wood identification systems operating on images alone, mostly restricted to the laboratory (Martins et al. 2013;Filho et al. 2014;Rosa et al. 2017;Figueroa-Mata et al. 2018;Ravindran et al. 2018;Souza et al. 2020).

Field-deployable computer vision wood identification (CVWID) systems
Only three potentially field-deployable computer vision wood identification (CVWID) systems have been published to date (de Andrade et al. 2020;Lopes et al. 2020;Ravindran et al. 2020), with a fourth available commercially but lacking peer-reviewed literature explicitly subtending it (https://www.xylorix.com).Three of the four systems use images collected from smartphones with image quality varying from quite poor, showing obvious and extreme spherical aberration (https://www.xylorix.com/wood-directory/),to good (de Andrade et al. 2020), or with image quality essentially impossible to evaluate (e.g., Figure 1, Lopes et al. 2020) based on the failure to adequately prepare specimen surfaces for imaging wood anatomical features.The fourth CVWID system, the XyloTron, requires custom imaging hardware and a laptop (Ravindran et al. 2020) to conduct real-world, in-field, ondevice inference (Ravindran et al. 2019) and is the only system to report actual field use and inference in real-time.

Imaging hardware design considerations for field-deployable CVWID systems to combat global illegal logging
In addition to topics covered in the conceptual overview of imaging wood for CVWID (Hermanson & Wiedenhoeft 2011), three broad factors inform the design and implementation of imaging hardware for field-deployable CVWID systems: a form factor related to necessary operator expertise and ease of use; cost of the system; and optical and imaging parameters.

Necessary operator expertise, ease of use, and device form factor
For all the CVWID systems in existence to date, the operator must cut or polish the transverse surface of a wood specimen such that the wood anatomical features are exposed.Failure to do this well could result in spurious results when training a CVWID model.Assuming that a system is purporting to identify wood based on wood anatomy, if the characteristic wood anatomy is not captured in the images then no amount of machine learning can generalize a model.Likewise, a model built from good data cannot properly identify an image during the inference phase from a specimen prepared in such a way that does not show the anatomy.Beyond this manual skill (easily taught to undergraduates in wood identification classes around the world and to law enforcement officers when training for field wood identification), operator expertise mostly involves orienting the imaging hardware on or near the surface of the wood to capture an in-focus image.Imaging hardware should therefore be easy to position on the substrate, should be robust to small bumps or perturbations in the substrate surface, should easily establish a focal distance, should be small enough to be convenient without being too small and fragile, and for phone-based systems should be easy to attach reliably to the phone in the same position each time.

Cost of the system
The XyloTron platform (Ravindran et al. 2020) can image and identify both wood and charcoal, is field-portable, and costs about USD 1300 to build the XyloScope, and then another several hundred USD for a suitable laptop for storage, power, visualization, and inference, but remains the de facto gold standard for macroscopic wood imaging in the field.The per-unit cost for a XyloTron, while quite scalable compared to training humans or laboratory-based approaches, remains impractical for many global contexts where its functionality could be valuable.The imaging systems described in Lopes et al. (2020), (the Ollo Clip, about USD 60), de Andrade et al. (2020), (unspecified lens costing approximately USD 3), and the Xylorix system (USD 29 plus USD 20-30 shipping costs) are clearly much more affordable and therefore vastly more scalable.With these latter systems, a bring-yourown-device model is implied, leveraging the comparative ubiquity of smartphones.

Optical and imaging parameters
Whether concerned with field imaging for real-time identification or collection of reference images, optical and image quality metrics should be important factors guiding the design of any new system but reports on new systems have not published such details, instead relying on implied human acceptance of the resulting images.Ravindran et al. (2020) specify the exact camera and lens in the XyloTron and the fixed field of view of each image and de Andrade et al. (2020) specify the camera zoom, image size in pixels, and total image field of view in millimeters of their images, whereas Lopes et al. (2020) and the Xylorix provide no such detail.Given the ubiquity of zoom functionality in smartphone camera apps, reporting the actual size of the resultant field of view is a critical factor.It would also be valuable to report metrics for the evenness of illumination, the geometric distortion across the field of view, the optical resolution of a system, and the spherical aberration of the system.Such data facilitate comparisons between systems, as well as possibly providing useful information for post-processing images to correct systematic errors and to create effective data augmentation strategies for training identification models.
Substrate illumination is a critical aspect of imaging hardware.Of the works cited, only Lopes et al. (2020) make no effort to control the illumination of the wood surface.The XyloTron (Ravindran et al. 2020) and the work by de Andrade et al. (2020) both exclude ambient light and provide controlled illumination, and the Xylorix system has a rechargeable LED lighting array to provide light, although the translucent hood between the lens and the specimen could permit the entrance of ambient light into the system.Additionally, the XyloTron is the only system to allow a user to select either visible light or UV illumination of the substrate.UV illumination permits the detection of wood surface fluorescence and can be useful for discriminating between woods with similar wood anatomy when observed with visible light illumination.
These factors are important not only as basic system parameters but because depending on the image-based machine learning strategies employed to develop classification models if distortion is present in an image, features of a given size in the center of the image will appear larger or smaller in the corners.With spherical aberration of sufficient severity, features with fine spatial scale will cease to be observable at the margins or corners of the images.Systematic error of these types endemic to a foundational data set could limit the accuracy or robustness of CVWID models developed from such data, depending on how such models are constructed.
Prior work in my laboratory (Ravindran et al. 2018(Ravindran et al. , 2019(Ravindran et al. , 2020;;Ravindran & Wiedenhoeft 2020) uses multiple image patches from across the parent image to train classification models.If a hardware-induced systematic error is present across the images at a scale or severity equal to or greater than the magnitude of image augmentation measures taken to control for such error, the resulting models could be less accurate, less robust, or even spurious.
To wit, the garbage-in, garbage out (GIGO) principle of computer science says that poor input data (garbage in) will necessarily result in a poor outcome (garbage out), and further that good programming should preclude the possibility of poor input data.For CVWID, the safety valve in preventing bad input data is the participation of a qualified wood anatomist who ensures that images are well-prepared and show relevant anatomical detail.In the era of machine learning, the GIGO principle can be one step more insidious -garbage in, fiction out (GIFO).
For example, CVWID models that claim species level accuracy greater than 98% in large models with many taxa which are considered inseparable by light microscopy, or models where the anatomical features were not observable in the parent images should not be accepted as valid without real-world verification.GIFO is therefore dangerous because the fiction-out might seem believable, even when too good to be true.The only way to ensure that in-silico models have any appreciable real-world relevance (whether CVWID or other modalities) is through field testing that verifies the results forensically.Though it should go without saying, perhaps it needs to be said -collecting high-quality images is better than collecting low-quality images.It is trivial to add noise, distort, blur, or otherwise postprocess high-quality parent images, but the reverse is not true.

Access to the system parameters
A final factor when considering imaging hardware for a CVWID system is the relative access that a user will have to the details of the system itself.Open-source systems (such as the XyloTron) allow end users to adapt the hardware for their specific use-cases as needed, whereas closed or commercial systems do not offer such access.Lack of access in this way forces a user to accept all design constraints whether or not they serve well for a specific use-case, which may reduce or constrain the utility of the CVWID system.
To address the above-noted concerns, in this paper I present the XyloPhone (Fig. 1), an open-source, 3D-printed research quality macroscopic imaging attachment adaptable to virtually any smartphone.It provides a fixed focal distance, exclusion of ambient light, selection of visible light or UV illumination, uses the lens from a commercially available loupe, is powered by a rechargeable external battery, and at a price point of less than USD 110 is a 12-fold price reduction over the XyloTron, while delivering comparable image quality.To document the efficacy of the XyloPhone I present comparative data on evenness of illumination, distortion, maximum resolution, and spherical aberration, as well as example images taken with the XyloTron, the XyloPhone on two different smartphones (an iPhone and a Samsung Android phone), and the Ollo Clip and Xylorix systems on an iPhone.

MATERIALS AND METHODS
XyloPhone components: The lens used in the XyloPhone is taken from a Belomo 10x triplet loupe and is specified in the bill of materials in the Supplementary Information, which also gives quantities, part numbers, and manufacturers for all the components of the Xylo-Phone.Four visible-light LEDs and four UV light LEDs positioned in the XyloPhone housing Figure 1.The XyloPhone printed in white polymer to facilitate photography.When mated to a phonespecific mounting plate, the XyloPhone can be used with virtually any smartphone.As noted in the Supplementary Information, printing the XyloPhone in black polymer provides the best performance.
comprise the illumination array of the XyloPhone.Many of the components could be exchanged for others with the same specifications, but any modifications should be tested for the effect on XyloPhone performance.
Smartphones: Two phones were used to collect data on field distortion, spherical aberration, and evenness of illumination: a Samsung Note 5 running Android version 7.0, and an iPhone XS Max, running iOS 13.4.1.The native Android camera app was used on the Samsung Note 5, but on the iPhone, the ProCamera app from the App Store was used to collect images.Images were saved in the JPEG format with square aspect ratio, maximum resolution, and minimum compression.
Hardware configurations: All calibration and reference images were collected by mounting the phone + optical and lighting array (either Xylorix, XyloPhone, or Ollo Clip + Xylo-Phone lighting array) to a 3D-printed phone holder (Fig. 2A) that was secured to an x/y/z micromanipulator mounted to a stereomicroscope stand.This readily permitted the fine adjustments necessary for collecting reference images of the various targets for measuring optical performance but is not required for wood image data collection or field use.This system was also used to collect the images of wood specimens in Figure 3 to capture substantially the same locations in the reference blocks.
Ollo Clip hardware: To collect comparable metrics for the 14× Ollo Clip lens I developed a 3D printed custom holder for the lens that mated with the iPhone and positioned the lens identically to the XyloPhone for scalar, field distortion, spherical aberration, and illumination measurements (Fig. 2B).Initial observations (data not shown) indicated that uncontrolled lighting with the OlloClip negatively affected the image quality.To maximize the validity of the comparisons between the XyloPhone and the OlloClip and to afford the  OlloClip the maximum possible performance, I designed a jig (Fig. 2B) to position the Xy-loPhone lighting array in an equivalent position with the OlloClip lens, and this was used to collect all OlloClip images.Xylorix hardware: To ensure that the Xylorix mounted in the same position each time, I adapted the 3D printed custom holder for the OlloClip to position the center of the Xylorix's lens in the same position as the XyloPhone (Fig. 2C).The Xylorix's in-built lighting array was used at the lowest brightness setting for scalar, field distortion, spherical aberration, and illumination measurements.
Field of view: The size of the field of view was determined by capturing one reference image of the metric divisions of an Edmund Optics dual-axis metric/English stage micrometer (No. 59277-0021) at each in-app camera zoom step to bracket the XyloTron's field of view (approximately 6.35 mm × approximately 6.35 mm; Ravindran et al. 2020).Resulting images were opened in Mac OS Preview and a bounding rectangle was selected from the leftmost edges of two reference values, and then nominal μm per pixel were calculated from those values.An effort was made to select reference values far enough apart in μm but closer to the center and less distorted portion of the image.
Hardware attachment replicates: Each image or image set (e.g., 5 images, one in the center and one for each corner for spherical aberration) for each of the measured properties represented a unique attachment of the hardware to the phone.That is, for every new image or image set, the hardware was removed and then reattached to establish the variability of any specific attachment to the performance of the system.
XyloTron as baseline: Because the XyloTron (Ravindran et al. 2020) is already used in several countries around the world (Ravindran et al. 2019;Arévalo et al. 2021, data not shown; distribution of XyloTrons by Wiedenhoeft), we use the XyloTron field of view as the baseline for comparison throughout the manuscript.For each device combination (smartphone + imaging/lighting hardware), the camera zoom level producing a field of view nearest to but not smaller than that of the XyloTron was chosen for data collection.The resulting image was then cropped to be equivalent to the XyloTron field of view without the need to alter the XyloTron image.All image metrics were made from these cropped images.The device combinations evaluated are the XyloTron (XT), the XyloPhone + iPhone (XPi), the Xylo-Phone + Samsung (XPs), the Ollo Clip 14× + iPhone (OCi), and the Xylorix + iPhone, with two configurations.On the iPhone, the Ollo Clip and the XyloPhone were evaluated using the telephoto camera.Because the Xylorix lens produces a field of view smaller than the Xy-loTron when mounted on the telephoto camera on the iPhone, the Xylorix was evaluated on both cameras: at 1.8× zoom on the wide-angle camera (RixWi), which produced a field of view just larger than that of the XyloTron, and at 2× zoom (the minimum possible zoom) on the telephoto camera (RixTi).These abbreviations are used throughout the balance of the manuscript.
Evenness of illumination: Five images of an X-rite Color Checker White Balance target were captured for each hardware configuration.The modal pixel intensity value was determined with the histogram function in Image J (v1.53c) for each quadrant of the image, and the center patch of the same dimensions as each quadrant.Example code for a indicates the difference between the XT FoV and the resulting FoV at the specific camera zoom.*It was necessary to use the wide-angle camera on the phone to reduce magnification lower than the XyloTron.All other configurations used either the sole camera (Samsung) or the telephoto camera (iPhone) Distortion was determined by comparing the average dot area in the central 3 × 3 dots to the average dot area of the 3 × 3 dots in each corner.
Determination of dot diameter: Equation 1 was used to calculate the estimated diameter based on the average dot area determined in the distortion measurements and the μm per pixel resolution determined in the field of view measurements.The known dot diameter of the target is 250 μm.
Average dot area Estimated diameter in μm = 2 ⁎ μm per pixel resolution ⁎ 2 (1) π Determination of resolution and spherical aberration: An Edmund Optics NBS 1963A (No. 85276) positive target was used to determine the maximum resolvable line pairs per millimeter (lp/mm) for each hardware configuration.Five sets of five images (one center image, one in each corner) were taken.Images were standardized to 100% zoom (in-silico) to evaluate the clear separation of line pairs (Maeda et al. 2020), the maximum resolvable number of line pairs was recorded, then the mean value for each position (center, corners) was calculated.

The XyloPhone
The XyloPhone weighs about 93 g (individual 3D printing parameters (e.g., infill density and pattern) and polymer choice will affect this), with another 10-20 g contributed by the phone adapter plate, for a total of less 115 g.With an approximate volume of 112 cm 3 , the XyloPhone is lightweight, small, and highly portable.The 1000 mA rechargeable lithiumion battery provides over 7 h of continuous illumination and can be recharged with the in-device charger connected to any powered USB port on a computer or any DC 5V cell phone charger.

Human-user evaluation of images
Figure 3 shows images of substantially the same spot on a specimen of Dalbergia lanceolaria sapwood illuminated with visible light.This taxon was chosen because its diffusein-aggregate parenchyma and numerous, narrow rays can fail to be resolved clearly when spherical aberration is prominent, as with the OCi (Fig. 4C), the RixWi (Fig. 4E), and the RixTi (Fig. 4F).The XT image (Fig. 4A) appears to the naked eye to have a consistent focus across the field of view, as does the XPi image (Fig. 4B).In addition to spherical aberration, images taken with the Xylorix show obvious distortion of the rays along the lateral edges of the image (Fig. 4E, F).
The visible light and UV light illumination options of the XyloPhone are demonstrated in Figure 4, which shows side-by-side images of Robinia pseudoacacia and Morus rubra.The heartwood fluorescence in Robinia is clearly visible.The XyloPhone is designed to be appressed directly to the substrate.To demonstrate that this fixed focal distance is functional on specimens with comparatively irregular surfaces, Figure 5 presents visible light free-hand XPi images of hand-cut transverse surfaces of specimens from a collection of teaching specimens in MADw-SJRw.

Quantitative evaluation of the optical properties of the XT, XPs, OCi, RixWi, RixTi, and XPi
Table 1 presents the field of view measurements for each hardware configuration, either at a fixed magnification (XT), at two zoom levels bracketing the XT magnification (XPs, OCi, XPi), or at two zooms on two different cameras, as a result of the magnification of the lens in the hardware (RixWi, RixTi).As noted in the materials and methods, the magnification of the Xylorix lens was too high to permit a field of view larger than the XT at the minimum zoom (2.0×) when attached to the telephoto camera.This necessitated using the wide-angle camera at 1.8× zoom to find the lower magnification bracket.The equivalent XT image size was used to process all non-XT images to facilitate an edge-cropped comparison of hardware.Doing this eliminated the most distorted or spherically aberrant portions of the image, and thereby presented a best-case version of hardware performance at the Xy-loTron field of view.
The evenness of illumination across reference images ranged from 97-98% for the XT, OCi, RixWi, and RixTi, where the corners were brighter in all cases, to more than 99% for the XPs and XPi (Table 2), with the corners of images slightly darker.
Distortion ranged from approximately 1% in the XT and XPi to approximately 4% for the XPs and OCi, to 14-15% for the Xylorix (Table 2).Across all hardware configurations, distortion produced larger dot areas in the corners compared to the center of the images.
The calibrated estimate of dot diameter determined from images was closest to the true value for the center patch in the XT, differing by less than 1 μm.The other hardware configurations differed from the true value by as little as 2.9 μm (RixTi) to as much as 15.4 μm (RixWi; Table 2).The pattern in ratios of the center diameter to the image corners parallels the distortion patterns, and the magnitudes are approximately equal to the positive square root of the area-based proportions, as would be expected for a linear estimate from the same parent data.The XT and XPi corner estimates differ from the center by 1% or less, and the other hardware configurations range from 2 to 7% overestimating the diameter relative to the center.
The XPs showed the lowest central patch resolution (Table 2), but it also showed the lowest overall spherical aberration, losing less than 1% resolution at the image corners.The XT and XPi had the next-least spherical aberration, losing approximately 11% of resolution at the image corners, but with a higher starting resolution of 90-line pairs per millimeter (lp/mm).The OCi, RixWi, and RixTi showed substantial spherical aberration, losing 58, 49 and 70% of initial resolution, respectively.The maximum resolution of these three configurations was higher than the XT or XPi, from almost 99 lp/mm to almost 170 lp/mm.

DISCUSSION
The images produced by the XyloPhone, especially the XPi are, for most metrics and to the human eye, as good as XT images (Fig. 3).Distortion, while undesirable, can be removed using post-processing algorithms if it is mapped for the device (Zhang 1999;Hartley & Kang 2007) or can be removed using machine learning approaches (Li et al. 2019).Systematic errors in estimating feature size (e.g., dot diameter) can be readily calibrated as well.Unlike distortion in an image, spherical aberration cannot as easily be ameliorated.Based on the results here, the OCi, RixWi, and RixTi configurations showed the greatest spherical aberration across an image, and the XPs showed uniformly low resolution.If the goal is to develop a phone-based imaging platform that maximizes image quality across the image, the XPi is clearly the superior hardware configuration for acquiring research-grade or archival macroscopic images at a comparatively low price-point., a calculated difference in comparison to a reference value.

Wiedenhoeft -Macroscopic imaging for wood
If the only objective of a phone-based system is to acquire the minimum acceptable images to develop a CVWID model, it is plausible that the OCi, RixWi, or RixTi hardware configurations could suffice.Lopes et al. (2020) report high-accuracy results in their model of ring-porous hardwoods using an OCi configuration, and Xylorix reports that it can be used with the related apps to identify wood.Based on the metrics of the hardware configurations as tested here, images collected with these systems may need additional post-processing for robust and stable training of image classification models for CVWID applications, especially if models were trained to use patches of the parent image.Any patch incorporating a corner of such an image will be incorporating tissue imaged at less than half the spatial resolution of the central patch, so otherwise macroscopically observable features might be obscured.It would, of course, be possible to limit systems to the central patch with the maximum optical properties, but then, depending on the hardware, perhaps half or more of each image would be discarded.Given the data scarcity issues endemic to CVWID (paucity of specimens and images per taxon), it is not in our best interests to discard reference data that could have otherwise been serviceable.I would also argue that if, as a community, wood anatomists are going to be a part of CVWID research and development, it would be in the broader community's best interests to collect high-quality, standard images that are cross-compatible between laboratories and CVWID models.
Tests are underway to compare the cross-compatibility of XP and XT wood images for CVWID models for laboratory testing and field deployment.If XP images can be used to train models for deployment on the XT, and conversely, if existing or new XT models can be deployed on a smartphone with the XP hardware and suitable software, the fielddeployability of CVWID technology can be greatly expanded, as not only is the per-unit cost reduced by a factor of <12, but there is no need for a laptop for deployment (another several hundred USD cost reduction).In such a future, the total kit needed for field use would be a sharp utility knife, one's own smartphone, and a XyloPhone.
In addition to its potential for application in CVWID systems, the XyloPhone can be used to image a wide range of biological or manmade materials (Fig. 6), just as with the XyloTron (Ravindran et al. 2020).In principle, any substrate with useful or interesting macroscopic variation can be imaged, if it can withstand contact of the XyloPhone, or if the user has a steady hand to image without contact.

CONCLUSIONS
Open-source, affordable, high-performance imaging hardware like the XyloPhone can provide a consistent foundation from which one can build macroscopic reference data sets, and the XyloPhone's optical performance, especially when used with more recent smartphones (e.g., the XPi) clearly exceed the performance of lenses/lighting arrays used by other systems.With the existence of affordable and standardizable imaging hardware, specimen selection and specimen preparation, at least for wood, become paramount, as they are likely to be the quality-limiting-factors in a dataset.Models developed from poor specimen sampling or inadequate hardware may represent as-yet-unrecognized cases of garbage-in fiction out (GIFO) and should give rise to healthy skepticism about the validity of any models built from such data sets.It is critical that as more research teams become involved in CVWID research, expert wood anatomists with key domain knowledge remain involved in the process.When specimens are poorly chosen, inadequately prepared, inappropriately imaged, and/or when the forensic questions are ill-conceived, the final result should be regarded warily (Olschofsky & Kohl 2020).It is my hope that by providing an even-lower-cost alternative to the XyloTron (which remains as the gold-standard for wood imaging, albeit at a higher price-point), the XyloPhone can ensure that future data sets collected across the world share cross-compatibility to contribute to a master data set that can be selected from and deployed globally.

Figure 2 .
Figure 2. (A) The 3D printed phone holder mounted to an x/y/z micromanipulator affixed to a stereoscope stand.(B) Ollo clip holder and XyloPhone lighting array.(C) Xylorix holder.

Figure 3 .
Figure 3. Macroscopic images of Dalbergia lanceolaria sapwood of substantially similar fields of view, A-E are 6360 μm on a side, F is 6274 μm on a side.(A) XT image.(B) XPi image.(C) OCi image.(D) XPs image.(E) RixWi image.(F) RixTi image.Note the loss of focus (spherical aberration) and distortion and therefore change in anatomical detail in the corners of the images, most notably in D-F.The color balance of the XT image (A) is set against a white balance card (Ravindran et al. 2020), whereas the white balance in the smartphone images was controlled by the camera app.Images A-D used the same lighting array, images E, F used the Xylorix lighting array.

Figure 4 .
Figure 4. Free-hand XPi images of Robinia pseudoacacia (A, C) and Morus rubra (B, D) with visible light illumination (A, B) and UV illumination (C, D).Note the clear yellow-green fluorescence of Robinia in C. All images are 6742 μm on a side.

Figure 5 .
Figure 5. Free-hand XPi images of hand-cut wood transverse surfaces.All images are 6414 μm on a side.(A) Carya sp.(B) Pseudotsuga sp.note the imperfect preparation of the earlywood.(C) Swietenia sp.(D) Berchemia cf.zeyheri.(E) Acer cf.saccharum.(F) Quercus sp., red oak group.Irregularities in the surface of the specimens was no detriment to producing serviceable images.Images courtesy of Caitlin Gilly.

Figure 6 .
Figure 6.Free-hand visible light XPi images of: (A) Red oak plywood.(B) The stipe and gills of a white button mushroom.(C) The abaxial surface of a variegated Coleus leaf.D, fabric from a sportswear shirt.A, B, and D are 6742 μm on a side.C, courtesy of Caitlin Gilly, using an iPhone 7 Plus, is 5727 μm on a side.

Table 1 .
Field of view (FoV) determinations for the hardware configurations evaluated.

Table 2 .
Quantitative aspects of optical system performance for the hardware configurations evaluated.All values are means with the coefficient of variation (CV) expressed in parentheses as a percentage.n, the number of images or image sets; lp/mm, line pairs per mm;