Forensic analysis of gunshot residue using image processing and machine learning with colorimetric tests

Read full text
Authors: João Vítor Szwarc, MARIA EDUARDA DE OLIVEIRA, Timothy Gustavo Cavazzotto, Chalder Nogueira Nunes, Sueli Pércio Quináia
Cited by: 1
References: 9

Abstract

This study proposes a low-cost and objective methodology for the analysis of gunshot residue (GSR) by integrating colorimetric testing with Bromopyrogallol Red (BPR), digital image processing, and machine learning algorithms. BPR forms distinct colored complexes with Pb 2+ and Sb 3+ , key elements typically found in GSR. Samples were photographed under standardized lighting conditions, and color attributes were extracted from both RGB and HSV color spaces for predictive modeling. Several algorithms were evaluated for two primary objectives: (i) binary classification of samples as “shot” or “no shot,” and (ii) quantitative regression of Pb and Sb concentrations. For classification, Random Forest and XGBoost achieved perfect performance across all metrics (accuracy, precision, sensitivity, and specificity = 1.000). For Pb quantification, Random Forest obtained R 2 = 0.950, RMSE = 5.317, and MAE = 3.629, while XGBoost yielded R 2 = 0.946, RMSE = 5.645, and MAE = 3.878. For Sb prediction, XGBoost reached R 2 = 0.727 (RMSE = 13.466, MAE = 10.003), followed by Random Forest with R 2 = 0.687 (RMSE = 14.090, MAE = 11.452). Linear models (LM, Ridge, Lasso, and PLS) displayed lower predictive power, with R 2 values ranging from 0.36 to 0.67. Model interpretability using the LIME technique highlighted the influence of specific color channels—particularly blue (B) and hue (H)—on classification outcomes. Overall, the integration of colorimetry and machine learning provides a reproducible and transparent approach for identifying and quantifying metallic elements in GSR samples, establishing a promising analytical framework for forensic applications.

Fields of Study & Subjects

Forensic and Genetic Research Forensic Fingerprint Detection Methods Forensic Anthropology and Bioarchaeology Studies

Publication details

Journal / source
Microchemical Journal
Publisher
Elsevier BV
Volume
221
Pages
116907–116907
Publication date
17 January 2026
Language
EN