*3.7. Dijkstra Algorithm*

In theory, the algorithm is used to solve the problem of the shortest path, i.e., the problem of finding the shortest connection between given vertices in a weighted graph. The operation of the algorithm is based on the fact that when analyzing a given graph with a distinguished vertex there are distances from the source to all other vertices. In a very simple way, the algorithm can be modified to look only for the shortest path to one fixed vertex, interrupting the action when reaching the target vertex or transposing the graph's incident table. The feature of the Dijkstra algorithm is that it finds all the shortest paths between the selected vertex and all the others, while calculating the cost of passing each of these paths [82]. Using the Dijkstra algorithm is a very effective method to predict the occurrence of cracks in a given area, when there are cracks discontinuities due to a contamination of the digital image or local crack bridging is present.

Amhaz et al. [83] proposed an original method of automatic crack detection on digital pavement images, which main assumption is the location of minimal paths within each image. The developed minimal path selection algorithm consists of three main parts, i.e., endpoint selection, minimal path estimation using the Dijkstra algorithm and minimal path selection. The algorithm is supplemented by two post-processing steps, i.e., elimination of artifacts, and crack width detection. The developed algorithm was validated on real cracked pavement images and compared with five other crack extraction methods. The proposed algorithm automatically provided very robust and accurate results in a wide spectrum of situations, which is undoubtedly its advantage. Gunkel et al. [84] developed a procedure for automatic micro-crack detection that uses a shortest path algorithm. The method is very effective for the identification of microcracks that occur in a plastic deformation environment, where separation between cracks and plastic deformations is difficult. In the first stage of the method, cracks are detected as combined cluster systems, consisting of pixels with a gradient value below a certain threshold value. Then, the crack paths are identified with the Dijkstra algorithm as the longest shortest paths through the darkest areas of the cluster system. The developed method was applied to more than 2000 digital images of cracked surfaces. However, the procedure has some limitations because it assumes that the crack is only one path. The method is not suitable for identifying tree-like cracks.

Many researchers note [83–86] that using the Dijkstra algorithm to solve the problem of cracks detection on the surface of cement composites requires a very large amount of computational effort, which only highly specialized machines can cope with. It is necessary to further search and modify the algorithms that deal with the issue of the minimal path selection.
