find_cracks

find_cracks(skel_im, min_size)[source]

Find the cracks in a skeletonized image.

This function finds the start and end of the cracks in a skeletonized image. All cracks must be aligned approximately vertical.

Parameters
skel_im: np.ndarray

Bool-Image where False is background and True is the 1 pixel wide representation of the crack.

min_size: int

Minimal minimal crack length in pixels that is detected.

Returns
cracks: np.ndarray

Array with the coordinates of the crack with the following structure: ([[x0, y0],[x1,y1], […]]) where x0 and y0 are the starting coordinates and x1, y1 the end of one crack. Each crack is represented by a 2x2 array stacked into a bigger array (x,2,2).