Bio-Potential Signal Extraction from Multi-Channel Paper Recorded Charts

Problem statement: Almost all of the modern biomedical equipments tha t record the biopotential actions have digital output but the paper chart records are a must. The volume of these records is significant and increasing rapidly. Keep ing a bio-signal chart of a patient make it easy fo r quick assessment but still create problems in the e ss nce of data storage, archiving , data interchang e and communications. Approach: As a solution to all these problems is to convert these paper records to digital form. In this study, a method for bio-po tential signal extraction from single or multi-chan nel paper recorded charts using image processing techni ques is developed. Results: After scanning the paper charts and converting them into images using a commercial scanner, the developed algorithm is applied to eliminate the background of the scanned paper chart from any recording device single channel or multi-channel using binary neighborhood morphological operations then converting the extracted waveform image into quantized values repr esenting the waveform recorded paper chart. The extracted signal is then filtered to remove the hig h frequency effects that result from the morphologi cal operations. A correlation and frequency analysis pr ocedure is then conducted to verify the result against known sampled waveform. Conclusion: A chart paper conversion to digital values that represent only the values for the biopotential wave form and eliminating the other irrelevant information has been achieved. These resulted in a less space occupation of patient records and make i t easy for data further processing and manipulations.


INTRODUCTION
For the purpose of medical investigation, the analysis of human body electrical and mechanical activities such as electrocardiology, electromyography, electroencephalography, evoked potential, electroocularography and many other bio-potentials are important to make such investigation by physicians (Webster, 2010). These physiological waveform are currently recorded onto hardcopy papers and analyzed using manual measurements by specialists. Due to the advance of technology almost all of the modern biomedical equipments that record the bio-potential actions have digital output (AlMejrad, 2010a) but the study chart records are a must. In addition to that the non-digital equipment is still available and in widespread use in hospitals. The volume of these records is significant and increasing rapidly. Keeping a bio-signal chart of a patient make it easy for quick assessment but still create problems in the essence of data storage, archiving , data interchange and communications. As a solution to these problems, it would very useful and helpful if these paper records could be converted to digital form. Digitization of lowfrequency signals and electrocardiograms records were achieved using optical scanners interfaced to desktop microcomputers (Widman and Hines, 1991). In 1996, a microcomputer-based prototype for ECG paper record conversion by Wang and Mital (1996). Computer system for analysis and extracting features from ECG paper recordings were achieved (Kao et al., 2001). The advances of information technology in storing, retrieving or processing of information are utilized for creation of database after data extraction from ECG paper records (Lobodzinski, 2003;Mitra, 2004). Badilini (2005) presented ECG scan that is a new digital application that enables the user to convert paper ECGs to digital ECGs and validated this study by comparing digital waveforms and measurements with the original. From this review, it is clear that most of the study done is for ECG records.
In this study, a method for bio-potential signal extraction from single or multi-channel paper recorded charts using image processing techniques is developed (Gonzalez and Woods, 2002;Ali and Zeng, 2010;AlMejrad, 2010b;Kumar et al., 2009;Hasan et al., 2009). After scanning the study charts and converting them into images using a commercial scanner, an algorithm is applied to eliminate the background of the scanned paper chart from any recording device single channel or multi-channel using binary neighborhood morphological operations then converting the extracted waveform image into quantized values representing the waveform recorded paper chart. The extracted signal is then filtered to remove the high frequency effects that result from the morphological operations. A correlation and frequency analysis procedure is then conducted to verify the result against known sampled waveform.

MATERIALS AND METHODS
Two types of materials were used in this study; simulated materials that were developed using different types of simulators and real data from paper chart recorder devices. The simulators and recorders are part of the advanced biomedical instrumentation lab that exists in the biomedical technology department, applied medical sciences, King Saud University. The other type of material is the real patients' records that were obtained from the database of the patients treated in our university hospital, King Khalid Hospital in Riyadh, KSA.
These simulated data has been acquired using the Fluke ® patient multi-lead ECG simulator and Fetus/Maternal ECG simulator PS-320. The simulated paper charts are recorded using a commercial ECG recorder and a commercial defibrillator. Two different kind of paper were used to record the ECG signal; uniform colored background chart paper and plain chart paper.
The patients' records data contain paper recorded charts for multi-channels ECG, Cardiac Output, Spo2, EMG, EEG and EOG as well as the digital form of these data. These charts were recorded on a uniform colored background. The digital form of the recorded charts will be used in the algorithm verification.
The study charts were scanned into images using a commercial A4 scanner with 300dpi gray scale settings. The algorithm starts with reading an image and converts it from gray scale to binary image in order to prepare it for the binary morphological operation. Before the morphological operation a region of interest is being defined that will help in reducing the processing time and much more it will allow a specific selection of a particular part of the waveform. The selected image is processed with a particular neighborhood morphological binary operation that will estimate the background of the image that will be subtracted from the selected image. The result image contains residual effects from the subtraction of the background that will result in isolated pixels to reduce these effects a threshold level is applied then the segments that are less than a specified number of pixels can be removed. For more isolated pixels reduction the complement of the threshold image is conducted and the result is XORed with the image resulted from the subtraction of the threshold image and the image after another threshold stage.
The final image will contain the waveform with minimal effect of the background.
The next step is to filter out the image with a square mask and average the result for final reduction of isolated pixels. The final step is to convert the waveform in the final processed image to 1D signal that can be then manipulated for any further signal processing. This process is shown in the flowchart of the signal extraction and background elimination algorithm (Fig. 1).

RESULTS
The algorithm was applied on many images that contain simulated ECG of different characteristics and the result is shown in the figures above. Figure 2 shows simulated maternal ECG from PS-230 fetal maternal simulator that of 2mV and 60 beat per minute (bpm) and Fig. 3 shows the processed simulated maternal. Figure 4 shows a fetal/maternal simulated ECG mixture using SP-320 of 2mV and 60 beat per minute (bpm) for the maternal and 0.5mV and 150 beat per minute (bpm) for the fetus and Fig. 5 shows the processed fetal/maternal simulated ECG. Figure 6 shows the fetus ECG simulated using SP-320 of 0.5mV 150 (bpm) and Fig. 7 shows the processed fetus ECG. Figure 8 shows the simulated ECG recorded by a Defibrillator. Figure 9 shows the processed ECG. This processed ECG can be stored in a text file as quantized values for further information communication and interchange.

Algorithm verification:
The verification processes starts with collecting real patient information from King Khalid Hospital (KHH) and scan it with the same scanner settings mentioned above then applying the algorithm and compare the result to the digital form stored in the hospital central station. As another way of verification for the algorithm the output from the simulator is feed to a commercial Data Acquisition System (DAS) and a digital form is acquired and compared to the result. The following Fig. 10-15 show the scanned real information of a patient bio-potential recorded image and the output result after processing. Figure 10-11 show a real ECG data and the data processing and extraction. In Fig. 12 the graph is taken during the sleep apnea analysis. A 50 years old subject is examined for EMG neck, Right EOG, Left EOG, Respiration and pulse rate. The patient is obese with cardiomegaly and ECG artifact is present in all leads.This patient multi-data record is fed as an image to the algorithm and the biopotential data extracted from every trace in the scanned image as sown in Fig. 13. Figure 14 shows a graph that is taken during the photic stimulation test at a rate of 16 flashes per second for photoparoxysmal response. The waves recorded for 26 years old subject that has generalized convulsive disorders. Figure 15 shows the biopotential data extracted from every trace in the scanned image after applying the extraction algorithm.

DISCUSSION
In an image scanned from a bio-potential paper chart contains uniform or plain background, waveform, text representing amplitude mV/mm and recording speed mm/sec. As shown in the flowchart of the signal extraction and background elimination algorithm, this algorithm is mainly depending on binary morphological image operations that will estimate the background. The background then can be subtracted from the original binary image. Another morphological operation that will remove the unconnected segment in the binary background free image is conducted. This will result in high frequency component that will be added to the net result image so an image threshold and a low-pass filter is needed to smooth such image. The waveform now is the only object presented in such image.

CONCLUSION
In almost all bio-potential recording devices paper chart is the main out form for the recorded waveform. For every regular check ECG recording is a must and thus a huge paper chart records are occupying every patient's file creating a storage problems and make difficult for quicker access and assessment of patient data. A chart paper conversion to digital values that represent only the values for the biopotential waveform and eliminating the other irrelevant information has been achieved. This resulted in a less space occupation of patient records and makes it easy for data further processing and manipulations.
A complete system design is the main goal of this study. This system will integrate the most common drivers for the most commercial scanners and GUI application software that will enable the user to select the desired region of interest interactively or as a predefined polygon points and saving utilities.