This article presents a new algorithm for spatial deinterlacing that could easily be integrated in a more complete deinterlacing system. The spatial interpolation process often fails to reconstruct edges that are diagonal or close to horizontal, leading to highly visible artifacts. Our solution aims at preserving the linear structure continuity. It connects pieces of horizontal edges coming from neighboring lines to build graphs which are then simplified in branches that represent the linear structure of the scene. These branches give the exact direction in which the interpolation has to be done. For the rest of the image, a traditional directional spatial interpolation gives satisfactory results already. Although the number of pixels interpolated with this method is relatively small, the overall image quality is subjectively well improved.