This paper initiates by preprocessing the paper electrocardiogram (ECG) and compares the performance of Sobel, Canny and LOG operators for edge detection in ECG images. Subsequently, skew correction is implemented using Hough line detection. Morphological operations form the basis for ECG waveform extraction. This paper further explores waveform extraction from both color and monochromatic ECG images, introducing a K-means++ algorithm with Laplace-Erode enhancement for color ECG and a connected region analysis-based method for monochromatic ECG. Following this, waveform segmentation is achieved through horizontal projection, segmenting the 12-lead ECG into individual leads to facilitate data extraction. To ensure pixel-to-pixel correspondence, an enhanced curve skeleton thinning algorithm is devised to refine the waveform, and the temporal-voltage pixel relationship is reconstructed based on the background grid. The waveform data is then transformed into ECG signal data, completing the extraction process. The algorithm's accuracy is experimentally validated. Furthermore, for ECG signal denoising, an 8-layer wavelet transform algorithm is proposed, effectively mitigating noise sources such as baseline drift and power frequency interference. Based on the aforementioned research content, this study designed and implemented an ECG digital system, that effectively achieved the core functionalities of digital processing and waveform detection for paper-based ECGs. Furthermore, the system served to validate the principal research objectives outlined in this paper.