# Non-Invasive Painting Pigment Classification Through Supervised Machine Learning
## 3 Dataset Preparation  
In the initial stage of the study, a reference database was developed, comprising samples of pigments and organic dyes commonly employed by artists in historical painting layers. To facilitate this, twenty medium-density fiberboard (MDF) panels, each measuring 45 \(\times\) 35 cm, were prepared as substrates. Each panel was coated with five uniform layers of a 10% glue-chalk ground formulated from rabbit-skin glue and Champagne chalk. The surfaces were subsequently refined by sequential sanding using abrasive papers with gri sizes of 500, 800, and 1000 to achieve a smooth and consistent painting ground. Following surface preparation, pigment and dye samples were applied using two traditional binding media: (i) a tempera emulsion consisting of egg yolk and distilled water in a 1:1 ratio and (ii) a linseed oil-based varnish derived from sun-bleached linseed oil. The resulting painted samples encompassed both aqueous and oil-based techniques, reflecting common historical practices. Pigments and organic dyes commonly employed by artists in historical painting layers were used as reference samples. These included but were not limited to traditional pigments such as ultramarine blue, timber, iron oxide red, vegetable black, and titanium white. They were categorized into seven chromatic families: white, yellow, red, green,blue, brown, and black. All pigments and dyes stored in the database were supplied by Kremer Pigments GmbH & Co. KG (Aichstetten, Germany). For each pigment-binder combination, the sample was structured into five discrete sections, arranged according to the following standardized scheme (Figure 1):  
1. Diluted transparent paint--pigment or dye;
2. Opaque paint--pigment or dye;
3. Opaque paint--pigment or dye + lead white (1:1);
4. Opaque paint--pigment or dye + zinc white (1:1);
5. Opaque paint--pigment or dye + titanium white (1:1). Reference samples of pigments and organic dyes were imaged using a medium-format digital camera (Pentax 645Z, 50 megapixels) (Tokyo, Japan) equipped with a sensor sensitive to a broad spectral range of approximately 320-1000 nm [25]. Imaging was conducted using reflectography techniques under three distinct illumination conditions, each corresponding to a specific spectral band and wavelength range:  
* Ultraviolet (UV) imaging utilized a black-light blue ultraviolet source emitting at a peak wavelength of 365 nm, covering the 320-400 nm band. * Visible light (VIS) imaging employed halogen photographic lamps, covering the 400-700 nm band. * Near-infrared (NIR) imaging also used halogen photographic lamps, covering the 700-1000 nm band. For each spectral range, appropriate optical filters were mounted on the camera lens to isolate the desired band (a filter transmitting ultraviolet radiation (range: 300 nm-400 nm), a UV and IR cut-off filter (transmitting range: 400 nm-700 nm), and infrared filters transmitting radiation above 780 nm). Illumination was provided by halogen photographic lamps in conjunction with a black-light blue ultraviolet source emitting at a peak wavelength of 365 nm. To ensure reproducibility and radiometric consistency, standardized color and grayscale calibration targets were incorporated during each image acquisition session (FADGI Device Level Target Standard, FADGI ISO 19264 Device Level Target). The images were recorded in RAW format and subsequently processed using dedicated software to perform white-balance correction and exposure adjustment. In the subsequent stage, false-color imaging techniques were applied:  
Figure 1: Example of a pigment sample (Prussian Blue), structured into five layers: (1) diluted transparent layer; (2) opaque layer; (3) opaque layer mixed with lead white (1:1); (4) opaque layer mixed with zinc white (1:1); and (5) opaque layer mixed with titanium white (1:1). Samples were prepared with tempera emulsion and linseed oil varnish. * For the ultraviolet false-color composite (UVFC), high-resolution images obtained in the visible (VIS) and ultraviolet (RUV) domains served as the input.