This paper describes an unsupervised signal processing method applied to three-channel unipolar electrograms recorded from human atria. These were obtained by epicardial wires sutured on the right and left atria after coronary artery bypass surgery. Atrial (A) and ventricular (V) activations had to be detected and identified on each channel, and gathered across the channels when belonging to the same global event. The algorithm was developed and optimized on a training set of 19 recordings of 5 min. It was assessed on twenty-seven 2 h recordings taken just before the onset of a prolonged atrial fibrillation for a total of 1593697 activations that were validated and classified as normal atrial or ventricular activations (A, V) and premature atrial or ventricular activations (PAA, PVA). 99.93% of the activations were detected, and amongst these, 99.89% of the A and 99.75% of the V activations were correctly labelled. In the subset of the 39705 PAA, 99.83% were detected and 99.3% were correctly classified as A. The false positive rate was 0.37%. In conclusion, a reliable fully automatic detection and classification algorithm was developed that can detect and discriminate A and V activations from atrial recordings. It can provide the time series needed to develop a monitoring system aiming to identify dynamic predictors of forthcoming cardiac events such as postoperative atrial fibrillation.