• + 0 comments

    8 connectivity refers to a pixel(A), that is connected to another pixel(B), from one of the eight directions, i.e., B must be either of DOWN/LEFT/RIGHT/EITHER OF ADJACENT DIAGONAL pixel to A.

    8-connected objects means a group of pixels that are 8 connected.

    010001
    100110
    000110
    

    Here

    01
    10      
    

    is one 8-connected object and

    001
    110
    110  
    

    is the other 8-connected object

    Hope this clears the concept!

    Edit:

    Adjacent Diagonal pixels to pixel (x,y):
    
    (x-1, y-1)
    (x+1, y-1)
    (x-1, y+1)
    (x+1, y+1)