# 5th Intensive Course on Soil Micromorphology Naples 2001 12th - 14th September Image Analysis Lecture 6 Morphological Segmentation Orientation Analysis.

## Presentation on theme: "5th Intensive Course on Soil Micromorphology Naples 2001 12th - 14th September Image Analysis Lecture 6 Morphological Segmentation Orientation Analysis."— Presentation transcript:

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 Operations which rely only on pixel in question Threshold mathematics using a single pixel and constant e.g. add 10 to each pixel - or subtract or multiply etc. mathematics using a single pixel with corresponding pixels in one or more images e.g. multiply pixel (x) in image A by value in pixel (x) in image B. Each pixel is processed in turn Summary of some key operations of Image Analysis/Processing

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Operations which rely only on pixel in question and neighbouring ones (e.g. kernel or convolution filter) each pixel is processed in turn Summary of some key operations of Image Analysis/Processing Many different types of kernel averaging hit and miss

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Intensity Gradient Analysis Orientation Analysis Domain Segmentation Improved Visualisation of Images. Some alternative methods for segmenting images and related topics

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological 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. 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. Segmentation of images without the need for segmentation An alternative approach examines changes in intensity and not absolute values.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation Image 1 and magnitude image from Intensity Gradient Analysis. Output image is a form of edge detector. Segmentation of images without the need for segmentation. Intensity Gradient Methods were devised primarily as edge-detectors.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation 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 An estimate of the orientation is thus available at each pixel. where d is distance between pixels For y-direction - pixel 2 is used.

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation 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. Intensity Gradient Analysis Background Two critical parameters are available - the orientation and M the magnitude of the intensity change

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation A better edge detector considers points 0 and 1 - 4. For x-direction change in intensity is given by This filters some noise and is alternatively known as the 4:2 formulation as four points are used in a 2nd order solution. where d is distance between pixels For y-direction

5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation For the 4:2 formula, the X - direction kernel will be defined by:- while the Y - direction kernel is:- 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.

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. The Sobel Operator uses a 3 x 3 kernel. Smart and Tovey (1988) kernel for 20,14 method. This kernel is most accurate in specifying orientation. Values are multiplied by 1000.

0 270 90 180 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 6: Morphological Segmentation i.e. 0 degrees is vertically upwards 90 degrees is horizontal angles go clockwise. Mathematical convention 0 degrees horizontal 90 degrees vertically upwards angles go anticlockwise. Orientation convention follows geological convention

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 Shape of rosette diagram usually approximates to an ellipse. Use Least Squares to find best fitting ellipse and length of major and minor axis. Index of Anistropy I a may be defined in 4 diffferent ways. Max and min refer to lengths of major and minor axes of ellipse.

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. This is equivalent to definition 3 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: Additionally the Mean Resultant Vector (R) may be defined as: Also the mean orientation is defined as:

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 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. 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. At each point, the proportion of each class is determined, and the dominant class then replaces the pixel value in question.

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 Better approach is to use colour overlay Image 1

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.

Similar presentations