A computer-implemented method for identifying a gap between objects in a binarized image, the method comprising: detecting contours of the objects in the binarized image; locating at least one path between the objects in the binarized image; and outputting a result indicative of one or more detected paths; characterized by: analysing one or more subdivisions (Z') of the binarized image, the subdivisions (Z') having a width and a height of at least one pixel, a minimum number of the subdivisions (Z') being zero such that the binarized image is analysed in its entirety; determining representative attenuations of respective one or more rows and columns of the subdivisions (Z'); identifying first pixels (j), being pixels in a column that has a representative attenuation of 0, and second pixels (k), being pixels in a row that has a representative attenuation of 0; determining whether there exists a path between two boundaries of the one or more subdivisions (Z'), by identifying at least one of said first and second pixels (j, k) on one of the two boundaries and identifying at least one of said first and second pixels (j, k) on another of the two boundaries; and detecting one or more paths between the two boundaries as vertical and/or horizontal lines from the at least one of said first and second pixels (j, k) on the one of the two the boundaries to the at least one of said first and second pixels (j, k) on the other of the two boundaries; wherein the vertical and/or horizontal lines identify the gap. detecting contours of the objects in the binarized image; locating at least one path between the objects in the binarized image; and outputting a result indicative of one or more detected paths; characterized by: analysing one or more subdivisions (Z') of the binarized image, the subdivisions (Z') having a width and a height of at least one pixel, a minimum number of the subdivisions (Z') being zero such that the binarized image is analysed in its entirety; determining representative attenuations of respective one or more rows and columns of the subdivisions (Z'); identifying first pixels (j), being pixels in a column that has a representative attenuation of 0, and second pixels (k), being pixels in a row that has a representative attenuation of 0; determining whether there exists a path between two boundaries of the one or more subdivisions (Z'), by identifying at least one of said first and second pixels (j, k) on one of the two boundaries and identifying at least one of said first and second pixels (j, k) on another of the two boundaries; and detecting one or more paths between the two boundaries as vertical and/or horizontal lines from the at least one of said first and second pixels (j, k) on the one of the two the boundaries to the at least one of said first and second pixels (j, k) on the other of the two boundaries; wherein the vertical and/or horizontal lines identify the gap. analysing one or more subdivisions (Z') of the binarized image, the subdivisions (Z') having a width and a height of at least one pixel, a minimum number of the subdivisions (Z') being zero such that the binarized image is analysed in its entirety; determining representative attenuations of respective one or more rows and columns of the subdivisions (Z'); identifying first pixels (j), being pixels in a column that has a representative attenuation of 0, and second pixels (k), being pixels in a row that has a representative attenuation of 0; determining whether there exists a path between two boundaries of the one or more subdivisions (Z'), by identifying at least one of said first and second pixels (j, k) on one of the two boundaries and identifying at least one of said first and second pixels (j, k) on another of the two boundaries; and detecting one or more paths between the two boundaries as vertical and/or horizontal lines from the at least one of said first and second pixels (j, k) on the one of the two the boundaries to the at least one of said first and second pixels (j, k) on the other of the two boundaries; wherein the vertical and/or horizontal lines identify the gap.