Precise detection of a nanometer-scale pattern's edge positions in an SEM image is challenging for next generation patterning technology development. Here, two different edge detection methods are proposed: one is based on a normal method employing the edge threshold algorithm and the other is based on a cross-correlation method by calculating the real image with a reference. Line/space and circle pattern types are both studied and compared with the two methods. By using different SEM images without noise and with noise, the pros and cons of the abovementioned two methods are summarized. With the implementation of the power spectral density method, the comparison shows that the cross-correlation method suppresses the metrology uncertainty of edge positions and edge roughness. Besides, the cross-correlation method also calculates all potential edge defects, especially the footing defects and the top loss defects. The method has high application potential in the 3D reconstruction process by using different reference waves; in addition to this, it enables novel focus-energy-matrix (FEM) metrology such as the roughness FEM and defect FEM.