0
$\begingroup$

How many 4-connected and 8-connected components are present in the binary image below?

enter image description here

Using definition of connectivities from the same textbook

"A connected component is a group of pixels that are connected in the sense that there is a connected path between any two pixels in the component. 4-connected means that the path comprises only horizontal or vertical neighbours (i.e. NSEW directions). In 8- connected regions the path may include diagonal neighbours as well (i.e. NW, SW, NE, SE directions)."

I get four 4-connected groups and three 8-connected groups.

enter image description here

The answer though is four 4-connected regions and one 8-connected region and it comes with the following diagram.

enter image description here

I realise I might be double counting some of the clusters, but I don't see how does the author get his/her answer from the above picture. Looking at it I get two 4-connected groups and one 8-connected groups. Unless the correct groups are grouped like this.

enter image description here

$\endgroup$
1
$\begingroup$

N-connectedness means that from any pixel to any other within the component, there should exist a path composed of N-connected steps. In other words, as long as two groups have one connected neighbor, they should be merged into a single group. It does not mean a 2 or 3 pixel group, but rather a component which consists of linked pixels.

See the connectedness garph theory.

With such definition, it is obvious that the author is right.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.