We have mathematically explicated and experimentally demonstrated how a correlation and convolution filter can dramatically suppress the noise that coexists with the scanned topographic signals of two-dimensional (2D) gratings and lattices with 2D perspectives. To realize pitch evaluation, the true peaks' coordinates have been precisely acquired after detecting the local maxima from the filtered signal, followed by image processing. The combination of 2D filtering, local-maxima detecting, and image processing make up the pitch detection (PD) method. It is elucidated that the pitch average, uniformity, rotation angle, and orthogonal angle can be calculated using the PD method. This has been applied to the pitch evaluation of several 2D gratings and lattices, and the results are compared with the results of using the center-of-gravity (CG) and Fourier-transform-based (FT) method. The differences of pitch averages which are produced using the PD, CG, and FT methods are within 1.5 pixels. Moreover, the PD method has also been applied to detect the dense peaks of Si (111) 7 x 7 surface and the highly oriented pyrolytic graphite (HOPG) basal plane.