. ▁ ▁Connect ivity ▁checks ▁are ▁carried ▁out ▁by ▁checking ▁neighbor ▁pixels ' ▁labels ▁( ne igh bor ▁elements ▁whose ▁labels ▁are ▁not ▁assigned ▁yet ▁are ▁ignored ), ▁or ▁say , ▁the ▁North - E ast , ▁the ▁North , ▁the ▁North - West ▁and ▁the ▁West ▁of ▁the ▁current ▁pixel ▁( ass uming ▁ 8 - connect ivity ). ▁ 4 - connect ivity ▁uses ▁only ▁North ▁and ▁West ▁neighb ors ▁of ▁the ▁current ▁pixel . ▁The ▁following ▁conditions ▁are ▁checked ▁to ▁determine ▁the ▁value ▁of ▁the ▁label ▁to ▁be ▁assigned ▁to ▁the ▁current ▁pixel ▁( 4 - connect ivity ▁is ▁assumed ) ▁ ▁Cond itions ▁to ▁check : ▁ ▁Does ▁the ▁pixel ▁to ▁the ▁left ▁( West ) ▁have ▁the ▁same ▁value ▁as ▁the ▁current ▁pixel ? ▁Yes ▁– ▁We ▁are ▁in ▁the ▁same ▁region . ▁Ass ign ▁the ▁same ▁label ▁to ▁the ▁current ▁pixel ▁No ▁– ▁Check ▁next ▁condition ▁Do ▁both ▁pixels ▁to ▁the ▁North ▁and ▁West ▁of ▁the ▁current ▁pixel ▁have ▁the ▁same ▁value ▁as ▁the ▁current ▁pixel ▁but ▁not ▁the ▁same ▁label ? ▁Yes ▁– ▁We ▁know ▁that ▁the ▁North ▁and ▁West ▁pixels ▁belong ▁to ▁the ▁same ▁region ▁and ▁must ▁be ▁merged . ▁Ass ign ▁the ▁current ▁pixel ▁the ▁minimum ▁of ▁the ▁North ▁and ▁West ▁labels , ▁and ▁record ▁their ▁equivalence ▁relationship ▁No ▁– ▁Check ▁next ▁condition ▁Does ▁the ▁pixel ▁to ▁the ▁left ▁( West ) ▁have ▁a ▁different ▁value ▁and ▁the ▁one ▁to ▁the ▁North ▁the ▁same ▁value ▁as ▁the ▁current ▁pixel ? ▁Yes ▁– ▁Ass ign