Background. With the advent of health information technology and wearable acquisition systems, long-term ECG are more and more used in long-term cardiac tolerability studies of new compounds. Nevertheless, the accurate analysis of such long signals requires reliable and fast signal processing algorithms. Objectives. The objective of this study is to assess the practical relevance of innovative matrix factorization methods for the preprocessing of long-term ECG. Those signals are generally noisy with complex baseline wander and require preprocessing, such as filtering, to perform a correct analysis. Our goal is to present two innovative algorithms of matrix factorization to detect R-peaks in long-term ECG. Methods. The two tested methods are called Independent Component Analysis (ICA) and Non-Negative Matrix Factorization (NMF). They are both source separation methods whose goal is to isolate each component of an ECG: R-peak, P and T waves, noise, baseline wander etc. On the one hand, ICA assumes that all subcomponents of the signal are statistically independent from each other and on the other hand, Non-Negative Matrix Factorization is a method that uses the non-negativity of the spectrogram of the ECG to separate the different time-frequency patterns. The two signal processing methods were implemented in the Matlab computing environment. Results. The proposed approaches are tested on the MIT-BIH Arrythmia and Noise Stress Test databases: ICA shows a strong drawback by returning the different sources in a random order making compulsory a reconnaissance step or the action of a specialist. Whereas NMF achieves high results in terms of sensitivity and specificity in general even in case of complex baseline wander and highly noisy signals. Conclusion. This study emphasizes promising results of a new long-term ECG preprocessing technique based on a matrix factorization method. This approach simultaneously undertakes three tasks: denoising, baseline wander removal and peak R detection.