This paper introduces an autonomous robot designed for in-pipe structural health monitoring of oil/gas pipelines. This system employs a 3D Optical Laser Scanning Technical Vision System (TVS) to continuously scan the internal surface of the pipeline. This paper elaborates on the mathematical methodology of 3D laser surface scanning based on dynamic triangulation. This paper presents the mathematical framework governing the combined kinematics of the Mobile Robot (MR) and TVS. It discusses the custom design of the MR, adjusting it to use of robustized mathematics, and incorporating a laser scanner produced using a 3D printer. Both experimental and theoretical approaches are utilized to illustrate the formation of point clouds during surface scanning. This paper details the application of the simple and robust mathematical algorithm RANSAC for the preliminary processing of the measured point clouds. Furthermore, it contributes two distinct and simplified criteria for detecting defects in pipelines, specifically tailored for computer processing. In conclusion, this paper assesses the effectiveness of the proposed mathematical and physical method through experimental tests conducted under varying light conditions.