Feature detection

implement feature detection for alignment.