An optical system for measuring changes in cell length during unloaded contractions of cardiac myocytes is described. A one-dimensional video "image" of a cell is obtained every 4 ms with a linear photodiode array, which is aligned with the longitudinal axis of the cell. The circuit used to process the image from the photodiode array has a variety of features to aid in the accurate determination of the distance between the ends of the cell, i.e. the cell length. First, the video image of the cell is divided into two "windows", one encompassing the "front" edge of the cell, the other encompassing the "rear" edge. Other cells or debris beyond the cell edges are excluded. Changes in the general light level, for example as a result of debris floating above the cell, have little effect because within the windows the "background light level" is subtracted from the signals before they are processed further. To detect the cell edges, the system determines when the signals within the windows exceed (front edge) or drop below (rear edge) chosen thresholds, which are different for the front and rear edges. The system has "memory" and it identifies the rear edge of the cell as the last time the signal falls below the threshold; because of this "bright spots" within the cell are not mistaken for the end of the cell. The system has "hysteresis", which enables it to ignore small fluctuations in brightness around the threshold. The system is easy to use, accurate, readily calibrated, and it has good spatial and time resolution (about 0.25 micron and 4 ms respectively).