This work describes an algorithm intended to detect the beat-to-beat heart rate from the ballistocardiogram (BCG) obtained from seated subjects. The algorithm is based on the continuous wavelet transform with splines, which enables the selection of an optimum scale for reducing noise and mechanical interferences. The first step of the algorithm is a learning phase in which the first four heartbeats in the BCG are detected to define initial thresholds, search windows and interval limits. The learned parameters serve to identify the next heartbeat and are readapted after each heartbeat detected to follow the heart rate and signal-amplitude changes. To evaluate the agreement between results from the algorithm and the heart rate obtained from the ECG, a Bland–Altman plot has been used to compare them for seven seated subjects. The mean error obtained was −0.03beats/min and the 95% confidence interval (±2 SD) was ±2.7beats/min, which is within the accuracy limits recommended by the Association for the Advancement of Medical Instrumentation (AAMI) standard for heart rate meters. 
An algorithm for beat-to-beat heart rate detection from the BCG based on the continuous spline wavelet transform