One of the fundamental characterizations in assessing a material’s surface its surface roughness. Here, we introduce a computational method using measured atomic force microscopy surface roughness data to perform Sobel edge detection of heterogeneity on corroded steel samples. This method enables the spatial mapping of corrosion-induced features and general inconsistencies on a sample’s surface using a freely available algorithm written in the Python computing language. The non-optical method has been tested on three different grades of steel, and results indicate reasonable accuracy when compared to visual observations made from grayscale optical data.