Background and objective: The isolated cardiomyocyte preparation is amenable to several experimental approaches not suitable to the myocardial tissue, which has allowed the gain of important information on the pathophysiology of the cardiac muscle. Thus, the development of techniques for functional studies in this preparation is important. The goal of the present study was to develop a computer program to extract contraction traces generated by cyclic cell shortening from cardiomyocyte video image files. Methods: The Canny algorithm, widely used for computer vision, was implemented for cell edge recognition and continuous tracking, so that changes in cardiomyocyte length could be monitored. The program was applied to demonstrate the effect of classical inotropic maneuvers on contraction parameters, as well as to assess the development of spontaneous activity in response to defibrillator-like electrical shocks in rat isolated cardiomyocytes. Results: The method resulted in successful monitoring of variations in cell length during both electrically triggered and post-shock spontaneous contractions, of which the rate was significantly related to shock strength. Conclusions: The proposed approach might be useful for analysis of contractile activity of isolated muscle cells, and allows detection of even the typically low-amplitude noisy spontaneous contractile events. Additionally, the experimental data suggest that the rate of spontaneous contraction could be used as an index of shock-induced electrical membrane damage.