With the increase in the number of oil and gas pipelines laid in China, more attention needs to be paid to pipeline maintenance work. At present, the main methods of detecting natural gas leaks in oil and gas transmission stations include manual inspections, opposing natural gas detection equipment, and cloud desktop natural gas detection equipment. Hand held natural gas detection equipment is used for manual inspection, which requires regular manual inspection. However, the response speed is poor and gas leaks cannot be detected in a timely manner. The opposed laser gas detection method can only detect the presence of gas on the beam path. If a larger area of leakage detection is desired, more equipment needs to be installed, resulting in a greatly increase in hardware costs. The existing cloud desktop laser gas detection method controls the deflection of the laser beam through the cloud platform to achieve leak detection at various points in the area to be tested. However, the rotation speed of the cloud platform is slow, and a complete detection cycle takes dozens of minutes, and only the presence of gas can be detected. For accurate leak location, manual on-site survey is also required to further determine the leak location. In order to meet the needs of the real-time monitoring and rapid positioning of oil and gas pipeline leaks, in this work, a fast and accurately controlled dual wedge scanning mirror system is designed, which combines tunable semiconductor laser absorption spectroscopy technology to convert the gas measurement laser beam from point measurement to surface measurement, thereby obtaining the two-dimensional distribution of gas, which is conducive to subsequent analysis and positioning of gas leakage sources. By using the inverse solution iterative optimization algorithm, the angle of the wedge mirror is controlled to obtain an efficient and uniform beam scanning trajectory. The deflection direction and detection position of the laser beam are fused with the corresponding methane concentration information, and a methane concentration data containing position information is constructed. In order to quantitatively verify the measurement accuracy and spatial resolution in the experiment, a standard air bag is used to simulate the methane leakage distribution. The results show that the minimum detection limit of the system can be lower than 5×10<sup>–4</sup> m, and the spatial resolution can be less than 6 cm. At the same time, this method can adjust the scanning step node based on the measurement distance of the oil from gas station, thereby achieving adjustable imaging resolution. This imaging method provides a new idea for accurately positioning and detecting the methane leakage location and amount.