Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Lecture 6
Representation Recommended
Chapter
11
Lecture 6 1
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Lecture 6 2
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Introduction
After
an image is segmented into regions, pixels in each region are usually represented and described in a form suitable for further computer processing. Represent a region in terms of
its external characteristics (its boundary); or its internal characteristics (the pixels comprising the region).
Describe
a region by its features, such as the length of its boundary, the orientation of a line joining its extreme points, etc.
JJ Zou & Q Cheng, UWS School of Engineering
Lecture 6 3
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Representation
Chain
codes
Chain codes are used to represent a boundary by a connected sequence of straight-line segments of specified length and direction. This representation is usually based on 4- or 8connectivity of the segments. The direction of each segment is coded by using a numbering scheme (see below).
Lecture 6 4
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
following its boundary in a clockwise (or counterclockwise) direction and Assigning a direction to each segment connecting two consecutive pixels.
We can solve this problem by resampling the boundary using a larger grid spacing (see next slide).
Lecture 6 5
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Lecture 6 6
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
One problem with the above chain code is that it depends on the starting point.
The code can be normalized with respect to the starting point by the following steps. 1. Treat the chain code as a circular sequence of direction numbers; 2. Redefine the starting point so that the resulting sequence of numbers forms an integer of minimum magnitude. For example, an integer of minimum magnitude of a circular sequence 12300321 is 00321123.
Lecture 6 7
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Another problem with the chain code is that it is not invariant to rotation.
Lecture 6 8
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
The chain code can be normalized for rotation by using its first difference instead of the code itself. The first difference is obtained by counting the number of direction changes (in a counterclockwise direction) that separate two adjacent elements of the code. For example, the first difference of a 4-direction circular chain code 10103322 is 33133030. 2 1 = 3, 1 0 = 3, 0 1 = 1,
Lecture 6 9
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Polygonal
approximations
A digital boundary can be approximated with arbitrary accuracy by a polygon. The goal of polygonal approximation is to capture the essence of the boundary shape with the fewest possible polygonal segments. We will discuss a number of polygonal approximation methods in the following.
Lecture 6 10
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Think of the boundary of an object as a rubber band contained within walls. If the rubber band is allowed to shrink, it produces a polygon of minimum perimeter. The maximum error of the approximation is 2d ,where d is the minimum possible distance between different pixels.
Lecture 6 11
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Merging techniques
Basic approach Merge points along a boundary until the approximation error exceeds a preset threshold. If the condition occurs, connect the first point and the point before last to form a segment and repeat the above procedure for a new segment. A major difficulty with this approach is that vertices in the resulting polygon do not always correspond to corners in the original boundary. Splitting techniques discussed next may be used to solve this problem.
Lecture 6 12
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Splitting techniques
Basic approach Subdivide a segment successively into two parts until a specified criterion is satisfied. A popular method for approximating a close boundary Select two extreme points to divide the boundary into two segments. For each segment, if the maximum perpendicular distance from the segment to the line joining its two end points exceeds a preset threshold, subdivide the segment at the farthest point from the line. This method has the advantage of seeking prominent inflection points (see next slide for an example).
Lecture 6 13
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Lecture 6 14
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Signatures
For example, a boundary can be represented by the distance from the centroid to the boundary versus the angle (see below).
Lecture 6 15
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Boundary
segments
For example, decomposition reduces the boundarys complexity and thus simplifies the description process.
The convex hull of a closed boundary is a powerful tool for robust decomposition of the boundary.
Lecture 6 16
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Skeletons
An important approach to representing the structural shape of a plane region is to reduce it to the skeleton. Skeletons have various applications, ranging from optical character recognition to data compression. The skeleton of a region may be defined via the medial axis transformation (MAT) proposed by Blum in 1967.
For each point p in a region R, we find its closest neighbour in the boundary B of R. If p has more than one such neighbour, it is said to belong to the medial axis (skeleton) of R.
Lecture 6 17
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Lecture 6 18
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Implementation potentially involves calculating the distance from every interior point to every point on the boundary of a region.
Numerous algorithms have been proposed for improving computational efficiency. Most of these algorithms are based on the thinning technique. The basic concept of thinning is to iteratively delete boundary points of a region subject to the constraints that deletion of these points
does not remove end points; does not break connectivity; and does not cause excessive erosion of the region.
Lecture 6 19
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Lecture 6 20
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Boundary descriptors
Length
The length of a boundary is the sum of the lengths of boundary segments between adjacent boundary pixels. The diameter of a boundary is the distance between its two extreme points. The major axis of a boundary is a line that passes through the two extreme points. The minor axis is a line that is perpendicular to the major axis, and passes through two farthest points along this direction. A rectangle is a basic rectangle if it completely encloses the boundary and passes through two extreme points along the major axis and two farthest points along the minor axis. Curvature is defined as the rate of change of slope.
JJ Zou & Q Cheng, UWS School of Engineering
Diameter
Curvature
Lecture 6 21
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Shape numbers
Given a boundary represented by a chain code, the shape number of the boundary is defined as the first difference of the smallest magnitude of the code. The order of a shape number is defined as the number of digits in its representation. Example 1: some shape numbers
Lecture 6 22
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
Find the basic rectangle Subdivide the rectangle Compute the chain code, first difference and shape number.
Lecture 6 23
300046 Multimedia Signal Processing / 300193 Multimedia Engineering - Part B: Image Processing
and description
Representation
Chain codes Polygonal approximations Signatures Boundary segments Skeletons Some simple descriptors Shape numbers
Boundary descriptors
Lecture 6 24