| Algorithm 2: Rematch Algorithm |
| Input: all candidate sorted images { } |
| 1: Detect SURF features of candidate image and query image ; 2: Detect image matching points using FLANN algorithm; |
| 3: Calculate the number of matching points, the most is ; |
| Output: the best matching image |