Conventional cameras often produce external pipeline surface images with significant perspective-projection distortions, making determining the type and size of defects on the pipeline surface difficult. To address this issue, we present a novel approach for correcting the geometric distortion of a constant diameter pipeline (CDP) external surface image based on apparent contour pairs (ACPs). First, the camera is calibrated and the real projection position of ACPs accurately extracted. Second, a single-view perspective projection model of the CDP is adopted to realize a three-dimensional reconstruction of the pipeline. Subsequently, the flattened image of the CDP's outer surface is obtained by performing equidistant sampling of cross sections, determining the visibility of discrete points, and mapping projection points onto a flat surface. Simulations and real experiments demonstrated the high accurate method in the correction of CDP images. Experiments conducted under different outdoor scenarios confirmed the robustness of the proposed method.