38
Segmentation and Representation

Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

  • Upload
    others

  • View
    8

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Segmentation and Representation

Page 2: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 3: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Introduction• Image segmentation is the process of partitioning the

digital image into multiple regions that can be

associated with the properties of one or more objects

Page 4: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 5: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Texture Texture provides measures of properties such as

smoothness, coarseness, and regularity.

Page 6: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Texture Based Segmentation

Page 7: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Co-Occurance Matrix Let P be a position operator, and A a k x k matrix.

aij shows the number of times that pixels with gray level zi occur at position given by P relative to points with gray level zj.

Matrix A is called co-occurance matrix and can provide statistical properties of the texture.

Page 8: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Example Assume P is one pixel to the right and one pixel below

Gray level values are : 0, 1, and 2

Image data:

Co-occurance matrix is:

Page 9: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Statistical Moments of Texture Let Matrix C be formed by dividing every element of A by the number

of point pairs that satisfy P.

The following moments are defined to compare textures:

Page 10: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 11: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Level Set Segmentation Instead of manipulating the contour directly, the

contour is embedded as the zero level set of a higher dimensional function called the level-set function y(X, t).

The level-set function is evolved under the control of a differential equation.

At any time, the evolving contour can be obtained by extracting the zero level-set G((X), t) = {y(X, t) = 0} from the output

Page 12: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Zero Set in a Level Set

Page 13: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Example

Page 14: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 15: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Watershed Segmentation Algorithm:

Convert the gray level image into a topographic image where the height of each point is proportional to its gray level intensity.

Punch a hole at each region minimum at let the whole topography be flooded from below.

The points where the water from different regions join are boundaries of the regions

Page 16: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Watershed Segmentation

Page 17: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Example

Page 18: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Example

Page 19: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 20: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Representation The result of segmentation should be represented and

described in a form suitable for further computer processing.

A region can be represented in terms of its external characteristics (boundary).

A region can be represented in terms of its internal characteristics.

Page 21: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 22: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Chain Codes Chain codes are generated by following a boundary in a

clockwise or counter-clockwise direction and assigning a direction to the segments connecting every pair of pixels.

Disadvantage: Can be unacceptably long.

Solution: Re-sampling (down sample) the boundary

Disadvantage: Is starting point dependent

Solution: Normalize the representation string to the smallest integer.

Page 23: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Chain Code Directions

Page 24: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Sample Chain Code

Page 25: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Down Sampling

Page 26: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 27: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Polygonal Approximation A boundary can be represented with arbitrary accuracy

by a polygon.

The approximation is exact when the number of sides is equal to the number of points in the boundary.

Finding a polygonal representation can be very time-consuming.

Page 28: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Minimum Perimeter Polygons

Page 29: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Splitting Techniques

Page 30: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 31: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Signature A signature is a 1D representation of a boundary.

e.g. Plotting distance to centroid as a function of angle

Invariant to translation

Disadvantages:

Rotation and scaling dependant

Defined only for convex regions

Page 32: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Signature Example

Page 33: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 34: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Boundary Segments Decomposing a boundary into segments simplifies

representation.

Convex Hull can be used for decomposition.

A new segment can be started whenever a Convex Hull deficiency is entered or exited.

Page 35: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Boundary Segments Example

Page 36: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Topics Segmentation

Texture Based Segmentation

Level Set Segmentation

Watershed Segmentation

Representation Introduction

Chain Codes

Polygonal Approximations

Signatures

Boundary Segments

Skeletons

Page 37: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Skeleton The structural shape of a region can be represented by

a graph.

The structural graph is obtained by thinning the region and finding the skeleton.

Page 38: Segmentation and Representation - Image Processing Courseceng503.cankaya.edu.tr/uploads/files/file/Digital... · Chain Codes Polygonal Approximations Signatures Boundary Segments

Questions?