2.1. Sample Preparation and Specimen Characteristics
Five distinct natural rubber types representing diverse quality grades were selected for comprehensive analysis, encompassing the spectrum of commercially significant rubber grades used in international trade. White crepe represents a premium grade characterized by minimal color development and rapid processing from fresh latex. Standard Thai Rubber grades 5 and 5L (STR5, STR5L) represent mid-grade rubbers processed from field latex, with STR5L exhibiting reduced yellowing due to optimized processing conditions. Ribbed Smoked Sheet grades 3 and 5 (RSS3, RSS5) represent progressively darker grades subjected to controlled smoking treatments. Raw rubber materials obtained from certified producers following Standard Thai Rubber specifications underwent standardized processing to ensure material uniformity and optical consistency [
16]. Coagulation control employed formic acid (0.5%
v/
v) at ambient temperature for 12–16 h, selected over sulfuric acid to minimize color alteration [
17]. Coagulated rubber was processed using a laboratory two-roll mill applying a consistent pressure of 5.0 MPa with a mill gap set at 1.70 mm to achieve the target thickness, with each specimen undergoing three compression passes to ensure uniform density [
18]. Compressed sheets were folded into two layers (final thickness 3.40 mm) and cut into 25 × 25 mm
2 squares, providing sufficient area for spatial analysis while fitting within the microscope field of view. Twenty specimens per rubber type (
= 100 total) were prepared according to ISO 2393:2017 standards [
16], processed within 24 h of coagulation, and analyzed within 48 h to prevent oxidation-induced color alterations [
19]. Specimens were stored in sealed containers at 25 °C and 50% relative humidity between processing and imaging. The sample size of
= 20 per rubber type (100 total) was determined through statistical power analysis targeting the detection of 5-unit yellowness index differences with power = 0.90 and
α = 0.05. This meets ISO 5725-2:2019 requirements [
20] (minimum
= 15/condition) for precision studies. Specimens were freshly processed under standardized protocols to validate measurement accuracy without confounding factors from degradation or contamination. Industrial validation will require evaluation of degraded specimens (aged 1 week to 6 months), contaminated samples (dust, moisture, residual chemicals), and edge-quality materials representing production variability.
Figure 1 illustrates the five prepared rubber types showing distinct color gradations corresponding to quality grades, ranging from white crepe exhibiting the highest lightness through progressive darkening to RSS5 with the lowest lightness value. The visible color progression reflects the biochemical and processing differences that characterize each grade, validating the need for objective quantitative assessment methods.
2.2. Automated Imaging System Design and Calibration
The automated imaging system was designed to replace conventional light box inspection with a fully integrated, computer-controlled platform, eliminating operator-dependent variability. The system comprises five functional modules working in concert to provide consistent, reproducible colorimetric measurements. The computational processing unit utilizes an Intel Core i7-11700 processor with 16 GB RAM and dedicated SSD storage, with GPU acceleration employed for color space transformations and matrix operations, reducing processing time by approximately 40% compared to CPU-only computation. The high-resolution imaging module employs a digital microscope with a CMOS sensor (8000 × 6000 pixels, 14-bit color depth per channel), providing 48 megapixel resolution with variable magnification up to 180×, operating at a working magnification of 20× to provide 0.5 mm spatial resolution across the specimen field. The controlled illumination array incorporates custom-designed LED arrays with six high-CRI white LEDs (CRI > 90) positioned in a circular arrangement at 45° incident angles, minimizing specular reflection while ensuring uniform illumination across the specimen surface. Luminous flux is adjustable from 180 to 720 lux at the specimen plane, with working conditions set at 1500 lux for optimal sensor utilization without saturation. The environmental control chamber maintains enclosed imaging conditions (500 × 500 × 400 mm3) with active temperature control at 25 ± 2 °C using thermoelectric cooling elements and humidity regulation at 50 ± 5% relative humidity via desiccant cartridges and a humidification system, with HEPA filtration preventing particulate contamination of optical surfaces. The automated specimen handling system employs a motorized X-Y positioning stage with 10 μm repeatability and vacuum hold-down, preventing specimen movement during acquisition.
Figure 2 presents the complete integrated system architecture, demonstrating the modular design that facilitates maintenance and calibration procedures. LED spectral distribution was characterized using a calibrated spectroradiometer (USB4000, Ocean Optics Inc., Dunedin, FL, USA; 0.5 nm resolution) across 350–800 nm, revealing a close match to CIE standard illuminant D65 with correlation coefficient R
2 = 0.9987, mean absolute spectral difference of 0.34%, and maximum deviation of 0.6% at 460 nm characteristic of white LED phosphor conversion. Complete spectral power distribution data comparing measured LED emission spectrum against D65 standard across 21 wavelength points from 380 to 780 nm is presented in
Figure S1 (Supplementary Materials), demonstrating excellent agreement throughout the visible and near-infrared spectrum with all deviations remaining below ±0.7%. The correlated color temperature of 6489 K differs from D65 by only 15 K, confirming spectral equivalence for colorimetric applications. Color rendering index calculated following CIE 13.3 methodology yielded a CRI of 92.5, exceeding the threshold recommended for critical color evaluation applications. Illumination uniformity was quantified by imaging white reference tiles and calculating the spatial coefficient of variation, yielding a CV of 3.2% across a 30 × 30 mm
2 central region, meeting stringent requirements for colorimetric imaging. System calibration procedures included geometric calibration using precision grid targets to correct barrel distortion of 0.28% at image edges, radiometric calibration employing certified reflectance standards (Spectralon SRT-99-100, 99% reflectance) for white balance and flat-field correction, and colorimetric calibration validated using X-Rite ColorChecker Classic (X-Rite Inc., Grand Rapids, MI, USA). Measured CIELAB coordinates compared against manufacturer-certified values yielded a mean color difference
of 1.18 ± 0.31 units across all 24 patches, with maximum deviation of 1.52 units for the red patch (Patch 15). Complete calibration of the validation data, including reference versus measured
,
, and
values, scatter plots showing correlation (
= 0.9998 for
values), chromatic coordinate comparison in CIELAB space, and bar chart of
color differences for all 24 patches is presented in
Figure S2 (Supplementary Materials), confirming all measurements fell within acceptable tolerances (
< 2.0) for quality control applications with 100% of patches meeting acceptability criteria.
2.3. Image Acquisition Protocol and Processing Pipeline
Specimens were placed in the imaging chamber for 5 min of thermal equilibration to chamber conditions before image acquisition. Automated positioning stage centered specimens within the imaging field using fiducial markers detected via corner detection algorithms. LED arrays were powered for 15 min of warm-up before initiating measurements, based on temporal stability characterization showing minimal flux variation after this period. Three sequential images were acquired per specimen at 1 s intervals with exposure times automatically adjusted to utilize 60–80% of sensor dynamic range, preventing saturation while maximizing signal-to-noise ratio. For the five rubber types, optimal exposures ranged from 50 ms for white crepe (high reflectance) to 200 ms for RSS5 (low reflectance), with exposure adjustment performed using histogram analysis of pre-scan images. Multiple frame acquisition enabled assessment of measurement repeatability and detection of systematic errors, with final results employing mean RGB values across three frames, reducing random noise by . Real-time quality checks assessed focus sharpness using gradient magnitude (threshold: contrast metric > 0.7), illumination uniformity (CV < 5%), and absence of saturation (<0.1% of pixels at maximum/minimum values), with images failing quality criteria triggering automated repositioning and reacquisition.
Figure 3 images processing workflow for real-time color classification of Para rubber specimens: (1) multispectral image acquisition under controlled illumination; (2) preprocessing including Gaussian filtering (
= 1.2) and flat-field correction; (3) automated ROI identification using Otsu’s multi-threshold segmentation; (4) color space transformation from RGB to CIE1931
to CIELAB coordinates; (5) yellowness index calculation following ASTM E313-20 standards [
8]; (6) feature extraction, including
,
,
parameters and spatial uniformity metrics; and (7) classification decision based on threshold comparison. Processing time: 1.01 ± 0.09 s per specimen. The modular pipeline architecture enables real-time analysis suitable for industrial quality control with throughput exceeding 3500 specimens per hour.
The image processing pipeline illustrated in
Figure 3 proceeds through seven integrated phases beginning with high-resolution multispectral acquisition, followed by systematic preprocessing. Raw images underwent pixel-wise flat-field correction to compensate for illumination non-uniformity and sensor response variations as expressed in Equation (1):
where
represents the raw specimen image,
is the dark current reference,
is the white reference image, and
is the spatial mean of the white reference. This operation reduced spatial luminance variation from 12.3% in uncorrected images to 2.8% after correction, significantly improving colorimetric measurement accuracy. Gaussian filtering with standard deviation
provided optimal balance between noise suppression and edge preservation, selected through systematic evaluation comparing signal-to-noise ratio improvement versus edge blur across the parameter range
, achieving 8.2 dB SNR improvement while maintaining greater than 95% edge definition. RGB values were normalized and inverse gamma-corrected following the sRGB standard (
) to linearize sensor response before colorimetric transformations.
Specimen boundaries were identified using Otsu’s multi-threshold method, which determines the optimal threshold
maximizing inter-class variance as shown in Equation (2):
where
and
represent class probabilities for background and specimen regions, while
and
represent the respective class means. This adaptive approach eliminates fixed threshold sensitivity to varying specimen reflectance ranging from 0.11 to 0.48 across rubber types. Binary segmentation masks underwent morphological operations, including opening with a 3 × 3 structuring element to remove small, isolated noise regions, closing with a 5 × 5 structuring element to fill internal gaps and smooth boundaries, and hole filling to eliminate internal voids using connected component analysis. The largest connected region was identified as the specimen region of interest using 8-connectivity, with alternative regions such as dust particles or edge artifacts rejected based on area and circularity criteria. Segmented regions were validated against expected specimen properties, including area (620–630 mm
2), circularity (>0.85), and centroid position (within the central 80% of the image frame), with failed validation triggering automatic specimen repositioning and reacquisition. Across 100 validation specimens, the segmentation algorithm achieved a 99.5% success rate on the first attempt.
Linearized RGB values were transformed to CIE1931.
tristimulus values using the standard conversion matrix for sRGB color space with D65 illuminant as specified in Equation (3):
The
values represent device-independent tristimulus coordinates corresponding to CIE 1931 2° standard [
21] observer color matching functions, with the
component specifically representing luminance, while
and
encode chromatic information.
tristimulus values were subsequently transformed to CIELAB color space following CIE 15:2004 [
21] specifications as expressed in Equations (4)–(6):
where the function
is defined piecewise in Equation (7):
With reference to white point values for D65 illuminant: , , and . The CIELAB color space was selected for rubber classification due to perceptual uniformity, where Euclidean distances in CIELAB space approximate perceived color differences. The axis represents psychometric lightness (0 = black, 100 = white), while and encode chromatic information (: green to red; : blue to yellow).
The yellowness index quantifies chromatic deviation from ideal whiteness, calculated following ASTM E313-20 standards [
8] for D65 illuminant as given in Equation (8):
where the coefficients 1.2985 and 1.1335 are specific to D65 illuminant and CIE 1931 2° standard observer, derived to approximate visual assessment of yellowness under daylight conditions. The
formula emphasizes the
tristimulus value enriched in long wavelengths (reddish yellow) while subtracting the
value enriched in short wavelengths (bluish), with normalization by
(luminance). Positive
indicates yellowish coloration, with magnitude proportional to perceived yellowness intensity.
2.4. Classification Algorithm and Statistical Validation
Classification thresholds were established using a training set of 10 specimens per rubber type (
= 50 total, separate from validation specimens), with threshold ranges determined as mean plus or minus two standard deviations encompassing 95% of training data. Initial thresholds based solely on yellowness index resulted in ambiguous classification for STR5 versus STR5L due to overlapping ranges (56–69 versus 58–70), prompting the incorporation of the
parameter as a secondary discriminator. STR5L exhibits distinctive negative
values (−0.88 ± 0.31) compared to STR5 (0.61 ± 0.28), reflecting subtle greenish undertones that enable reliable differentiation. The classification algorithm employs multidimensional colorimetric analysis rather than the yellowness index alone. While yellowness index serves as the primary metric due to strong correlation with rubber grades and ASTM E313-20 standardization [
8], the hierarchical decision tree incorporates: (1) primary yellowness index thresholds separating distinctly different grades; (2) secondary CIELAB parameters (
,
,
from Equations (4)–(6) for ambiguous cases, particularly STR5 vs. STR5L differentiation where a* values distinguish greenish undertones; (3) spatial uniformity assessment for heterogeneous specimens. This multidimensional approach achieved 100% classification accuracy, including successful differentiation of similar grades that would be problematic using the yellowness index alone. The final classification algorithm employs a hierarchical decision tree with a primary split at
< 9.5 separating white crepe from colored grades, secondary split at
< 31 distinguishing RSS5 from higher-yellowing grades, and tertiary split using
threshold at −0.5 differentiating STR5 versus STR5L, with final split at
separating RSS3 from extreme outliers. This structure minimizes computational complexity with a maximum of five comparisons per specimen while maintaining classification accuracy.
Statistical validation employed one-way analysis of variance comparing yellowness index measurements between the standard reference method (calibrated benchtop spectrophotometer with
geometry, D65 illuminant) and experimental imaging system determinations. Twenty specimens per rubber type underwent triplicate measurements under controlled conditions, with the ANOVA model expressed in Equation (9):
where
represents the
observation of the
rubber type,
is the overall mean,
is the effect of the
rubber type, and
is the random error term assumed to follow a normal distribution
. Post-hoc Tukey’s HSD tests identified significant differences between rubber types at
significance level. Image quality assessment quantified signal-to-noise ratio as the ratio of the mean signal from white reference to noise standard deviation from dark frames, expressed in Equation (10):
Spatial uniformity was assessed via the coefficient of variation in pixel intensities across white reference images within the central 30 × 30 mm
2 region. Measurement repeatability and reproducibility were quantified following ISO 5725-2:2019 guidelines [
20] for short-term and long-term precision, respectively.