Automatic Detection of Coronal Mass Ejections