stichImages is the main program loop