Generalized Mosaicing