Mexican hat function is selected as the basic wavelet and the transform is realized according to a trous algorithm. By this method, the detection rate of R wave can be above 98.42% on an average for the three ECG signals with good quality and three ECG signals seriously corrupted by noise in MIT/BIH standard database.