| Input: |
| β(i)β : a sequence of points |
| Data: |
| β (i)β : the set of all the detected points |
| β (ii) : the last point in the sequence |
| β (iii) : a set of sequences composed by points |
| β (iv) : the height of a vertebra |
| β (v) : the size of an intervertebral space |
| begin |
| ββ if ββthen |
| βββAdd to ; |
| βββAdd to ; |
| βββreturn; |
| ββelse |
| βββif ββis an upper corner then |
| βββββ foreach ββin ββdo |
| ββββββif ββthen |
| βββββββRemove from ; |
| βββββββ; |
| βββββββ; |
| βββelse |
| βββββforeach ββin ββdo |
| βββββββif ββthen |
| ββββββββRemove from ; |
| ββββββββ; |
| ββββββββ; |