Representation and Description Preview After an image has

  • Slides: 40
Download presentation
Representation and Description

Representation and Description

Preview � � After an image has been segmented into regions by methods such

Preview � � After an image has been segmented into regions by methods such as those discussed in image segmentation chapter, the segmented pixels usually are represented and described in a form suitable for further computer processing. Basically, representing a region involves two choices: ◦ 1 - we can represent the region in terms of its external characteristics (its boundary). ◦ 2 - or we can represent it in terms of its internal characteristics (the pixels comprising the region). � Choosing a representation scheme, however, in only part of the task of making the data useful to a computer.

Preview � � The next task is to describe the region based on the

Preview � � The next task is to describe the region based on the chosen representation. For example, a region may be represented by its boundary, and the boundary is described by features such as its length, the orientation of the straight line joining its extreme points, and the number of concavities in the boundary. An external representation is chosen when the primary focus is on shape characteristics. An internal representation is selected when the primary focus is on regional properties, such as color and texture.

Preview � Sometimes it may be necessary to use both types of representation. �

Preview � Sometimes it may be necessary to use both types of representation. � In either case, the features selected as descriptors should be as insensitive as possible to variations in size, translation, and rotation. � For most part, the descriptors discussed in this chapter satisfy one or more of these properties.

Representation � In this section, we discuss various representation approaches: ◦ Boundary (Border) Following.

Representation � In this section, we discuss various representation approaches: ◦ Boundary (Border) Following. ◦ Chain Codes. ◦ Polygonal Approximations using Minimum-Perimeter Polygons. �Foundation �MPP algorithm ◦ Other polygonal Approximation Approaches �Merging techniques �Splitting Techniques ◦ Signatures ◦ Boundary Segments ◦ Skeletons

Boundary (Border) Following: � � Several of the algorithms discussed in this chapter require

Boundary (Border) Following: � � Several of the algorithms discussed in this chapter require that the points in the boundary of a region be ordered in a clockwise direction. Consequently, we begin our discussion by introducing a boundary following algorithm whose output is an ordered sequence of points, we assume that: ◦ 1. we are working with binary images in which object and background points are labeled 1 and 0, respectively. ◦ 2. images are padded with a border of 0 s to eliminate the possibility of an object merging with image border. ◦ 3. for convenience, we limit the discussion to single regions. The approach is extended to multiple, disjoint regions by processing the regions individually.

Boundary (Border) Following: � Given a binary region R or its boundary, an algorithm

Boundary (Border) Following: � Given a binary region R or its boundary, an algorithm for following the border of R, or the given boundary, consists of the following: ◦ 1 - let the starting point, b 0, be the uppermost, leftmost point in the image that is labeled 1. denote by c 0 the west neighbor of b 0 [see Fig. 11. 1 (b)]. Clearly, c 0 always is a background point. Examine the 8 -neighbor of b 0 , starting a c 0 and proceeding in a clockwise direction. Let b 1 denote the first neighbor encountered whose value is 1, and let c 1 be the (background) point immediately preceding b 1 in the sequence. Store the locations of b 0 and b 1 for use in step 5. ◦ 2 - let b = b 1 and c = c 1 [Fig. 11(c)]. ◦ 3 - let the 8 -neighbors of b, strting at c and proceeding in a clockwise direction, be denoted by n 1, n 2, … , n 8. Find the first nk labeled 1. ◦ 4 - let b = nk and c = nk-1 ◦ 5 - repeat steps 3 and 4 until b = b 0 and the next boundary point found is b 1. the sequence of b points found when the algorithm stops constitutes the set of ordered boundary points.

Boundary (Border) Following:

Boundary (Border) Following:

Chain Codes � � Chain codes are used to represent a boundary by a

Chain Codes � � Chain codes are used to represent a boundary by a connected sequence of straight-line segments of specified length and direction. Typically this representation is based on 4 - or 8 - connectivity of the segment. The direction of each segment is coded using a numbering scheme, as in Fig. 11. 3 A boundary code formed as a sequence of such directional numbers is referred to as a Freeman Chain Code.

Chain Codes

Chain Codes

Chain Codes

Chain Codes

Polygonal Approximations Using Minimum-Perimeter Polygon � � A digital boundary can be approximated with

Polygonal Approximations Using Minimum-Perimeter Polygon � � A digital boundary can be approximated with arbitrary accuracy by a polygon. For a closed boundary, the approximation becomes exact when the number of segments of the polygon is equal to the number of points in the boundary so that each pair of adjacent points defines a segment of the polygon. The goal of this approach is to capture the essence of the shape in a given boundary using the fewest possible number of segments. One of the most powerful algorithms for representing a boundary by a minimum-perimeter polygon (MPP) as defined in the following discussion.

Minimum-Perimeter Polygon (MPP) � � Foundation: an approach for generating an algorithm to compute

Minimum-Perimeter Polygon (MPP) � � Foundation: an approach for generating an algorithm to compute MPPs is to enclose a boundary [Fig. 11. 6(a)] by a set of concatenated cells, as in (b). Think of the boundary as a rubber band, as it is allowed to shrink, the rubber band will be constrained by the inner and outer walls of the bounding region defined by the cells.

Minimum-Perimeter Polygon (MPP)

Minimum-Perimeter Polygon (MPP)

Other polygonal Approximation Approaches � � � Merging techniques: one approach is to merge

Other polygonal Approximation Approaches � � � Merging techniques: one approach is to merge points along the boundary until the least square error (LSE) line fit of the points merged so far exceed a present threshold. When this condition occurs, the parameters of the line are stored, the error is set to 0, and the procedure is repeated to merge new points along the boundary. One of the principal difficulties in this approach is to merge points at the corners. Splitting techniques: it is the approach to subdivide a segment into two parts until a specified criterion is satisfied. Splitting a boundary segment depends on drawing a line joining two end points. Then drawing line at the top and bottom of the drawn line.

Splitting techniques:

Splitting techniques:

Signature � � � A signature is a 1 -D functional representation of a

Signature � � � A signature is a 1 -D functional representation of a boundary and may be generated in various ways. One of the simplest ways is to plot the distance from the centroid to the boundary. Signatures depend on rotation and scaling. Representing signatures depend on normalization with respect to rotation, by selecting the starting point which is the farthest from the centroid. This way requires more computation, another way is to use the chain code algorithms for this purpose.

Boundary Segments � Decomposition useful. a boundary into segments is often � Decomposition reduces

Boundary Segments � Decomposition useful. a boundary into segments is often � Decomposition reduces the boundary’s complexity and thus simplifies the description process. � This process is particularly attractive when the boundary contains one or more significant concavities that carry shape information. � This approach depends o the convex hull algorithm.

Descriptors � � Boundary Descriptors ◦ Some Simple Descriptors ◦ Shape Numbers ◦ Fourier

Descriptors � � Boundary Descriptors ◦ Some Simple Descriptors ◦ Shape Numbers ◦ Fourier Descriptors ◦ Statistical Moments Regional Descriptors ◦ Some Simple Descriptors ◦ Topological Descriptors ◦ Texture �Statistical approaches �Structural approaches �Spectral approaches � Relational Descriptors

Descriptors � Boundary Descriptors: in this section, we consider several approaches to describing the

Descriptors � Boundary Descriptors: in this section, we consider several approaches to describing the boundary of a region. � Regional Descriptors: the focus here on regional descriptors � In other sections they are applicable to both boundaries and regions.

Boundary Descriptors ◦ Some Simple Descriptors: the length of the boundary is one of

Boundary Descriptors ◦ Some Simple Descriptors: the length of the boundary is one of its simplest descriptors. ◦ The number of pixels along a boundary gives a rough approximation of its length. ◦ Shape Numbers: as explained in the chain code boundary, the first difference of a chain coded boundary depends on the starting point. The shape number of such a boundary, based on the 4 directional code is defined as the first difference of smallest magnitude. The order n of shape number is defined as the number of digits in its representation.

Shape Numbers � The order n is even for a closed boundary, and its

Shape Numbers � The order n is even for a closed boundary, and its value limits the number of possible different shapes. Fig. 11. 7 shows all the shapes of order 4, 6, and 8, along with their chain code representations, first differences and corresponding shape numbers.

Fourier Descriptors

Fourier Descriptors

Fourier Descriptors � � � Fig. 11. 19 shows a K-point digital boundary in

Fourier Descriptors � � � Fig. 11. 19 shows a K-point digital boundary in the x y-plane. Starting at an arbitrary point (x 0, y 0), coordinate (x 0, y 0), (x 1, y 1), (x 2, y 2), …, (xk-1, yk-1) are encountered in traversing the boundary, say, in the counter clockwise direction. The boundary itself can be represented in a sequence of coordinates. In this approach the x-axis is treated as the real axis and the y-axis as the imaginary axis of a sequence of complex numbers. Although the of the sequence interpretation of the sequence was recast, the nature of the boundary itself was not changed. Of course, this representation has one great advantage: it reduces a 2 -D to a 1 -D problem.

Statistical Moments � The shape of boundary segments (and of signature waveforms) can be

Statistical Moments � The shape of boundary segments (and of signature waveforms) can be described quantitatively by using statistical moments, such as the mean, variance, and higher order moments.

Regional Descriptors � � In this section we consider several approaches for describing image

Regional Descriptors � � In this section we consider several approaches for describing image regions. Keep in mind that it is a common practice to use both boundary and regional descriptors combined. Some Simple Descriptors: the area of a region is described as the number of pixels in the region. The perimeter of a region is the length of its boundary. Although area and perimeter are sometimes used as descriptors, they apply primarily to situations in which the size of the regions of interest is invariant.

Topological Descriptors � � � Topological properties are useful for global descriptions of regions

Topological Descriptors � � � Topological properties are useful for global descriptions of regions in the image plane. Simply defined, topology is the study of properties of a figure (sometimes these are called rubber-sheet distortions). For example Fig. 11. 23 shows a region with two holes. Thus if a topological descriptor is defined by the number of holes in the region, this property obviously will not be affected by stretching or rotation transformation. In general, however, the number of holes will change if the region is torn or folded.

Topological Descriptors

Topological Descriptors

Topological Descriptors

Topological Descriptors

Topological Descriptors Another topological property useful for region description is the number of connected

Topological Descriptors Another topological property useful for region description is the number of connected components. Fig. 11. 24 shows a region with three connected components. The number of holes H and connected components C in a figure can be used to define to Euler number E: E=C–H The Euler formula is used for computing connected components � � Another example in Fig. 11. 26 shows a polygonal network. Classifying interior regions of such a network into faces and holes is often important. Denoting the number of vertices by V, the number of edges is Q, and the number of faces is F gives the following relationship, called the Euler formula: V–Q+F=C-H

Topological Descriptors

Topological Descriptors

Topological Descriptors

Topological Descriptors

Texture � � An important approach to region description is to quantify its texture

Texture � � An important approach to region description is to quantify its texture content. Although no formal definition of texture exists, intuitively, this descriptor provides measures of properties such as smoothness, coarseness, and regularity. (Fig. 11. 28 shows some examples). The three principal approaches used in image processing to describe the texture of a region are: satatistical, structural, and spectral. ◦ Statistical approaches: yield characterizations of textures as smooth, coarse, grainy, and so on. ◦ Structural techniques: deal with the arrangement of image primitives, such as the description of texture based on regularity spaced parallel lines. ◦ Spectral techniques: are based on the properties of the Fourier spectrum and are used primarily to detect global periodicity in an image by identifying high-energy, narrow peaks in the spectrum.

Texture

Texture

Statistical Approaches � yield characterizations of textures as smooth, coarse, grainy, and so on.

Statistical Approaches � yield characterizations of textures as smooth, coarse, grainy, and so on. Statistical means using statistical measures such as, mean, Standard Deviation, and so on.

Statistical Approaches

Statistical Approaches

Structural and Spectral approaches � Structural approaches: Deal with the arrangement of image primitives,

Structural and Spectral approaches � Structural approaches: Deal with the arrangement of image primitives, such as the description of texture based on regularity spaced parallel lines. � Spectral: are based on the properties of the Fourier spectrum and are used primarily to detect global periodicity in an image by identifying high-energy, narrow peaks in the spectrum.

Spectral Approches

Spectral Approches

Summery � The Representation and description of objects or regions that have been segmented

Summery � The Representation and description of objects or regions that have been segmented out of an image are early steps in the operation of most automated involving images. � These description for example, constitute the input to the object recognition methods developed in the following chapter.

Questions? ? ?

Questions? ? ?