Lecture 6 Morphological Segmentation Orientation Analysis 5th Intensive Course on Soil

Download Report

Transcript Lecture 6 Morphological Segmentation Orientation Analysis 5th Intensive Course on Soil

5th Intensive Course on Soil Micromorphology Naples 2001 12th - 14th September Image Analysis

Lecture 6

Morphological Segmentation Orientation Analysis

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Some alternative methods for segmenting images and related topics

Intensity Gradient Analysis

Orientation Analysis

Domain Segmentation

Improved Visualisation of Images.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Segmentation of images without the need for segmentation For many images, unambiguous segmentation is not possible as the resulting image is too complex even for manual editting to ensure that particles and voids are adequately separated.

An alternative approach examines changes in intensity and not absolute values.

Advantages: •avoids thresholding/segmentation problems •can remove subjectivity entirely •can reduce complex images to a relatively few parameters which can be related to external factors such as stress level, water flow etc.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Segmentation of images without the need for segmentation .

Intensity Gradient Methods were devised primarily as edge-detectors.

Image 1 and magnitude image from Intensity Gradient Analysis. Output image is a form of edge detector.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation 2 0 1

Simplest form of edge detector considers point 0 and one adjacent pixel.

For x-direction - pixel 1 is used

i.e. change in intensity is given by 

I

x

I

1

I o d

where d is distance between pixels 

I

For y-direction - pixel 2 is used.

y

I

2

I o d

An estimate of the orientation is thus available at each pixel.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Intensity Gradient Analysis Background 2 0 1

Greatest gradient of intensity change will be at right angles to edges and this can be used to define an improved edge-dector or to define the orientation of features at every pixel within an image.

 

tan

1

       

I I y x

   

M

    Two critical parameters are available  

I

x

  

2

     

I y

  

2

- the orientation and

M

the magnitude of the intensity change

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation 3 2 0 4 1

A better edge detector considers points 0 and 1 - 4.

For x-direction

change in intensity is given by 

I

x

I

1

I

3 2

d

where d is distance between pixels

For y-direction

I

y

I

2

I

4 2

d

This filters some noise and is alternatively known as the 4:2 formulation as four points are used in a 2nd order solution.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

A convenient way to process an image is to define a kernel by which the pixels surrounding the pixels of interest and multiplied by appropriate factors.

3 2 0 4 1

For the 4:2 formula, the X - direction kernel will be defined by: while the Y - direction kernel is:-

0 -0.5

0 0 0 0 0 0.5

0 0 0 0 0.5

0 -0.5

0 0 0

Intensity Gradient Analysis

Best results are obtained using 20 nearest surrounding pixels.

Gives a fourth order solution for orientation - only 14 points are required so least squares analysis possible thereby providing some filtering

Intensity Gradient Analysis

Kernels for 20,14 Analysis Mehtod of Smart and Tovey and also Sobel Operator.

I

x are shown

 

I

y are obtained by rotation

.

0 0 0 0 0 0 -1 -2 -1 0 0 0 0 0 0 0 -1 -2 -1 0

The Sobel Operator uses a 3 x 3 kernel.

0 0 0 0 0 0 77 -70 77 0 13 -207 -280 -207 13 0 0 0 0 0 -13 207 280 207 -13 0 -77 70 -77 0

Smart and Tovey (1988) kernel for 20,14 method. This kernel is most accurate in specifying orientation. Values are multiplied by 1000.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

0 Orientation convention follows geological convention 270 90 i.e. 0 degrees is vertically upwards 90 degrees is horizontal angles go clockwise . 180 Mathematical convention 0 degrees horizontal 90 degrees vertically upwards angles go anticlockwise .

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Image 1 and angles-coded image Each pixel has orientation defined by colour scale.

Howver, output image can be difficult to interpret

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Over 250 000 estimates of orientation.

Data used to define a rosette diagram - often approximately shaped as an ellipse.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

I a

Max Min

.....

definition

1 Shape of rosette diagram usually approximates to an ellipse.

I a

Min Max

.....

definition

2

I a

1

Min Max

.....

definition

3 Use Least Squares to find best fitting ellipse and length of major and minor axis.

I a

(

Max

(

Max

 

Min

)

Min

) .....

definition

4 Max and min refer to lengths of major and minor axes of ellipse.

Index of Anistropy I a may be defined in 4 diffferent ways.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Sokolov used a different definition: Areas of rosette are divided into 90 o segments centred on major and minor axes.

A g

1

(

S

1

S

1 ' ) /(

S

2

S

2 ' )

This is equivalent to definition 3

I a

1

Min Max

This is the preferred definition these days as it is a bounded scale from 0 (random) to 1 as full orientated.

Sokolov uses percentage rather than a ratio 0 - 1.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Index of Anistropy can usually be computed, but if rosette diagram departs significantly from ellipse, then problems may arise.

Alternative: Mean Resultant Vector

(also known as Consitency Ratio) works in all cases.

Define vector of unit magnitude at each pixel in

angles coded

image having components in X- and Y- directions: i.e. at

i

th pixel - the angle is 

i

and components are cos 

i

and sin 

i

in the two directions respectively.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

The respective components at all N points in the image are summed to generate two parameters C and S:

C

i N

 

1 cos

i N

:

S

i N

 

1 sin

i N

Additionally the Mean Resultant Vector (R) may be defined as:

R

C

2

S

2

Also the mean orientation is defined as:  

cos

1 (

C R

)

sin

1 (

S R

)

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

The

Mean Resultant Vector

can always be computed even if the rosette diagram is unimodal.

The range is also 0 - 1 as for the Index of Anisotropy .

However, the value will depend on reference direction set.

[Curray, (1956), Mardia (1972), and Tovey (1972) independantly show a method by which this problem can be overcome].

The range of Mean Resultant Vector over which most Real Soils exist, is significantly less than the Index of Anisotropy and the latter is recommended for most applications.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Image 2: High degree of general orientation

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Image 3: High degree of localised orientation but random otherwise

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Image 4: Near orientation Random orientation

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Image 5: High degree of localised orientation but random otherwise

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Image 6: High degree of general orientation

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Advanced Orientation -

Domain Segmentation

Index of Anisotropy is relatively easy to determine but

Angles-Coded

image can be difficult to interpret

Domain Segmentation

attempts to define regions of generally consistent orientation.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Advanced Orientation -

Domain Segmentation

From 0 22.5

67.5

112.5

157.5

To 22.5

67.5

113 158 180 Code 1 2 3 4 1

Each pixel orientation value is replaced by its general orientation direction. With 4 coded classes, the replacement values are as in table.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

A large radius Modal filter is passed over image. At each point, the proportion of each class is determined, and the dominant class then replaces the pixel value in question.

In example, there are more pixels coded 4 in mask area, and so central pixel is replaced by code 4. If no class is dominant, class 5 (random) is coded).

In examples to be used in this Course, just 4 classes are used for simpliicty. Usually 8, 12 or 16 classes are used.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Domain Segmentation

of Image 1 using a 19 pixel radius Modal Filter - colour representation

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

To help visualisation, boundaries of domains may be overlain on original image.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Alternatively, just domains of a given general orientation may be displayed - in this case the vertical domains.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Image 1 Better approach is to use colour overlay

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Image 2

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Image 3

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Image 4

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Image 5

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Image 6

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

Difficulties with Intensity Gradient Analysis and Solutions: low contrast, and brightness varies little between pixels.

Solution: redefine all pixels where pixel value in MAGNITUDE image is less than a given value as “undecided” - typically less than 1% in images of clays. Tovey et al. Recommend that magnitude values < 2.0 be treated in this way.

Will not all orientation vales be weighted equally irrespective of contrast in Index of Anisotropy.

YES - and this ensures that there is no bias just for brighter features.

However, by using selected ranges of magnitude, various brightness features may be treated differently.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation

What happens if there are large particles with little or no contrast?

Will this not distort Index of Anisotropy?.

To some extent this may be true, but intensity values in these regions are usually below threshold value and are disregarded anyway.

More advanced multiple segmentation methods are available - see later lecture.