Skip to article
AHFE AHFE Discoveries AHFE International Open Access Journal
AHFE OPEN ACCESS OPEN ACCESS CONFERENCE PROCEEDINGS PAPER

Development of an Automated System for Cardiomyocyte Activity Using Computer Vision

1 Department of BioScience, University of East London, Water Lane, London, E15 4LZ, UK ↗
2 Department of Computer Science and Digital Technologies, University of East London, University Way, London E16 2RD, UK ↗
Publication year
Digital Object Identifier10.54941/ahfe1005963

Abstract

Computer vision, a pivotal field within computer science, empowers machines to interpret and analyse visual information such as images and videos. Its growing application in healthcare, particularly in the diagnosis and treatment of cardiac conditions, underscores its transformative potential. Traditional methods for detecting cardiac beat rates are largely manual, making them time-consuming and labour-intensive, thereby limiting their scalability in clinical contexts. To address this gap, there is a critical need for an automated system capable of identifying cells in video data and extracting key parameters such as beat rate, cell area during systole and diastole, and beat duration. This study introduces a novel computer vision-based framework that automates the detection of heart cell contractions from video recordings. By employing motion segmentation, masking techniques, and machine learning algorithms, the system efficiently identifies active cardiomyocytes, calculates beats per minute (BPM), and measures the time taken for a complete contraction-relaxation cycle. This approach not only improves diagnostic accuracy but also contributes to more efficient and scalable cardiac assessments, representing a significant advancement in computational healthcare.

1. INTRODUCTION

The human heart is a highly sophisticated organ that plays a fundamental role in sustaining life by continuously circulating oxygenated blood and essential nutrients throughout the body (Woodcock, 2005). Monitoring cardiac activity, particularly the beat rate, is crucial for the diagnosis and treatment of cardiovascular diseases. However, existing methods for beat rate detection and cardiac parameter measurement largely depend on manual observation and analysis, which are time-consuming, labour-intensive, and prone to human error (Grune, 2019). These limitations hinder the scalability and efficiency of cardiac assessments in both clinical and research settings.

© 2025. Published by AHFE Open Access. All rights reserved. 145

There is a growing need for automated systems capable of accurately quantifying key parameters of cardiomyocytes (heart muscle cells) including beat rate, beat duration, and cell area during both systolic and diastolic phases. Systole refers to the contraction phase of the cardiac cycle, during which blood is pumped from the heart, while diastole denotes the relaxation phase when the heart chambers refill with blood (Woodcock, 2005). Reliable measurement of these parameters is essential for understanding normal cardiac function and pathological changes, such as those induced by aging or disease (Bor’bely, 2005).

This study presents an automated system that integrates advanced image processing and machine learning techniques to detect cardiomyocyte beat rate and calculate associated metrics from video microscopy footage. The system enhances video quality through preprocessing, applies motion segmentation, motion detection, masking, and K-Means clustering to identify and track cardiomyocytes, and calculates beat intervals and cell areas during systole and diastole.

The structure of this paper is as follows: Section 2 reviews related work in beat rate detection and cardiomyocyte analysis; Section 3 outlines the proposed methodology and Section 4 concludes with potential future enhancements.

2. RELATED WORK

Automatic Cell Detection and Tracking: In his seminal work, Crane (1979) proposed an innovative method for automatic cell detection and tracking, aiming to advance the study of cellular behaviour. Observing that contemporary cell tracking techniques were limited in efficiency and flexibility, Crane introduced a novel “cell-tracking template” that integrates Fourier transforms, image correlation, and cellular automata to enhance detection accuracy. This approach was designed to provide a robust and adaptable platform for tracking cellular movement, particularly in complex imaging environments (Crane, 1979).

The template offers several advantages, including the ability to track cells in three dimensions and to yield accurate results under appropriate conditions. However, Crane (1979) also acknowledged certain limitations, such as the system’s inability to perform real-time tracking and its susceptibility to image noise and motion blur. Despite these challenges, the proposed method has broad applicability in fields such as cell culture analysis and microscopy, offering a valuable tool for investigating cell dynamics and behaviour (Crane, 1979). Overall, Crane’s work presents a foundational contribution to the development of automated cell tracking technologies.

The MYOCYTER: MYOCYTER (Grune, 2019) is an open-source macro developed for the ImageJ platform, specifically designed to quantify cardiomyocyte and cardiac contractions from video recordings. It offers a robust and user-friendly interface for large-scale data analysis, enabling the extraction of diverse contractile parameters. The tool has demonstrated reliability in both in vitro and in vivo applications, supporting analysis across cellular and animal models.

Development of an Automated System for Cardiomyocyte Activity 147

Key functionalities of MYOCYTER include dynamic thresholding, automated multi-cell detection, masked evaluations, and post-analysis parameter adjustments. Its performance has been validated using synthetic video data that adhere to predefined mathematical functions, confirming its accuracy in extracting relevant contraction metrics. The software has also been employed in experimental studies involving NZO/HIBomDife and C57BL/6J mouse strains, as well as Daphnia pulex (water fleas). Statistical evaluations of the extracted parameters were performed using GraphPad Prism (Grune, 2019).

However, while MYOCYTER is capable of determining beat counts within video sequences, it lacks the functionality to measure the spatial area of cardiomyocytes.

DATASET For this research, we utilized our own proprietary data comprising over 96 gigabytes of video clips. This dataset consists of video recordings of cardiomyocytes (synthesized in lab by co-author Prashant Ruchaya) observed through a microscope and captured using a smartphone. The video clips have a frame rate of 100 frames per second (FPS), with each clip being approximately 10 seconds in duration.

3. METHODOLOGY

Figure 1 illustrates the three main parts of the suggested system. In the sections that follow, each element will be covered in detail.

Figure 1: System design.
Original PDF Figure 1:

Video Pre-Processing and Motion Detection The proposed algorithm efficiently detects cardiomyocyte motion from video data by identifying dynamic regions within successive frames. Initially, the video frames are converted to greyscale to reduce computational complexity, followed by Gaussian blurring to suppress noise and enhance image quality.

Motion is detected by calculating the absolute difference in pixel intensities between consecutive frames, producing a difference map that highlights areas of activity. This map is then binarized using thresholding, where significant changes are marked as white pixels (value 1) and non-significant areas as black (value 0).

To focus analysis on meaningful activity, the algorithm extracts the coordinates of non-zero pixels in the binary image, corresponding to regions where motion occurs. By isolating these active areas, the method ensures computational efficiency and avoids unnecessary processing of static regions. This targeted approach forms the basis for subsequent cardiomyocyte analysis, offering a precise and scalable solution for detecting cellular motion. A visual representation of the workflow is provided to support understanding of the process.

Figure 2: Pre-processing flow chart.
Original PDF Figure 2:

Calculate Beat Rate of the Cell The proposed algorithm utilizes frame-by-frame video analysis to detect and quantify cardiomyocyte beat rates, prioritizing both computational efficiency and robustness. Motion is identified by isolating non-zero pixels (those with intensity values greater than zero) after preprocessing steps such as background subtraction and thresholding. These pixels represent active regions within each frame, enabling the algorithm to capture spatial motion without resorting to complex tracking or feature extraction methods.

Development of an Automated System for Cardiomyocyte Activity 149

This simplification allows for efficient detection of cardiac activity while preserving accuracy across varying datasets.

The algorithm introduces two state variables, current_state and prev_state, to monitor transitions between motion and no-motion frames. For each frame, the number of non-zero pixels is evaluated: if greater than zero, the frame is marked as active; otherwise, it is considered inactive. A beat is registered whenever a transition from inactivity to activity occurs, formally, when prev_state = False and current_state = True. Each detected transition increments the beat counter, and the beat rate is then calculated using the formula R=B/TR = B/T, where B is the total number of beats and T is the video duration in seconds. This motion-based approach ensures scalability and eliminates the need for explicit object recognition, making it well-suited for diverse cardiomyocyte imaging datasets. A visual workflow diagram is included to clarify the algorithm’s operation.

Figure 3: Calculate beat rate flowchart.
Original PDF Figure 3:

Measuring Area of the Cell Building on the principles of frame-by-frame analysis, this algorithm is designed to estimate the spatial area of cardiomyocytes by applying clustering techniques to regions of motion within video frames. Initially, non-zero pixels (representing active regions) are extracted following standard preprocessing procedures such as background subtraction and thresholding. These pixels form the basis for identifying individual cells, as they highlight areas associated with cellular motion. To segment these regions, the algorithm employs the KMeans clustering method, which partitions the non-zero pixel array into distinct groups, each corresponding to a unique cardiomyocyte. This approach is well-suited for spatial data and offers an efficient means of delineating cell boundaries.

Following clustering, the area of each identified cell is computed by counting the number of pixels within each cluster. These values serve as

quantitative estimates of cell size and are exported to a CSV file for further analysis and integration into broader research workflows. For enhanced interpretability, the algorithm generates a visual overlay on each video frame, assigning unique colors to each cluster and annotating them with the corresponding area. Overall, the method provides a scalable and adaptable solution for cardiomyocyte area estimation, capable of maintaining accuracy across diverse imaging datasets. A visual summary of the algorithm is included to support understanding and replication.

Figure 4: Calculating cell area flowchart.
Original PDF Figure 4:

By employing K-means, we effectively quantify the areas of cells based on their motion, providing a structured dataset for subsequent analysis.

4. CONCLUSION & FUTURE WORK This study presents the development of an automated system for analysing the beating dynamics of human heart cells, employing advanced computer vision and machine learning techniques to overcome the inherent limitations of manual measurement methods (Grune, 2019). The system is designed to streamline cardiomyocyte analysis, thereby providing an automated, efficient, and scalable solution for both biomedical research and clinical diagnostics.

Future enhancements to the framework are anticipated, including rigorous performance validation using specialised metrics (Pantofaru, 2005) through comparisons with similar existing tools (Grune, 2019), which are expected to bolster the system’s reliability. By addressing the current limitations, this proposed framework promises more comprehensive and precise analyses of cardiomyocyte activity, potentially advancing the fields of cardiac diagnostics and therapeutic research.

Development of an Automated System for Cardiomyocyte Activity 151

REFERENCES

Ahmed, M., Seraj, R. and Islam, S. M. S., 2020. The k-means algorithm: A comprehensive survey and performance evaluation. Electronics, 9(8), p. 1295. Ait-Mou, Y., Hsu, K., Farman, G. P., Kumar, M., Greaser, M. L., Irving, T. C.

and De Tombe, P. P., 2016. Titin strain contributes to the Frank–Starling law of the heart by structural rearrangements of both thin-and thick-filament proteins. Proceedings of the National Academy of Sciences, 113(8), pp. 2306–2311. Bernhard, D. and Laufer, G., 2008. The aging cardiomyocyte: A minireview.

Gerontology, 54(1), pp. 24–31. Borb’ely, A., Van Der Velden, J., Papp, Z., Bronzwaer, J. G., Edes, I., Stienen, G. J. and Paulus, W. J., 2005. Cardiomyocyte stiffness in diastolic heart failure. Circulation, 111(6), pp. 774–781. Crane, R. K., 1979. Automatic cell detection and tracking. IEEE Transactions on

Geoscience Electronics, 17(4), pp. 250–262. Fan, D., Wannenburg, T. and de Tombe, P. P., 1997. Decreased myocyte tension development and calcium responsiveness in rat right ventricular pressure overload. Circulation, 95(9), pp. 2312–2317. Grune, T., Ott, C., Häseli, S., Höhn, A. and Jung, T., 2019. The “MYOCYTER”–

Convert cellular and cardiac contractions into numbers with ImageJ. Scientific Reports, 9(1), p. 15112. Li, G., Zhang, Y., Xu, B. and Li, X., 2019, June. Image analysis and processing of skin cell injury based on opencv. In Journal of Physics: Conference Series (Vol. 1237, No. 3, p. 032003). IOP Publishing. Li, X., Ding, H., Yuan, H., Zhang, W., Pang, J., Cheng, G., Chen, K., Liu, Z. and

Loy, C. C., 2024. Transformer-based visual segmentation: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence. Llewellyn, M. E., Barretto, R. P., Delp, S. L. and Schnitzer, M. J., 2008. Minimally invasive high-speed imaging of sarcomere contractile dynamics in mice and humans. Nature, 454(7205), pp. 784–788. Malhotra, A. J., Chopra, A., Dahiya, R., Yadav, P. and Singhal, A., 2021. Background

object removal and image inpainting to fill irregular holes. In Innovations in Cyber Physical Systems: Select Proceedings of ICICPS 2020 (pp. 287–295). Springer Singapore. Mattheus, J., Grobler, H. and Abu-Mahfouz, A. M., 2020, November. A review of motion segmentation: Approaches and major challenges. In 2020 2nd International multidisciplinary information technology and engineering conference (IMITEC) (pp. 1–8). IEEE. “numpy.nonzero — NumPy v1.24 Manual,” numpy.org. https://numpy.org/doc/ stable/reference/generated/numpy.nonzero.html Pantofaru, C. and Hebert, M., 2005, September. A measure for objective evaluation

of image segmentation algorithms. In 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05)-Workshops (p. 34). IEEE. Pasqualin, C., Gannier, F., Yu, A., Mal’ecot, C. O., Bredeloux, P. and Maupoil, V.,

2016. SarcOptiM for ImageJ: High-frequency online sarcomere length computing on stimulated cardiomyocytes. American Journal of Physiology-Cell Physiology, 311(2), pp. C277–C283. Peterson, P., Kalda, M. and Vendelin, M., 2013. Real-time determination of sarcomere length of a single cardiomyocyte during contraction. American Journal of Physiology-Cell Physiology, 304(6), pp. C519–C531.

Prangemeier, T., Reich, C. and Koeppl, H., 2020, December. Attentionbased transformers for instance segmentation of cells in microstructures. In 2020 IEEE International Conference on Bioinformatics and Biomedicine (BIBM) (pp. 700–707). IEEE. Sheikh, F., Raskin, A., Chu, P. H., Lange, S., Domenighetti, A. A., Zheng, M.,

Liang, X., Zhang, T., Yajima, T., Gu, Y. and Dalton, N. D., 2008. An FHL1- containing complex within the cardiomyocyte sarcomere mediates hypertrophic biomechanical stress responses in mice. The Journal of Clinical Investigation, 118(12), pp. 3870–3880. Woodcock, E. A. and Matkovich, S. J., 2005. Cardiomyocytes structure, function and associated pathologies. The International Journal of Biochemistry & Cell Biology, 37(9), pp. 1746–1751. Xu, D. and Tian, Y., 2015. A comprehensive survey of clustering algorithms. Annals

of Data Science, 2, pp. 165–193.

Cover of the proceedings volume Human Interaction and Emerging Technologies (IHIET-FS 2025): Future Systems and Artificial Intelligence Applications

Explore the complete digital volume

Human Interaction and Emerging Technologies (IHIET-FS 2025): Future Systems and Artificial Intelligence Applications

Read this individual research paper free through the original publisher, or explore the full digital proceedings book.

ISBN 978-1-964867-72-4

Explore this ISBN in the AHFE Bookstore Listed in the July 2026 bookstore catalogue; search by ISBN to confirm current availability · Digital book purchase optional

Explore Related Research

Related research 8 matches

More papers from this volume

← Back to Research ExplorerBrowse the full library →