In comparison to tactile sensors, optical techniques can provide a fast, non-destructive profile/areal surface measurement solution. Nonetheless, high measurement noise, unmeasured points and outliers, are often observed in optical measurement, particularly for structured surfaces. To alleviate their detrimental impacts on the characterization of surface topography as well as the examination of micro/nanoscale geometries, a post-processing filtering technique, i.e. the clustering filter, which is essentially an iterative process to find the aggregation center of a cluster of points, is implemented. The clustering filter is particularly useful for noises and outlier suppression for optical measurement of structured surfaces due to its edge-preserving capability. Five surface samples with structured features are measured by an in-house developed dispersive interferometer and a commercial white light interferometer, thereafter the measured surface data is filtered by the clustering filter. Both noise and outliers are suppressed, which not only facilitates the visualization and characterization of surface topography, but also enables the accurate evaluation of local functional geometries.