I. Introduction
Digital lines (DLs) are the discrete representation of straight lines or curves in a discrete coordinate system, play an important role in image processing and pattern recognition. One of the most important properties of DLs is the connectivity. We call a DL connected if successive components of the DL are neighboring pixels (i.e., 4/8-neighbor connectivity). DLs describe patterns of objects in the images but usually appear as disconnected segments in the discrete planes. For example, DLs resulting from edge detection methods are often discontinuous due to the presence of noise or low variation in the distribution of the grey levels. Disconnected DLs (DDLs) also appear as outputs of parametric active contours due to the nature of these methods. Connectivity of the DLs is crucial for a wide range of applications in image processing such as image segmentation, edge linking [1], [2], [3], [4], [5], [6], [7], [8], [9] and DLs intersection detection [10], [11]. Also, the conventional approach to generate a binary mask, which has many applications in image segmentation and pattern recognition, uses the imfill function of MATLAB and requires connected DLs as an input. Moreover, in most applications, generation and usage of the connected DLs are a part of computationally expensive workflows, while disconnected lines can terminate the running workflows [12]. So far, to the best of the author’s knowledge, not much attention has been paid to this problem. Typical approaches that are currently used to compute DDLs include morphological operations as well as 1D and 2D interpolations. In the following subsection, we discuss these approaches and their drawbacks.