ABSTRACT
The watershed is a powerful segmentation tool developed in mathematical morphology, which has the drawback of producing over-segmentation. In this study, in order to prevent its over-segmentation, a strategy to obtain robust markers for atherosclerosis images segmentation is presented. In such sense, it is introduced an algorithm, which was very useful in order to obtain the markers of the atherosclerotic lesions. Images were pre-processed using the Gauss filter and a contrast enhancement. The obtained results by using this strategy were validated calculating the False Negatives (FN) and False Positives (FP) according to criterion of physicians, where 0% for FN and less than 13% for FP were obtained. Extensive experimentation showed that, using real image data, the proposed strategy was very suitable for this application. These images will be subject to an additional morphometrical analysis in order to study automatically the atherosclerosis and its organic-consequences.
PDF Abstract XML References Citation
How to cite this article
DOI: 10.3923/jas.2005.1316.1327
URL: https://scialert.net/abstract/?doi=jas.2005.1316.1327
INTRODUCTION
Segmentation and contour extraction are important steps towards image analysis. Segmented images are now used routinely in a multitude of different applications, such as, diagnosis, treatment planning, localization of pathology, study of anatomical structure, computer-integrated surgery, among others. However, image segmentation remains a difficult task due to both the variability of object shapes and the variation in image quality. Particularly, medical images are often corrupted by noise and sampling artifacts, which can cause considerable difficulties when applying rigid methods.
The pathological anatomy is a speciality, where the use of different techniques of Digital Image Processing (DIP) allows to improve the accuracy of diagnosis of many diseases. One of the most important diseases to study is the atherosclerosis and its organic-consequences, which is one of the principal causes of death in the world today[1-3]. The atherosclerosis produces as final consequence the loss of elasticity and increase of the wall of the arteries. For example, heart attack, cerebral attack and ischaemia are some of its principal consequences[4].
Many segmentation methods have been proposed for medical-image data[5-11]. Unfortunately, segmentation using traditional low-level image processing techniques, such as thresholding, edge detection and other classical operations, requires a considerable amount of interactive guidance in order to get satisfactory results. Automating these model-free approaches is difficult because of shape complexity, shadows and variability within and across individual objects. Furthermore, noise and other image artifacts can cause incorrect regions or boundary discontinuities in objects recovered from these methods.
In Mathematical Morphology (MM) important methods have been developed for image segmentation[12,13]. One of the most powerful tools developed in MM is the watershed transformation, which is classic in the field of topography and it has been used in many problems of image segmentation. However, the watershed transformation has the disadvantage of producing over-segmentation. For that reason, the correct way to use watersheds for grayscale image segmentation is to mark the regions we want to segment, that is, the objects, but also the background. One and only one marker must correspond to each region. The design of robust marker detection techniques involves the use of specific knowledge of the series of images under study[13].
The goal of this study was to present a strategy to obtain robust markers for segmentation of atherosclerotic lesions. In such sense, it is introduced an algorithm to obtain markers, which identifies correctly the atherosclerotic lesions and eliminates considerably all spurious information. The validity of our strategy was tested by using watersheds segmentation, where the atherosclerotic lesions, according to the criteria of physicians, were correctly delineated. These images will be subject to a further morphometrical analysis in order to study automatically the atherosclerosis and its organic-consequences.
THEORETICAL ASPECTS
Pre-processing: With the goal of diminishing the noise in the original images we used the Gauss filter. Several researches were carried out with many images, arriving to the final conclusion that the best performance are obtained, according to our application, with σ = 3 and a 3x3 window size. Smaller dimensional windows produce a lot of noise, mainly due to change of intensity. Larger dimensional window causes loss of information in the atherosclerotic lesions. It was verified that with these parameters the noise was considerably smoothed and the edges of the interest objects (lesions) were not affected.
Contrast enhancement: Contrast enhancement is a very used technique as previous step to segmentation. There are many methods in the literature that can be seen[14,15]. In this study, the contrast via histogram modification is improved according to the following steps:
(1) |
where, FuncProb, FuncTransf and HistogramaImagSalida are, respectively, probability function, transference function of the input image and the transformed histogram of the output image; i being the gray level, CantPixelsImagEntrada is the quantity of pixels of the input image and CantNivelesGris is the quantity of gray level.
Morphological grayscale reconstruction: Let J and I be two grayscale images defined on the same domain, taking their values in the discrete set {0, 1, ........, L-1} and such that J ≤ I (i.e., for each pixel p ε DI , J(p) ≤ I (p)). L being an arbitrary positive integer. In this way, it is useful to introduce the geodesic dilations according to the following definition[12]:
Definition (Geodesic dilation): The elementary geodesic dilation of of grayscale image J ≤ I under I (J is called the marker image and I is the mask) is defined as:
(2) |
where, the symbol Λ stands for the pointwise minimum and J ⊕ B is the dilation of J by flat structuring element B. The grayscale geodesic dilation of size n ≥ 0 is obtained by:
(3) |
This leads to the following definition of grayscale reconstruction[12]:
Definition (Grayscale reconstruction): The grayscale reconstruction ρI of I from J is obtained by iterating grayscale dilation(J) s of J under I until stability is reached, that is:
(4) |
Definition (Geodesic erosion): Similarly, the elementary geodesic erosion of grayscale image J ≥ I above I is given by:
(5) |
where, ∨ stands for the pointwise maximum and J θ B is the erosion of J by flat structuring element B. The grayscale geodesic erosion of size n ≥ 0 is then given by:
(6) |
Reconstruction turns out to provide a very efficient method to extract regional maxima and minima from grayscale images. Furthermore, the technique extends to the determination of maximal structures, which will be call h-domes and h-basins. Lets stay the following definition:
Definition (Regional maximum): A regional maximum M of a grayscale image I is a connected component of pixels with a given value h (plateau at altitude h), such that every pixel in the neighbourhood of M has a strictly lower value.
Regional maximum should not be confused with local maxima. Recall that a pixel p of I is a local maximum for grid G if and only if its value I(p) is greater or equal to that of any of its neighbours. All pixels belonging to a regional maximum are local maxima, but the converse is not true.
Definition (H-dome transformation): The h-dome image Dh (I) of the h-domes of a grayscale image I is given by:
This provides a useful technique for extracting domes or valleys of a given height, which are called h-domes. Geometrically speaking, an h-dome can be interpreted in the same way as a maximum: an h-dome D of image I is a connected component of pixels such that:
• | Every pixel p that is a neighbour of D satisfies: I(p) < min {I(q) | q ε D}, |
• | max {I(q) | q ε D}-min {I (q) | q ε D} < h |
Besides, the value of pixel p of h-dome D in image Dh ( I ) is equal to I (p)-min { I (q) | q ε D}.
The h-dome transformation extracts light structure without involving any size or shape criteria. The only parameter (h) is related to the height of these structures.
Watershed segmentation: In what follows, it is considered grayscale images as numerical functions or as topographic relief.
We consider the successive thresholds Th (I) of I, for h =0 to L-1,
It is said that they constitute the threshold decomposition of I, where these sets satisfy the following inclusion relationship:
According to this point of view, an alternative definition can also be proposed for the notion of regional minimum:
Definition (Regional minimum): A regional minimum M at altitude h of a grayscale image I is a connected component C of Th (I) such that C ∩ Th-1 (I) = φ, Th (I) being a threshold of I at level h.
The same criterion of the regional maximum should be considered for the regional minimum. According to this criterion of a regional minimum, it is possible to establish the following definition[13]:
Definition (Catchment basin): The catchment basin C(M) associated with a minimum M is the set of pixels p of DI such that a water drop falling at p flows down along the relief, following a certain descending path called the downstream of p and eventually reaches M.
Using the former definitions, it is possible to present the watershed definition. The notion of watershed will now serve as a guideline for the segmentation of grayscale images.
Definition (Watershed by immersion): Suppose that we have pierced holes in each regional minimum of I, this picture being regarded as a topographic surface. We then slowly immerse this surface into a lake. Starting from the minimum of lowest altitude, the water will progressively fill up the different catchment basins of I. Now, at each pixel where the water coming from two different minima would merge, a dam is build (Fig. 1). At the end of this immersion procedure, each minimum is completely surrounded by dams, which delimit its associated catchment basin. The whole set of dams which has been built thus provides a tessellation of I in its different catchment basins. These dams correspond to the watershed of I, that is, these represent the edges of objects.
Mathematically, this immersion process is made in the following way: I being the grayscale image under study, denote hmim the smallest value taken by I on its domain DI. Similarly, denote hmax the largest value taken by I on DI. Let Th(I) be the threshold of I at level h. Let C(M) be the catchment basin associated with a minimum M and Ch(M) the subset of this catchment basin made of the points having an altitude smaller or equal to h, then,
In many practical case, one of the principal problems is to obtain the regional minimum, due to the fact that, in general, images are corrupted by noise. Therefore, the correct way to use watershed for grayscale image segmentation consists in first detecting markers of the objects to be extracted. A marking function is then constructed, whose different catchment basins correspond to the desired objects. When one works in an other way, then the watershed transformation produces over-segmentation. The over-segmentation mainly comes from the fact that the markers are not perfectly appropriate to the objects to be contoured.
Fig. 1: | Building dams at the places where the water coming from two different minima would merge |
In short, the quality of the segmentation is directly linked to the marking function.
In such sense, in this study, the proposed strategy permits to obtain good markers, which were useful for the segmentation process. These avoided the over-segmentation.
The method of evaluation: Manual segmentation generally gives the best and most reliable results when identifying structures for a particular clinical task. However, this task is very tedious and time-consuming for the segmenter and thus it does not serve the needs of daily clinical use well. Until now and due to the lack of ground truth, the quantitative evaluation of a segmentation method is difficult to achieve. An alternative is to use manual-segmentation results as the ground truth.
In order to evaluate the performance of the proposed strategy, we calculate the percent of false negatives (FN, atherosclerotic lesions, which were not classified by the strategy) and the false positives (FP, noise, which was classified as atherosclerotic lesion). These are defined according to the following expressions,
(7) |
where, Vp is the real quantity of atherosclerotic lesions identified by the physician, fn is the quantity of atherosclerotic lesions, which were not marked by the strategy and fp is the number of spurious regions, which were marked as atherosclerotic lesion.
FEATURES OF THE STUDIED IMAGES
The studied images were of arteries, which had atherosclerotic lesions and these were obtained from different parts of the human body, from more of 80 autopsies. These arteries were contrasted with a special tint in order to accentuate the different lesions in arteries (fatty streaks (type I)), fibrous plaques (type II)) and severe plaques (types III and IV)). The arteries were digitalized directly from the working desk. It is possible to observe from the images that the different arterial structures are well defined. Other works have used the photograph of the arteries to digitalize the image[16,17]. This constitutes an additional step, increases the cost of the research and leads to a loss of some part of the information in the original image. The segmentation process is then more difficult too. In Fig. 2a a typical image with lesions I and II can be seen, while in Fig. 2b is shown its histogram. These images were captured via the MADIP system with a resolution of 512x512x8 bit/pixels[18].
Figure 3 shows other examples with other types of lesions.
There are several remarkable characteristics of these images, which are common to typical images that we encountered in the atherosclerotic lesions:
1. | High local variation of intensity is observed both, within the atherosclerotic lesions and the background. However, the local variation of intensities is higher within the lesions than in background regions. |
2. | The histogram of Fig. 2b shows that there is a low contrast in the images. |
3. | The lesions III and IV have better contrast than the lesions I and II (Fig. 3). In addition, due to variations in the intensity of the background across the image and the low contrast between lesions and background intensities, principally for the lesions I and II, the atherosclerotic lesions in a region of the image may appear lighter than the background in a distant region. |
4. | It is common of these images the diversity in shape and size of the atherosclerotic lesions. |
5. | The boundary of the atherosclerotic lesions, principally for the lesions I and II, may be extremely difficult to define. Due to variations in intensity, both within the lesions and in the background, portions of the atherosclerotic lesion may appear blended into the background, without creating a distinct boundary. |
While the characteristics presented above testify the difficulty in identifying atherosclerotic lesions, a close examination reveals information that can be used. It was observed that two features of the image, local variation of intensity and image intensity level, can be used to identify regions of the image that describe lesions. High local variation of intensity is exhibited by regions within and near the boundaries of lesions. Thus, local variation of intensity can roughly identify regions of the image that contain lesions. Across the entire image, changes in intensity level can not reliably distinguish atherosclerotic lesions, due to possible nonuniformity of the average background intensity and low contrast between lesions and background, principally, in the lesions I and II. However, within a region of interest, changes in intensity level can effectively distinguish a lesion, since locally a lesion has major variation of intensities than its surrounding background. The exact shape and size of this region are not important and hence the region is referred to as an approximate region.
Fig. 2: | (a) Atherosclerosis image. (b) Histogram. It can be observed low contrast |
Fig. 3: | Atherosclerosis images with different lesions, which are marked with arrows |
RESULTS AND DISCUSSION
With the goal of diminishing the noise in the atherosclerosis images, the Gauss filter is used. In a second step, we carried out to a modification of the histogram to these images in order to increase the contrast. Figure 4 shows the results of this procedure.
In order to extract the approximate regions of interest, after the histogram modification, we carried out a morphological reconstruction. In the case of the lesions I and II, we carried out a reconstruction by dilation, while for the lesions III and IV, we carried out a reconstruction by erosion. It was verified that the reconstruction by erosion (for the lesions III and IV) led to an image where the dark zones correspond to these lesions (Fig. 5).
The result in Fig. 5b was obtained by using a rhomb as structuring element of 5x5 size and a height equal to 60. The selection of this structuring element and its size was obtained via experimentation. Figure 6 shows the obtained results (in the reconstruction) for other structuring elements. In all cases, the considered height was equal to 60.
As can be appreciated in Fig. 6a, for a structuring element minor than 5x5 size, the area of the atherosclerotic lesions decreased. Comparing Fig. 5b with Fig. 6b and c, one can see that for structuring elements (rhomb or circle) major than 5x5 size, the results obtained were very similar, but the computation time was increased. In Fig. 6d-f can be observed that for segments as structuring elements, the results obtained were not good, the lesions were notably deformed. For these reasons, we considered that the rhomb of 5x5 size was the most suitable.
With respect to the height, it was verified that for all our images the optimal value was in the range from 40 to 60. In fact, Fig. 7 depicts the results obtained considering a height out of this range.
In Fig. 7b and c, one can observe that for a large height the atherosclerotic lesions were very smoothed; however, the areas of the lesions were increased too. Some of them were fused (see arrows). For a value smaller than 40, according to the criterion of pathologists, the area of the atherosclerotic lesions decreased. Then, in these cases, an exact delimitation of the lesions is not obtained and the final results will be poor.
After obtaining both, the size of structuring element and the optimal height, the next stage of our strategy was to segment the approximate region of interest, that is, a region that contains the atherosclerotic lesion and its neighbouring background.
Fig. 4: | (a) and (c) Filtered images with Gauss. (b) and (d) Improved images. It is evident the obtained good result with the enhancement |
Fig. 5: | (a) Resulting image of the histogram modification. (b) Image obtained by a reconstruction by erosion. The dark parts correspond to the lesion IV |
Fig. 6: | (a) Reconstruction by a rhomb of 3x3 size. (b) Reconstruction by a rhomb of 7x7 size. (c) Reconstruction by a circle of 7x7 size. (d) Reconstruction by a diagonal segment (45°) of 3 pixels. (e) Reconstruction by a diagonal segment of 5 pixels (45°). (f) Reconstruction by a diagonal segment of 7 pixels (45°). The height was equal to 60 |
Fig. 7: | (a) Reconstruction with a 5x5 rhomb and height equal to 30. (b) Reconstruction with a 5x5 rhomb and height equal to 80. (c) Reconstruction with a 5x5 rhomb and height equal to 120 |
Fig. 8: | (a) Image of the reconstruction, where the arrows indicate the lesions. (b) Regions of interest |
This step was carried out by applying a simple threshold. In Fig. 8b one can see the region of interest.
In Fig. 8b one can observe how all the indicated lesions in Fig. 8a were detected. After this result, we introduce the following algorithm to obtain markers for the atherosclerotic lesions.
Algorithm to obtain markers: The steps of the algorithm are described below.
1. | Obtain the regions of interest. Let IREZI be the resulting image. |
2. | Label the resulting image of the step 1. Then, to create an auxiliary image, let IA1 be. All pixels of this image are put in zero. In iterative way scan the IREZI image (see appendix, function Mark_Background (...)). Then, this image is labeled with a value equal to 1 in all the background. |
3. | With the goal of finding connected components (the lesions), scan again the IREZI image from the top until the bottom and from the left until the right. If there is a pixel, which belongs to a connected component and in Ial such pixel has a value of zero, then other iterative method begins to work (see appendix, function Mark_Component (...)). This new iterative method marks with a determined value within the IA1 image all pixels belonging to a connected component. In addition, pixels within the IREZI image are marked also with a value, which identifies the connected component to which they belong. This action is carried out in the whole image. As this step is finished, in the IREZI image all the connected components were filled and in the IA1 image all the connected components were labeled. |
4. | Create other auxiliary image (let IA2 be) with the same values of the IA1 image. Create also an array, which controls if a connected component was reduced. In the IA2 image is where in each step the reduction of the connected components are obtained, the final result is represented in the IA1 image. |
5. | Scan the labeled image (IA1). When a pixel is found, which belongs to a connected component, via other iterative method the same is reduced (see appendix, function Mark_Frontier (...)). In other words, in the IA2 image is marked all the frontiers of the connected component. If some pixel within the connected component is remained, which is not frontier, then in the IA2 and IA1 images are eliminated the frontiers and this function begins again until all points are frontiers. In this case, the result obtained (reduction) is taken as the mark. In the array (step 3) is indicated that the labeled component with this value was processed and it is begun to look for another component. |
6. | Finish whenever the IA1 image is completely scanned. When this step is concluded, in the IA1 image all marks of the atherosclerotic lesions are. These marks are placed in the IREZI image, where the connected components of the IREZI image after the step two were filled. The IREZI image is the resulting image. |
The result of applying this algorithm to the image of Fig. 8b is shown in Fig. 9. In Fig. 9b one can see that the mark is unique for each atherosclerotic lesion, which is always within it. As we have pointed out, this procedure was for the lesions III and IV.
Fig. 9: | (a) Image with regions of interest. (b) Marking image. (c) Marks superimposed on the original image |
Fig. 10: | (a) Original image. (b) Image after the histogram modification |
Fig. 11: | (a) Initial image (see Fig. 10(b)). (b) Reconstruction by dilation ( lesion II ) |
Now, we will explain the steps that we carried out to obtain the marks for the lesions I and II. Analyzing an image for the lesions I and II (Fig. 10), one can observe that when we carry out an histogram modification, the intensity is slightly higher within lesions than local surrounding background. In Fig. 10b can be seen the resulting image of this transformation.
After this step, it carried out a reconstruction by dilation. This reconstruction improved a lot of the contrast of the lesions I and II. Figure 11 shows the obtained result of the reconstruction. The result in Fig. 11b was obtained by using a structuring element type rhomb of 5x5 size. The height was equal to 40. This study also carried out several experiments with distinct structuring elements for the lesions I and II. The results obtained were very similar to those depicted in Fig. 6 and 7.
Fig. 12: | (a) Regions of interest. The arrows indicate the connected components. (b) Image with marks. (c) The marks superimposed on the original image |
Fig. 13: | Steps to obtain the markers for the atherosclerosis lesions |
It was verified that the structuring element type rhomb of 5x5 size was of the best performance. In addition, with respect to height for the reconstruction, we concluded that the optimal height was in the range from 40 to 60 too. Out of this range, the same results were obtained as in the lesions III and IV.
Later, we obtained the approximate region of interest and the markers similarly as in the lesions III and IV. The obtained results are shown in Fig. 12.
Figure 13 depicts all steps of the proposed strategy to obtain robust markers for the atherosclerosis lesions.
Application of the proposed strategy for atherosclerosis image segmentation by using the watershed method: As we have pointed out the watershed transformation has the drawback of producing an over-segmentation as it is applied directly to the original image or the gradient image. In fact, Fig. 14b shows the obtained result as we applied directly the watershed transformation to a atherosclerosis image without good markers for the lesions. It is evident as the contours of the atherosclerotic lesions were not well detected and it is observed a lot of noise. However, in Fig. 14c is shown the excellent result obtained according to our strategy and the algorithm, which was introduced in this work. The contours of the atherosclerotic lesions were well defined.
In Fig. 15, the contours superimposed on the original image are shown in order to see the exact coincidence of the obtained contours.
In Fig. 16, another example of an application of our strategy is shown with another atherosclerosis image. Another example with real image is shown in Fig. 17, where one can see the contour superimposed on the original image.
Validation of the results obtained: In order to evaluate the performance of the proposed strategy, it was calculated, according to the criterion of pathologists, the percent of false positives and false negatives. In Table 1 the numerical results are summarised. We carried out this comparison with all images.
In Table 1, one can observe that the percent error for the false negatives (FN) was equal to 0%, that is, all the regions belonging to the atherosclerotic lesions were identified, which denotes the good performance of our strategy. This behavior was the same for 80 segmented images. In Fig. 15, 16c and 17b are indicated with arrows, according to the criterion of pathologists, the false positives. The percent of false positives (FP) was minor than 13% was verified. Nevertheless, one can see (Fig. 15, 16c and 17b) that the segmentation process was not completely correct, due to the variation of the intensity within images.
Table 1: | Numerical results of the validation |
Fig. 14: | (a) Original image. (b) The watershed segmentation without marks in the lesions. (c) The watershed segmentation according to our strategy |
Fig. 15: | The contours superimposed on the original image. The arrow indicates an object, which does not correspond to an atherosclerotic lesion |
Fig. 16: | (a) Original image. (b) Watershed transformation. (c) Contours superimposed on the original image. The arrow in Fig. 16c indicates an object, which does not belong to the lesion |
For that reason, the result of the segmentation process is presented to the pathologists for manual segmentation. With a few mouse clicks on the segmented image, the false positives are completely eliminated from the rest of the image. This work is a part of a global image analysis process in which these images will be subject to a further morphometrical analysis.
CONCLUSIONS
This study proposed a strategy to obtain robust markers for the atherosclerotic lesions. In such sense, we introduced an algorithm, which identifies correctly the atherosclerotic lesions and eliminates considerably all spurious information. With our strategy the application of the watershed transformation provided excellent results and we obtained the exact contours of the atherosclerotic lesions. This study extensive experimentation by using real image data, that the proposed strategy was robust for the type of images considered. This strategy was tested, according to the criteria of pathologists, obtaining the FN and FP, where the percent for FN was equal to 0% and for FP minor than 13%.
Fig. 17: | (a) Image with atherosclerotic lesions. (b) Contours superimposed on the original image. The arrows indicate an objects, which do not belong to the lesions |
Appendix
//int posX [8]; int posY [8];
// posX [0]=-1; posX [1]=-1; posX [2]=-1; posX [3]=0; posX [4]=1; posX
[5]=1; posX [6]=1; posX [7]=0
// posY [0]=-1; posY [1]=0; posY [2]=1; posY [3]=1; posY [4]=1; posY
[5]=0; posY [6]=-1; posY [7]=-1;
// CString valor; for example, valor = E .
// BYTE **Imagen,,**BAux,**BAux1;
// BOOL pointFind
// Method used to obtain marks.
// It controls the movement in the image
BOOL OperaImagen::pointValid (unsigned row, unsigned column)
{
return (( row >= 0) && ( row < HeightImag ) && (column >= 0) &&
(column < WidthImag ));
}
// To mark all the connected components with value equal to 215
void OperaImagen::Mark_Component (unsigned row, unsigned column,
BYTE **Imag)
{
Imag [row][column] = label;
Imagen [row][column] = 215; // Auxiliary image
for (int i =0; i < 8; i++)
{
if ((pointValid (row + posX [i], column + posY[i] )) && (Imag[ row +
posX[i]][column + posY[i]] == 0))
Mark_Component ( row + posX[i], column + posY[i], Imag);
}
}
// To identify with 1 the pixels belonging to background.
void OperaImagen::Mark_Background (unsigned row, unsigned column,
BYTE **Imag)
{
Imag[row][column] = 1; // To mark background.
for (int i=0; i < 8; i++)
{
if (( pointValid ( row + posX[i], column + posY[i])) && (Imag[row +
posX[i]][column + posY[i]] == 0)
&& (Imagen [row + posX[i]][column + posY[i]] == 0))
Mark_Background (row + posX[i], column + posY[i], Imag);
}
}
// To fill the connected components. The mark with value equal to 2 is not filled.
void OperaImagen::drawComponent (unsigned int r, unsigned int c)
{
if (BAux1[r][c] == 2)
{
Baux1[r][c] = 1;
BAux [r][c] = 1;
}
else
{
Baux1[r][c] = valor;
BAux [r][c] = valor;
}
for (unsigned i = 0 ; i < 8 ; i++)
if ((pointValid (r + posX[i],c + posY[i] )) && (BAux1[r + posX[i]][c +
posY[i]] •= 1) &&
(BAux1[f + posX[i]][c + posY[i]] != valor ))
drawComponent (r + posX[i], c + posY[i] );
}
// To identify the points that are frontiers.
BOOL OperaImagen::Frontier (unsigned r, unsigned c, BYTE **Imag)
{
for (unsigned i = 0; i < 8; i++)
if ((pointValid (r + posX[i], c + posY[i] )) && (Imag [r + posX [i]][c +
posY[i] ] == 1))
{
return TRUE;
break
}
return FALSE;
}
// To mark the frontiers for reducing the connected components.
void OperaImagen::Mark_Frontier (unsigned int r, unsigned int c)
{
BAux1[r][c] = 2;
for (unsigned i = 0 ; i < 8 ; i++)
{
if ((pointValid (r + posX[i],c + posY[i])) && (BAux1[r + posX[i]][c +
posY[i]] == valor))
if (Frontier (r + posX[i], c + posY[i], BAux1))
Mark_Frontier (r + posX[i], c + posY[i]);
else
{
if (! pointFind)
{
pointFind = TRUE;
proximaX = r + posX[i];
proximaY = c + posY[i];
}
}
}
}
//***********************************************************************
REFERENCES
- Vincent, L. and P. Soille, 1991. Watersheds in digital spaces: An efficient algorithm based on immersion simulations. IEEE Trans. Pattern Anal. Mach. Intell., 13: 583-598.
CrossRef - Kenong, W., D. Gauthier and M.D. Levine, 1995. Live cell image segmentation. IEEE Trans. Biomed. Eng., 42: 1-12.
CrossRef - Roberto, R.M., E.A. Teresa, W.N. Roberto and L.S. Cuello, 2002. Color segmentation applied to study of the angiogenesis. Part I. J. Intel. Robot. Syst., 34: 83-97.
Direct Link - Schmid, P., 1999. Segmentation of digitized dermatoscopic images by two-dimensional color clustering. IEEE Trans. Med. Imag., 18: 164-171.
CrossRefDirect Link - Koss, J.E., F.D. Newman, T.K. Johnson and D.L. Kirch, 1999. Abdominal organ segmentation using texture transforms and a hopfield neural network. IEEE Trans. Med. Imag., 18: 640-648.
Direct Link