The K Desktop Environment

Next Previous Table of Contents

1. Introduction

This program is designed to convert scanned 12-lead electrocardiograms into PNG format and a web-friendly image size. It assumes that the electrocardiogram (ECG) is printed with a black line on white paper with a red grid.

The problems this program is designed to solve are (1) an ECG scanned at relatively high resolution (300 to 600 dots per inch) imposes a substantial load on the web browser because it contains about 6 million pixels which may require 18 to 24 MB of RAM to store for display. Also, (2) typical scanners convert a clean paper ECG into a multitude of colors, include green and blue. The resulting file cannot be compressed efficiently because it does not contain as much redundancy, and thus takes more time to transmit over low-speed network connections.

This program approaches these problems by (1) shrinking the image in a way that preserves the signal data as first priority and the grid data as second priority, and (2) cleaning up the color map so that only three colors remain. (As an option, the red grid can be removed so that only two colors remain.) The first step allows an arbitrary integer reduction in the size of the output file, which reduces the memory burden on the user's web browser. The second step usually reduces the output filesize by 90 to 95%, which reduces transmission time proportionately.

The input image formats are those that Qt recognizes. The open-source version of Qt accepts PNG, BMP, XBM, XPM and PNM. The different PNM formats are: PBM(P1), PGM (P2), PPM (P3), PBMRAW (P4), PGMRAW (P5) and PPMRAW (P6). Additional formats are available with the Qt Image IO Extension package, which is included in the Professional Edition. Currently, the Extension package adds the JPEG format.

1.1 Changes

  1. Version 0.3. 1999/10/17 Initial public release.

Next Previous Table of Contents