**Template Matching Approaches Applied to Vertebra Detection**

Mohammed Benjelloun, Saïd Mahmoudi and Mohamed Amine Larhmam

Additional information is available at the end of the chapter

http://dx.doi.org/10.5772/50476

## **1. Introduction**

In the medical world, the problems of back and spine are usually inseparable. They can take various forms ranging from the low back pain to scoliosis and osteoporosis. Medical Imag‐ ing provides very useful information about the patient's condition, and the adopted treat‐ ment depends on the symptoms described and the interpretation of this information. This information is generally analyzed visually and subjectively by a human expert. In this diffi‐ cult task, medical images processing presents an effective aid able to help medical staff. This is nowhere clearer than in diagnostics and therapy in the medical world.

We are particularly interested to detect and extract vertebra locations from X-ray images. Some works related to this field can be found in the literature. Actually, these contributions are mainly interested in only 2 medical imagery modalities: Computed Tomography (CT) and Magnetic Resonance (MR). A few works are dedicated to the conventional X-Ray radi‐ ography. However, this modality is the cheapest and fastest one to obtain spine images. In addition, from the point of view of the patient, this procedure has the advantage to be more safe and non-invasive. For these reasons, this review is widely used and remains essential treatments and/or urgent diagnosis. Despite these valuable benefits, the interpretation of im‐ ages of this type remains a difficult task now. Their nature is the main cause. Indeed, in practice, these images are characterized by a low contrast and it is not uncommon that some parts of the image are partially hidden by other organs of the human body. As a result, the vertebra edge is not always obvious to see or detect.

In the context of cervical spinal column analysis, the vertebra edges detection task is very useful for further processing, like angular measures (between two consecutive vertebrae or

© 2012 Benjelloun et al.; licensee InTech. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. © 2012 Benjelloun et al.; licensee InTech. This is a paper distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

in the same vertebra in several images), vertebral mobility analysis and motion estimation. However, automatically detecting vertebral bodies in X-Ray images is a very complex task, especially because of the noise and the low contrast resulting in that kind of medical image‐ ry modality. The goal of this work is to provide some computer vision tools that enable to measure vertebra movement and to determine the mobility of each vertebra compared to others in the same image.

mentation approaches. The first one were based a regions selection process allowing the de‐ tection of vertebra orientations and inter-vertebral angles and the second based of the active shape model theory. These methods present semi-automatic computer based techniques.

In this section, we propose a first pre-processing step which allows the creation of a polygo‐ nal region for each vertebra. This pre-treatment is achieved by a template matching ap‐ proach based on a mathematical representation of the inter-vertebral area. Indeed, each region represents a specific geometrical model based on the geometry and the orientation of the vertebra. We suggest a supervised process where the user has to click once at the center

construction of vertebra regions [11]. After this, we compute the distance between every two contiguous points (*Di*,*<sup>i</sup>*+1) and the line L1, which connects these contiguous points, by a first

The function L1 will be used as reference for a template displacement, Figure 1, by the func‐ tion T(x,y) defined in equation (2). This template function represents an inter-vertebral mod‐

With k = 0.1 an empirical value and xi the coordinate of the point (x, y) in the new reference plane in each vertebra center. We use the L1 function and the inter-vertebral distances, to compute the inter-vertebral angles (αiv) and to determine a division line for each inter-ver‐ tebral area. The goal of this proposed template matching process is to find the positions on the image which are best correlated with the template function. So, for each vertebra, the template function *T* (*x*, *y*) is first placed on the geometrical inter-vertebral central point *P*(*xic*, *yic*), which represents the average position between each two contiguous click points:

)*withr* <sup>=</sup> *<sup>k</sup>*

) and*P*(*xi*+1, *yi*+1). The new reference plane -on each vertebra- is created with the

, *yi*

)and *P*(*xi*+1, *yi*+1), along the

point *P*(*xic*, *yic*) as center. The X axis of this plane is the line L1. The Y axis is therefore easily created by tracing the line passing through *P*(*xic*, *yic*)and orthogonal to L1. We notice that the orientation angle of this second axis present the initial value of the orientation angle αiv.

To determine the points representing border areas, we displace the template function

line L1. For more details on this approach, the reader can consult this [8]. The results ob‐

*Di*,*i*+1

, *yi*


el, which is calculated according to the shapes of the areas between vertebrae.

, *yi*

http://dx.doi.org/10.5772/50476

), *P*(*xi*+1, *yi*+1) (1)

Template Matching Approaches Applied to Vertebra Detection

) for the

5

(2)

of each vertebra to be analyzed. These clicks represent the starting points *P*(*xi*

*L* <sup>1</sup> = *f a*, *b*; *P*(*xi*

*T* (*x*, *y*)=(1 - *e*

*T* (*x*, *y*) equation (2), between every two reference points *P*(*xi*

tained by the process of vertebral regions selection are shown in Fig 2.

**2.1. Region selection**

order polynomial, equation (1).

*P*(*xi* , *yi*

The main idea of the proposed work in this chapter is to locate vertebra positions in radio‐ graphs. This operation is an essential preliminary pre-processing step used to achieve full automatic vertebra segmentation. The goal of the segmentation process is to exploit only the useful information for image interpretation. The reader is lead to discover [1] for an over‐ view of the current segmentation methods applied to medical imagery. The vertebra seg‐ mentation has already been treated in various ways. The level set method is a numerical technique used for the evolution of curves and surfaces in a discrete domain [2]. The advant‐ age is that the edge has not to be parameterized and the topology changes are automatically taken into account. Some works related to the vertebrae are presented in [3]. The active con‐ tour algorithm deforms and moves a contour submitted to internal and external energies [4]. A special case, the Discrete Dynamic Contour Model [5] has been applied to the vertebra segmentation in [6]. A survey on deformable models is done in [7]. Other methods exist and without being exhaustive, let's just mention the parametric methods [15], or the use boun‐ dary based segmentation [16] and also Watershed based segmentation approaches [17].

The difficulties resulting from the use of X-ray images force the segmentation methods to be as robust as possible. In this chapter, we propose, in the first part, some methods that we have already used for extracting vertebrae and the results obtained. The second part will fo‐ cus on a new method, using the Hough transform to detect vertebrae locations. Indeed, the proposed method is based on the application of the Generalized Hough Transform in order to detect vertebra positions and orientations. For this task, we propose first, to use a detec‐ tion method based on the Generalized Hough Transform and in addition, we propose a cost function in order to eliminate the false positives shapes detected. This function is based on vertebra positions and orientations on the image.

This chapter is organized as follow: In section 02 we present some of our previous works composed of two category of method. The firsts are based on a preliminary region selection process followed by a second segmentation step. We have proposed three segmentation ap‐ proach based on corner detection, polar signature and vertebral faces detection. The second category of methods proposed in this chapter is based on the active shape model theory. In section 03 we describe a new automatic vertebrae detection approach based on the General‐ ized Hough transform. In section 04 we conclude this chapter.

## **2. Previous work**

In this part, we provide an overview of the segmentation approach methods that we have already applied to vertebrae detection and segmentation. We proposed two kinds of seg‐ mentation approaches. The first one were based a regions selection process allowing the de‐ tection of vertebra orientations and inter-vertebral angles and the second based of the active shape model theory. These methods present semi-automatic computer based techniques.

## **2.1. Region selection**

in the same vertebra in several images), vertebral mobility analysis and motion estimation. However, automatically detecting vertebral bodies in X-Ray images is a very complex task, especially because of the noise and the low contrast resulting in that kind of medical image‐ ry modality. The goal of this work is to provide some computer vision tools that enable to measure vertebra movement and to determine the mobility of each vertebra compared to

The main idea of the proposed work in this chapter is to locate vertebra positions in radio‐ graphs. This operation is an essential preliminary pre-processing step used to achieve full automatic vertebra segmentation. The goal of the segmentation process is to exploit only the useful information for image interpretation. The reader is lead to discover [1] for an over‐ view of the current segmentation methods applied to medical imagery. The vertebra seg‐ mentation has already been treated in various ways. The level set method is a numerical technique used for the evolution of curves and surfaces in a discrete domain [2]. The advant‐ age is that the edge has not to be parameterized and the topology changes are automatically taken into account. Some works related to the vertebrae are presented in [3]. The active con‐ tour algorithm deforms and moves a contour submitted to internal and external energies [4]. A special case, the Discrete Dynamic Contour Model [5] has been applied to the vertebra segmentation in [6]. A survey on deformable models is done in [7]. Other methods exist and without being exhaustive, let's just mention the parametric methods [15], or the use boun‐ dary based segmentation [16] and also Watershed based segmentation approaches [17].

The difficulties resulting from the use of X-ray images force the segmentation methods to be as robust as possible. In this chapter, we propose, in the first part, some methods that we have already used for extracting vertebrae and the results obtained. The second part will fo‐ cus on a new method, using the Hough transform to detect vertebrae locations. Indeed, the proposed method is based on the application of the Generalized Hough Transform in order to detect vertebra positions and orientations. For this task, we propose first, to use a detec‐ tion method based on the Generalized Hough Transform and in addition, we propose a cost function in order to eliminate the false positives shapes detected. This function is based on

This chapter is organized as follow: In section 02 we present some of our previous works composed of two category of method. The firsts are based on a preliminary region selection process followed by a second segmentation step. We have proposed three segmentation ap‐ proach based on corner detection, polar signature and vertebral faces detection. The second category of methods proposed in this chapter is based on the active shape model theory. In section 03 we describe a new automatic vertebrae detection approach based on the General‐

In this part, we provide an overview of the segmentation approach methods that we have already applied to vertebrae detection and segmentation. We proposed two kinds of seg‐

others in the same image.

4 Advances in Image Segmentation

vertebra positions and orientations on the image.

**2. Previous work**

ized Hough transform. In section 04 we conclude this chapter.

In this section, we propose a first pre-processing step which allows the creation of a polygo‐ nal region for each vertebra. This pre-treatment is achieved by a template matching ap‐ proach based on a mathematical representation of the inter-vertebral area. Indeed, each region represents a specific geometrical model based on the geometry and the orientation of the vertebra. We suggest a supervised process where the user has to click once at the center of each vertebra to be analyzed. These clicks represent the starting points *P*(*xi* , *yi* ) for the construction of vertebra regions [11]. After this, we compute the distance between every two contiguous points (*Di*,*<sup>i</sup>*+1) and the line L1, which connects these contiguous points, by a first order polynomial, equation (1).

$$L\_{-1} = f\left[a, \ b; P(\mathbf{x}\_{i'} \mid y\_i)\_{\prime}, P(\mathbf{x}\_{i+1'} \mid y\_{i+1})\right] \tag{1}$$

The function L1 will be used as reference for a template displacement, Figure 1, by the func‐ tion T(x,y) defined in equation (2). This template function represents an inter-vertebral mod‐ el, which is calculated according to the shapes of the areas between vertebrae.

$$T\begin{pmatrix} \mathbf{x}\_{\prime} & \mathbf{y} \end{pmatrix} = \begin{pmatrix} 1 \ -e^{-r \cdot \mathbf{x}\_{i}^{2}} \end{pmatrix} \\
\text{with} \\ r = \frac{k}{\sum\_{i,j=1}} \tag{2}$$

With k = 0.1 an empirical value and xi the coordinate of the point (x, y) in the new reference plane in each vertebra center. We use the L1 function and the inter-vertebral distances, to compute the inter-vertebral angles (αiv) and to determine a division line for each inter-ver‐ tebral area. The goal of this proposed template matching process is to find the positions on the image which are best correlated with the template function. So, for each vertebra, the template function *T* (*x*, *y*) is first placed on the geometrical inter-vertebral central point *P*(*xic*, *yic*), which represents the average position between each two contiguous click points: *P*(*xi* , *yi* ) and*P*(*xi*+1, *yi*+1). The new reference plane -on each vertebra- is created with the point *P*(*xic*, *yic*) as center. The X axis of this plane is the line L1. The Y axis is therefore easily created by tracing the line passing through *P*(*xic*, *yic*)and orthogonal to L1. We notice that the orientation angle of this second axis present the initial value of the orientation angle αiv.

To determine the points representing border areas, we displace the template function *T* (*x*, *y*) equation (2), between every two reference points *P*(*xi* , *yi* )and *P*(*xi*+1, *yi*+1), along the line L1. For more details on this approach, the reader can consult this [8]. The results ob‐ tained by the process of vertebral regions selection are shown in Fig 2.

*2.1.1. Harris corner detector*

corner detector.

After the creation of a polygonal area for each vertebra, we can apply locally a few ap‐

Template Matching Approaches Applied to Vertebra Detection

http://dx.doi.org/10.5772/50476

7

**Figure 3.** The different steps of the detection process using the region selection method combined to the Harris

**Figure 4.** Results obtained by using the region selection method combined to the Harris corner detector.

Figure 3 and figure 4 show the results obtained by using the region selection method combined to the Harris corner detector [8] applied to X-ray image of the cervical spinal column. We no‐ tice that the process of region selection, Figure 3, gives very good results and permit to isolate each vertebra separately in a polygonal area. On the other hand, the extraction of the anterior face of the vertebra using the interest point detection process is given with high precision.

proaches to segmentation as shown in the following examples.

**Figure 1.** The template function T displacement.

**Figure 2.** Results obtained by the process of vertebral regions selection. (a) Original image reference with the click points, (b) inter-vertebral points given by the template matching process, (c) boundary lines between vertebrae, (d) vertebrae regions.

## *2.1.1. Harris corner detector*

After the creation of a polygonal area for each vertebra, we can apply locally a few ap‐ proaches to segmentation as shown in the following examples.

**Figure 1.** The template function T displacement.

6 Advances in Image Segmentation

vertebrae regions.

**Figure 2.** Results obtained by the process of vertebral regions selection. (a) Original image reference with the click points, (b) inter-vertebral points given by the template matching process, (c) boundary lines between vertebrae, (d)

**Figure 3.** The different steps of the detection process using the region selection method combined to the Harris corner detector.

**Figure 4.** Results obtained by using the region selection method combined to the Harris corner detector.

Figure 3 and figure 4 show the results obtained by using the region selection method combined to the Harris corner detector [8] applied to X-ray image of the cervical spinal column. We no‐ tice that the process of region selection, Figure 3, gives very good results and permit to isolate each vertebra separately in a polygonal area. On the other hand, the extraction of the anterior face of the vertebra using the interest point detection process is given with high precision.

## *2.1.2. Polar signature*

A second segmentation approach that we proposed to apply after the region selection proc‐ ess is based on a polar signature [8] representation associated to the polygonal region for each vertebra described on section 2.1. We choose to use this approach in order to explore all region points likely to be corresponding to vertebra contours.

For each vertebra we use as center of the polar coordinate system the click point initially used for the region selection step. For the beginning direction, we chose the average direc‐ tion between the frontal line direction and the posterior line. We rotate the radial vector 360° around the central points with a step parameter expressed in degrees. In order to determine vertebra contours, we select the maximum value of the image gradient, Figure 5, for each degree inside the research zone.

terior, inferior and superior faces). We start with a process of region selection. The resulting regions obtained are used to create a global polygonal area for each vertebra. Another stage considered as a second pre-treatment step is the computation of the image gradient magni‐ tude on vertebrae regions. This process allows a first approximation of the areas belonging to vertebrae contours, figure 7. To extract faces vertebrae contours, we propose a template matching process based on a mathematical representation of vertebrae by a template func‐ tion. This function is defined according to the radial intensity distribution on each vertebra.

Template Matching Approaches Applied to Vertebra Detection

http://dx.doi.org/10.5772/50476

9

**Figure 7.** The template matching process for faces detection. (a) translation and, (b) rotation operation applied to the

In this section, we describe another method that we proposed for cervical vertebra segmen‐ tation in digitized X-ray images. This segmentation approach is based on Active Shape Mod‐ el method [12, 13,14] whose main advantage is that it uses a statistical model. This model is created by training it with sample images on which the boundaries of the object of interest are annotated by an expert. The specialist knowledge is very useful in this context. This model represents the local statistics around each landmark. Our application allows the ma‐ nipulation of a vertebra model. We proposed an approach which consists on modelling all the shapes of vertebrae by only one vertebra model. The results obtained are very promis‐ ing. Indeed, the multiple tests which we carried out on a large dataset composed of varied images prove the effectiveness of the suggested approach. The ASM method is composed of

**1.** Learning: placing landmarks on the images in order to describe the vertebrae.

**2.** Model Design: aligning all the marked shapes for the creation of the model.

For more details see [12].

template function.

4 steps (figure8):

**2.2. Active shape model based segmentation:**

**Figure 5.** Polar signature applied to vertebra region.

**Figure 6.** Polynomial fitting applied after a polar signature.

In order to get a closed contour, we apply an edge closing method to the contours obtained, a polynomial fitting to each face for each vertebra. Indeed, for a better approximation of ver‐ tebra contours, we use a second degree polynomial fitting [9, 10]. We achieve this 2D poly‐ nomial fitting by the least square method, Figure 6.

## *2.1.3. Vertebral Faces Detection*

In this method, we proceed by detecting the four faces belonging to vertebrae contours. We propose an individual characterization of each vertebra by a set of four faces, (anterior, pos‐ terior, inferior and superior faces). We start with a process of region selection. The resulting regions obtained are used to create a global polygonal area for each vertebra. Another stage considered as a second pre-treatment step is the computation of the image gradient magni‐ tude on vertebrae regions. This process allows a first approximation of the areas belonging to vertebrae contours, figure 7. To extract faces vertebrae contours, we propose a template matching process based on a mathematical representation of vertebrae by a template func‐ tion. This function is defined according to the radial intensity distribution on each vertebra. For more details see [12].

**Figure 7.** The template matching process for faces detection. (a) translation and, (b) rotation operation applied to the template function.

#### **2.2. Active shape model based segmentation:**

*2.1.2. Polar signature*

8 Advances in Image Segmentation

degree inside the research zone.

**Figure 5.** Polar signature applied to vertebra region.

**Figure 6.** Polynomial fitting applied after a polar signature.

nomial fitting by the least square method, Figure 6.

*2.1.3. Vertebral Faces Detection*

A second segmentation approach that we proposed to apply after the region selection proc‐ ess is based on a polar signature [8] representation associated to the polygonal region for each vertebra described on section 2.1. We choose to use this approach in order to explore all

For each vertebra we use as center of the polar coordinate system the click point initially used for the region selection step. For the beginning direction, we chose the average direc‐ tion between the frontal line direction and the posterior line. We rotate the radial vector 360° around the central points with a step parameter expressed in degrees. In order to determine vertebra contours, we select the maximum value of the image gradient, Figure 5, for each

In order to get a closed contour, we apply an edge closing method to the contours obtained, a polynomial fitting to each face for each vertebra. Indeed, for a better approximation of ver‐ tebra contours, we use a second degree polynomial fitting [9, 10]. We achieve this 2D poly‐

In this method, we proceed by detecting the four faces belonging to vertebrae contours. We propose an individual characterization of each vertebra by a set of four faces, (anterior, pos‐

region points likely to be corresponding to vertebra contours.

In this section, we describe another method that we proposed for cervical vertebra segmen‐ tation in digitized X-ray images. This segmentation approach is based on Active Shape Mod‐ el method [12, 13,14] whose main advantage is that it uses a statistical model. This model is created by training it with sample images on which the boundaries of the object of interest are annotated by an expert. The specialist knowledge is very useful in this context. This model represents the local statistics around each landmark. Our application allows the ma‐ nipulation of a vertebra model. We proposed an approach which consists on modelling all the shapes of vertebrae by only one vertebra model. The results obtained are very promis‐ ing. Indeed, the multiple tests which we carried out on a large dataset composed of varied images prove the effectiveness of the suggested approach. The ASM method is composed of 4 steps (figure8):


**3.** Initialization: the mean shape model is associated with the corners of the searched ver‐ tebrae. This step can be manual or semi-automatic.

parabolas, etc.) from binary image and extended by D. H. Ballard [18] to extract arbitrary shapes based on a template matching approach. This method is well known by its invari‐ ance to scale change, rotation and translation. The detection process of the GHT is presented

The R-Table is a discrete lookup table made to represent the model shape. The construction of this table is computed during a training phase based on the edge information as follow.

Given an arbitrary shape of a target object, figure 11, the first step is to determine a reference

distance r and the direction from the boundary point to the reference point β in the R-Table as a function of the orientationφ. We have in general many occurrences of the same orienta‐

The accumulator is a three dimensional voting scheme constructed in the following manner.

tion as we move around the boundary. The form of the R-table is shown in Table 1.

**Orientation φ Positions (r,β )**

0 {(ri

Δφ {(ri

2Δφ {(ri

… …

<sup>→</sup> =(cx, cy) in the object. The shape is defined in according to the distance and angle from the boundary to the reference point. For each point of the boundary we compute the

> , β*<sup>i</sup>* ) / φ*<sup>i</sup>* =0}

, β*<sup>i</sup>*

, β*<sup>i</sup>*

<sup>→</sup> in the image, we compute the gradient direction*φp*. Then, we vote for

of the reference point in the accumalator array, where *r*

) undexed under *φ<sup>i</sup>* =*φp*in the R-Table. The shape is indicated by finding local

) / φ*<sup>i</sup>* =Δφ}

) / φ*<sup>i</sup>* =2Δφ}

→ *i* are the

<sup>→</sup> =(rx, ry) from the reference point. Then, we store the

Template Matching Approaches Applied to Vertebra Detection

http://dx.doi.org/10.5772/50476

11

as two main parts:

orientation φ and the relative position *r*

**Table 1.** The general R-table form.

For each edge point *p*

all possible positions *p*

, *β<sup>i</sup>*

maxima in the voting scheme.

positions (ri

**1.** Modeling

**2.** Detection

**3.** Post-processing

*3.1.2. The accumulator construction*

<sup>→</sup> −*r* → *i*

**3.2. Application to vertebrae segmentation**

The proposed approach is based on three main steps:

point*c*

**4.** Segmentation: each point of the mean shape evolves so that its contour fits the edge of the vertebrae.

**Figure 8.** The steps of our framework using ASM.

## **3. Shape detection using Generalized Hough Transform**

In this section, we propose a cervical vertebrae detection method using a modified template matching approach based on the Generalized Hough Transform [18]. The Hough Transform is an interesting technique used in image analysis to extract imperfect instances of a shape in im‐ ages by a voting procedure. The success of this method relies mainly on the quality of the pat‐ tern used. The detection process that we propose starts with the determination of the edges on the radiography. We achieve this task by using the well-known Canny detector, [19]. After this step, the detection algorithm selects among the edges which one look the most similar to the vertebra shape by using the Generalized Hough Transform (GHT) accumulator.

For our experiments, we used 40 X-Ray radiographs coming from the NHANES II database. These images were chosen randomly but they all are focused on the cervical vertebrae C3 to C7. The first pre-processing step consists on a preliminary contour detection step. For this task we used the canny filter detector. After applying the detection process using the GHT method and the cost function proposed, all the vertebrae were detected perfectly. The seg‐ mentation results show that vertebra positions and edges are well detected by applying the proposed segmentation approach using the Generalized Hough Transform and followed by applying the proposed cost function.

## **3.1. Generalized Hough Transform**

## **3.1.1. R-Table construction**

The Generalized Hough transform (GHT) is a powerful pattern recognition technique wide‐ ly used in computer vision. It was initially developed to detect analytic curves (lines, circles, parabolas, etc.) from binary image and extended by D. H. Ballard [18] to extract arbitrary shapes based on a template matching approach. This method is well known by its invari‐ ance to scale change, rotation and translation. The detection process of the GHT is presented as two main parts:

The R-Table is a discrete lookup table made to represent the model shape. The construction of this table is computed during a training phase based on the edge information as follow.

Given an arbitrary shape of a target object, figure 11, the first step is to determine a reference point*c* <sup>→</sup> =(cx, cy) in the object. The shape is defined in according to the distance and angle from the boundary to the reference point. For each point of the boundary we compute the orientation φ and the relative position *r* <sup>→</sup> =(rx, ry) from the reference point. Then, we store the distance r and the direction from the boundary point to the reference point β in the R-Table as a function of the orientationφ. We have in general many occurrences of the same orienta‐ tion as we move around the boundary. The form of the R-table is shown in Table 1.


#### **Table 1.** The general R-table form.

**3.** Initialization: the mean shape model is associated with the corners of the searched ver‐

**4.** Segmentation: each point of the mean shape evolves so that its contour fits the edge of

In this section, we propose a cervical vertebrae detection method using a modified template matching approach based on the Generalized Hough Transform [18]. The Hough Transform is an interesting technique used in image analysis to extract imperfect instances of a shape in im‐ ages by a voting procedure. The success of this method relies mainly on the quality of the pat‐ tern used. The detection process that we propose starts with the determination of the edges on the radiography. We achieve this task by using the well-known Canny detector, [19]. After this step, the detection algorithm selects among the edges which one look the most similar to the

For our experiments, we used 40 X-Ray radiographs coming from the NHANES II database. These images were chosen randomly but they all are focused on the cervical vertebrae C3 to C7. The first pre-processing step consists on a preliminary contour detection step. For this task we used the canny filter detector. After applying the detection process using the GHT method and the cost function proposed, all the vertebrae were detected perfectly. The seg‐ mentation results show that vertebra positions and edges are well detected by applying the proposed segmentation approach using the Generalized Hough Transform and followed by

The Generalized Hough transform (GHT) is a powerful pattern recognition technique wide‐ ly used in computer vision. It was initially developed to detect analytic curves (lines, circles,

tebrae. This step can be manual or semi-automatic.

**3. Shape detection using Generalized Hough Transform**

vertebra shape by using the Generalized Hough Transform (GHT) accumulator.

the vertebrae.

10 Advances in Image Segmentation

**Figure 8.** The steps of our framework using ASM.

applying the proposed cost function.

**3.1. Generalized Hough Transform**

**3.1.1. R-Table construction**

## *3.1.2. The accumulator construction*

The accumulator is a three dimensional voting scheme constructed in the following manner. For each edge point *p* <sup>→</sup> in the image, we compute the gradient direction*φp*. Then, we vote for all possible positions *p* <sup>→</sup> −*r* → *i* of the reference point in the accumalator array, where *r* → *i* are the positions (ri , *β<sup>i</sup>* ) undexed under *φ<sup>i</sup>* =*φp*in the R-Table. The shape is indicated by finding local maxima in the voting scheme.

#### **3.2. Application to vertebrae segmentation**

The proposed approach is based on three main steps:


**Figure 9.** The steps of the proposed framework.

#### *3.2.1. Modeling*

The modeling process is an offline task. It is composed of three steps:


Within this operator, the image is first smoothed to reduce the noise. This step is realized by convolving the image with the kernel of Gaussian filter defined by equation (3):

$$G(\mathbf{x}\_{\prime} \mid y) = \frac{1}{\sqrt{2\pi\sigma^2}} e^{-\left(\mathbf{x}^2 + y^2\right)/2\sigma^2} \tag{3}$$

**iii.** *R-Table construction:* This offline phase of the GHT consists of calculating the tem‐

The R-table is then constructed by analysing all the boundry points of the model shape. For

and *β<sup>i</sup>*

)<sup>2</sup> + (*yc* - *yi*

*xi* − *xc*

**Figure 10.** The modelling process results (a) Vertebra mean model, (b) Edge detection result, (c) the template shape

Therefore, the R-table allows to recompute the center point position, using edge points and

The different parameters of the modified Hough transform are presented in Figure11.

*cx* = *x* + *rcos*(*β*), *cy* = *y* + *r*sin(*β*) (9)

*<sup>β</sup><sup>i</sup>* <sup>=</sup>*artan*( *yi* <sup>−</sup> *yc*

rection of edge points computed in the last step.

*c* ⇀ <sup>=</sup> <sup>1</sup> *<sup>n</sup>*∑ *<sup>p</sup>* ⇀

*ri* = (*xc* - *xi*

Assuming that *n* denotes the number of model edge point *pi*

, we compute the distance *ri*

and the reference point c as shown ine equation (7) and (8).

sponding gradient. the refrence point*c*

each point *pi*

constructed from the R-Table.

the gradient information, equation (9).

plate shape of the vertebra, constructed using information about position and di‐

(*xi* , *yi*

<sup>→</sup> =(*cx*, *cy*)is calculated by the equation (6):

)(*i* =1…*n*) and *φ<sup>i</sup>*

http://dx.doi.org/10.5772/50476

*<sup>i</sup>* (6)

Template Matching Approaches Applied to Vertebra Detection

the angle between the horizontal direction

)<sup>2</sup> (7)

) (8)

its corre‐

13

The gradient of each pixel in the smoothed image is computed by applying the Sobel-opera‐ tor. The approximation is performed in horizontal and vertical directions by applying the two masks shown in equation (4).

$$\mathbf{G}\_x = \begin{bmatrix} -1 & 0 & 1 \\ -2 & 0 & 2 \\ -1 & 0 & 1 \end{bmatrix} \mathbf{G}\_y = \begin{bmatrix} -1 & -2 & -1 \\ 0 & 0 & 0 \\ 1 & 2 & 1 \end{bmatrix} \tag{4}$$

Then, the direction of the edges is determined by the equation (5).

$$\varphi = \arctan\left(\frac{G\_x}{G\_y}\right) \tag{5}$$

The next step is non-maximum suppression. Only the local maxima in the gradient image are preserved. Finally, an edge tracking by hysteresis is used, where high and low threshold are defined to make a filter for pixels of the last image.

The canny edge detection result is shown in Figure 2(b).

**iii.** *R-Table construction:* This offline phase of the GHT consists of calculating the tem‐ plate shape of the vertebra, constructed using information about position and di‐ rection of edge points computed in the last step.

Assuming that *n* denotes the number of model edge point *pi* (*xi* , *yi* )(*i* =1…*n*) and *φ<sup>i</sup>* its corre‐ sponding gradient. the refrence point*c* <sup>→</sup> =(*cx*, *cy*)is calculated by the equation (6):

**Figure 9.** The steps of the proposed framework.

Figure 2(a)

two masks shown in equation (4).

The modeling process is an offline task. It is composed of three steps:

**i.** *Geometric model construction:* In this step, we build a vertebra mean model repre‐

**ii.** *Gradient computation and edge detection:* We use the canny operator to extract the edge

used in image processing and provides an accurate result for edge detection.

Within this operator, the image is first smoothed to reduce the noise. This step is realized by

<sup>2</sup>*πσ* <sup>2</sup> *<sup>e</sup>* <sup>−</sup>(*<sup>x</sup>* <sup>2</sup>

The gradient of each pixel in the smoothed image is computed by applying the Sobel-opera‐ tor. The approximation is performed in horizontal and vertical directions by applying the

*Gy* =

*<sup>φ</sup>* =arctan( *Gx*

*Gy*

The next step is non-maximum suppression. Only the local maxima in the gradient image are preserved. Finally, an edge tracking by hysteresis is used, where high and low threshold

convolving the image with the kernel of Gaussian filter defined by equation (3):

*<sup>G</sup>*(*x*, *<sup>y</sup>*)= <sup>1</sup>

*Gx* =

are defined to make a filter for pixels of the last image.

The canny edge detection result is shown in Figure 2(b).

Then, the direction of the edges is determined by the equation (5).

senting the average shape corresponding to a set of 25 vertebrae. The contour used to create this mean shape was extracted manually. the resulting model is shown in

of the vertebrae mean model. Canny operator was proposed in 1986 [19]. It is widely

+*y* 2)/2*σ* <sup>2</sup>


) (5)

(3)

(4)

*3.2.1. Modeling*

12 Advances in Image Segmentation

$$
\vec{c} = \frac{1}{n} \sum \vec{p}\_i \tag{6}
$$

The R-table is then constructed by analysing all the boundry points of the model shape. For each point *pi* , we compute the distance *ri* and *β<sup>i</sup>* the angle between the horizontal direction and the reference point c as shown ine equation (7) and (8).

$$r\_i = \sqrt{(\mathbf{x}\_c \cdot \mathbf{x}\_i)^2 + (y\_c \cdot y\_i)^2} \tag{7}$$

$$\beta\_i = \arctan\left(\frac{y\_i - y\_c}{x\_i - x\_c}\right) \tag{8}$$

**Figure 10.** The modelling process results (a) Vertebra mean model, (b) Edge detection result, (c) the template shape constructed from the R-Table.

Therefore, the R-table allows to recompute the center point position, using edge points and the gradient information, equation (9).

$$c\_x = x + r\cos(\beta), \ c\_y = y + r\sin(\beta) \tag{9}$$

The different parameters of the modified Hough transform are presented in Figure11.

**•** *Contrast-Limited Adaptive Histogram Equalization:*This step aims to prepare the X-ray images to edge detection by using the Contrast-Limited Adaptive Histogram Equali‐ zation (CLAHE) [3] technique used to improve the image contrast. It computes first different local histograms corresponding to each part of the image, and uses them to change the contrast of distinct regions of the image. This method is well known by

Template Matching Approaches Applied to Vertebra Detection

http://dx.doi.org/10.5772/50476

15

**•** *Gradient computation and edge detection:*In this step, we repeat the same process descri‐ bed in the model construction. Therefore, edge detection with Canny filter is applied to the improved image, and sobel operator is performed in –x and –y directions. The

We made two alternative approaches of our selection of Region of Interest (ROI). The differ‐

limiting noise amplification. The result of this step is shown in Figure 13(b).

result of the edge detection is showen in figure 13(c).

ent versions of ROI selection are presented in Figure 12.

**Figure 12.** The two proposed processing of ROI selection.

**b.** Region of interest selection

**Figure 11.** The GHT parameters corresponding to a model edge point.

The R-table construction algorithm can be expressed as follow (Listing 1):

	- **a.** Compute the gradient direction *φ*
	- **b.** Calculate *ri*
	- **c.** Calculate *β<sup>i</sup>*

Listing 1. Pre-processing steps used to create the R-table

Figure 10(c) shows the vertebra construction using only information stored in the R-Table.

#### *3.2.2. Potential vertebrae centers detection*

For the vertebrae detection we propose two alternative approaches, Automatic and semi-au‐ tomatic detection. We make a preliminary pre-processing step based on histogram equaliza‐ tion to enhance X-ray images. Next, we use the Canny and Sobel operators for edge detection and gradient computation. Then, we perform GHT process based on the R-table calculated at offline training.

**a.** Pre-processing


**Figure 11.** The GHT parameters corresponding to a model edge point.

, do:

as a function of *φ*

Figure 10(c) shows the vertebra construction using only information stored in the R-Table.

For the vertebrae detection we propose two alternative approaches, Automatic and semi-au‐ tomatic detection. We make a preliminary pre-processing step based on histogram equaliza‐ tion to enhance X-ray images. Next, we use the Canny and Sobel operators for edge detection and gradient computation. Then, we perform GHT process based on the R-table

Listing 1. Pre-processing steps used to create the R-table

**a.** Compute the gradient direction *φ*

and *β<sup>i</sup>*

*3.2.2. Potential vertebrae centers detection*

calculated at offline training.

**a.** Pre-processing

**1.** Create the R-table.

14 Advances in Image Segmentation

**2.** For each edge point pi

**b.** Calculate *ri*

**c.** Calculate *β<sup>i</sup>*

**3.** Increment *ri*

**4.** End

The R-table construction algorithm can be expressed as follow (Listing 1):

We made two alternative approaches of our selection of Region of Interest (ROI). The differ‐ ent versions of ROI selection are presented in Figure 12.

**Figure 12.** The two proposed processing of ROI selection.

In practice, each point from the edge detection results, figure 13(c), votes for different possi‐ ble centers. The selection is based on the gradient direction of the target point and its corre‐

The proposed model may be not easily matched. For this reason, we add a new parameter to make a range of scale to enhance the detection process. Therefore, a voted point can be ex‐

> coscos(*βφ j* )

sinsin(*βφ j*

) the parameters obtained in (5) and (6) corresponding to *φ* value

) (10)

Template Matching Approaches Applied to Vertebra Detection

http://dx.doi.org/10.5772/50476

17

sponding information in the R-table. These votes are stored in an accumulator.

+ *s* \**r<sup>φ</sup> j*

) indexed under *φ* in the R-table

**•** For each scale *s*, compute the candidate center (*a*, *b*)

Listing 2. Detection algorithm of the Generalized Hough transform method.

For the post processing analysis we propose a new powerful issue in order to consider in a more global way the results given by the GHT voting procedure. This process is composed

**a.** *Image grid cost:* We divide the image area into small squares which sizes are depending of the image resolution. We attribute to each of these areas a value determined by a cost function at first depending only of the number of votes. Each square vote for a unique

This method gives some good results on quality radiographies but quickly reach its lim‐ itations by detecting mainly false positive. That is why, in addition to this first detection process, we introduce a new cost function, in order to eliminate the false positives. **b.** *Top voted:* Based on the top three voted centers from the last step, we keep only the points that are in a specific distance computed in an offline process based on experi‐ mentations,area of the first and third quadrant in figure 15. Then, we repeat the same

process for the selected point. This technique respects the inclination of the neck.

**3.** Potential centers are given by local maxima in the accumulator

*a b* = *xi yi*

in the R-table. Listing 2 summarize the detection algorithm.

, *yi* )

**•** Increment (*a*, *b*) in the accumulator.

point computed as a mean of all inside points

pressed by its two coordinates x and y:

*j* , *βφ j*

**a.** Compute the gradient direction *φ*

*j* , *βφ j*

**1.** Find all edge detection points

**2.** For each feature point (*xi*

**b.** For each (*r<sup>φ</sup>*

*3.2.3. Post-processing analysis:*

of four steps:

Where*s*is the scale, (*r<sup>φ</sup>*

**Figure 13.** The proposed edge detection approach in case of cervical vertebrae (a)the original X-ray image, (b) the improved image, (c) The Canny edge detection result.


**Figure 14.** Semi-automatic ROI selection.

**c.** *Accumulator construction:*This step represents the core of the Generalized Hough Trans‐ form detection. It aims to determine the position of the center points of vertebrae in the input X-ray image by using the information stored in the R-table.

In practice, each point from the edge detection results, figure 13(c), votes for different possi‐ ble centers. The selection is based on the gradient direction of the target point and its corre‐ sponding information in the R-table. These votes are stored in an accumulator.

The proposed model may be not easily matched. For this reason, we add a new parameter to make a range of scale to enhance the detection process. Therefore, a voted point can be ex‐ pressed by its two coordinates x and y:

$$
\begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} \boldsymbol{x}\_i \\ \boldsymbol{y}\_i \end{bmatrix} + \boldsymbol{s} \, \, ^\* r\_{\phi}^{\boldsymbol{j}} \begin{bmatrix} \cos \cos(\beta\_{\phi}^{\boldsymbol{j}}) \\ \sin \sin(\beta\_{\phi}^{\boldsymbol{j}}) \end{bmatrix} \tag{10}
$$

Where*s*is the scale, (*r<sup>φ</sup> j* , *βφ j* ) the parameters obtained in (5) and (6) corresponding to *φ* value in the R-table. Listing 2 summarize the detection algorithm.

**1.** Find all edge detection points

**Figure 13.** The proposed edge detection approach in case of cervical vertebrae (a)the original X-ray image, (b) the

**•** *Automatic:* This algorithm travel through the image without any human action. Noises are

**•** *Semi-automatic:* Two points are placed to make a sub-image covering the area of cervical

**c.** *Accumulator construction:*This step represents the core of the Generalized Hough Trans‐ form detection. It aims to determine the position of the center points of vertebrae in the

input X-ray image by using the information stored in the R-table.

improved image, (c) The Canny edge detection result.

vertebrae. The figure 14 shows the result selection

observed in the final results.

16 Advances in Image Segmentation

**Figure 14.** Semi-automatic ROI selection.

	- **a.** Compute the gradient direction *φ*
	- **b.** For each (*r<sup>φ</sup> j* , *βφ j* ) indexed under *φ* in the R-table
		- **•** For each scale *s*, compute the candidate center (*a*, *b*)
		- **•** Increment (*a*, *b*) in the accumulator.

Listing 2. Detection algorithm of the Generalized Hough transform method.

## *3.2.3. Post-processing analysis:*

For the post processing analysis we propose a new powerful issue in order to consider in a more global way the results given by the GHT voting procedure. This process is composed of four steps:

**a.** *Image grid cost:* We divide the image area into small squares which sizes are depending of the image resolution. We attribute to each of these areas a value determined by a cost function at first depending only of the number of votes. Each square vote for a unique point computed as a mean of all inside points

This method gives some good results on quality radiographies but quickly reach its lim‐ itations by detecting mainly false positive. That is why, in addition to this first detection process, we introduce a new cost function, in order to eliminate the false positives.

**b.** *Top voted:* Based on the top three voted centers from the last step, we keep only the points that are in a specific distance computed in an offline process based on experi‐ mentations,area of the first and third quadrant in figure 15. Then, we repeat the same process for the selected point. This technique respects the inclination of the neck.

**c.** *Linear regression fitting:*Among the set of possible vertebrae extracted, the good ones are those forming a line, globally orthogonal to the orientation of the considered vertebra. We apply a simple linear regression based on a processing selection of top voted point from the accumulator.

The objective of this step is to select the effectively voted points(*x*, *y*) based on the straight line equation (11).

$$\begin{cases} y = a\bar{x} + b \\ a = \frac{S\_{xy}}{S\_{xx}} \\ b = \bar{y} - a\bar{\bar{x}} \end{cases} \tag{11}$$

**Figure 16.** Cervical vertebra C1 to C7.

**Table 2.** Accuracy recognition.

Figure17 and Figure 18 shows the obtained results by using thetwo proposed approaches in case of four X-ray images. These results enabled a global accuracy of 64,5% with automatic de‐ tection and 89% with the semi-automatic detection on the 200 vertebrae investigated as shown in Table 2. Notice that the C7 vertebra is detected with a rate of 32,5% and 60% with the two techniques which is lower than the mean accuracy. This is due to the edge detection step which does not detect efficiently this vertebra. The noise surrounding this cervical area makes this de‐

> *Detection rate Automatic Semi-automatic True False True False*

Template Matching Approaches Applied to Vertebra Detection

http://dx.doi.org/10.5772/50476

19

C3 70,0% 35,5% 97,5% 0%

C4 77,5% 95,0% C5 65,0% 95,0% C6 77,5% 97,5% C7 32,5% 60,0% Global 64,5% 89,0%

tection more difficult. We note 35,5% of false detection in the automatic technique.

*Vertebrae type*

Where *Sxy* <sup>=</sup>∑(*xi* <sup>−</sup> *<sup>x</sup>*¯)(*yi* <sup>−</sup> *<sup>y</sup>*¯)

**Figure 15.** Region of selection around the top voted point in color.

**d.** *Adaptive distance filter:* An adaptive filter is finally applied to the result of the linear regres‐ sion fitting step. This task aims to check the distance between selected points. Based on these distance, we compute the average distance between vertebrae centers. This enables us to eliminate false centers (with a distance higher or smaller than the average distance).

#### **3.3. Experiments and results**

Experimentations have been conducted using a set of 40 digitized X-ray films. These images presenting cervical spine region (Figure 13(a)) are obtained from the National Health and Nutrition Examination Surveys database NHANES II.

These experimentations are focused on the detection of the cervical vertebrae C3 to C7 (Fig‐ ure 16). Indeed, our input images contain a total of 200 (40x5) vertebrae. We notice that the mean model was build using a set of 25 cervical vertebrae (Figure10(a)).

**Figure 16.** Cervical vertebra C1 to C7.

**c.** *Linear regression fitting:*Among the set of possible vertebrae extracted, the good ones are those forming a line, globally orthogonal to the orientation of the considered vertebra. We apply a simple linear regression based on a processing selection of top voted point

The objective of this step is to select the effectively voted points(*x*, *y*) based on the straight

**d.** *Adaptive distance filter:* An adaptive filter is finally applied to the result of the linear regres‐ sion fitting step. This task aims to check the distance between selected points. Based on these distance, we compute the average distance between vertebrae centers. This enables us to eliminate false centers (with a distance higher or smaller than the average distance).

Experimentations have been conducted using a set of 40 digitized X-ray films. These images presenting cervical spine region (Figure 13(a)) are obtained from the National Health and

These experimentations are focused on the detection of the cervical vertebrae C3 to C7 (Fig‐ ure 16). Indeed, our input images contain a total of 200 (40x5) vertebrae. We notice that the

(11)

*y* =*ax* + *b <sup>a</sup>* <sup>=</sup> *Sxy Sxx b* = *y*¯ −*ax*¯

{

from the accumulator.

Where *Sxy* <sup>=</sup>∑(*xi* <sup>−</sup> *<sup>x</sup>*¯)(*yi* <sup>−</sup> *<sup>y</sup>*¯)

**3.3. Experiments and results**

**Figure 15.** Region of selection around the top voted point in color.

Nutrition Examination Surveys database NHANES II.

mean model was build using a set of 25 cervical vertebrae (Figure10(a)).

line equation (11).

18 Advances in Image Segmentation

Figure17 and Figure 18 shows the obtained results by using thetwo proposed approaches in case of four X-ray images. These results enabled a global accuracy of 64,5% with automatic de‐ tection and 89% with the semi-automatic detection on the 200 vertebrae investigated as shown in Table 2. Notice that the C7 vertebra is detected with a rate of 32,5% and 60% with the two techniques which is lower than the mean accuracy. This is due to the edge detection step which does not detect efficiently this vertebra. The noise surrounding this cervical area makes this de‐ tection more difficult. We note 35,5% of false detection in the automatic technique.


**Table 2.** Accuracy recognition.

We note also that the edge detection and gradient computation steps depend on the contrast level of the input images. The use of CLAHE method allowed to achieve an efficient gradi‐ ent computation, and hence enhanced the edge extraction.

**4. Conclusion**

**Author details**

**References**

sity Press.

In this chapter we have proposed a set of medical images detection and segmentation meth‐ ods applied to vertebrae identification. We have first introduced a pre-processing operation that consists on defining a global polygonal region for each vertebra. This pre-treatment was used as a first step of three semi-automatic segmentation methods allowing to locate verte‐ brae positions and contours. These methods are based on automatic corner detection, polar signature and face detection. We have also proposed another semi-automatic segmentation

Template Matching Approaches Applied to Vertebra Detection

http://dx.doi.org/10.5772/50476

21

On the other hand we have proposed using the Generalized Hough Transform –GHT– to perform semi-automatic and automatic vertebrae detection methods. The GHT technique is a powerful method for object recognition. It has a lot of advantages, like robustness under partial or slightly deformed shapes, tolerance to noise, and the ability to find multiple occur‐ rences of a shape during the same processing task. In the GHT method, the model shape is represented by an R-table, which presents a discrete lookup table based on its edge informa‐ tion. The references points corresponding to the shapes to be detected are deduced from an accumulator containing an array of votes related to each point on the initial boundary shape. The points corresponding to highest number of votes represent the references point candidate and indicate the position of the model in the image. In addition to this first detec‐ tion process, we introduced a new cost function that consisted on a grid based voting proce‐ dure. We applied also a post-processing analysis based on a linear regression fitting and an adaptive distance filter. As result, the proposed methods give promising detection rate for a large set of X-ray images. For our future works we plan to make an optimization of the GHT

transform to increase the vertebrae detection accuracy and also computing time.

Mohammed Benjelloun, Saïd Mahmoudi and Mohamed Amine Larhmam

mentation. *Annual Review of Bimedical Engineering*, 2, 315-337.

Department of Computer Science, Faculty of Engineering University of Mons, Belgium

[1] Pham, D. L., Xu, C., & Prince, J. L. (2000). Current methods in medical image seg‐

[2] Sethian, J. A. (1999). *Level Set Methods and Fast Marching Methods*, Cambridge Univer‐

\*Address all correspondence to: said.mahmoudi@umons.ac.be

approach based on the widely used active shape model theory.

**Figure 17.** Final result detection of C3 to C7 cervical vertebrae with the automaticapproach (a) Five detection and one false positive, (b)Three detections and four false positives.

**Figure 18.** Final result detection of C3 to C7 cervical vertebrae with the semi-automatic approach for two cases.

## **4. Conclusion**

We note also that the edge detection and gradient computation steps depend on the contrast level of the input images. The use of CLAHE method allowed to achieve an efficient gradi‐

**Figure 17.** Final result detection of C3 to C7 cervical vertebrae with the automaticapproach (a) Five detection and one

**Figure 18.** Final result detection of C3 to C7 cervical vertebrae with the semi-automatic approach for two cases.

ent computation, and hence enhanced the edge extraction.

20 Advances in Image Segmentation

false positive, (b)Three detections and four false positives.

In this chapter we have proposed a set of medical images detection and segmentation meth‐ ods applied to vertebrae identification. We have first introduced a pre-processing operation that consists on defining a global polygonal region for each vertebra. This pre-treatment was used as a first step of three semi-automatic segmentation methods allowing to locate verte‐ brae positions and contours. These methods are based on automatic corner detection, polar signature and face detection. We have also proposed another semi-automatic segmentation approach based on the widely used active shape model theory.

On the other hand we have proposed using the Generalized Hough Transform –GHT– to perform semi-automatic and automatic vertebrae detection methods. The GHT technique is a powerful method for object recognition. It has a lot of advantages, like robustness under partial or slightly deformed shapes, tolerance to noise, and the ability to find multiple occur‐ rences of a shape during the same processing task. In the GHT method, the model shape is represented by an R-table, which presents a discrete lookup table based on its edge informa‐ tion. The references points corresponding to the shapes to be detected are deduced from an accumulator containing an array of votes related to each point on the initial boundary shape. The points corresponding to highest number of votes represent the references point candidate and indicate the position of the model in the image. In addition to this first detec‐ tion process, we introduced a new cost function that consisted on a grid based voting proce‐ dure. We applied also a post-processing analysis based on a linear regression fitting and an adaptive distance filter. As result, the proposed methods give promising detection rate for a large set of X-ray images. For our future works we plan to make an optimization of the GHT transform to increase the vertebrae detection accuracy and also computing time.

## **Author details**

Mohammed Benjelloun, Saïd Mahmoudi and Mohamed Amine Larhmam

\*Address all correspondence to: said.mahmoudi@umons.ac.be

Department of Computer Science, Faculty of Engineering University of Mons, Belgium

## **References**


[3] Tan, S., Yao, J., Ward, M. M., Yao, L., & Summers, R. M. (2006). Level set based verte‐ bra segmentation for the evaluation of ankylosing spondylitis. *Progress in biomedical optics and imaging*, 7(1, 30), 12-24.

[16] Mahmoudi, S., & Benjelloun, M. (2007). A New Approach for Cervical Vertebrae Seg‐ mentation. Lecture Notes in Computer Science. 4756, *Progress in Pattern Recognition,*

Template Matching Approaches Applied to Vertebra Detection

http://dx.doi.org/10.5772/50476

23

[17] Chevrefils, C., Chériet, F., & Grimard, F. G. (2007). Watershed segmentation of inter‐ vertebral disk and spinal canal from MRI images. *In: Kamel M, ed. Image Analysis and Recognition: Lecture Notes in Computer Science*, Berlin, Germany, Springer, 1017-27.

[18] Ballard, D. H. (1981). Generalizing the Hough transform to detect arbitrary Shapes.

[19] Canny, J. (1986). A computational approach to edge detection. *IEEE Transactions on*

[20] Pizer, S. M., Amburn, E. P., Austin, J. D., et al. (1987). Adaptive histogram equaliza‐ tion and its variations. *Computer Vision, Graphics, and Image Processing*, 39(3), 355-368.

*Image Analysis and Applications*, 753-762.

*Pattern Analysis and Machine Intelligence*, 8(6).

*Pattern Recogn.*, 13(2), 111-122.


[16] Mahmoudi, S., & Benjelloun, M. (2007). A New Approach for Cervical Vertebrae Seg‐ mentation. Lecture Notes in Computer Science. 4756, *Progress in Pattern Recognition, Image Analysis and Applications*, 753-762.

[3] Tan, S., Yao, J., Ward, M. M., Yao, L., & Summers, R. M. (2006). Level set based verte‐ bra segmentation for the evaluation of ankylosing spondylitis. *Progress in biomedical*

[4] Kass, M., Witkin, A., & Terzopoulos, D. (1988). Snakes: Active contour models. *Inter‐*

[5] Lobregt, S., & Viergever, M. (1995). A discrete dynamic contour model. *IEEE Transac‐*

[6] Benjelloun, M., & Mahmoudi, S. (2008). X-ray image segmentation for vertebral mo‐ bility analysis. *International Journal of Computer Assisted Radiology and Surgery*, 2(6),

[7] Mc Inerney, T., & Terzopoulos, D. (1996). Deformable models in medical image anal‐

[8] Benjelloun, M., & Mahmoudi, S. (2009). Spine Localization in X-ray Images Using In‐ terest Point Detection. Journal of Digital Imaging, juin http://dx.doi.org/10.1007/

[9] Keren, D. (2004). Topologically Faithful Fitting of Simple Closed Curves. *IEEE Trans‐*

[10] Benjelloun, M., Tellez, H. J., Oliva, R., & Prevot, . (2007, December 31). Edge Closing of Synthetic and Real Images using Polynomial Fitting. *JCIT: Journal of Convergence*

[11] Benjelloun, M., & Mahmoudi, S. (2007). Mobility Estimation and Analysis in Medical X-ray Images Using Corners and Faces Contours Detection. International Machine Vision and Image Processing Conference IMVIP 5th-7th September, Maynooth

[12] Cootes, T. F., Hill, A., Taylor, C. J., & Haslam, J. (1994). Use of active shape models for locating structures in medical images. *Image and Vision Computing*, 12(6), 355-365.

[13] Cootes, T. F., Taylor, C. J., Cooper, D. H., & Graham, J. (1995). Active shape models: Their training and application. *Computer Vision and Image Understanding*, 61(1), 38-59.

[14] Benjelloun, M., Mahmoudi, S., & Lecron, F. (2010, 20-23 January, 2010). Paper pre‐ sented at 3rdInternational Conference on Bio-inspired Systems and Signal Processing, Valencia, Spain. *A New Semi-Automatic Approch for X-Ray Cervical Images Segmentation*

[15] Tezmol, H., Sari-Sarraf, S., Mitra, A., Gururajan, R., & Long, . (2002). Customized Hough Transform for Robust Segmentation of Cervical Vertebrae from X-Ray Im‐ ages. Paper presented at Fifth IEEE Southwest Symposium on Image Analysis and Interpretation. *Image Analysis and Interpretation, IEEE Southwest Symposium on*, 0224.

*optics and imaging*, 7(1, 30), 12-24.

*tions on Medical Imaging*, 14(1), 12-24.

s10278-007-9099-3 , 22(3), 309-318.

*Information Technology*, 2(4), 8-19, 1975-9320.

(NUIM) Dublin, Ireland 978-0-7695-2887-8 , 01, 106-116.

*Using Active Shape Model*, BIOSIGNALS, 501-506.

*actions on PAMI*, 26(1).

371-383.

22 Advances in Image Segmentation

*national Journal of Computer Vision*, 1(4), 321-331.

ysis: A survey. *Medical Image Analysis*, 1(2), 91-108.


**Chapter 2**

**Image Segmentation and Time Series Clustering Based**

During the past decades, image segmentation and edge detection have been two important and challenging topics. The main idea is to produce a partition of an image such that each category or region is homogeneous with respect to some measures. The processed image can

Spatial autoregressive moving average (ARMA) processes have been extensively used in several applications in image/signal processing. In particular, these models have been used for image segmentation, edge detection and image filtering. Image restoration algorithms based on robust estimation of a two-dimensional process have been developed (Kashyap & Eom 1988). Also the two-dimensional autoregressive model has been used to perform unsu‐ pervised texture segmentation (Cariou & Chehdi, 2008). Generalizations of the previous al‐ gorithms using the generalized M estimators to deal with the effect caused by additive contamination was also addressed (Allende et al., 2001). Later on, robust autocovariance (RA) estimators for two dimensional autoregresive (AR-2D) processes were introduced (Oje‐ da, 2002). Several theoretical contributions have been suggested in the literature, including the asymptotic properties of a nearly unstable sequence of stationary spatial autoregressive processes (Baran et al., 2004). Other contributions and applications of spatial ARMA proc‐ esses have been considered in many publications (Basu & Reinsel, 1993, Bustos 2009a, Fran‐ cos & Friendlaner1998, Guyon 1982, Ho 2011, Illig & Truong-Van 2006, Martin1996, Vallejos

A new approach to perform image segmentation based on the estimation of AR-2D process‐ es has been recently suggested (Ojeda 2010). First an image is locally modeled using a spatial autoregressive model for the image intensity. Then the residual autoregressive image is computed. This resulting image possesses interesting texture features. The borders and edges

> © 2012 Vallejos and Ojeda; licensee InTech. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

© 2012 Vallejos and Ojeda; licensee InTech. This is a paper distributed under the terms of the Creative Commons

**on Spatial and Temporal ARMA Processes**

Ronny Vallejos and Silvia Ojeda

http://dx.doi.org/10.5772/50513

**1. Introduction**

& Mardesic 2004).

Additional information is available at the end of the chapter

be useful for posterior image processing treatments.
