Skip to main content

Table 1 OR-decision table for labeling

From: Efficient scan mask techniques for connected components labeling algorithm

Mask

Condition

Action

 

x

p

q

r

s

No action

New label

Assign

Merge

        

x = p

x = q

x = r

x = s

x = p + r

x = r + s

 

0

-

-

-

-

1

       

1

1

0

0

0

0

 

1

      

3

1

1

0

0

0

  

1

     

5

1

0

1

0

0

   

1

    

9

1

0

0

1

0

    

1

   

2

1

0

0

0

1

     

1

  

7

1

1

1

0

0

  

1

1

    

11

1

1

0

1

0

      

1

 

4

1

1

0

0

1

  

1

  

1

  

13

1

0

1

1

0

   

1

1

   

6

1

0

1

0

1

   

1

 

1

  

10

1

0

0

1

1

       

1

15

1

1

1

1

0

  

1

1

1

   

8

1

1

1

0

1

  

1

1

 

1

  

12

1

1

0

1

1

      

1

1

14

1

0

1

1

1

   

1

1

1

  

16

1

1

1

1

1

  

1

1

1

1

  
  1. Bold 1's are selected