So, my professor says that two pixels are connected if:
- they are neighbours; and
- their intensities satisfy a specified criterion of similarity.
And depending on the type of neighbours they are, they can be 4-, 8- or m-connected.
But the book I'm following, by Gonzalez and Woods, says the following about connectivity:
Let S represent a subset of pixels in an image. Two pixels p and q are said to be connected in S if there exists a path between them consisting entirely of pixels in S.
Now, if I understand what a "path" is, then according to the book, two pixels can be connected even if they're not neighbours and are still connected by a path. This directly contradicts the first condition in my professor's definition.
Is one of them wrong? What am I missing?