Epilepsy is a common neurological disease, and electroencephalogram (EEG) contains massive epilepsy information. Automatic recognition of epileptic discharges has great significance in diagnosis of epilepsy.This paper proposes a novel automatic recognition of epileptic waves method in EEG signals based on shape similarity in time-series sequence directly. Merger of the increasing and decreasing sequences (MIDS) was used to improve the recognition accuracy and reduce the computation cost. Then shape templates were designed, and the modified Hausdorff distance was employed to measure the shape similarity of waveforms in template matching part. This approach imitates human visual cognitive process to analyze EEG and employs image recognition method into one-dimensional signals, which is a direct, original and effective method.373 epileptic discharge fragments marked by clinicians from 20 patients’ EEG recordings were selected. By fusing significance rules, 98.39% of them were recognized, with the false recognition rate 1.1%.Experimental results indicate that the proposed approach yielded better performance for interictal epileptiform discharges (IEDS) recognition compared with the previous methods.The proposed approach has good performance and high stability in automatic recognition of epileptic discharges both in ictal and interictal period, which could support the diagnosis of epilepsy greatly.