• No results found

Stochastic Watershed: A Comparison of Different Seeding Methods

N/A
N/A
Protected

Academic year: 2022

Share "Stochastic Watershed: A Comparison of Different Seeding Methods"

Copied!
35
0
0

Loading.... (view fulltext now)

Full text

(1)

TVE 20 024 juni

Examensarbete 15 hp Juni 2012

Stochastic Watershed

A Comparison of Different Seeding Methods

Karl Bengtsson Bernander

Kenneth Gustavsson

(2)

Populärvetenskaplig sammanfattning

I projektet stochastic watershed vidareutvecklades en relativt ny metod inom bildanalys för att automatiskt dela upp en bild i olika regioner, så kallad segmentering. När denna metod används på bilder av endotelceller i hornhinnan fås ett resultat där nästan varje cell är omsluten av markerade cellväggar. Denna information om regionerna kan sedan användas för vidare analys, till exempel att räkna antalet totala celler i bilden eller att räkna ut cellernas areor. Metoden bygger på upprepade försök med ett antal startpositioner i bilden för segmenteringen. Dessa startpositioner varieras utifrån slumptal och kan placeras med olika fördelningar. I projektet undersöktes olika fördelningar och de som gav bäst segmenteringar identifierades. Denna information användes för att förbättra segmenteringen av cellbilderna.

Detta väcker förhoppningar om framtida vidareutveckling av metoden och fler

användningsområden inom till exempel biologi och medicin.

(3)

Teknisk- naturvetenskaplig fakultet UTH-enheten

Besöksadress:

Ångströmlaboratoriet Lägerhyddsvägen 1 Hus 4, Plan 0 Postadress:

Box 536 751 21 Uppsala Telefon:

018 – 471 30 03 Telefax:

018 – 471 30 00 Hemsida:

http://www.teknat.uu.se/student

Abstract

Stochastic Watershed - A Comparison of Different

Karl Bengtsson Bernander, Kenneth Gustavsson

We study modifications to the novel stochastic watershed method for segmentation of digital images. This is a stochastic version of the original watershed method which is repeatedly realized in order to create a probability density function for the segmentation. The study is primarily done on synthetic images with both same-sized regions and differently sized regions, and at the end we apply our methods on two endothelial cell images of the human cornea. We find that, for same-sized regions, the seeds should be placed in a spaced grid instead of a random uniform distribution in order to yield a more accurate segmentation. When images with differently sized regions are being segmented, the seeds should be placed dependent on the gradient, and by also adding uniform or gaussian noise to the image in every iteration a satisfactory result is obtained.

ISSN: 1401-5757, TVE 20 024 juni Examinator: Martin Sjödin Ämnesgranskare: Alfonso Garcia Handledare: Bettina Selig

(4)

Contents

1 Background . . . 5

2 Purpose . . . 7

2.1 A - Different seeding methods for same-sized regions . . . 7

2.2 B - Different seeding methods for differently sized regions . . . 7

3 Theory . . . 8

3.1 Image segmentation . . . 8

3.2 Segmentation using watershed . . . 8

3.3 Seeded watershed . . . 9

3.4 Stochastic watershed . . . 9

4 Method . . . 10

4.1 A - Different seeding methods for same-sized regions . . . 11

4.1.1 Experimental setup . . . 11

4.1.2 1D seeding . . . 12

4.1.3 Random uniform and pink noise based seeding . . . 13

4.1.4 Clustered seeding . . . 13

4.1.5 Seeding with Voronoi shifting . . . 14

4.1.6 Grid-based seeding . . . 15

4.1.7 Different numbers of seeds . . . 17

4.2 B - Different seeding methods for differently sized regions . . . 17

4.2.1 Experimental setup . . . 17

4.2.2 Gradient dependent seeding . . . 19

4.2.3 Added noise in every iteration . . . 21

4.3 Segmentation of endothelial cell images . . . 22

5 Results . . . 23

5.1 A - Different seeding methods for same-sized regions . . . 23

5.1.1 Different seeding distributions . . . 23

5.1.2 Different numbers of seeds . . . 26

5.2 B - Different seeding methods for differently sized regions . . . 27

5.2.1 Gradient dependent and random uniform seeding . . . 27

5.2.2 Added noise in every iteration . . . 28

5.3 Segmentation of endothelial cell images . . . 31

6 Conclusions . . . 33

6.1 A - Different seeding methods for same-sized regions . . . 33

6.2 B - Different seeding methods for differently sized regions . . . 33

6.3 Segmentation of endothelial cell images . . . 34

7 Discussion . . . 34

8 References . . . 35

(5)

1 Background 5

1 Background

Thanks to the increasing dominance of computers and digital images, computer based image analysis to- day is a fast expanding research area. Computer science and mathematics make up the cornerstones of this discipline, which in short is about processing and analyzing digital images. Image analysis methods are applied in photo editing software when adjusting contrast, brightness, sharpness, color balance and other parameters in a photograph. Face recognition is also part of image analysis and makes sure that peoples’

faces get blurred when caught by Google street view, or that your camera takes a picture after detecting a smile. Image analysis is also employed on satellite images to automatically detect the distribution of different surface features, such as water, forests, agricultural and urban areas. Additionally, image analysis is often applied in the fields of cellular biology and medicine, which naturally deal with large datasets in the form of images. For example, image analysis can be used to detect differences in tissue composition between MR images of healthy brains and those beginning to show the onset of Alzheimer’s disease. Still today, a lot of time goes into manually processing and analyzing these images, which can result in days of work or just skipping the analysis altogether because of the time involved. It is also a matter of human error; a computer behaves consistently, while a human could make mistakes or interpret the image differ- ently depending on her abilities and preferences. In the context of this, it is easy to understand why one would want to extend the amount of computer based image analysis in these fields. With the help of other knowledge and experience, this would let the professionals judge the deeper meaning of the images, such as if a patient can be considered healthy.

When dealing with specific endothelial cell images of the human cornea, one example of this desire would be to automatically segment the image. When applied on such a picture, the program would find and mark the lines between the different cells, dividing the picture into different regions; a straightforward but time consuming task for a human, though a bit more abstract to implement in a computer for various reasons. It is important that such a program would require little to no pre-knowledge about the image, such as information about how many cells are present, their sizes or how they are placed, in order to be of useful. After the segmentation it is a simpler task to analyze the picture, like getting a count of the number of cells, or finding the distribution of the areas of the cells.

One segmentation method that shows promise in meeting these requirements is the stochastic water- shed. It is a Monte Carlo method based on the common and much used watershed algorithm for segment- ing images. In short, the stochastic version begins by distributing a number of markers over the image.

These are called seeds and form the starting point for the watershed algorithm, which finds boundaries in the image. Some of these lines correspond to the ones we want to find in order to obtain an accurate segmentation; these we call true lines. The other lines are false and unwanted for the final segmentation.

By repeatedly applying this method, the true lines hopefully become stronger than the false lines. After this the false lines can be removed, completing the segmentation. For images with similar-sized regions, there exists an optimal range of the number of seeds close to the number of regions for obtaining an accu- rate final segmentation [1]. This is the case for the random uniform distribution, but this range might be different when using other distributions of seeds. For images with differently sized regions, the watershed algorithm has a tendency to segment the image into regions of similar size by introducing unwanted false lines. An example of the stochastic watershed algorithm applied on an endothelial cell image of the human cornea can be seen in figure 1.

(6)

1 Background 6

Fig. 1: Segmentation of endothelial cell image of the human cornea when using the stochastic watershed.

The original image is shown in (A). The result after 300 iterations of the stochastic watershed is shown in (B). Both true and false lines are present. In image (C), the result in (B) is thresholded to only show the strongest lines, removing most of the false lines, and then superimposed on the image in (A).

(7)

2 Purpose 7

2 Purpose

The aim of this report is to investigate how the stochastic watershed method can be improved. More specifically, we want to A) find out which distributions of seeds are the most efficient when segmenting images with regions of similar size, and B) find a seeding method that yields more accurate segmentations when dealing with images containing regions of different sizes, avoiding the phenomenon of dividing the image into similar-sized regions. An accurate segmentation should contain true lines corresponding to the boundaries of the regions while excluding unwanted false lines. These issues are presented throughout the report in subsections A and B. This is done for both 1D and 2D images to see if the results are consistent in different dimensions. After determining the most effective seeding methods, the goal is to achieve a successful segmentation of endothelial cell images of the human cornea.

2.1 A - Different seeding methods for same-sized regions

The main goal of subproject A is to try out a number of different distributions of seeds and determine which are the most efficient for use in the stochastic watershed. This will be limited to images with regions of the same sizes. We expect to find that spaced distributions outperform the ones containing clusters, since the former would distribute seeds evenly over the different regions. Additionally, the effect of using different numbers of seeds in the seeding methods are to be investigated. Here we expect to find an optimal range of the number of seeds close to the number of regions for these distributions, as concluded for the random uniform distribution[1].

2.2 B - Different seeding methods for differently sized regions

The purpose of this part of the report is to investigate different seeding methods for use in the stochastic watershed, and also the effects of adding noise in every iteration. This will be done for images with differently sized regions. In addition to this, it will also be investigated if and how the distribution of differently sized regions and their relative size to each other affect the result. We expect that there is some way to use approximative information about edges and lines in the image to improve the stochastic watershed algorithm. We also expect that the added noise will reduce the intensity of the false boundaries.

Finally we should be able to show that the result depends on how regions are distributed and their relative size to each other.

(8)

3 Theory 8

3 Theory

In this section, some basic concepts are explained. It also covers the current knowledge of the stochastic watershed that is used in this project.

3.1 Image segmentation

Image segmentation is basically dividing the image into different regions. That is, separating objects from the background and labeling them (give them individual id numbers) so that information about them can be extracted. Segmentation is an important step in image analysis but also a difficult problem [2].

3.2 Segmentation using watershed

Watershed is a useful and common method for image segmentation. The method is quite intuitive and the concept is based on interpreting the image as a topographic map. The image is seen as a landscape with peaks and valleys where there are three types of points: (i) local minima, the lowest points in valleys, (ii) points in slopes and (iii) ridges and peaks. Imagine rain falling down on the landscape and the valleys beeing flooded. At a point of type (ii) the water will with certainty continue into a single local minimum, i.e. a type (i) point. The type (i) points are labeled and when water flows from a point of type (ii) into a point of type (i) the type (ii) point gets the same label as the type (i) point. This way, each valley gets its own label. When water is falling down at points of type (iii) it is equally likely for it to continue into more than one local minimum. These points defines the watershed lines which separates the valleys from each other.

(a) (b)

Fig. 2: The basic concept of watershed segmentation. The figures can be regarded as a cross section of an image interpreted as a topographic map where the peaks corresponds to high grey level values and the valleys as lower grey level values. In figure 2a the points of type (i) are marked with circles and the dashed lines passes through the type (iii) points. The figure shows rain falling down on the landscape and the arrows indicates how the water will continue when it hits the ground. 2b shows the fully flooded image where watershed lines have been constructed at the points of type (iii) to prevent the merging of two adjacent regions. Where there is only one arrow in 2a no watershed lines are constructed since these points are of type (ii) and are not separating two valleys. (Original image courtesy of Martynas Patasius, Wikimedia Commons)

(9)

3 Theory 9

Watershed is often applied to a processed version of the image where different types of information have been highlighted and not to the original image itself. One example of processing is to convert the image to a binary image and then apply the distance transform which is assigning a value to each pixel in the background and objects representing the distance to the closest pixel in the background. Another alternative is to calculate the gradient of the image before applying the watershed algorithm. Depending on the application this can give a better result than applying watershed to the image itself [2].

3.3 Seeded watershed

Seeded watershed is a modified version of the original watershed method. A drawback with watershed is that it often leads to oversegmentation, i.e. the image is divided into too many regions. This can happen if there are local irregularities in the image or if there is noise present creating additional local minima.

If there are more local minima than there are regions in the image, it will be oversegmented. One way to avoid this is to use markers (seeds) to determine which points that should be regarded as type (i) points in the watershed algorithm and get an own label. Minima not marked as seeds will be regarded as type (ii) points. The result is a segmented image with one region for each seed. Though the result gets better, this requires prior knowledge such as the approximative positions of the regions.

(a) (b) (c)

Fig. 3: 3a shows an oversegmented image of cells. Since there are several local maxima in the intensity in some of the cells they are divided into more than one region by the watershed method. 3b shows the nuclei of the cells which in 3c are used as seeds to segmentate the image with seeded watershed. The nuclei are marked in 3c and the cells are correctly segmented. (Original image courtesy of Carolina W¨ahlby, Broad Insitute of Harvard and MIT)

3.4 Stochastic watershed

With stochastic watershed, seeded watershed is realized a large number of times with randomly placed seeds. The result from every realization is a segmentation built from the random seeds. By adding all those segmentations together a probability density function, PDF for the lines is constructed and used to obtain the final segmentation of the image. Algorithm 1 shows how the stochastic watershed that is used in this report is implemented. Previous work has shown that there are some parameters that affect the outcome [1, 3]. Selig and Luengo, [1] analyze the influence of the number of seed points and the size of the regions in an image. The conclusions drawn are that the number of seed points is not relevant

(10)

4 Method 10

for determining a good preliminary segmentation as long as the regions have similar sizes. However, the number of iterations that are needed to clearly identify the true boundaries decreases if the number of seeds is close to the number of regions. When it comes to regions of different sizes it is shown that the stochastic watershed fails to construct a PDF that can be used to segment the image. The PDF values are higher for some false boundaries than for some correct boundaries and is therefore not suited for segmentation. Not even experiments when the number of regions is known gives a satisfactory result. The basic stochastic watershed method is shown in algorithm 1.

Algorithm 1 Stochastic Watershed I{Original image}

Initialize PDF for i = 1 → M do

Create SN {Image with N random seed points}

Calculate Wi with seeded watershed on I with SN

PDF = PDF + Wi

end for

4 Method

In order to achieve our specified goals, an experimental approach was used. All of the seeding methods with specific parameters were implemented and tested one by one. They were first applied to synthetic test images which were created to mimic real images and still be suitable for the experiments. Stochastic watershed was then applied with 100 realizations. For every iteration the current PDF was calculated and by comparison with a ground truth four specific values were determined. These were:

• bmean, the mean value of the true lines

• bmin, the minimum value of the true lines

• bmax, the maximum value of the true lines

• lmax, the maximum value of the false lines

The ground truths were binary images of the true lines. These were only available for the synthetic images since the true lines in those images were known beforehand. This was not the case for the cell images, since the goal was to find these lines. The results could later be compared to a control group and evaluated. Each method was tested a small number of times to get a qualitative understanding of how each method performed compared to the others. To see if results were consistent across dimensions, both 1D and 2D test images were used. All of the methods used were implemented and tested using Matlab with the image processing toolbox and the freely available DIPimage toolbox.

(11)

4 Method 11

4.1 A - Different seeding methods for same-sized regions

4.1.1 Experimental setup

To test the hypothesis that equally spaced distributions would outperform clustered ones, eight distribu- tions were implemented in the 2D case. One of these was the random uniform distribution, which was used as a reference and could not be classified as either spaced or clustered. Another distribution with similar characteristics was implemented based on pink noise. One clustered distribution was tested, and which was expected to perform the worst. A distribution with almost equally spaced seeds was created based on Voronoi shifting. Two different spaced grids were created with equal spacing. These grids were also implemented with additional offsets for each seed to see what would happen when the spacing became more random. For the 1D case, three different distributions were tested: the random uniform, an equally spaced, and an equally spaced with additional random offset. In the tests, synthetic 1D and 2D images with regions of the same size were used as input to the stochastic watershed. The boundaries between these regions corresponded to the true lines, which were to be detected by the stochastic watershed. In order to to simulate the effects of the difficulties of segmenting real images, white noise was added to the image. Hopefully the stochastic watershed would not detect unwanted false lines in the noisy background, or detect them with low intensity. In the 1D case, images with 4 and 8 regions were tested. In the 2D case, images with 16 and 36 regions were tested. These images can be seen in figure 4a, 4b, 5a and 5b respec- tively. For each tested distribution, 1.5 times as many seeds as regions were used. The best performing distributions in this experiment were then tested more extensively with different amounts of seeds. The random uniform distribution was used as a reference for comparison with other distributions. In each case, the stochastic watershed was applied with M = 100 realizations. For every iteration the current PDF was examined and the values bmean, bmin, bmaxand lmaxwere determined.

(a) (b)

Fig. 4: The test images for the different 1D distributions. Image (a) shows an image consisting of 4 same- sized regions and white noise. Image (b) shows an image consisting of 8 same-sized regions and white noise.

(12)

4 Method 12

(a) (b)

Fig. 5: The test images for the different 2D distributions. Image (a) shows an image consisting of 16 same-sized regions and white noise, while image (b) shows an image consisting of 36 same-sized regions and white noise. The boundaries between the regions are of the same intensity.

4.1.2 1D seeding

For the 1D case, three distributions of seed points were used. The first was the random uniform distri- bution, which served as a reference. In the second the seeds were positioned with equal distance. The distance was selected as the floor of the division of the image size by the number of seeds. This distribu- tion had a starting random position and was generated by adding new seeds iteratively to the right and left of it. In the third distribution the seeds were positioned like in the second one, and then given an additional offset. The offset was computed as a random integer between −f and f, where f = �(δ/2) − 2�, and �x�

denotes the ceiling of x. Examples of 6 seeds placed according to the random uniform, equally spaced and equally spaced with random offset distributions are given in figure 6a, 6b and 6c respectively.

(a) (b) (c)

Fig. 6: Examples of different distributions for the 1D case with 6 seeds. All lines correspond to seeds.

The distributions are (a) uniform random, (b) equally spaced and (c) equally spaced with random offset.

(13)

4 Method 13

4.1.3 Random uniform and pink noise based seeding

For the 2D case, an example of 24 seeds placed with the random uniform distribution can be seen in figure 8a. Another distribution that was not spaced nor clustered was created by choosing the local maxima of pink noise as seed points. First an image filled with white noise was created, which was then smoothed with a Gaussian filter with σ = 10 to create pink noise. Finally, the local maxima were selected and the N most intense were selected as seed points, where N was the number of seed points to be used. This created a seemingly semi-random uniform distribution, as seen in figure 8b for 24 seeds.

4.1.4 Clustered seeding

A clustered distribution was implemented by modifying the method for creating the 2D hexagonal dis- tribution. First the number of clusters was decided by randomizing a number between 20-50 percent of the number of seed points. The number of seeds in each cluster was then selected as a random number between 50 and 150 percent of the number of clusters. If the total number of seeds in all the clusters was incorrect, the process restarted. The starting points of the clusters were then chosen by the random uni- form distribution, after which each cluster had its neighbors placed in the same way as for the hexagonal grid. The step between the neighbors was chosen as δ = �(dcy

dx2/(√

3sdy)) + 1�, where δ is the step size, �x� denotes the floor of x, dxand dy are the image dimensions, c is the number of clusters and s is the number of seeds. An example of this distribution for 24 seed points can be seen in figure 8c.

(14)

4 Method 14

4.1.5 Seeding with Voronoi shifting

By using markers generated with the random uniform distribution as a starting point, information from their so called Voronoi diagram was used to shift the markers in a manner to create a more evenly spaced distribution of seeds. The Voronoi diagram was constructed by drawing lines between the markers so that any point in any region was closest to the marker inside that region, as in figure 7. By shifting the marker in the smallest of these regions toward the marker in its biggest neighbor, redrawing the Voronoi diagram and repeating this process a Voronoi diagram with regions of approximately the same sizes was eventually produced. Sometimes however, looping behaviour disrupted this process. This was handled by, every other iteration, finding the largest region in the Voronoi diagram. After this, the marker in its smallest neighbor was shifted toward the marker in the biggest region. This avoided some of the previous looping behaviour. By finally placing seeds in the center of the Voronoi regions, the seeds were roughly evenly spaced. An example of the positions of 24 seeds after 100 shifts is seen in figure 8d.

Fig. 7: The Voronoi diagram for 100 seeds placed with the random uniform distribution.

(15)

4 Method 15

(a) (b)

(c) (d)

Fig. 8: Examples of different distributions for the 2D case with 24 seeds. All white pixels correspond to seeds, although their sizes are exaggerated. The distributions are a) random uniform, b) pink noise-based, c) clustered and d) Voronoi-based .

4.1.6 Grid-based seeding

Four different types of grids were implemented and tested in addition to the random uniform distribution of seed points. The first one was a square grid (four neighbors) with random rotation. The distance between two adjacent seeds was calculated as δ = �(dy

�dx/(sdy))�, where δ is the step size, �x� denotes the floor of x, dx and dy are the image dimensions, and s is the number of seeds. The grid had a random starting point and a random orientation in space, which was accomplished by randomizing starting coordinates and an angle. To construct the grid, a variant of the so called breadth-first search algorithm was used.

This implementation was favored over an iterative approach because of the former’s relative simplicity.

The second grid was constructed in the same way but with an additional random offset. The offset was computed by randomizing an angle and a radius between 0 and a maximum radius R, and shifting the

(16)

4 Method 16

seeds’ X and Y coordinates by the radius times the cosine and sine of this angle respectively. The R was calculated as R = �(δ/2 − 1)�. The third grid was hexagonal (six neighbors) with random rotation. The distance between two adjacent seeds was calculated as δ = �(dy

dx2/(√

3sdy))�. The fourth grid was constructed like the third but with an additional random offset, in a manner identical to the offset in the second grid. Examples of 24 seeds placed according to the square grid-based, square grid-based with random offset, hexagonal grid-based, and hexagonal grid-based with random offset distributions are given in figure 9a, 9b, 9c and 9d respectively.

(a) (b)

(c) (d)

Fig. 9: Examples of different distributions for the 2D case with 24 seeds. All white pixels correspond to seeds, although their sizes are exaggerated. The distributions are (a) square grid-based, (b) square grid-based with random offset, (c) hexagonal grid-based and (d) hexagonal grid-based with random offset.

(17)

4 Method 17

4.1.7 Different numbers of seeds

Each distribution was tested with a different number of seed points to get an idea of how the number of seeds affected the results. This was only done for the image consisting of 4 and 16 regions for the 1D and 2D cases respectively. For each 1D distribution, 2, 4 and 12 seeds were tested in addition to the 6 seeds that had been used in the earlier tests. For each 2D distribution, 8, 16 and 32 seeds were tested in addition to the 24 seeds that had been used in the earlier tests.

4.2 B - Different seeding methods for differently sized regions

Three different methods were tested and evaluated for images with differently sized regions. The first was the gradient dependent seeding, where information about lines in the image was used to place the seeds more effectively when looking for differently sized regions. A similar idea is discussed by Angulo and Juelin, [4]. The aim of the method presented here was to place more seeds in small regions and fewer seeds in big regions; this would avoid oversegmentation of the big regions and enhance the boundaries of the small regions. In the second method, noise was added to the images in every iteration with the expectation that the false boundaries would be less intense in the resulting PDF. The added noise would result in false boundaries in the PDF just like the background noise in the original images, but since the added noise was different for every iteration, different false boundaries would be detected each time. Because of this, the false lines would not be as intense as if the same false boundaries were detected in each iteration. Since the true boundaries were at the same place in each realization they would still be of high intensity in the final PDF. The third method was a random uniform seeding to use for comparison.

4.2.1 Experimental setup

For the experiments on images with differently sized regions the two image sets, S1 and S2, shown in figure 10 and figure 11 respectively, were created. Each set consisted of three synthetic images in both a 1D and 2D version. The 1D images in S1 are referred to as Id1, Id2and Id3and in S2 as Id4, Id5and Id6. A capital D is used to denote the 2D images. As an example, ID1 denotes the 2D version of test image 1. In the images, the backgrounds were constructed with uniform noise with grey level values between 0 and 0.5. The boundaries were one pixel thick lines with grey level value 1. The images were then linearly stretched to have values between 0 and 255. The 2D images were 480 x 480 pixels and the 1D images were 1 x 480 pixels. Each image had two different sizes of regions and they were placed differently for each set. In S1, the smaller regions were grouped together in the middle, and in S2 they were more uniformly spread over the image. Hopefully the use of two different sets would yield information about if and how the distribution of regions affects the result.

Figure 10 shows set S1, where the small regions were in a group in the center of the images and their relative size to the big regions varied between 5% (1/21), 8% (1/12) and 20% (1/5). In the 1Dl images there were four small regions, each placed next to each other and with one big region on each side of the group of small regions. In the 2D images, 16 smaller regions were placed in a square grid and 4 bigger regions were placed in each corner. Figure 11 shows set S2 where the small regions were, as previously mentioned, not grouped together. Instead they were spread more uniformly across the images. The size of the small regions relative to the big regions were varied between 10%, 50% and 90% for the three images.

(18)

4 Method 18

(a) Id1 (b) Id2 (c) Id3

(d) ID1 (e) ID2 (f) ID3

Fig. 10: Data set S1 in 1D (a)-(c) and 2D (d)-(f). They all have backgrounds created with uniform noise on the interval [0, 127.5]. The lines are 1 pixel thick with grey level value 255. The relative size between small and big regions are 5% (1/21), 8% (1/12) respectively 20% (1/5) for the images.

(19)

4 Method 19

(a) Id4 (b) Id5 (c) Id6

(d) ID4 (e) ID5 (f) ID6

Fig. 11: Data set S2 in 1D (a)-(c) and 2D (d)-(f). The images have the same features as the ones in S1 aside from the distribution and size of regions. These images have a more uniform distribution of small regions than S1.

All experiments done on images with differently sized regions were carried out in the same way.

The methods were tested for both the 1D and 2D versions of the data sets S1 and S2. For each image, stochastic watershed was applied with M = 100 realizations and with the number of seeds equal to number of regions in the image. 20 seeds were used for the 2D version of S1 and 6 seeds for the 1D version. For the 2D version of S2, 28 seeds were used while 7 seeds were used for the 1D version. For every iteration the current PDF was examined and the values bmean, bmin, bmaxand lmaxwere determined.

4.2.2 Gradient dependent seeding

This method placed more seed points close to high gradients in the image, I, and less seed points in other areas. This was done by extracting information about lines in the images with an edge detector and then placing the seeds dependent on the output. This approach could be effective because in areas in an image where there are several smaller regions there are also more lines than in similar sized areas with only big regions. Thus, the edge detector should give different outputs for areas with small regions and areas with big regions. To implement this idea in the stochastic watershed the probability map, PBM, was introduced.

The PBM is a grey level image and determines the probabilities for seeds in pixels. The grey level value of a pixel in the PBM corresponds to the probability of a seed point to be placed in the corresponding pixel in I. Where there are lines in I the value of the PBM is low, close to lines in I the value of the PBM is high and in pixels far from lines the value of the PBM is low.

(20)

4 Method 20

In the experiment the PBM was created by applying three filters to I. First, |∇Gσ=2� I| was cal- culated with a gradient magnitude filter, to detect the original lines in I. In order to make the detected lines wider and achieve a bigger area with higher grey values close to the true lines a Gaussian filter was used to calculate Gσ � (|∇Gσ=2� I|). The final step was to apply another gradient magnitude filter in order to get higher grey level values close to the broadened lines, |∇Gσ=1� (Gσ�|∇Gσ=2� I|)|. For the Gaussian filter, the σ was calculated individually for each image. The σ used in the experiment was 1/8 of the minimal distance between two parallel lines in I. This value was chosen after applying the method with different relationships between σ and the minimal distance between two parallel lines on some of the test images from data set S1 and S2. By visual inspection it was seen that the value 1/8 gave enough smoothing without getting to high grey values in pixels at the true lines. The size of the σ does not need to be determined from the distance between two lines, other information about the approximative size of the smallest region can be used as well. Note also that when all images in a data set are similar to each other, the same σ can be used for all of the images.

Since there were sets of pixels in the background in the test images that could be interpreted as lines it was important that the filtering could distinguish those false lines from the true lines. This was accom- plished by the Gaussian filter which smoothed the false lines enough to make them almost undetected by the second gradient magnitude filter. Since the true lines were of a higher intensity than the false lines they were preserved in the smoothing process and when the last gradient magnitude filter later was ap- plied the output contained clear traces of the true lines and only small traces of false lines. In other words, the resulting PBM had the wanted characteristics with low probability for seeds at the actual lines and in bigger areas and higher probability for seeds in areas close to lines. The probability map that were created for the test image ID3is shown in figure 12. The same figure also shows how the seeds were placed using this PBM. The basis of the gradient dependent seeding of the stochastic watershed is shown in algorithm 2

(a) (b)

Fig. 12: (a) shows the PBM for ID3 that were created and used in the experiment. The PBM seems to have the wanted characteristics, high probability for seeds close to lines and low probability in other areas. In (b) the seeding obtained with the PBM is shown. The seeds that are shown are the total amount of seeds after 100 realizations. It can be observed that most of the seeds are placed close to true lines.

(21)

4 Method 21

Algorithm 2 Stochastic Watershed with gradient dependent seed placing I{Original image}

Create PBM Initialize PDF for i = 1 → M do

Create SN based on PBM {Image with N random seed points}

Calculate Wi with seeded watershed on I with SN

PDF = PDF + Wi

Determine bmean,i, bmin,i, bmax,i, and lmax,i

end for

4.2.3 Added noise in every iteration

Two different types of noise were used in the experiment, uniform and Gaussian noise. The amplitude of the noise was calculated as a percentage of the maximum image intensity, max(I) which for the test images always was 255. For uniform noise, the three amplitudes, 10, 50 and 90% of max(I) were investigated. Since max(I) was equal to 255, the noise were uniform distributed in the intervals [0, 25], [0, 127.5] and [0, 229.5]. Three different cases of adding Gaussian distributed noise were tested as well. All of them had a mean equal to 0 but different standard deviations. The standard deviations were calculated as a percentage of max(I) and were 10, 50 and 90% of max(I) which gave the intervals [-102,102], [-510, 510] and [-980, 980] for the noise amplitude.

Algorithm 3 Stochastic Watershed with noise added in every iteration I{Original image}

Initialize PDF for i = 1 → M do

Create SN {Image with N random seed points}

Create and add noise to I

Calculate Wi with seeded watershed on I with SN

PDF = PDF + Wi

Determine bmean,i, bmin,i, bmax,i, and lmax,i

end for

(22)

4 Method 22

4.3 Segmentation of endothelial cell images

The distributions that showed the best results on the test images were selected to be used on the endothelial cell images. One cell image with regions of almost similar sizes, I1 and one with more differently sized regions, I2were chosen. For I1seeds placed in a hexagonal grid was used and for I2a gradient dependent seeding was used. The random uniform seeding was used as a reference. Before the methods were applied to the images a Laplacian filter was used to enhance the lines in I1and I2. The outcome of these experiments were evaluated by observation of the PDF and comparison with the original image.

For image I1300 iterations of the stochastic watershed was applied using the hexagonal grid distribu- tion with 60 seeds. Two experiments based on this setup were run: one with and one without additional noise introduced in each iteration. The noise was distributed randomly in the interval of 0 to 50 percent of the max intensity in the image. The number of seeds was selected by estimating the number of regions in I1 and choosing the number of seeds to be equal to this. The stochastic watershed was not applied to the image I1 itself but to a preprocessed version of it, ∇2Gσ=7� I1. This was done in order to sharpen the image so that the lines could more easily be detected. The parameters were the same when a random uniform distribution was used so that the result could be evaluated on the same basis. When testing the gradient dependent seeding on I2the image was preprocessed almost the same way as I1but with σ = 4 instead of 7 in the Laplacian filtering. Because of the differences between the lines in the synthetic test images and ∇2Gσ=4� I2the probability map was not created the same way in both cases. To get a PBM with the right features in this case it was created by calculating�

�∇Gσ=2� (∇2Gσ=4� I2)��, using no other filtering. The number of seeds used was chosen as 45 after estimating the number of regions in I2 to be almost the same. 100 realizations of stochastic watershed was applied both with the gradient dependent and the random uniform seeding.

(23)

5 Results 23

5 Results

Most of the results were evaluated on the basis of how big the difference was between true and false lines in the constructed PDF after the stochastic watershed algorithm. A good result meant that the minimum of the true lines were much stronger than the maximum of the false lines. After this, thresholding by a suitable value would only leave true lines intact, completing the segmentation of the original image.

5.1 A - Different seeding methods for same-sized regions

5.1.1 Different seeding distributions

The resulting PDF for the random uniform distribution with 24 seeds on the image with 16 regions is shown in figure 13a. It can be seen that all of the true lines have been detected correctly, but some false lines are also present. The values of the bmean, bmin, bmax and lmax are plotted against the number of iterations of the stochastic watershed algorithm in figure 13b. The minimum of the true lines, bmin(lower red dots), is around 62 for the last iteration, while the maximum of the false lines, lmax (green dots) is around 37, giving a positive difference of 25. This is a fairly good result, since the difference is big enough to be independent of small variations of the respective values, meaning that the unwanted false lines can relatively easily be removed by thresholding the PDF with a suitable value. The rest of the results follow in tables, with the interesting values of bmin, lmax and bmin − lmax shown for the final iteration of the stochastic watershed. The values are approximate; each experiment was repeated a small number of times and showed little variation between runs.

(a) (b)

Fig. 13: The results of the stochastic watershed algorithm, using the random uniform distribution with 24 seeds on the image with 16 regions. Figure (a) Shows the PDF, while (b) shows a plot of bmean, bmin, bmaxand lmaxagainst the number of iterations.

(24)

5 Results 24

Three different distributions were tested for the 1D case. The results are shown in table 1 for 4 and 8 equally sized regions. The number of seeds used was 6 and 12, respectively. All distributions perform well in the experiments, as seen in the large bmin− lmaxvalues. The equally spaced distribution produce a smaller bmin− lmax value than the others, but still detects the original lines the best as seen in the big bminvalues.

Tab. 1: PDF values after 100 iterations of the stochastic watershed for different distributions. It was applied on the 1D images consisting of 4 and 8 same-sized regions as shown in figures 4a and 4b, respectively. The number of seeds was 6 and 12, respectively.

Nr. of regions Distribution bmin lmax bmin− lmax

Random uniform 63 19 44

4

Equally spaced 93 54 39

Equally spaced + random offset 91 50 41

Random uniform 63 31 32

8

Equally spaced 90 63 27

Equally spaced + random offset 89 41 48

(25)

5 Results 25

Eight different distributions were tested for the 2D case. The results are shown in table 2 for sixteen and thirty-two equally sized regions. The number of seeds used was 24 and 54, respectively. The equally spaced hex and square grids perform very well in the experiments, as seen in the large bmin− lmaxvalues.

The hex grid performs the best. The grid-based with offset and Voronoi distributions perform well but worse than the hex and square grids, while the random uniform and pink noise distributions perform acceptably. The clustered distribution yields a negative bmin − lmax value, meaning that a successful separation between the true and the false lines is impossible.

Tab. 2: PDF values after 100 iterations of the stochastic watershed for different distributions. It was applied on the 2D image consisting of 16 and 32 same-sized regions as shown in figures 5a and 5b, respectively. The number of seeds was 24 and 54, respectively.

Nr. of regions Distribution bmin lmax bmin− lmax

Random uniform 61 38 23

Pink noise 65 27 38

Clusters 19 28 -9

16

Voronoi 89 39 50

Square grid 95 38 57

Square grid with offset 86 39 47

Hex grid 98 34 64

Hex grid with offset 87 35 52

Random uniform 50 40 10

Pink noise 55 41 14

Clusters 16 23 -7

32

Voronoi 85 42 43

Square grid 94 42 52

Square grid with offset 88 46 42

Hex grid 97 37 60

Hex grid with offset 85 40 45

(26)

5 Results 26

5.1.2 Different numbers of seeds

The 1D distributions were also tested with two, four and eight seeds for the image with four equally sized regions. The results are shown in table 3. The results are difficult to interpret, but it seems that the grid- based distributions perform best when using four seeds. All of them perform significantly worse when using two or eight seeds.

Tab. 3: PDF values after 100 iterations of the stochastic watershed using a variable amount of seeds and different distributions. 2, 4 and 8 seeds were used. The 1D image consisting of 4 same-sized regions as shown in figure 4a was used.

Nr. of seeds Distribution bmin lmax bmin− lmax

Random uniform 3 0 3

2

Equally spaced 7 0 7

Equally spaced with offset 26 0 26

Random uniform 44 18 26

4

Equally spaced 100 0 100

Equally spaced with offset 73 15 58

Random uniform 77 38 39

8

Equally spaced 100 100 0

Equally spaced with offset 91 78 13

Some 2D distributions were also tested with eight, sixteen and thirty-two seeds for the image with sixteen equally sized regions. Considering that the equally spaced outperformed the other distributions when using 24 seeds, only the grids were tested more extensively. The results are shown in table 4. Both the grids perform the best when using 16 seeds.

Tab. 4: PDF values after 100 iterations of the stochastic watershed using a variable amount of seeds and different distributions. 8, 16 and 32 seeds were used. The 2D image consisting of 16 same-sized regions as shown in figure 5a was used.

Nr. of seeds Distribution bmin lmax bmin− lmax

Square grid 6 0 6

8

Hex grid 10 0 10

Square grid 80 8 72

16

Hex grid 89 4 85

Square grid 98 66 32

32

Hex grid 97 51 46

(27)

5 Results 27

5.2 B - Different seeding methods for differently sized regions

5.2.1 Gradient dependent and random uniform seeding

The results from experiments in 1D are seen in table 5. The gradient dependent seeding yields a big enough difference between bmin and lmaxin order to separate them in one more case than the uniform seeding. It is also the best seeding for the images Id1, Id2 and Id3, which are the ones with the small regions grouped togehter and the biggest difference between region sizes. When the relative difference between region sizes is small or when the regions are uniformly spread across the images, as in Id4, Id5

and Id6, the random uniform seeding performs best.

Tab. 5: The final PDF values bmin, lmaxand bmin− lmaxwith gradient dependent seed placing used for S1 and S2 in 1D.

Gradient dependent Random uniform

seeding seeding

Test image bmin lmax bmin− lmax bmin lmax bmin− lmax

Id1 16 60 -44 16 63 -47

Id2 37 46 -9 23 53 -30

Id3 41 30 11 35 38 -3

Id4 40 34 6 35 25 10

Id5 31 21 10 36 19 17

Id6 36 18 18 49 17 32

Table 6 shows that, in 2D, the gradient dependent seeding distinguishes the true lines from the false lines in 4 more images than the random uniform seeding. Similar to the results in 1D, the gradient de- pendent seeding performs better than the random uniform seeding when the difference between region sizes are big or when the small regions are grouped together, as in the images ID1, ID2, ID3 and ID4. For the other images, the random uniform seeding performs better than, or almost as good as the gradient dependent seeding.

Tab. 6: The final PDF values bmin, lmaxand bmin− lmaxwith gradient dependent seed placing used for S1 and S2 in 2D.

Gradient dependent Random uniform

seeding seeding

Test image bmin lmax bmin− lmax bmin lmax bmin− lmax

ID1 53 57 -4 36 80 -44

ID2 63 56 7 41 84 -43

ID3 62 37 25 54 62 -8

ID4 53 39 14 40 40 0

ID5 61 27 34 57 30 27

ID6 60 26 34 65 23 42

(28)

5 Results 28

5.2.2 Added noise in every iteration

In the tables 7 and 8 it can be seen that the results are similar for both uniform and Gaussian noise added to the 1D images and without any noise at all added. The amplitude does not seem to make any major differences for the results. Both adding and not adding noise yield a better result for the images Id3, Id4, Id5 and Id6 were there the difference between region sizes are small or were the small regions are uniformly spread across the images.

Tab. 7: bmin-lmaxafter 100 iterations for the 1D images. Column one, two and three show the result from adding uniform noise on three different intervals in each iteration. The last column shows the result without adding noise.

noise interval

Test image [0, 26] [0, 128] [0, 230] without noise

Id1 -45 -50 -44 -47

Id2 -28 -37 -30 -30

Id3 -3 -6 3 -3

Id4 -12 -3 2 10

Id5 29 26 20 17

Id6 23 24 27 32

Tab. 8: bmin-lmaxafter 100 iterations for the 1D images. Column one, two and three show the result from adding Gaussian noise with three different values of σ in each iteration The last column shows the result without adding noise.

σfor the Gaussian noise

Test image 26 128 230 without noise

Id1 -47 -51 -50 -47

Id2 -39 -32 -27 -30

Id3 -6 -7 -8 -8

Id4 1 -10 6 10

Id5 17 21 20 17

Id6 29 24 27 32

(29)

5 Results 29

For the 2D images adding noise in every iteration was significantly better than not adding it. Table 9 shows that bminand lmaxcan be distinguished from each other for all images, given that a uniform noise with an amplitude equal to, or higher than 50% of the maxium image intensity is added. In table 10 it is shown that to distinguish bmin and lmax with gaussian noise added, the σ should be around 10% of the maximum image intensity. Both adding and not adding noise yield better result when the images have more similar sized regions or when the regions are more uniformly spread across the images. The only exception is when gaussian noise with a σ = 128 is added. In that case, the result improves when the relative difference between regions gets bigger. For the images ID1, ID2, ID3and ID4, were the relative difference between region sizes are biggest the uniform noise performs better than the Gaussian noise.

Tab. 9: bmin-lmaxafter 100 iterations for the 2D images. Column one, two and three show the result from adding uniform noise on three different intervals in each iteration. The last column shows the result without adding noise.

noise interval

Test image [0, 26] [0, 128] [0, 230] without noise

ID1 -4 21 30 -44

ID2 2 34 36 -43

ID3 27 45 52 -8

ID4 16 35 39 0

ID5 38 49 54 27

ID6 41 50 53 42

Tab. 10: bmin-lmax after 100 iterations for the 2D images. Column one, two and three show the result from adding Gaussian noise with three different values of σ in each iteration The last column shows the result without adding noise.

σfor the Gaussian noise

Test image 26 128 230 without noise

ID1 12 7 -15 -44

ID2 26 4 -12 -43

ID3 40 5 -11 -8

ID4 31 3 -16 0

ID5 45 3 -14 27

ID6 51 0 -13 42

(30)

5 Results 30

Figure 14 shows a comparison between the case when uniform noise with an amplitude equal to 50%

of the maximum intenstiy in ID1 was added in each iteration (first row) and the case without any noise added (second row). The leftmost images shows the resulting PDFs, in the middle, two images with all the boundaries in each case are shown and to the right, the developments of different PDF values are seen.

In figure 14a and 14d it is seen that the true lines are much stronger than the false ones when the noise was added. As mentioned in 4.2 the added noise would make the stochastic watershed find different false boundaries in each iteration end therefore decrease their values in the PDF. In figure 14b there are clearly more detected boundaries than in figure 14e. Even though there are more boundaries detected in 14b, figure 14c show that lmaxdoes not rise as fast as bmin. That is an indication that the method not just gave a good result but that it worked as expected.

(a) (b) (c)

(d) (e) (f)

Fig. 14: Six figures showing the difference between adding noise in every iteration (first row) and not adding it (second row). (a) and (d) shows the PDFs in both cases. (b) and (e) shows all the lines detected and the developments of different PDF values are plotted in (c) and (f). Figure (a)-(c) are from experiments on ID1 with uniform noise with an max amplitude equal to 50% of the maximum intensity in I.

(31)

5 Results 31

5.3 Segmentation of endothelial cell images

The resulting segmentations for the stochastic watershed for different seeding methods are shown in figure 15, for the image with approximately same-sized regions. It can be seen that the segmentation of the image is reasonable, considering the quality of the original image and the little amount of processing. Overall, the hex grid in (c) yields a more accurate segmentation, since it finds more true lines than the random uniform distribution in (b) does. However, both distributions miss some of the true lines and detect some false lines. The result is especially poor in the edges of the image. The resulting PDF when combining a hex grid with additional noise in each iteration is shown in figure 16. It is difficult to construct a good segmentation since the PDF lines are fuzzy from the added noise.

(a)

(b) (c)

Fig. 15: The results after applying the stochastic watershed on an endothelial cell image with approxi- mately same-sized regions. (a) Shows the unprocessed image of endothelial cells. In (b) and (c), the results with 60 seeds after 300 iterations of the stochastic watershed and thresholding over an intensity of 40 are shown for a random uniform distribution and a hex grid, respectively. The im- age was processed with a Laplacian filter with a σ = 7 before applying the stochastic watershed.

The interesting differences between the two results are highlighted with arrows.

(32)

5 Results 32

Fig. 16: The resulting PDF after applying the stochastic watershed on an endothelial cell image with approximately same-sized regions. 300 iterations of the stochastic watershed with 60 seeds in a hex grid were used. In each iteration, additional noise uniformly distributed between 0 and 50 percent of the maximum intensity in the cell image was added. The image was processed with a Laplacian filter with a σ = 7 before applying the stochastic watershed.

The results for the stochastic watershed on the image with differently sized regions are shown in figure 17. It can be seen that the segmentation of the image is reasonable, considering the quality of the original image and the little amount of processing. Overall, the gradient dependent seeding in 17c finds more true lines than the random uniform seeeding in 17b does. However, both seedings miss some of the true lines, especially around the edges of the image. In the experiment the PDFs were thresholded so that the presence of false boundaries was at a minimum for both cases.

(a) (b) (c)

Fig. 17: The results after applying the stochastic watershed on an endothelial cell image. (a) Shows the unprocessed image of endothelial cells. In (b) and (c), the results with 45 seeds after 100 iterations of the stochastic watershed and thresholding over an intensity to minimize the occurrence of false boundaries are shown for a random uniform distribution of seeds and the gradient dependent seed placing, respectively. The image was processed with a laplace filter with a σ of 4 before applying the stochastic watershed.

(33)

6 Conclusions 33

6 Conclusions

6.1 A - Different seeding methods for same-sized regions

Although more thorough experiments are needed to get definite answers, some conclusions can be drawn about effective distributions for same-sized regions. The results in section 5.1 show that the Voronoi distribution together with the square and hex grids without offset achieve the biggest separation between the true and false lines, the clustered achieve the lowest, and the rest fall in between. The conclusion is drawn that spaced distributions are preferable to clustered ones for the 2D case. The hexagonal grid performed the best in the experiments; Therefore, it was chosen in the segmentation of the endothelial cell images. The 1D distributions performed very different than their 2D counterparts, however. The reason for this is unknown and no conclusions can be drawn, except that what is true for one dimensionality is not necessarily true for another.

The Voronoi distribution performs well, however there are three problems. First of of all, there are rarely seeds in the edges. This is bad for images with smaller regions near the borders. Secondly, the method is very slow because of the amount of computations needed for each iteration. Third, it is very sensitive to looping behaviours. Consider for example shifting the point of the smallest Voronoi region towards its biggest neighbor; this makes the former region grow in size, and the latter shrink. If the former region after this still is the smallest, on the next iteration the point will shift again towards its biggest neighbor; this could now be another neighbor on the opposite side. This will make the point ”bounce”

between the two neighbor regions, stopping the intended manipulation of the Voronoi diagram.

Another distribution which is hard to implement as intended is the pink noise method. It is hard to create a spaced distribution since it seems no suitable value of σ can be found. The most intense local maxima seem to be placed in a way reminiscent of the random uniform distribution no matter the value of σ, although with fewer smaller clusters and more at the edges of the image. They might become more evenly spaced when using another type of noise or combination of filters.

The results when varying the number of seeds used for all of the distributions indicate that the closer the number of seeds is to the number of regions, the better the results. This holds for both the 1D and 2D cases. It does however seem likely that keeping these numbers close to each other improves the chance of having exactly one seed in each region. This chance would further be improved by using a spaced distribution, which could help explain why the best results were obtained when using the square and hexagonal grids with exactly the same number of seeds as regions.

6.2 B - Different seeding methods for differently sized regions

The experiments showed that, when images with differently sized regions are being segmented, the stochastic watershed performs better with a gradient dependent seeding or when noise is added in ev- ery iteration. The tables in section 5.2.1 and 5.2.2 show some differences in the results between 1D and 2D. In the 1D experiments the methods neither improved nor worsened the results compared to the random uniform distribution. However, the 2D experiments showed a significant improvement compared with just using a random uniform distribution of seeds.

The fact that the gradient dependent seeding worked indicates that images with differently sized re- gions are better segmented if the seeds are placed dependent on region size, i.e more seeds are placed in smaller regions than in big regions. It also indicates that it can be done by extracting basic information about the lines in the image with an edge detector.

(34)

7 Discussion 34

When adding noise in every iteration it was seen that uniform noise yields a better result than Gaussian noise. However, It can not really be compared since all three intervals for the uniform noise were inside the interval for the image intensity but two of the cases with Gaussian noise had amplitudes higher than the maximum image intensity. A conclusion that can be drawn is that the added noise should not have an amplitude higher than the image intensity.

When it comes to the relative size between regions and their positioning it definitely affects the result.

In each of the tables in section 5.2.1 and 5.2.2 the results indicate that it is easier to separate the true and false lines if the regions are of more similar size. The methods works best when the size of the small regions are 50% or 90% of the size of the big regions as in image ID5/Id5 and image ID6/Id6. Since the methods can handle images with both big and small differences in region sizes they can be applied to both cases. Regarding the position or distribution of regions in the image, the gradient dependent seeding and adding noise in every iteration generally perform better for the images in set S2 where the small regions are more uniformly spread over the images than in S1 where they are gathered in the middle.

6.3 Segmentation of endothelial cell images

For both images with similar sized regions and differently sized regions, the evaluated methods outperform the uniform distribution of seeds. This conclusion can be drawn after inspection of the results shown in section 5.3. There, it is seen that seeds placed in hexagonal grid finds more cells than a uniform distribution when the cells are of similar sizes. When combining the hex grid with added noise in each iteration, the PDF lines became fuzzy. This makes it hard to say if adding noise is preferable to not doing it. When the cells are of different sizes it is more efficient to place the seeds dependent on the gradient than in a uniform distribution.

7 Discussion

We have shown that the stochastic watershed can be successfully modified to achieve a better final seg- mentation of both images with same-sized regions and differently sized regions. These methods probably can be improved by more thorough testing. A more quantitative approach may be necessary for some of the methods. For example; in the investigation on how the number of seeds affect the result described in section 4.1.7 would give a more meaningful result if additional number of seeds are tested with a smaller step size between them. Also the investigation of adding noise in every iteration could be more meaning- ful if several different amplitudes are tested. The experiments showed that a space distribution is better than a random uniform when dealing with same-sized regions. These grids should be further investigated to determine how they differ from each other and how they perform compared to each other. Another spaced grid which could be interesting to investigate is the semi-regular grid, introduced in the paper by Borgefors [5].

Some of the results, for example in 5.2.2 and 4.2, were different for 1D and 2D. If the result actually is different for different dimensions could be determined if additional tests are done. The methods can be tested in both 1D and 2D as is done here but also in higher dimensions to find out if the difference follows any pattern.

(35)

8 References 35

8 References

[1] B. Selig and C.L. Luengo Hendriks. ”Stochastic Watershed – An Analysis” in H. Kjellstr¨om (ed.), Proceedings SSBA 2012, Symposium on Image Analysis, (March 8-9, 2012). Stockholm, Sweden, KTH Royal Institute of Technology

[2] R.C. Gonzalez, and R.E. Woods, Digital images processing (2008). 3rd edition. Pearson Education.

[3] F. Meyer and J. Stawiaski. ”A stochastic evaluation of the contour strength” in Michael Goesele, Stefan Roth, Arjan Kuijper, Bernt Schiele, and Konrad Schindler (Eds.), Proceedings of the 32nd DAGM conference on Pattern recognition, pp. 513-522, (2010). Springer-Verlag, Berlin, Heidelberg [4] J. Angulo and D. Jeulin. ”Stochastic watershed segmentation”. Submit. to Int. Symp. Mathematical

Morphology (ISMM’07), (October 10-13, 2007). Rio, Brazil

[5] G. Borgefors: A Semiregular Image Grid, Journal of Visual Communication and Image Representa- tion, Vol. 1, No. 2, pp 127-136 (Nov. 1990)

References

Related documents

Oorde fortsatt arbctc mcd insekter och da han atcr bosatt sig i Kariskrona, donerats at 。 lika ha‖ : de svcnska till Zool lnstitutionen i Lund och cn stor dcl av de utlindska t‖

It is clear from Figure 5 a) and b) that the extraction process was stable because there are no noteworthy fluctuations seen in the diagrams and the lines are almost linear. The

Show that the uniform distribution is a stationary distribution for the associated Markov chain..

In this paper we propose two simple modifications to the stochastic watershed that will strongly improve its properties: we randomize the way in which the watershed grows the regions

• Page ii, first sentence “Akademisk avhandling f¨ or avl¨ agande av tek- nologie licentiatexamen (TeknL) inom ¨ amnesomr˚ adet teoretisk fysik.”. should be replaced by

In recent years the Swedish education system has experienced a rise in the number of newly arrived students speaking different languages and with different

Baserat på våra slutsatser och analys kommer SJ’s värdekedja att påverkas av en ny depå i egen regi. Om en ny depåanläggning införskaffas kommer den att tillhöra den

The project resulted, in a new concept called “fixed with hooks” which was evaluated against other developed concepts and the original model before being evaluated in terms of