Detailed sift algorithm