A system for segmenting sensor data, the system comprising: at least one sensor configured to acquire at least one frame of range data from an environment containing the at least one sensor, wherein the at least one frame of range data provides a three-dimensional description of a portion of the environment; a processing unit configured to receive the at least one frame of range data from the at least one sensor, wherein the processing unit is configured to segment the at least one frame of range data by: computing a residual map that is based on the distance between data points in the at least one frame of range data and at least one polynomial surface fitted to at least one surface represented by the data points in the at least one frame of range data, wherein the residual map represents a residual value, for each position of the at least one frame of range data, wherein the residual value is the sum of orthogonal distances between the at least one fitted polynomial surface and the data points within a specified local neighborhood; smoothing the residual map to remove minor extrema from the residual map and retain major extrema in the residual map; identifying a plurality of major minima in the residual map, wherein each major minimum in the plurality of major minima is associated with a different region in a plurality of regions; flooding the residual map at the plurality of major minima; identifying boundaries for the plurality of regions, wherein the boundaries are at the locations where the flooding in adjacent regions first contact one another as the residual map is flooded; and dividing the residual map into a plurality of segments based on the identified boundaries. at least one sensor configured to acquire at least one frame of range data from an environment containing the at least one sensor, wherein the at least one frame of range data provides a three-dimensional description of a portion of the environment; a processing unit configured to receive the at least one frame of range data from the at least one sensor, wherein the processing unit is configured to segment the at least one frame of range data by: computing a residual map that is based on the distance between data points in the at least one frame of range data and at least one polynomial surface fitted to at least one surface represented by the data points in the at least one frame of range data, wherein the residual map represents a residual value, for each position of the at least one frame of range data, wherein the residual value is the sum of orthogonal distances between the at least one fitted polynomial surface and the data points within a specified local neighborhood; smoothing the residual map to remove minor extrema from the residual map and retain major extrema in the residual map; identifying a plurality of major minima in the residual map, wherein each major minimum in the plurality of major minima is associated with a different region in a plurality of regions; flooding the residual map at the plurality of major minima; identifying boundaries for the plurality of regions, wherein the boundaries are at the locations where the flooding in adjacent regions first contact one another as the residual map is flooded; and dividing the residual map into a plurality of segments based on the identified boundaries. computing a residual map that is based on the distance between data points in the at least one frame of range data and at least one polynomial surface fitted to at least one surface represented by the data points in the at least one frame of range data, wherein the residual map represents a residual value, for each position of the at least one frame of range data, wherein the residual value is the sum of orthogonal distances between the at least one fitted polynomial surface and the data points within a specified local neighborhood; smoothing the residual map to remove minor extrema from the residual map and retain major extrema in the residual map; identifying a plurality of major minima in the residual map, wherein each major minimum in the plurality of major minima is associated with a different region in a plurality of regions; flooding the residual map at the plurality of major minima; identifying boundaries for the plurality of regions, wherein the boundaries are at the locations where the flooding in adjacent regions first contact one another as the residual map is flooded; and dividing the residual map into a plurality of segments based on the identified boundaries.