Ballistocardiogram (BCG) is a technique for monitoring cardiac function, and the characteristic peaks of the BCG signal are important. However, due to individual differences, especially when the subject has cardiac dysfunction, waveform distortion occurs in the BCG signal, making traditional peak localization algorithms insufficiently adaptive. This study, based on the principle of waveform consistency in the BCG signals of the same subject, first locates the J peak, then segments the cardiac cycle, builds a template, and finally achieves peak localization by dynamic time warping matching between the template and the remaining cardiac cycles. A fiber optic sensing monitoring system is used to collect BCG signals from 10 healthy subjects. Three technicians annotate the feature peak groups according to the rules and ensure reliability using the Kappa coefficient. The experimental result shows that the overall accuracy of the algorithm was 91.7%. This method can method can help monitor cardiac function by detecting characteristic peaks in BCG signals.