Piecewise planar underwater mosaicing