Publicly available ionograms are often in the form of pictures. This paper proposes a novel algorithm for extracting and repairing the F layer traces from pictorial ionograms. Extensive efforts have been invested in ionogram autoscaling and critical parameter identification to improve the efficiency of scaling algorithms. To obtain the parameters of the F layer automatically, it is necessary to accurately extract the F layer trace. However, research on F layer trace extraction with repair is relatively limited. The method employed in this study makes full use of the characteristics of different types of echoes on the ionograms, and the procedure includes noise preprocessing, coupling noise processing, and trace repair. To enhance the applicability of the repair, two different automatic filling algorithms are adopted to repair the F layer trace. The aim of this paper is to present an adaptive algorithm to automatically extract and repair F layer traces from different pictorial ionograms. The results of Hainan Fuke ionograms illustrate the reliability of the F layer trace extraction and trace repair.