| Algorithm 1: The Pseudo-Code of Stitching Two Adjacent Images |
| Input: Adjacent images , The camera parameter of images 1. Use to get the rough registration of two images 2. Use S-H algorithm [34] and rough registration to get the overlapped area of the two images 3. Use SURF to extract feature points in the overlapped area on 4. Dived the overlapped area into grids, and 5. Sort feature points, such that 6. 7. for in : 8. if ( is in the grid) and (): 9. is used as anchor point, its corresponding position: 10. let region R be the neighbor window around on with 11. extract SURF features points in R 12. for in : 13. 14. if : 15. push into set 16. 17. if all the : 18. break 19. Solve transform matrix with 20. if or ( is the term of ): 21. use rough registration to calculate transform matrix 22. Use H to stitch the images to get the stitched image Output: a stitched image |