What exactly is a connected componnent in an image? The following is a paragraph from &quot;Digital image processing, 4th edition, Gonzalez and Woods&quot;.

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.
For any pixel p in S, the set of pixels that are connected to it in S is called a connected
component of S. If it only has one component, and that component is connected,
then S is called a connected set.

I do not understand the last sentence: How can S have one component and that component is not connected??
Another question: In a binary image, can S be a connected component and have both 0 and 1 pixels?
By the way, the concept of component is not define precisely in the book.
Update:
In the book, a region is defined as a connected set. The following figure is an example of two adjacent regions (So, $R_i$ and $R_j$ are both connected sets.)

Thanks.
Let S represent a subset of pixels in an image.

This is typically a set of pixels with the same value, for example a group of pixels with the value 1, surrounded by pixels with a value 0.

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.

A path is a set of steps that take you from pixel p to pixel q, and where each step is a jump from a pixel to a neighboring pixel. Thus, two pixels are connected if you can travel from neighbor to neighbor starting at p until you reach q.

If it only has one component, and that component is connected, then S is called a connected set.

If all pixels in the set S are connected to all other pixels through a path, then S is a connected component.
Thus a connected component is the very intuitive concept of a continuous region of equal-valued pixels.