Ethel Nilsson

Embed Size (px)

Citation preview

  • 7/28/2019 Ethel Nilsson

    1/82

    Multifractal-based Image Analysis

    with applications in Medical Imaging

    Ethel Nilsson

    May 31, 2007

    Masters Thesis in Computing Science and Mathematics, 20 creditsSupervisor at CS-UmU: Fredrik GeorgssonExaminers: Per Lindstrm, Peter Wingren

    Ume University

    Department of Computing Science

    SE-901 87 UME

    SWEDEN

  • 7/28/2019 Ethel Nilsson

    2/82

  • 7/28/2019 Ethel Nilsson

    3/82

    Abstract

    In this thesis we look at the use of Multifractalsas a tool in image analysis. We begin by studyingthe mathematical theory behind the concept of multifractals and give a close description of bothfractal theory and multifractal theory. Different proposed approaches for estimating the multifrac-tal exponents for a digital image is then presented and we describe how these exponents can beused to perform image segmentation and texture classification. Based on one of the presented ap-proaches, a method for calculating the multifractal spectrum for a grayscale image is implementedand then tested for generated images with known multifractal spectra. We see that in this casethere is a large number of parameters that will affect the result, but with the right parametersetting we can obtain spectra that are close to the theoretically calculated spectra. However,finding a good parameter setting is not easy since the values depend on the type of image underconsideration and the image size. To see examples of the potential use of the multifractal approachin real applications, the implemented method is also tested for two different kinds of medical im-ages - mammograms and digital microscopy images. For both these applications it seems verypromising to use the multifractal spectra to distinguish between different tissue types representedin the images.

  • 7/28/2019 Ethel Nilsson

    4/82

    ii

  • 7/28/2019 Ethel Nilsson

    5/82

    Contents

    1 Introduction 1

    2 Fractal theory 3

    2.1 Fractals and fractal properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    2.1.1 Natural fractals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    2.2 The Euclidean and the Topological dimensions . . . . . . . . . . . . . . . . . . . . 6

    2.3 Fractal dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2.3.1 Similarity dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    2.3.2 Box-counting dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    2.3.3 Hausdorff dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    3 Multifractal theory 13

    3.1 Measure theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    3.2 Multifractal analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.2.1 The fine theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    3.2.2 The coarse theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    3.2.3 Moment sums and Legendre transformations . . . . . . . . . . . . . . . . . 18

    4 Multifractal-based image processing 21

    4.1 Grayscale digital images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    4.2 The multifractal approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    4.2.1 Image segmentation and texture classification using and f() . . . . . . . 22

    4.2.2 Methods for estimating the multifractal spectrum . . . . . . . . . . . . . . . 24

    4.2.3 The multifractal spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    5 Generating multifractal images 29

    5.1 Self-similar measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    5.2 Algorithm for generating images . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    6 Implementation 37

    6.1 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    6.1.1 Estimation of local dimension . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    6.1.2 The -image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

    6.1.3 Estimation of the multifractal spectrum . . . . . . . . . . . . . . . . . . . . 40

    6.1.4 The f()-image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    6.1.5 Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    iii

  • 7/28/2019 Ethel Nilsson

    6/82

    iv CONTENTS

    7 Results 45

    7.1 Comparison of two spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    7.2 Effects of different parameters for the generated images . . . . . . . . . . . . . . . 467.2.1 Measure used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

    7.2.2 Neighbourhood shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

    7.2.3 Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    7.2.4 Sizes of neighbourhoods for estimation of the local dimension . . . . . . . . 48

    7.2.5 Parameters for the estimation of the spectrum . . . . . . . . . . . . . . . . 50

    7.2.6 Effects of noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

    7.3 Results for real medical images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    8 Conclusions 69

    References 71

    A Statistical methods 73

    A.1 Least squares method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    A.2 Detecting influential observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    A.3 Detecting outliers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

    B Proofs 75

    B.1 Self-similar measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

    B.1.1 A unique number of (q) for each q . . . . . . . . . . . . . . . . . . . . . . 75

    B.1.2 The form of the function . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

    B.1.3 Equal quotients

    ln(pi)

    ln(si) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

  • 7/28/2019 Ethel Nilsson

    7/82

    Chapter 1

    Introduction

    Breast cancer is a leading cause of cancer-related death in women population today. However,if breast anomalities are detected and diagnosis are made at early stages, studies show that thechances of survival can be greatly improved [28],[17]. Currently the most reliable imaging tech-nique for the detection of such anomalities is Mammography, or X-ray examination, that alsoplays an important role in control during and after the treatment. The interpretation of mam-mograms is however not an easy task. The mammographic appearance of normal tissue is highlyvariable and the radiological findings associated with breast cancer can be very complex. 10-30%of cancers which could have been discovered are missed and a high percent of the patients thatare called back at screening turn out not to have cancer [17]. Since, even with experienced radi-ologists, errors in diagnosis can be introduced by human factors such as varying decision criteria,distraction by other image features or simple oversight, research is devoted to developing reliablecomputer aided diagnosis (CAD) methods. Research in this field is performed at the Departmentof Computing Science in collaboration with the department of Mathematics and Mathematicalstatistics at the University of Ume in Sweden. This masters thesis is made on commission bythis research group and the main aim of the work is to look at the mathematical concept ofMultifractals and how it can be used as a tool in image analysis. Fractal theory has been usedin various applications to calculate the fractal dimension of an image - a real number describingits structure or irregularity. Multifractal theory can be considered an extension of fractal theoryand since some natural phenomena (including natural images) might be better described by themultifractal theory, it is interesting to look at the introduction of this tool to image analysis. Themultifractal approach will provide us with a spectrum of fractal dimensions characterizing theimage and could potentially give us more information about the image compared to the single frac-tal dimension. The theoretical concept of multifractals is however based on continuous functionsand sets and applying this theory to a discrete environment will present us with some limitationsand problems. To see examples of limitations and also possibilities of the multifractal approach,

    a method for calculating the multifractal spectrum for a grayscale image will be implemented andtested for images with known properties. Then the result of this method for some real medicalimages will be examined.

    For the mammographic application the hopes are that this tool can help to improve classifica-tion of healthy and pathological tissue or the segmentation of important parts of the mammogramlike the edge of the breast or the breast muscle. Besides mammograms we will also look at digitalmicroscopy images of prostate tissue slices. Prostate cancer is the most common type of cancerfor men in Europe and the US and the methods to detect this kind of cancer are still precariousand new techniques are needed [15]. CAD-methods for the detection of this type of cancer couldpotentially be another application for the multifractal tool. The image acquisition is very differentfor microscopy images and X-ray images and it would be promising if the multifractal tool couldgive useful information about the object under observation for various ways of obtaining the med-ical image. Except for medical applications there are various image analysis applications where

    1

  • 7/28/2019 Ethel Nilsson

    8/82

    2 CHAPTER 1. INTRODUCTION

    this approach might be useful, for example in the forest or mining industry where computer aidedmethods can be used to distinguish different kinds of trees or minerals. However, a suitably modi-fied method will likely be needed for each particular application if good results should be obtained.

    This thesis is organized as follows:

    Theory behind the mathematical concept Multifractals, primarily based upon works by Ken-neth Falconer [11],[12] and Gerald A. Edgar [9], will be described in chapters 2 and 3. Chapter2 is devoted to the fractal theory that is needed for the understanding of the multifractal theory.We will here look at the concept fractal and different definitions of fractal dimension. Themultifractal theory is addressed in chapter 3. Since multifractals are based on measures or massdistributions this chapter begins with a section on measure theory. Then two approaches to definethe multifractal tool is presented - the coarse and the fine theory.

    In chapter 4 we look at the introduction of the multifractal tool to image analysis. We define

    a digital grayscale image and talk about how the tool can be used to perform image segmentationand texture classification. A number of proposed methods for calculating the multifractal expo-nents for a discrete image are presented.

    In chapter 5 we look at a method for generating images of multifractal character with knownproperties. These images will be used as test images when we examine the performance of ourimplemented method. Here a mathematical analysis of self-similar measures is given.

    Chapter 6 describes the implemented method. We will look at different parameters that willaffect the result and problems we must handle. In chapter 7 the results from testing this methodfor the images described in chapter 5 is presented and we will see in what way the different pa-rameters influence the result in this case. Then the results of this method for real medical imagesare presented. Finally, conclusions about the results are given in chapter 8.

  • 7/28/2019 Ethel Nilsson

    9/82

    Chapter 2

    Fractal theory

    2.1 Fractals and fractal properties

    In the classical mathematics, where chance and measures are not considered, the concepts andmethods are concerned only with smooth, regular ob jects and irregular sets are ignored. For ex-ample we can characterize the properties of smooth curves and surfaces through the concept of thederivative. Many natural phenomena however are so complicated and irregular that they cannotbe modeled well using these classical techniques. Some examples of problems where these phe-nomena appear are the growth and decline of populations, rainfall distribution, fluid turbulenceand trends in economy [26],[12],[31].

    In the last couple of decades it has been realized that these irregular sets and functions canbe regarded as a class to which a general theory can be applicable, known as Fractal geometry.

    This class represent many natural phenomena much better than figures of classical geometry doand the theory provides us with the concepts and practical techniques needed for the analysis ofthese phenomena [11].

    To give an exact answer to the question "What is a fractal?" is rather difficult. Benoit B. Man-delbrot founded the concept in 1975 and gave the name fractals to very irregular sets for whichthe Hausdorff dimension is strictly greater than the Topological dimension. Later it was foundthat a number of sets that should be regarded as fractals did not fulfil the criteria in the definitionby Mandelbrot. Other examples of definitions have been given but all of them seem to excludesome fractal sets [11]. So what then defines a fractal?

    To get an idea of what kind of sets we are talking about we will look at some common examplesof fractals.

    Example 2.1.1: An easily constructed fractal is the Cantor set illustrated in Figure 2.1. Toconstruct this set we start with a unit interval [0, 1], i.e. the real numbers 0 x 1, and performa sequence of operations on this set. Let E0 be [0, 1]. E1 is obtained by removing the middle thirdof E0, so that E1 is the set containing the two remaining intervals

    0, 1

    3

    ,23

    , 1

    . E2 is then givenby deleting the middle third of both intervals in E1. If we continue this procedure, obtaining Ekby removing the middle third of each interval in Ek1, the Cantor set will be given as the limitof the sequence of sets Ek when k tends to infinity. The Cantor set will not contain any intervalsbut in the neighbourhood of any of its points we can find infinitely many numbers. The Cantorset is thus infinite and uncountable.

    Example 2.1.2: Another fractal is the von Koch curve illustrated in Figure 2.2. Again let E0be [0, 1]. E

    1is obtained by removing the middle third ofE

    0and replacing it by the other two sides

    of a equilateral triangle based on the removed segment. In the next step we get E2 by performing

    3

  • 7/28/2019 Ethel Nilsson

    10/82

    4 CHAPTER 2. FRACTAL THEORY

    Figure 2.1: The sequence of sets Ek approaching the Cantor set.

    the same procedure on all the four segments ofE1. Continuing in this way, in each step replacingthe middle part of all straight line segments in the preceding set, the sequence of polygonal curvesEk as k tends to infinity approaches our limiting curve - the von Koch curve.

    Example 2.1.3: Our last example is the Sierpinski triangle that can be constructed in a similarway as in the above examples. He we start with the set E0 being an equilateral triangle and in

    each step an inverted equilateral triangle is removed from the center of each part of the precedingset (Figure 2.3).

    Kenneth Falconer states that, rather than to give a precise definition, a fractal should be regardedas a set with certain characteristic properties [11]. Most fractal sets have all these properties, butyou can also find fractals that are exceptions to some of them.

    Let us look at the fractal sets in the examples and examine their fractal properties:

    a) First of all these sets have fine structure. This means that no matter how many times wemagnify a part of the picture of the fractal, we always get a new picture showing more andmore detail (Figure 2.4).

    b) The sets are also self-similar in some sense. An object is said to be exact self-similar if it ismade up by parts that are scaled, translated and/or rotated copies of itself [16]. Structuresthat are artificially generated by applying exact rules are called deterministic fractals andthese fractals are exact self-similar (sometimes referred to as monofractals). The fractals inthe examples are all deterministic. For example, the von Koch curve is composed of fourpieces equal to the whole set, but all scaled by a factor 1/3. Some of the pieces are alsotranslated and rotated. Fractals appearing in nature are not exact self-similar but showstatistical self-similarity. This means that a magnification of a small part of the fractal willshow similar statistical properties as the whole fractal, but not exactly the same.

    c) Despite the complex structure of the sets in the examples, they all have quite simple defini-tions. All of them can also be obtained by a recursive procedure.

    d) These sets are too irregular to be described in traditional geometrical language, both locallyand globally. For example we call the von Koch curve a curve, but it is far too irregular

  • 7/28/2019 Ethel Nilsson

    11/82

    2.1. FRACTALS AND FRACTAL PROPERTIES 5

    Figure 2.2: The sequence of sets Ek approaching the von Koch curve.

    Figure 2.3: Three sets in the sequence approaching the Sierpinsky triangle.

    to have tangents in the classical sense. Later we will also see that ordinary geometrical

    measures, such as length and area, can not be applied in these cases.e) In section 2.3 we are going to define the concept of fractal dimension and the different ways

    in which the size and roughness of a fractal set can be estimated. Then we will see that thefractal dimension for these sets are greater than their topological dimension.

    We will have the above properties in mind when we refer to a set F as a fractal.

    2.1.1 Natural fractals

    To explain the concept of fractals and their dimensions we will often use deterministic fractals asexamples, but our aim is to use this theory to study natural fractal sets.

    Before the development of fractal geometry, nature was generally regarded as noisy Euclideangeometry. Mandelbrot however claims in [23]:

  • 7/28/2019 Ethel Nilsson

    12/82

    6 CHAPTER 2. FRACTAL THEORY

    Figure 2.4: Illustration of the property fine structure. The piece of the Sierpinsky triangle withinthe circle is magnified and the magnification shows the same structure as the whole triangle. If we

    would look closer at a piece of the magnification that looks homogeneous, we would again obtainthe same structure.

    "Clouds are not spheres, mountains are not cones, coastlines are not circles, and barkis not smooth, nor does lightning travel in a straight line."

    A central theme of fractal geometry is that nature exhibit some form of self-similarity despite itscomplexity. No matter how complex a shape or dynamic behaviour of a system may seem, wecan find features in one scale which resembles those at other scales. If we look at a branch froma tree, we see that the branch has similar structure as the whole tree, but to a smaller scale.We can find the same kind of structural behaviour by observing e.g. clouds, mountains, somevegetables like cauliflower and broccoli, venous and arterial system, etc [26],[13]. For our attemptto analyse medical images from a fractal point of view, an important fact is that human tissue ischaracterized by high degree of self-similarity [28].

    Natural fractals are however not self-similar over all scales. There is both an upper and lowerlimit beyond which the structure is no longer fractal. If we would magnify a part of a naturalobject too many times we would eventually be observing atoms and continuing the magnificationat this point would not show us any more detail.

    2.2 The Euclidean and the Topological dimensions

    Objects and phenomena are often described by using different measurements, called dimensions

    (the Latin word dimensio means measure). One of the most commonly used dimension is theEuclidean dimension, DE, that considers the space occupied by an object. In this measure astructure is called one-dimensional if it is embedded on a straight line, two-dimensional if it isembedded on a plane and three-dimensional if it is embedded in space. A point has dimension 0[26].

    Another familiar dimension is the Topological one, DT. The Topological dimension is definedregarding the way in which an observed object can be divided [9],[26]. The point is dimensionlesssince it is not a continuum and can not be divided, so for a point DE = DT = 0. A line (curve)will be one-dimensional, regardless of its shape, since it can be divided by points that are zero-dimensional. A surface will be two-dimensional since it can be divided by one-dimensional curves,and space three-dimensional, since to divide space two-dimensional surfaces are necessary. Forthese objects D

    Eand D

    Tdo not need to b e the same. According to the Euclidean definition a

    curve line lying in the plane will be two-dimensional and a complex curve lying in the space will be

  • 7/28/2019 Ethel Nilsson

    13/82

    2.3. FRACTAL DIMENSION 7

    Figure 2.5: Left: Cauliflower, that like many ferns and trees are built up by small pieces lookingsimilar to the whole object. These natural objects are not exact self-similar but show statisticalself-similarity. Right: A fractal generated by an iterative procedure resembling the natural object.Image from [13].

    three-dimensional. Similarly, a surface will only have Euclidean dimension two if the surface is flat.Otherwise the surface lies in space and have DE = 3. See [9] for a more thorough mathematical

    description of Topological dimension.

    2.3 Fractal dimension

    We mentioned earlier that the ordinary geometrical measures can not be used for fractals. In thecreation sequence for the von Koch curve, one set Ek can be shown to have length (4/3)

    k. When k

    tends to infinity this will imply that the fractal has infinite length. In a similar way you can showthat the length of the Sierpinsky triangle also tends to infinity, thus length is not an appropriateway to measure the size of these sets. One set Ek in the creation sequence of the Sierpinskytriangle consists of 3k triangles with side 2k. The total area of Ek will be 3

    k (2k)2 3/4 andthis converges to 0 as k tends to infinity. The von Koch curve also occupies zero area in the planeand we see that neither length nor area will give any useful information about these sets. Length

    is used to measure the size of sets of dimension 1 and area to measure the size of sets of dimension2. Our two fractal sets however appear to have a dimension larger than 1 but smaller than 2 andto find a way around this dilemma Hausdorff proposed in 1919 that the dimension of a set shouldbe allowed to be a fraction [9].

    The Euclidean and Topological dimensions both assume only integer values. For example, ac-cording to the Topological dimension both the van Koch curve and the Sierpinsky triangle hasdimension 1 and the Cantor set has dimension 0. Since these numbers do not provide muchinformation, the Fractal dimension is used to estimate the size and roughness of fractal sets. Im-precisely the Fractal dimension is a number associated with a fractal that tells how densely thefractal occupies the underlying space. This number, that is a real, will give us the possibility tocompare different fractals. The Fractal dimension of a set can be calculated in many ways andit is important to notice that different definitions may give different values of dimension for thesame set. The various definitions may also have very different properties.

  • 7/28/2019 Ethel Nilsson

    14/82

    8 CHAPTER 2. FRACTAL THEORY

    Figure 2.6: Illustration of the Similarity dimension for the Euclidean objects line, square and cube.

    2.3.1 Similarity dimension

    The fractal dimension for exact self-similar fractals, like the example fractals, can be assumed asa similarity dimension, DS. A self-similar set in Rn is the union of N non-overlapping copies ofitself, each copy scaled down by a ratio r < 1 in all coordinates. The relationship between N andr is a power law [26]

    N = rDS (2.1)

    and we get the similarity dimension as

    DS = ln N

    ln r. (2.2)

    This dimension can also be applied to non-fractal but self-similar Euclidean objects like the line,square and cube. We will determine the dimension for these sets to show that this measure is

    consistent with our intuitive feeling of dimension.

    Let us split a line in three equal parts. Each line segment will equal the whole line scaled by1/3 and 3 segments will be needed to make up the whole. We have that 3 = (1/3)1 and by thepower law, the dimension for the line is 1. If we now take a square and scale each side by a ratio of1/3, 9 pieces will be obtained and we get dimension 2 from 9 = (1/3)2. Finally for a cube witheach side scaled by 1/3, 27 pieces will be obtained and we get dimension 3 from 27 = (1/3)3.Figure 2.6 illustrate these kind of calculations.

    The Cantor set is generated from N = 2 parts scaled by r = 1/3 and we get the similaritydimension ln 2/ ln(1/3) = ln2/ ln3 = 0.631. This number captures the idea that the Cantor setshould have larger dimension than that of a collection of points (of zero dimension) but a smallerdimension than that of a line. We mentioned earlier that the von Koch curve was composed offour copies scaled by a factor 1/3. The similarity dimension for the von Koch curve can therefore

  • 7/28/2019 Ethel Nilsson

    15/82

    2.3. FRACTAL DIMENSION 9

    be calculated as ln 4/ ln(1/3) = ln4/ ln 3 = 1.262, a dimension between one and two. Finallythe Sierpinsky triangle consists of N = 3 triangles with side length 1/2 of the whole triangle. Thedimension for this set is ln 3/

    ln(1/2) = ln3/ ln2 = 1.584, a larger number than that for the von

    Koch curve but still smaller than two.

    For fractals that do not have this regular structure and a precise creation rule, the similaritydimension is not appropriate. The idea is now instead to look at the smallest number of sets N()with size depending on needed to cover the fractal, and examine the relationship between N()and at different scales. We therefore define the following.

    Definition 2.3.1: The diameter of a subset X of Rn, denoted |X|, is the supremum of thedistance between pairs of points in X according to the sets underlying metric.

    Definition 2.3.2: A cover of an arbitrary subset X ofRn is a family U of sets Ui in Rn such

    that

    X Ui (2.3)where i ranges over the natural numbers. IfU is countable (or finite) the cover is called countable(or finite).

    Definition 2.3.3: A -cover of X Rn is a (countable) cover such that for each i, |Ui| < ,where is a positive real number.

    Definition 2.3.4: A -mesh net on Rn is a partition ofRn into cubes, of side length , of theform

    [m1, (m1 + 1)) . . . [mn, (mn + 1)) (2.4)where m1, . . . , mn are integers. (In R1 a cube is an interval and in R2 a cube is a square).

    Figure 2.7: Left: A set in R2. Middle: A cover of the set by closed balls of radius . Right: A-mesh net laid over the set. The intersection with the set is shown in gray.

    We can now look at two definitions of fractal dimension for fractals that do not need to be strictlyself-similar.

    2.3.2 Box-counting dimension

    One definition of a fractal dimension is the box-counting dimension. This is one of the most widelyused fractal dimensions because that it is convenient to estimate in practice [11].

    Let E by any non-empty bounded subset ofRn. Let N

    (E) be the number of sets in the smallest-cover of E, that is the smallest number of sets of diameter at most that can cover E. The

  • 7/28/2019 Ethel Nilsson

    16/82

    10 CHAPTER 2. FRACTAL THEORY

    restriction to non-empty sets will make sure that ln N(E) is defined and since the dimension ofthe empty set is always zero, the box dimension will still be defined for all sets.

    Definition 2.3.5: The lower and upper box-counting dimensions of a set E are defined as

    dimBE = lim inf0

    ln N(E)

    ln (2.5)

    and

    dimBE = lim sup0

    ln N(E)

    ln . (2.6)

    If the lower and upper dimension are equal, their common value is the box-counting dimensionofE

    dimBE = lim0

    ln N(E)

    ln . (2.7)

    The box-counting dimension can be defined in many equivalent ways and we could also for examplelet N(E) be any of the following:

    the smallest number of closed balls of radius that cover E,

    the smallest number of cubes of side that cover E,

    the smallest number of -mesh cubes that intersect E,

    the largest number of disjoint balls of radius with centers in E.

    The proof for the equivalence is found in [11], p.38-41. Empirically it is common to let N(E) bethe number of cubes in a -mesh net that intersect the set E. For a set in R2 in this case, we candraw a mesh of boxes of side over the set and count the number of boxes that overlap the set

    for various small . To estimate the logarithmic rate for which N(E) increases when tends tozero, we can look at the gradient of the graph of ln(N(E)) against ln() [11].

    The closure of a set E is the smallest closed set that contain E, denoted E. Any subset E ofF that is dense in F, i.e. where E = F, will have the same box-dimension as F. This means thatthe box-dimension can not separate a set from its closure.

    Theorem 2.3.6: If E is a bounded set then

    dimBE = dimBE (2.8)

    anddimBE = dimBE. (2.9)

    Proof. Let us cover E by a finite collection of closed balls of radii . This finite cover will be aclosed set and with this set we must also be able to cover E since E is the smallest closed set thatcontains E. The theorem thus follows.

    2.3.3 Hausdorff dimension

    The Hausdorff dimension is a way of calculating the fractal dimension based on measures and likethe box-counting dimension it is defined on any set. Measures will be addressed more thoroughlyin Chapter 3 section 3.1, but briefly a measure is a function that in some sense describes thecontents of subsets of a given set. The definition of the Hausdorff dimension is quite complexbut it is important to study for the mathematical understanding of fractals. In practice it is hardto calculate and to estimate by computational methods [2],[11].

  • 7/28/2019 Ethel Nilsson

    17/82

    2.3. FRACTAL DIMENSION 11

    Let E be a subset ofRn and s > 0. We will begin by looking at all -covers of E and try tominimize the sum of the s:th powers of the diameters. For any > 0 define

    Hs (E) = inf

    i

    |Ui|s (2.10)where {Ui} is a -cover of E.

    If > 0 decreases the class of possible covers of E is also reduced. This means that the infi-mum Hs (E) increases and we denote the limit that is approached when 0 Hs(E).Definition 2.3.7: Hs(E) is called the s-dimensional Hausdorff measure of E and is defined as

    Hs(E) = lim0

    Hs (E). (2.11)

    This limit exists for all subsets ofRn and all s. It will take values in [0,

    ] and often is 0 or[24].

    We can look at the s-dimensional Hausdorff measure as a function of s [0, ]. The range of thisfunction consists of only one, two or three values, which can be zero, a finite number and infinity[2]. We can see that if < 1 Hs (E) is non-increasing with s and so must H

    s(E) be, since this isthe limit when approaches zero. If t > s and {Ui} is a -cover of E the following must be true

    i

    |Ui|t < ts i

    |U i|s (2.12)

    since |Ui| < .

    By taking infimum of both sides we get

    Ht(E) < ts Hs (E). (2.13)

    We let 0 and see that if Hs(E) = lim0 Hs (E) < then Ht(E) = 0 for t > s. What thissays is that there is a critical value of s where Hs(E) jumps from to 0 (Figure 2.8).Theorem 2.3.8: There is a unique number dimH > 0 such that

    Hs(E) = { if s < dimH, 0 if s > dimH} . (2.14)

    Definition 2.3.9: The Hausdorff dimension of E is defined as the unique real number

    dimH(E) = inf{s : Hs(E) = 0} = sup {s : Hs(E) = } . (2.15)If s = dimH(E) the value for Hs(E) can be zero, a finite number or infinity [11].

    What can we say about the relationship between the box-counting dimension and the Hausdorffdimension? The Hausdorff dimension assigns different weights |Ui|s to the covering sets Ui, whereasthe box-counting dimension assigns the same weight s for each covering set. This means that thebox-counting dimension will measure the efficiency with which a set can be covered by small setsof equal size, while the Hausdorff dimension also take into account coverings by small sets but ofperhaps varying sizes. For many sets that are regular enough these two dimensions will be equal,but in general the box-counting dimension gives a larger value for the dimension, as the followingtheorem shows.

    Theorem 2.3.10: If E is a bounded set then

    dimH(E) dimB(E) dimB(E). (2.16)

  • 7/28/2019 Ethel Nilsson

    18/82

    12 CHAPTER 2. FRACTAL THEORY

    Figure 2.8: The graph of Hs(E) for a Sierpinsky triangle. For a value of s less than 1.584 thevalue of Hs(E) is . For a value of s larger than 1.584 the value of Hs(E) is 0. The Hausdorffdimension is defined as the critical value of s where Hs(E) jumps from to 0, and we see thatthe Hausdorff dimension of the Sierpinsky triangle is 1.584.

    Proof. If we can cover E by N(E) sets of diameter , then from definition (2.10) we have

    Hs (E) N(E)s. (2.17)

    If 1 < Hs(E) = lim0 Hs (E) and we take the logarithm of (2.17) we get

    ln N(E) + s ln ln Hs (E) > ln1 = 0, (2.18)

    where the second inequality is strict if is sufficiently small. Thus for all small enough we have

    s 0 and 0we define

    Nr() = # {r-mesh cubes A with (A) ra} . (3.14)

    The number of r-mesh cubes A with

    r+ (A) < r (3.15)

    can be expressed by Nr( + ) Nr( ).Definition 3.2.6: For 0 the coarse multifractal spectrum of is

    fC() = lim0

    limr0

    ln+(Nr( + ) Nr( )) ln r (3.16)

    if the double limit exists.

    Using ln+(x) = max{

    0, ln(x)}

    will ensure that fC

    ()

    0.

  • 7/28/2019 Ethel Nilsson

    24/82

    18 CHAPTER 3. MULTIFRACTAL THEORY

    If we assume this limit exists the definition of the coarse spectrum tells us that for > 0 and > 0small enough

    rfC()+

    Nr( + )

    Nr(

    )

    rfC() (3.17)

    for all sufficiently small r. What this means, roughly speaking, is that the number of r-meshcubes with (A) approximately r obey a power law as r 0 and that the power law exponentis fC(). That is

    Nr( + ) Nr( ) rfC() (3.18)If the limit as r 0 in the definition of fC() fail to exist we define the following.Definition 3.2.7: For 0 the lower and upper coarse multifractal spectra of are

    fC

    () = lim0

    lim infr0

    ln+(Nr( + ) Nr( )) ln r (3.19)

    and

    fC() = lim0

    limsupr0

    ln

    +

    (Nr( + ) Nr( )) ln r . (3.20)The limit as 0 will exist since it is the limit of a decreasing (non-negative) function.

    The relationship between the fine and the coarse spectra is given in the following theorem.

    Theorem 3.2.8: Let be a finite measure on Rn. For 0fH() fC() fC(). (3.21)

    The proof can be found in [12], p.188.

    Notice the similarity with Theorem 2.3.10 and that just as certain sets can have equal Hausdorff

    and box-counting dimensions, certain measures have the same fine and coarse spectra [12].

    3.2.3 Moment sums and Legendre transformations

    Many measures have spectra that are equal to the Legendre transformation of an auxillary function based on moment sums. This provides an alternative way of calculating the coarse multifractalspectra that avoids the often slow and tedious work of directly estimating the power law behaviourof Nr( + ) Nr( ).

    Given a measure , the support is covered by a r-mesh net and for q R and r > 0 we con-sider the q-th power moment sums

    Mr(q) = (A)q

    taken over all cubes A with (A) > 0.

    We identify the power law behaviour of Mr(q) by the functions

    (q) = lim infr0

    ln Mr(q)

    ln r (3.22)

    and

    (q) = limsupr0

    ln Mr(q)

    ln r . (3.23)

    When they are equal the auxillary function : R R is defined by their common value

    (q) = limr0

    ln Mr(q) ln r (3.24)

  • 7/28/2019 Ethel Nilsson

    25/82

    3.2. MULTIFRACTAL ANALYSIS 19

    Figure 3.1: Illustration of the Legendre transform. The figure shows the function plotted againstq and the tangent to this curve with slope . For a given we receive the Legendre transformof as the intersection of the tangent with the vertical axis.

    that is the power law exponent in

    Mr(q) r(q). (3.25)In order for the Legendre transform of the (q) function to be easily and uniquely determined weneed (q) to be a convex, decreasing function. That (q) is convex roughly means that every cordof the graph of (q) lie above or on the graph. Inspecting Figure 3.1 we can see that a line withslope , through some point (q, (q)) on the graph of (q), will intersect the vertical axis in(0, (q) + q). We receive the Legendre transform of for a given in [min, max] as the mini-mum value of(q)+ qseen as a function ofq. Since (q) is convex the minimum value of (q)+ qwill be obtained when the line with slope is the tangent to the graph, i.e. where = (q0)for some q0 in R. More information about the Legendre transform can be found in e.g. [32] and [8].

    For 0 the upper and lower Legendre spectra of the measure can then be defined asthe Legendre transforms

    fL

    () = inf

    (q) + q

    (3.26)

    and

    fL() = inf

    (q) + q

    . (3.27)

    If these values are equal, their common value is the Legendre spectrum of

    fL() = inf{(q) + q} (3.28)

    The following theorem shows how the Legendre spectrum is related to the coarse multifractalspectrum.

  • 7/28/2019 Ethel Nilsson

    26/82

    20 CHAPTER 3. MULTIFRACTAL THEORY

    Theorem 3.2.9: Let be a finite measure on Rn. For 0

    fC

    ()

    fL

    () (3.29)

    andfC() fL(). (3.30)

    The proof can be found in [12], p.190.

    For many measures the Legendre spectrum equals the coarse multifractal spectrum and the vari-ables q and (q) can be used to find and fC(). This approach can have a problem for negativevalues ofq. If a cube only clips the edge of the spt() then (A)q can become very large. Howeverthere are ways to handle this problem, for example by restricting the sums to cubes with a centralportion intersecting the support of the measure [12].

  • 7/28/2019 Ethel Nilsson

    27/82

    Chapter 4

    Multifractal-based image processing

    The fractal geometry has been introduced a long time ago in image analysis. The fractal dimen-sion has been used to perform texture classification and image segmentation in different kinds ofapplications. For example it has been used as a feature in classification of pathological tissue inmammograms and tumour blood vessels [21],[16]. In this report we want to look at how the multi-fractal theory can be used to analyse digital grayscale images. How can the multifractal approachhelp in performing texture classification and image segmentation in for example mammogramsand microscopy images?

    When using a fractal approach, image analysis sometimes means computing some sort of fractaldimension for an image representing a certain state of a given process. By using the image, infor-mation of interest for characterizing the process is obtained [20]. Here, on the other hand, we donot want to use an image representation of a process to compute its associated fractal dimension,

    but to study an image itself and its structure and characterize it in terms of fractal features.

    4.1 Grayscale digital images

    One way to define a digital grayscale image, described in [14], is as a two-dimensional functionf(x, y) with finite, discrete spatial coordinates x = m x and y = n y, m = 1, . . . , M , n =1, . . . , N where the amplitude of f at any pair of coordinates (x, y) describe the intensity, or

    level of gray, of the image at that point. The amplitude of f is also a finite, discrete quantity,f(x, y) = l f, l = 0, . . . , (L 1), where the number of gray levels L typically is an integer powerof two. When an image can have 2k gray levels it is often referred to as a k-bit image, e.g. if 256gray levels are used the image is called an 8-bit image.

    A digital image is in other words composed of a finite number of picture elements, called pix-els, each of which has a particular location and value (Figure 4.1). We can write the digital imagewith M rows and N columns in matrix form as:

    f(x, y) =

    f(0, 0) f(0, 1) . . . f (0, N 1)f(1, 0) f(1, 1) . . . f (1, N 1)

    ......

    ...

    f(M 1, 0) f(M 1, 1) . . . f (M 1, N 1)

    21

  • 7/28/2019 Ethel Nilsson

    28/82

    22 CHAPTER 4. MULTIFRACTAL-BASED IMAGE PROCESSING

    Figure 4.1: Illustration of pixels. The location of a pixel is described by the spatial coordinates(x, y), and the level of gray in each pixel is given by f(x, y).

    4.2 The multifractal approach

    According to Lvy-Vhel and Berroir, fractal dimension is a good tool for characterizing theirregularity of a curve or a surface and they mention this as the main point that justifies theintroduction of multifractals in image analysis [20]. However, it seems to them that even if fractaldimension can sometimes help to get specific features from the data, applying it to characterizean image is totally unfounded. For such an approach the assumption must be made that the2D grayscale image can be seen as a 3D surface, or, equivalently, that the gray levels can beassimilated to a spatial coordinate on the z-axis. For examples of this view see e.g. [3],[1],[27] and[30]. According to Lvy-Vhel and Berroir this assumption has no theoretical basis. They thinkthat this approach leads to a fundamentally false analysis of the image, since the scaling propertiesof the gray levels are totally different from those of the space coordinates. Instead they say thatthe gray levels should be looked upon as a measure over a generally compact set, inhomogeneous

    to space coordinates, where the measure of a region is defined as a function of the gray levels of thepoints belonging to the region. By the multifractal spectrum f(), characterizing this measure,both local and global information of the image regularity can then be derived.

    4.2.1 Image segmentation and texture classification using and f()

    Image segmentation consists in finding the characteristic entities of an image, either by their con-tours (edges) or by the region they lie in. The edge detection approach and the region extractionapproach often vary much both in algorithms and segmentation results. In the classical methodsfor edge detection, edges are usually considered to correspond to local extrema of the gradientof the gray levels in the image. The difficulty arising is the computation of the derivative of amost of the time noisy, discrete signal. These methods therefore involve smoothing of the discreteimage data and the gradient is then computed by differentiating the smoothed signal [20]. Themultifractal approach, on the contrary, use the initial discrete image data directly. Based on the

  • 7/28/2019 Ethel Nilsson

    29/82

    4.2. THE MULTIFRACTAL APPROACH 23

    Figure 4.2: The result of thresholding an image at different values of f() and . Pixels withvalues within the given limits are shown in white. (The image is a part of a Brodatz texture from[33] published in [4].)

    idea that the underlying continuous process might not be possible to recover, the relevant infor-mation is extracted directly from the singularities. The advantage is that no information is lostor introduced by the smoothing process, which is an important feature in applications like edgedetection, segmentation and texture classification, particularly in medical diagnosis [25],[26]. Thedrawback is that this approach might be more sensitive to noise.

    The idea in multifractal segmentation is to extract image regions based on particular values of

    and/or f(). By appropriate choice of the ordered pair (, f()), different features may berecognized, extracted and even classified, both in geometric and probalistic sense. The value of will hold information about the local behaviour of the measure, i.e. how the measure will behavewhen increasing scale, and will respond to singularities such as lines, step-edges and corners. For atwo-dimensional signal, points having 2 are points where the measure is regular. Points with = 2 lie in regions where something happens, where we encounter singularities. If alpha is muchlarger or much smaller than 2 the region is characterized by a high gradient or discontinuities ofthe signal. The values of f() gives the global information of the image. Pixels belonging to theset with f() close to 1 correspond to pixels in the original image lying on a smooth contour orline (one-dimensional object). The set of f() close to 2 correspond to pixels in the original imagelying in the homogeneous region or surface (two-dimensional object).

    A probalistic interpretation of f() can also be made corresponding to the fact that a pointin a homogeneous region is a frequent event while an edge point is a rare event. f(), loosely

  • 7/28/2019 Ethel Nilsson

    30/82

    24 CHAPTER 4. MULTIFRACTAL-BASED IMAGE PROCESSING

    speaking, measures how rare or frequent an event of singularity is. Let us look at Figure 4.3. Wewould probably say that the left image shows three edges. The right image can be interpreted ascontaining eleven edges, but it is more likely that we would talk about a texture in this case. The

    local computation of will however be the same in both cases. An edge consequently has anothercharacteristic feature, it corresponds to a rare event in some sense. To characterize a point asan edge point we will first demand that it has a certain singularity value (local condition). Wewill then look at the set of all points with this singularity value, and demand that the dimensionof this set (f()) equals the dimension for a set of lines (global condition). The dimension for aset of edges should be close to 1. If the value of f() is closer to 2, the set contains too manypoints to be considered a set of edge points and could rather be considered as points belongingto a texture. If the value of f() is close to 0 we have detected very rare events, like for examplecorners.

    Figure 4.3: Left: Three edges, Right: A binary texture

    4.2.2 Methods for estimating the multifractal spectrumThe procedures described in chapter 3 for finding the local dimension and the multifractal spec-trum of a measure are based on functions that are continuous both in space and amplitude. Tryingto determine these values for a discrete space introduces several difficulties and limitations. Forexample, sizes of boxes covering the image must be an integer multiple of the pixel size, and thismakes limiting procedures impossible. We can not let the box size tend to zero since the smallestbox size we can observe is that of one pixel. Looking at the definition (3.7) of the local dimensionand the definition (2.7) of the box-counting dimension we see that we must find ways to estimatethese limits from our discrete images.

    Several methods for applying the multifractal theory to discrete space has been suggested andevaluated in different ways. A simple and direct way of computing the coarse spectra is the his-

    togram method. For example, we let be a measure on the attractor of a dynamical system. Bycounting the proportion of the iterates of an initial point in each r-mesh square A we can estimatethe number of squares for which k log (A)/ log r < k+1 for 0 1 < < k. The powerlaw behaviour of Nr( + ) Nr( ) is then examined by looking at this histogram for differ-ent r, and we get an estimate of f(). However, this method is often computationally slow andawkward [12]. In real and computer experiments the (q) function (defined in 5.2) has been easierto estimate and f() curves have usually been determined by the Legendre transform of (q) asdescribed in section 3.2.3 [12]. Transforming the curve into the f() curve generally involve firstsmoothing the beta curve and then Legendre transforming, and this has some disadvantages. Theerrors from the data itself will be harder to estimate since the smoothing procedure can introduceerrors, and discontinuities of the or f() curves can be missed.

    Another type of method, for example used in [28], has also been used for the direct computationof f(). For estimating the local Hlder exponent, or local dimension, each pixel is characterized

  • 7/28/2019 Ethel Nilsson

    31/82

    4.2. THE MULTIFRACTAL APPROACH 25

    by a discrete set of coarse Hlder exponents as

    i(m, n) =

    ln(i(m, n))

    ln i, i = 1, 2, 3 . . .

    where i(m, n) is the amount of measure in a box of size r = i. The natural logarithm of i(m, n)and of the box size i are calculated and corresponding points are plotted in a bi-logarithmicdiagram ln(i(m, n)) versus ln(i). The limiting value of (m, n) is then estimated as the slopeof a linear regression line. The continuous Hlder exponents are discretized into R values of r,and an -image, with one-by-one correspondence to image pixels, filled by values of r(m, n) iscreated. This alpha-image is then covered by a j-mesh net j = 1, 2, . . . and boxes containing atleast one value of r are counted giving the number Nj(r). Nets with different box sizes arerecursively considered and corresponding Hausdorff measures are calculated as

    fj(r) =ln Nj(r)

    lnj, j = 1, 2, . . .

    The limiting values of the multifractal spectrum f() is, in the same manner as for alpha, calcu-lated from linear regression from a set of points in a bi-logarithmic diagram of ln Nr(r) vs ln(j).

    Lvy Vhel and Pascal Mignot introduced some of the most commonly used measures i(m, m),known as capacity measures, and we will address these and their effects on the Hlder exponentin chapter 6, section 6.1.5. For a particular application an appropriate measure must be chosento get desirable effects.

    The application of this kind of method to real or experimental data however suffers from mathemat-ical ambiguities, i.e. is f() a Hausdorff or box-counting dimension? Large errors are also causedby the logarithmic corrections arising from the scale-dependent prefactors in N(r) rf(r).Despite these quantitative inaccuracies, the method provide important qualitative information

    about the statistical properties of the measure [6].

    In [6] A Chhabra and R.V. Jensen presents a method that circumvents the difficulties of thelog-log methods without resorting to the intermediate Legendre transform. This is a simple andmathematically precise method for the calculation of the f() spectrum for real or experimentaldata where the underlying dynamics are unknown. There are several theorems saying how tocompute the dimension of the support of measures arising from multiplicative processes describedby probabilities Pi. The entropy S of such a measure is

    S = i

    Pi log Pi

    The Hausdorff dimension of M, the support of the measure associated with the process, can berelated to the entropy by

    dimH(M) = limN

    1

    log N

    Ni=1

    Pi log Pi. (4.1)

    We cover the support of the experimental measure P(X) we are looking at with boxes of size r anddefine Pi(r) as the probability in the i:th box. If we bin the measure so that the Pi(r) correspondto the probabilities of a multiplicative process with N r1 then equation (4.1) tells us howto compute the Hausdorff dimension of the support of P(X). To evaluate the f() spectrumwe construct a one-parameter family of normalized measures (q) where each box of size r hasprobability

    i(q, r) = [Pi(r)]q

    /j

    [Pj(r)]q

    . (4.2)

  • 7/28/2019 Ethel Nilsson

    32/82

    26 CHAPTER 4. MULTIFRACTAL-BASED IMAGE PROCESSING

    Through the parameter q, that works like a microscope, different regions of the measure can beexplored. For q > 1, (q) amplifies the more singular structures of P(X), while for q < 1 the lesssingular regions are enhanced. For q = 1 we get the original measure. Equation (4.1) gives us the

    Hausdorff dimension of the support of (q) and we get

    f(q) = limN

    1

    log N

    Ni=1

    i(q, r)log[i(q, r)] = limr0

    i i(q, r)log[i(q, r)]

    log r(4.3)

    and the average value of the singularity strength i = log(Pi)/ log r with respect to (q) is obtainedas

    (q) = limN

    1

    log N

    Ni=1

    i(q, r)log[Pi(r)] = limr0

    i i(q, r)log[Pi(r)]

    log r(4.4)

    These functions of the parameter q gives a relationship between a Hausdorff dimension and anaverage singularity strength . One can generally show that f(q) and (q) introduced this way

    provide an alternative definition of the multifractal spectra. To estimate the limiting values inthe equations (4.3) and (4.4) the method of linear regression of points in a bi-logarithmic diagramis used. Errors may arise from having to find the best linear fit to oscillating points, but despitethese errors the method will reproduce the top of the f() curve very accurately.

    The wavelet transform is a mathematical tool consisting in the decomposition of a signal on aset of functions characterized by parameters of position and scale. The application of this kindof wavelet transform representation to multifractal analysis has lately become very common. TheWavelet Transform Modulus Maxima (WTMM) is a wavelet-based multifractal formalism thatwas introduced by Arneodo, Bacry and Muzy, and this method has been used to examine variousnatural phenomena [18]. The 2D WTMM method was applied in [17] to perform a multifractalanalysis of digitized mammograms. This method was originally designed to statistically describethe roughness fluctuations of fractal surfaces, and in their work they summarize how the methodprovides an efficient framework to study synthetic and natural fractal images. Briefly, the methodconsists in performing a wavelet based multiscale Canny edge detection. Wavelet transforms aretaken at different scales and the scaling exponents are computed by following maxima lines.

    Both methods based on wavelets and methods based on moments sums are technically involvedand are very demanding in sampling statistics. Large datasets are required to avoid poor samplingstatistics for small and large values of the singularity strength and to get a good estimate of thesingularity spectrum.

    4.2.3 The multifractal spectrum

    Spectra obtained by using different methods will not look exactly the same, but the global shape

    should be very close. The function f() is continuous over usually having the graph or f()curve bell-shaped. Depending on the method, the obtained spectrum may or may not be a smoothcurve line. The width of the spectra is related to the variability of the intensities in the image.Higher variability gives a broader spectrum as we will see when we analyse self-similar measuresin Chapter 5.

    The multifractal spectrum will obtain its maximum at a value of close to the dimension ofthe signal under observation. When we look at images as 2D signals the maximum of the spec-trum will be obtained at an close to 2. In [26] the authors look at digitized microscopy imagesand try to tell if samples belong to different tissues or not. After calculating the f() curve for thedifferent images they compare the values at which the maximum of each spectrum is obtained.The authors say that differences in this value suggest that the samples belong to different tissues.According to them, zoomed parts of an original image have spectra similar to the spectrum ofthe whole image. The maximum of the spectra for zoomed parts of the image will be obtained

  • 7/28/2019 Ethel Nilsson

    33/82

    4.2. THE MULTIFRACTAL APPROACH 27

    at approximately the same value as for the original image. The variability of the intensities ina zoomed part may not be equal to the original image, and thus the width of the spectrum maydiffer from that of the original image.

  • 7/28/2019 Ethel Nilsson

    34/82

    28 CHAPTER 4. MULTIFRACTAL-BASED IMAGE PROCESSING

  • 7/28/2019 Ethel Nilsson

    35/82

    Chapter 5

    Generating multifractal images

    To be able to evaluate how correctly a method approximate the true multifractal spectra we needsome sort of test images for which the multifractal spectrum is known.

    Several methods for fractal modeling and generation have been introduced in the last decades.The Iterated Function System methods, popularized by Barnsley [2], are very useful for mod-eling and generating self-similar fractals because they are simple and mathematically sound. Aminimum set of input data is also required [31].

    Since we are concerned with generating two-dimensional images we will consider this methodonly for R2. To measure the distance between two points in this space we use the Euclideandistance, i.e. the distance between x,y R2 is

    |x

    y

    |= |x1 y1|

    2+

    |x2

    y2

    |2

    where x = {x1, x2} and y = {y1, y2}. We let X be a given subset ofR2 that with the definedmetric constitutes a metric space. We assume that this metric space is closed.

    An Iterated Function System (IFS) is a finite number of contraction mappings {w1, . . . , wN}on X with respective contractivity factors {s1, . . . , sN}. A contraction mapping wi : X X is atransformation that reduces the distance between every pair of points in X, i.e. there is a factors (0, 1) such that

    |wi(x) wi(y)| s |x y| (5.1)for all pairs of points x and y in X. The smallest constant s is the contractivity factor. wi iscalled a similarity if there is equality in equation (5.1) for all points x and y. In this case wi willtransform a set into a new smaller set, geometrically similar to the original one [24].

    Iterating the IFS, applied to any compact (i.e. bounded and closed) subset in R2, we will re-ceive a sequence of sets converging to a unique shape A X, a fixed point called the attractor ofthe IFS. This is the only set invariant under the application of {w1, . . . , wN}, i.e.

    A =

    Ni=1

    wi(A)

    and is a deterministic fractal [2],[13].

    5.1 Self-similar measures

    A multifractal measure can be obtained from an IFS by assigning probabilities pi

    (0, 1) to eachof the transformations in the IFS, such that ipi = 1. First an initial point, belonging to the

    29

  • 7/28/2019 Ethel Nilsson

    36/82

    30 CHAPTER 5. GENERATING MULTIFRACTAL IMAGES

    Figure 5.1: Top left, top right and bottom left: Textures arising from the Random IterationAlgorithm with increasing number of points, where points are shown in white. The mappings ofthe IFS used are W1(x) = (x1/2, x2/2), W2(x) = (x1/2, x2/2) + (0, 1/2), W3(x) = (x1/2, x2/2) +

    (1/2, 0) and W4(x) = (x1/2, x2/2) + (1/2, 1/2), for a point x = {x1, x2}, and the correspondingprobabilities {0.3, 0.3, 0.1, 0.3}. The attractor of the IFS is the whole square. Bottom right:Grayscale image representing the probability of finding a point at each position, i.e. the proportionsof points landing at each position. Brighter pixels correspond to higher probabilities.

    attractor of the IFS, is picked and one of the mappings in the set {w1, . . . , wN} is chosen at randomwith respective probability {p1, . . . , pN}. The selected map is then applied to the starting point togenerate a new point, and with this new point the same process is repeated again. Continuing thisiterative process, a sequence of points is obtained that, under various conditions, will convergeto the attractor of the IFS, as the number of points increases. This is known as the RandomIteration Algorithm. By adjusting the probabilities we can make different parts of the fractal fillin at different rates. In Figure 5.1 we see that if the algorithm is halted before the image becomessaturated, diverse textures arise. The attractor is in each case the same but the points fromthe generated sequence rain down on the attractor with different frequencies on different placesand this will make some areas appear more dense than others [2],[13]. By dividing the number ofpoints landing on a certain place by the total number of points generated we can also talk abouta probability in each part of the attractor.

    An IFS with probabilities induces a contracting map on the set of Borel probability mea-sures M(X) on R2 with a unique fixed point described as a multifractal measure whose supportis the attractor of the underlying IFS. This unique measure fulfills

    (E) =

    Ni=1

    pi (w1i (E)) (5.2)

  • 7/28/2019 Ethel Nilsson

    37/82

    5.1. SELF-SIMILAR MEASURES 31

    for all sets E and if the IFS consists particularly of similarities this measure is called a Self-similarmeasure [12],[7].

    In this section we are going to look at a method for calculating the multifractal spectra for theclass of Self-similar measures. This method is however a prototype for multifractal calculationsfor many classes of measures.

    We define a self-similar measure by the IFS with probabilities consisting of the mappings{W1,...,WN} on R2 with contractivity factors {s1, . . . , sN} and associated probabilities {p1, . . . , pN}.We let A = spt() be the attractor of the IFS and we assume that the strong separation condi-tion is satisfied, that is Wi(A) Wj(A) = for all i = j, so that A is totally disconnected. For1 i N a sequence (i1, . . . ik) will be denoted i. We let X be any non-empty compact set in R2with Wi(X) X for all i and Wi(X) Wj(X) = if i = j. We use the notation

    Xi = Xi1 , . . . , X ik = Wi1 Wikand assume that the diameter (definition 2.3.1), |X| = 1 so that we get for i = (i1, i2, . . . , ik)

    |Xi| = si si1si2 sikand

    (Xi) = pi pi1pi2 pik .The multifractal spectrum f() for this measure can be calculated as the Legendre transform ofa function . Given a real number q, we define = (q) as the positive number satisfying

    Ni=1

    pqi s(q)i = 1. (5.3)

    We prove in Appendix B.1.1 that this definition will give us a unique number of (q) for each q.

    In Appendix B.1.2 we also derive that, unless the quotients ln(pi)ln(si)

    are equal for all i, : R Ris a strictly decreasing, strictly convex function (Figure 5.2) and from the definition we concludethat

    limq

    (q) = (5.4)and

    limq

    (q) = . (5.5)The derivation in Appendix B.1.3 tells what happens when all quotients are equal, i.e. whenln(pi)ln(si)

    = c for all i and some positive constant c. The function will then be a linear function

    with slope c and the multifractal spectrum will here only consists of the point (c, dim(spt()))as shown in Figure 5.3.

    From now on we assume that ln(pi)ln(si)

    are not equal for all i so that is a strictly decreasing

    and strictly convex function.

    If we let f be the Legendre transform of

    f() = inf

  • 7/28/2019 Ethel Nilsson

    38/82

    32 CHAPTER 5. GENERATING MULTIFRACTAL IMAGES

    Figure 5.2: Form of the (q) function for a typical self-similar measure. We see that (q) tendsto - as q grows large and (q) tends to as q tends to -. (0) give us the dimension of thesupport of the measure used. The slope of the asymptotes gives us max and min.

    Figure 5.3: Left: The function plotted against q in the case when all probabilities are equal.Right: The theoretical spectra, f() plotted against , in the case when all probabilities are equal.Here the multifractal spectrum only contains one point.

    We then have

    f() = q+ (q) = qddq + (q). (5.8)

  • 7/28/2019 Ethel Nilsson

    39/82

    5.1. SELF-SIMILAR MEASURES 33

    If any one of q, or is given, the other two can be determined by using the equations (5.3) and(5.7). If we differentiate (5.3) we can write as

    =N

    i=1pqi s

    i lnpiN

    i=1pqi s

    i ln si

    . (5.9)

    From this expression we can see that

    min = min1iN

    lnpi/ ln si

    and

    max = max1iN

    lnpi/ ln si

    corresponding to q approaching and - respectively. If all the quotientsln(pi)

    ln(si) are different wewill also have f(min) = f(max) = 0 [13].

    If we look at q as a function of and differentiate the expression for f() in equation (5.8)with respect to , we get using (5.7)

    df

    d=

    dq

    d+ q+

    d

    dq

    dq

    d=

    dq

    d+ q dq

    d= q. (5.10)

    q decreases as increases and this tells us that f is a concave function of , which roughly meansthat every cord of the graph of f() lie under or on the graph (Figure 5.4). Since df

    d= q the

    end points of the multifractal spectrum must have vertical asymptotes. We can also come to theconclusion that the maximum of f will be reached when q = 0 and the corresponding value of fis f() = 0 + (0) = (0). By the definition of (q) we have in this case

    Ni=1

    s(0)i = 1.

    The similarity dimension of the attractor A, DS(A) of the underlying IFS is the unique solutionD of the Moran equation

    Ni=1

    sDi = 1. (5.11)

    (In [13] this is derived from the definition of similarity dimension). This tells us that (0) = DS(A)and for an IFS of similarities we have DS(A) = dimH(A) = dimB(A) [12]. Since A = spt() thismeans that the maximum point of the spectrum (0) gives us the dimension of the support of themeasure (Figure 5.5).

    Another interesting q-value is q = 1 that implies (q) = 0 by (5.3), and therefore f() = by (5.8). We will have df

    d= q = 1 and this tells us that the line y = is a tangent to the curve

    y = f(). We have by equation (5.9)

    f() = =

    Ni=1pi ln(pi)Ni=1pi ln(si)

    (5.12)

    and this value is known as the Information dimension. This value also equals the dimension of themeasure , that is the smallest dimension of among all sets F with (F) > 0 (Figure 5.5) [13].

  • 7/28/2019 Ethel Nilsson

    40/82

    34 CHAPTER 5. GENERATING MULTIFRACTAL IMAGES

    Figure 5.4: The theoretical spectra, f() plotted against , calculated as the Legendre trans-form of the function. The mappings that have been used are: W1(x) = (x1/2, x2/2), W2(x) =(x1/2, x2/2) + (0, 1/2), W3(x) = (x1/2, x2/2) + (1/2, 0) and W4(x) = (x1/2, x2/2) + (1/2, 1/2)

    that all have contractivity factor s = 0.5. The different spectra correspond to the probabilities:{0.35, 0.30, 0.20, 0.15}, {0.50, 0.25, 0.20, 0.05}, {0.60, 0.20, 0.15, 0.05} and {0.80, 0.10, 0.06, 0.04}.We see that f() is a concave function of and that the end points have vertical asymp-totes. The max and min values of are given by the max and min values of lnpi/ ln si.For the first curve we have [min = ln(.35)/ ln(.5) = 1.51, max = ln(.15)/ ln(.5) = 2.74],for the second [min = ln(.5)/ ln(.5) = 1.00, max = ln(.05)/ ln(.5) = 4.32], for the third[min = ln(.6)/ ln(.5) = 0.74, max = ln(.05)/ ln(.5) = 4.32] and finally for the last curve[min = ln(.8)/ ln(.5) = 0.32, max = ln(.04)/ ln(.5) = 4.64]

    .

    5.2 Algorithm for generating images

    We will here generate images representing the kind of self-similar measures that corresponds toan IFS with probabilities using contraction mappings:

    W1(x) = (x1/2, x2/2), W2(x) = (x1/2, x2/2) + (0, 1/2),

    W3(x) = (x1/2, x2/2) + (1/2, 0), W4(x) = (x1/2, x2/2) + (1/2, 1/2)

    for a point x = {x1, x2}, with the corresponding contractivity factors s = 0.5 for all four mappings.The Random Iteration Algorithm, mentioned in section 5.1, could be used here but the algorithmdescribed below is deterministic, giving us the exact same image in each generation, and will alsobe faster, demanding less iterations to receive a reliable probability for each pixel in the image.

    When generating images we first specify an image size (must be 2n for a positive integer n),and a vector of four probability values. We then start from a square image of the given size where

  • 7/28/2019 Ethel Nilsson

    41/82

    5.2. ALGORITHM FOR GENERATING IMAGES 35

    Figure 5.5: The multifractal spectra for a self-similar measure, f() plotted against . Themaximum point of the spectrum, corresponding to q = 0, gives the dimension of the support ofthe measure. When q = 1 then f() = and this common value is known as the Informationdimension.

    all pixels have intensity value 1. This image is divided into four squares of equal size and the pixelvalues in each square are multiplied by the corresponding probability. Each of these squares arethen considered in the same way - we split each square into four equal sized squares and multiplythe intensity values by the respective probability (Figure 5.6). We continue these recursive calls

    until the size of each square is one pixel. The gray-scale value of each pixel will then represent theprobability for that point of the image.

  • 7/28/2019 Ethel Nilsson

    42/82

    36 CHAPTER 5. GENERATING MULTIFRACTAL IMAGES

    Figure 5.6: Two steps in the generation algorithm for images representing self-similar measures.The probabilities used are from top to bottom: {0.3, 0.3, 0.1, 0.3}, {0.22, 0.23, 0.27, 0.28} and{0.34, 0.22, 0.16, 0.28}. The resulting images are shown to the right.

  • 7/28/2019 Ethel Nilsson

    43/82

    Chapter 6

    Implementation

    The aim of this work is not to develop a method well suited for one particular application, butrather to examine how the concept of multifractals can be used in image analysis, what problemsarise and what contributions can be made by this approach. The implemented method describedbelow is based upon the method used in [28], mentioned in section 4.2.2. Compared to the othermethods, that consider the irregularities of the measure only on a global scale, this methodsconsiders each point of the image separately. From an image analysis point of view, this is anappealing quality. Using this method we will not only end up with a spectrum over the imagebut also with a one-by-one corresponding -image describing the calculated -exponent for eachpoint and a f()-image describing the distribution of these exponents. For our understanding ofthe multifractal approach this is an important quality that will make it easier to see the connec-tions between the mathematical definitions and the calculated features. This method also has theadvantage of not being too computationally complex or too demanding in sampling statistics.

    This approach is in some sense based on the fine theory explained in section 3.2.1, but instead ofusing the Hausdorff dimension for determining the dimension of each E set we use the empiricalestimation of the box-counting dimension mentioned in section 2.7. The equations (3.11) and(3.12) on page 17 say that the box dimension can not be used to separate the different E sets ifthey are dense in the support of the measure. However, we are not dealing with the continuous setsand functions in this case, and for our discrete images we will be able to estimate the dimensionof the different E sets by the box-counting method.

    6.1 Method

    We will here look at grayscale images and consider the intensity distribution a measure in R2. Toobtain a probability measure we begin by dividing every intensity value in the image by the totalintensity in the image.

    6.1.1 Estimation of local dimension

    First we calculate the local dimension, defined in equation (3.7) on page 16, for each point of theoriginal image. For estimating the local dimension in our discrete space we look at the amountof measure, i(m, n), in a number of i i sized neighbourhoods with i = 2p + 1, p = 0, 1, 2, . . .centered around each pixel. The local Hlder exponent is then computed as the slope of a linearregression line for ln(i(m, n)), versus ln(i) using the least squares method described in AppendixA, section A.1. The maximal size of neighbourhoods is related to localization of computation. Ifsmall neighbourhoods are used will react to localized singularities. If larger neighbourhoods are

    37

  • 7/28/2019 Ethel Nilsson

    44/82

    38 CHAPTER 6. IMPLEMENTATION

    used more widespread singularities will be detected.

    To get a good estimation of through linear regression there are a number of problems we

    must look at. First of all we make the assumption that there is a linear relationship between ln(i)and ln(i(m, n)) for neighbourhood sizes up to the maximal size. In other words, we expect theobservations (xl, yl) in our bi-logarithmic plot to follow the model

    yl = k0 + k1xl + l, l = 1, 2, 3, . . . (6.1)

    where k0 is the intercept of the true regression line, k1 is its slope and l are random errors withexpected value 0 and the same variance 2. If the assumption about linearity is not true we maynot obtain a very good result.

    We sometimes get a knee in the diagram, meaning that the best way to fit these points wouldbe by two lines (Figure 6.1). We have one linear relation up to a certain size, then another

    Figure 6.1: Illustration of knees in the bi-logarithmic diagram. Here two lines are used to fit theobservation. To minimize the regression error the three smallest neighbourhood sizes are used forthe first line in the left plot, and the four smallest sizes in the right plot.

    for points corresponding to larger sizes. Since we are looking for the local dimension we wantthe slope of the first line, fitted to the small sizes. This would imply that only a small numberof sizes should be used in these cases. When the assumption of the linear relation is true how-

    ever, we in general want as many plotted point as possible to minimize the errors in the regression.

    Outliers and influential observations also affect the result from the linear regression. An out-lier is an observation that does not follow the general pattern of the relationship, and such a valueis indicated by a large residual. If noise is present in the image, such deviating values can beobtained and affect the resulting Hlder exponent. We will address the effects of noise further insection 7.2.6. The regression line can also be influenced by an observation that is not necessarilyan outlier, but has an extreme value on the x-axis (Figure 6.2). The scale on the x-axis in ourcase is logarithmic, and this will give us a non-linear distribution of the observations when usinga linear set of neighbourhood sizes. The observation corresponding to the smallest neighbourhoodsize (smallest i) will have a larger distance to the other observations, and more influence whenestimating the regression line (Figure 6.3). Errors introduced by this observation will cause abigger effect on our resulting value.

  • 7/28/2019 Ethel Nilsson

    45/82

    6.1. METHOD 39

    Figure 6.2: Illustration of Influential Observations. In both diagrams the observations are thesame, except for the last one. The last observation has in both diagrams the same y-value but inthe left diagram it has a much larger x-value than in the right one. The slope of the regressionline (using all observations) in the left diagram is 0.100 and in the right digram 0.864. We canalso see that there are big differences between the regression lines with and without the influentialpoints.

    In [29] a method for identifying influential observations is mentioned and we describe this methodin Appendix A, section A.2. Testing the linear set of neighbourhood sizes i = {1, 3, 5, 7, . . . , 19}for influential observations in the logarithmic plot, give us the result that the first (and only thefirst) observation is influential (Figure 6.3). Since we for the first observation only look at onepixel value, and do not take the sum over a number of pixels, this observation will in most casesbe the most sensitive to noise. Giving this observation a high influence on the regression line willthen also give the noise a high influence. To prevent this we could consider a non-linear set ofneighbourhood sizes that will be evenly distributed on the logarithmic x-axis. We test the seti = {1, 3, 7, 15, 31, 63} (given by the expression 2m 1), that will give a more even distribution onthe x-axis. The result will show that there are no influential observations in this case (Figure 6.3).

    If the points in the bi-logarithmic diagram do not lie on an exact straight line there will alwaysbe an uncertainty in the determination of the slope. The number and the sizes of neighbourhoodsto use are parameters that have to be chosen depending on the application and image size.

    The definition of the measure and the shape of the neighbourhoods also strongly affect the esti-mated local dimension. In section 6.1.5 we will discuss different measures and how they respondto encountered singularities. The typical shape of a neighbourhood is a square, but for certain ap-plications disk-shaped or diamond-shaped neighbourhoods might be more appropriate. We mustalso decide how to pad the image when considering neighbourhoods of pixels near the boarders ofthe image.

    6.1.2 The -image

    We create an alpha-image of the same size as the original image and let the intensity of each pointin the -image represent the local dimension of corresponding point in the original image (Figure6.4). The value of will be close to the dimension of the structure under observation and for ourtwo-dimensional signal the values of will be close to two. If we let the values of in Figure

  • 7/28/2019 Ethel Nilsson

    46/82

    40 CHAPTER 6. IMPLEMENTATION

    Figure 6.3: Left: Diagram of ln(i) vs ln(i) for the linear set i = {1, 3, 5, 7, ..., 19}. The first obser-vation is influential. Right: Diagram of ln(i) vs ln(i) for the non-linear set i = 1, 3, 7, 15, 31, 63.In this case there are no influential observations.

    6.4 be displayed in the full magnitude range [0, 1], we see that the brightest and darkest pointslie around the strongest singularities in the original image, and that gray areas correspond tohomogeneous regions in the original image. Depending on the intensity values of the backgroundand the encountered singularity, the values near a singularity either becomes smaller or largerthan two (dark or bright). Note however that the -image enhance just local contrast, irrespectiveof the actual levels of gray.

    6.1.3 Estimation of the multifractal spectrum

    We then want to find the distribution of . First the continuous values, lying between somemin and max, are discretized into R values of r as follows:

    r = min + (r 1)r, r = 1, 2, . . . , R . (6.2)If the uniform division is used we have:

    r = (max min)/R. (6.3)The number of subranges R will influence the accuracy of the multifractal spectrum. A small num-

    ber of subranges will give us a smooth spectrum but with small resolution and small sharpness.Conversely, too many subranges produce a saw-toothed spectrum with more detail. A suitablenumber of R has to be chosen with respect to how exactly we can determine . We want thespectrum to have high resolution to give us as much information as possible, but at the same timenot to show the effects of the uncertainty in the determination of . If the uncertainty in thedetermination of varies with the value, a non-uniform division could be considered, takinglarger steps where the uncertainty is big and smaller steps where the uncertainty is small.

    For each subrange r we threshold the -image, obtaining an image showing only points wherer < (r + r). Pixels, in this binary image, with value 1 thus represent correspondingpixels in the -image taking on a value in the given subrange. By the means of the box-countingdimension (chapter 2, section 2.7), we then try to estimate the dimension, or the f() value, ofthis thresholded image. The image is covered by a grid of boxes of integer size j and the numberof non-empty boxes are counted giving the number Nj(r). Boxes of different sizes are recursively

  • 7/28/2019 Ethel Nilsson

    47/82

    6.1. METHOD 41

    taken into account and similar to the case of the estimation of , f() is estimated as the slopeof a linear regression line of the points in the bi-logarithmic diagram of ln(Nj(r)) versus ln(j).This procedure is then repeated for all the subranges of . The multifractal spectrum for the

    original image is obtained by plotting the midpoint of each subrange versus the corresponding cal-culated f() value in a diagram. To get the plot to show the actual min and max values we alsothreshold the -image for very small subranges around these -values, calculate the f() valuesand add these points to the diagram. Because of this, the plot will really show R + 1 intervalswhere the length of the first and last interval together equals the length of the other intervals.

    In the calculation of the box-counting dimension we again encounter the problems of linear re-gression and have to choose a suitable set of box sizes j to obtain a good estimate of the truedimension. If the box size is large enough the number of non-empty boxes may remain unchangedwhen the box size increases, meaning that the points in the bi-logarithmic plot stay on a horizontalline. These point will make the linear regression line tend to zero and thus reduce the resolutionof the calculated dimension values. If we choose arbitrary box sizes we may also have to handle

    the problem of the image width or height not being a multiple of the box size.

    6.1.4 The f()-image

    We also get an f()-image with one-by-one correspondence to the original image by replacingall pixels with in a given subrange with the respective f() value (Figure 6.4). The values off() gives the global information of the image. Homogeneous regions have the highest dimension(close to 2) and will therefore correspond to the brightest values in the f()-image (shown in fullmagnitude range). Singular points, that correspond to a dimension close to 0 will have the darkestvalues in this image, and lines with values close to 1 will be seen as gray.

    Figure 6.4: Left: A part of a Brodatz texture of size 128128. Original image from [33] publishedin [4]. Middle: The -image where the intensity values represent the local dimension of thecorresponding points in the original image. Neighbourhood sizes of {i = 1, 3, 5, 7} are consideredand the values of are shown in the full magnitude range [0, 1]. Right: The f()-image wherethe intensity values represent the box-counting dimension of the E set containing the value ofthe corresponding points in the original image. The values of f() are shown in full magnituderange.

    6.1.5 Measures

    Lvy Vhel and Pascal Mignot introduced some of the most commonly used measures i(m, n),

    known as capacity measures. Let g(k, l) represent the gray-scale intensity at point (k, l), i the

  • 7/28/2019 Ethel Nilsson

    48/82

    42 CHAPTER 6. IMPLEMENTATION

    Figure 6.5: Models of the singularities step-edge, line and corner. p1 gives the intensity value ofthe point of interest, p2 the value of the background.

    size of a measure neighbourhood and the set of all pixels within the measure neighbourhood(non-zero for ) and define:

    Maximum : i(m, n) = max(k,l)

    g(k, l),

    Minimum : i(m, n) = min(k,l)

    g(k, l),

    Sum : i(m, n) =

    (k,l)

    g(k, l)

    Iso : i(m, n) = # {(k, l)| g(m, n) g(k, l), (k, l) } .The definition of the Sum measure respects measures theory axioms (section 3.1), but the otherdefinitions do not and form a generalization of the notion of Hlder exponent [28]. Different mea-sures will obtain different information on encountered singularities and for a particular applicationan appropriate measure must be chosen to get desirable result.

    In [20] the authors study how the multifractal exponents behave when a singularity is encoun-tered. They look at three simplified models of singularities (step-edge, corner and line) with onlytwo values of gray levels (illustrated in Figure 6.5). p1 gives the intensity value of the point ofinterest, p2 the value of the background and =

    p2p1

    the relative height of the singularity. TheHlder exponents calculated with the measures Maximum and Minimum will only depend onthe height of the singularity, and by using small neighbourhoods with these measures any kind of

    singularity can be detected. The exponents calculated with the measure Iso will depend only onthe kind of singularity, allowing us to distinguish between different singularities regardless of thevalues of the gray levels. With the Sum measure the Hlder exponent will respond to both kindand relative height of the singularity.

    The authors look at neighbourhoods of sizes i = 2n + 1, n = 0, 1, . . . and describe how the Summeasure respond to different singularities. For a homogeneous region, the measure (i) within aneighbourhood of size i will be i2p1, for a step-edge we have (i) = (2n + 1)(np2 + (n + 1)p1), fora corner (i) = n(3n + 2)p2 + (n + 1)

    2p1 and for a line (i) = (2n + 1)p1 + (2n + 1)(2n)p2. Forgiven values of p1 and p2, with for instance p1 > p2, the value will be 2 for a plane, then will besmaller for a step-edge, even smaller for a corner and will have the lowest value for a line (Figure6.6). When the sizes of the neighbourhoods grow the values for the different singularities willin general tend to the same value, and for that reason a local study has to be performed to detectdifferent singularities.

  • 7/28/2019 Ethel Nilsson

    49/82

    6.1. METHOD 43

    Figure 6.6: Each diagram show the response of the sum measure to a homogeneous region, step-edge, corner, and a line for given value of when p1 > p2. The slope of each line gives thecorresponding value of . Left: = 0.2, Right: = 0.05.

  • 7/28/2019 Ethel Nilsson

    50/82

    44 CHAPTER 6. IMPLEMENTATION

  • 7/28/2019 Ethel Nilsson

    51/82

    Chapter 7

    Results

    To begin with, the implemented method was tested for different images generated according tothe algorithm described in section 5.2. These images represent self-similar measures (section 5.1),and for each set of probabilities the theoretical spectra for the true underlying measure can becalculated. How well the generated image of the measure correspond to the true underlyingmeasure will depend on resolution and numerical effects in the computation. By comparing ourcalculated spectra to the theoretical ones we should however get some information about what ourmethod is measuring and if we are getting expected results.

    7.1 Comparison of two spectra

    To be able to talk about how close to the true spectra we get, a quantitative method for compar-ing different spectra would here