FFT-based Terrain Segmentation for Underwater Mapping