Detection of First and Second Order Motion