PyGraph Scanner an interactive tool for digitizing historical series

Main Article Content

Daniele Randazzo
Arianna Pesci

Abstract

This work introduces PyGraph Scanner, a Python-based software for the automatic digitization of historical and analog graphs. The tool addresses the need to recover time series stored on paper, which are otherwise difficult to use with modern digital tools, providing a bridge between past observations and contemporary quantitative analyses. The code integrates a GUI built with PySide6, image processing through OpenCV, and data handling with NumPy. Starting from a few reference points selected by the user, the algorithm tracks the graph by scanning horizontally and computing the centroid of color-compatible pixels, ensuring robustness against noise while allowing manual intervention in complex sections.
The method was tested on synthetic graphs (straight lines, sinusoids, and multi-frequency compositions), which were printed and photocopied to simulate the degradation of historical documents and to introduce controlled background disturbances. The experiments demonstrated high reliability: differences between original and digitized curves were consistently smaller than the line thickness, with error distributions close to Gaussian and no significant spectral alterations in FFT analyses, apart from high-frequency components related to dense sampling.
These results confirm that PyGraph Scanner offers a simple, flexible, and reproducible solution for the digitization of historical time series, particularly valuable in structural, seismic, hydrological, and climate applications. Ongoing work focuses on systematic errors and the definition of acceptability thresholds for analyses in both the time and frequency domains, which will be further detailed in future studies.

Article Details

How to Cite

Randazzo, D., & Pesci, A. (2026). PyGraph Scanner an interactive tool for digitizing historical series. Rapporti Tecnici INGV, 513, 26 pp. https://doi.org/10.13127/rpt/513