Rato, João Maria Ferraz de Oliveira Mendonça2026-02-052026-02-052025http://hdl.handle.net/10400.5/116891Tese de Mestrado, Engenharia Física, 2025, Universidade de Lisboa, Faculdade de CiênciasForensic investigation of firearm-related crimes often relies on estimating shooting distances through analysis of gunshot residue (GSR) patterns revealed by colorimetric tests, such as the Sodium Rhodizonate method, which highlights lead particles on target surfaces. Traditional visual comparison analysis of colorimetric test results with reference patterns is subjective, prone to variability, and lacks quantifiable parameters, limiting reproducibility and precision. This thesis develops an automated methodology to objectively estimate firing distances from GSR Sodium Rhodizonate colorimetric test images, enhancing forensic reliability. The approach utilizes a dataset of 183 distinct images from controlled handgun shots taken within a interior shooting range across six calibers (.38 SPL, .22 LR, .32 S&WL, 6.35 mm Browning, 7.65 mm Browning, 9 mm Parabellum) from distances ranging from 0 to 200 cm. Images are labeled and undergo pre-processing, followed by computer vision techniques to then save key image features to a .txt file. A standardized photography setup with fixed camera positioning and controlled lighting was tested in order to minimize acquisition conditions variability while increasing the image data quality and making its subsequent analysis more reliable. The standardized setup allowed for a significantly greater ”resolution” as demonstrated by the average number of detected contours on the old, original data (541) and the new, standardized setup data (2367). Exploratory analysis was performed on both original and new data sets, by plotting different image parameters with the distance and identifying key features, which were then fed into multiple machine learning models, trained/tested using cross validation methods and evaluated via appropriate performance metrics (MAPE, RMSE). A feature relevance review showed that area-based parameters scored the highest Mutual Info and RF Importance score indicating these are the most predictive among the probed features. Linear and non-linear correlation metrics were also evaluated, revealing low values for the Pearson score compared to the Spearman score pointing towards the nonlinearity of the data. The best results on original data were attained by the Random Forest achieving a MAPE=61.6% and RMSE=34.3 cm, improving to MAPE=58.4% (Decision Tree) and RMSE=31.6 cm (KNN) on standardized data. Compared to expert visual estimates (MAPE=43.2%, RMSE=48.8 cm), models reduce absolute errors while experts maintain lower relative errors. Although more research is still needed, the methodology confirms the hypothesis set by the thesis, setting the foundation for a more reproducible distance estimation method based solely on objectively defined parameters.application/pdfengFiring distance estimationChemographic testImage processingMachine learningGSRFirearm shooting distance estimation via chemographic test image analysismaster thesis204176352