(Gonzalez) Digital Image Processing Chapter 11

Chapter 11 Representation and Description
Introduction
Representing a region involves two options: (1) representing the region in terms of its external features (boundaries), or (2) representing the region in terms of its internal features (such as the pixels that make up the region). The next task is to describe the region based on the chosen representation. For example, a region can be represented by its boundary, which can be described by features such as length, the direction of the line connecting the endpoints, and the number of depressions on the boundary.
When we focus on shape features, we can choose an external representation; when we focus on internal attributes such as color and texture, we can choose an internal representation. Sometimes it is necessary to use both representations together. In either case, the features chosen for use as descriptors should be as insensitive to size, translation, and rotation as possible.


11.1 Representation
11.1.1 Boundary Tracking
Moore's Boundary Tracking Algorithm


11.1.2 Chain Codes
Chain codes are used to represent a boundary consisting of sequentially connected straight line segments with a specified length and direction. Typically, this representation is based on 4-connection or 8-connection of these line segments. The direction of each line segment is coded using a numerical number. A code represented by a sequence of numbers in this direction is called a Freeman code.
Digital images are usually acquired and processed in grid form, in which the spacing in the x and y directions is equal, so a chain code can be generated by tracing a boundary, i.e., in a clockwise direction, and for each connection Generated by assigning a direction to a pixel's hazard. This approach is generally not feasible for two reasons: (1) the resulting chain codes tend to be too long; (2) any minor disturbance along the boundaries caused by noise or imperfect segmentation will cause coding changes that The main trait characteristics at the border may be irrelevant.
The chaincode of the boundary depends on the starting point. However, chain codes can be normalized with respect to the starting point by a simple procedure as follows: we simply treat the chain code as a cyclic sequence of direction numbers and redefine the starting point so that the minimum integer value of the sequence of numbers is obtained. We can also normalize for rotation by using the first difference of the chain code instead of the chain code itself. This difference is obtained by counting the number of directional changes in the chain code dividing two adjacent pixels. If we normalize the chain code as a cyclic sequence with respect to the starting point, the first element of the difference is computed by using the transition between the last element of the chain code and the first element.


11.1.3 Polygon approximation using minimum perimeter polygons
Numerical boundaries can be approximated by polygons to arbitrary precision. For a closed boundary, this approximation becomes accurate when the number of sides of the polygon equals the number of points on the boundary. At this point, each adjacent point defines an edge of the polygon. The purpose of the polygon approximation is to obtain the basic shape of a given boundary using the fewest possible number of line segments. Moderately complex polygon approximation techniques are still well suited for image processing tasks. Among these approximation techniques, one of the most effective is to use a minimum perimeter polygon (MPP) to represent the boundary.


The size of the base
unit determines how close the polygon is. In a given application, our aim is to use a suitable maximum possible element size to generate MPP with the least number of vertices. The vertices of the MPP coincide either with the convex vertices in the interior walls or with the mirrored vertices of the concave vertices in the exterior walls. MPP


Algorithm A set of cells that form a numerical boundary is called a cell combination. The observations are explained as follows: 1. Unit assemblies consisting of simple connections are non-self-intersecting. 2. Every convex vertex of MPP is a W vertex, but not every W vertex of the boundary is a vertex of MPP. 3. Every mirror concave vertex of MPP is a B vertex, but not every B vertex of the boundary is a vertex of MPP.





4. All B vertices are either on or outside the MPP; all W vertices are either on or inside the MPP.
5. The upper-leftmost vertex of the vertex sequence contained in the unit assembly is always a W vertex of the MPP.

The advantage of MPP is that even when the number of vertices is small, it can still retain all the main characteristics of the original boundary, and another advantage is that it can perform boundary smoothing.


11.1.4 Other polygon approximation methods
Aggregation techniques Aggregation techniques
based on mean error or other criteria have been applied to polygon approximation techniques. One approach is to aggregate points along a boundary until the minimum mean squared error of the line fitting the aggregated points exceeds some preset threshold. When such a condition occurs, the parameters of the line are stored, the error is set to 0, and the process is repeated, aggregating new points along the boundary, until the error exceeds the preset threshold again. After this process, the intersections of adjacent line segments constitute the vertices of the polygon. The main difficulty with this approach is that the resulting approximate vertices do not always correspond to deformations (eg corners) in the original boundary.


Splitting Techniques
One way to split a boundary line is to continuously subdivide the line segment into two parts until a specified criterion is met. For example, a possible requirement is that the maximum vertical distance between a boundary line segment and a straight line between its two endpoints does not exceed a preset threshold. If the criterion is satisfied, the point with the largest distance from the line becomes a vertex, thus dividing the initial line segment into two sub-line segments. This method has an advantage in finding points that vary significantly. For a closed boundary, the best starting points are usually the two furthest points on the boundary.


11.1.5 Marker Graphs
Marker graphs are one-dimensional functional representations of boundaries, which can be generated using various methods. One of the easiest ways to do this is to plot the distance from the centroid to the boundary as a function of angle. However, no matter how the label map is generated, the basic concept is to reduce the boundary to a 1D function that may be simpler to describe than the original 2D boundary.
The marker maps generated by the method just described are translation invariant, but they do depend on rotation and scaling. By finding a way to generate the marker map by picking the same starting point, normalization with respect to rotation can be achieved regardless of the orientation of the shape. One way to do this is to pick the point furthest from the centroid as the starting point, assuming that this point is unique for each shape we're interested in. Another way is to pick the point on the eigenaxis that is farthest from the centroid. This method is more computationally expensive but more stable because the orientation of the eigen-axis is determined with all contour points. Another way is to get the chaincode for that boundary.
Based on the assumption that the two axes are scaled consistently and sampled at equal intervals \theta, changes in morphology size lead to changes in the magnitude of the response marker plot. One way to normalize this is to scale all functions so that they have the same range, say [0,1]. The main advantage of this approach is simplicity, but there is a potentially serious flaw in that the scaling of the entire function depends on only two values: the minimum and maximum values. If the shape is noisy, this dependency can be a source of error for individual objects. A more stable approach is to divide each sample by the variance of the labeled plot. Using variance results in a variable scaling factor that is inversely proportional to the size change. Regardless of the method used, the basic idea is to remove the size dependency while maintaining the basic shape of the waveform.
Distances and angles are not the only ways to generate marker maps. For example, another approach is to travel along the boundary and, for each point on the boundary, draw the angle between the tangent of the boundary line at that point and the reference line, which carries information about the basic shape characteristics. A variant of this approach is to use a so-called slope density function as a marker plot. The function is a histogram of tangent angle values. Since the histogram is a measure of how dense the values ​​are, the slope density function strongly reflects the portion of the boundary that has a constant tangent angle (straight line segments or near-straight line segments), and the portion where the angle changes rapidly (corners or other sharply curved locations) There are deep troughs.


11.1.6 Boundary Segments Breaking
the boundary into dangerous segments reduces the complexity of the boundary. This approach is especially attractive when the boundary lines contain one or more distinct concavities that carry shape information.
The convex hull H of an arbitrary set S is the smallest convex set containing S. The difference set HS is called the convexity of the set S. Region boundaries can be segmented as follows: trace the contour of S and mark transition points entering or leaving a convexity. In principle, this scheme is independent of region size and orientation.
In practice, the digital boundaries are often irregular due to the effects of digitization, noise, and segmentation distortion. These effects often result in randomly scattered small bumps along the boundary. Rather than trying to separate out these irregular boundaries through post-processing, it is better to smooth the boundaries in an ordinary way before segmenting them. There are many ways to do this. One way is to trace the boundary and use the average coordinates of a pixel's k neighbors along that boundary in place of this pixel's coordinates. This method is suitable for smaller irregular boundaries, but it is time consuming and difficult to control. Larger values ​​of k may result in over-smoothing, and smaller values ​​of k may result in insufficient smoothing on some boundary segments. A more stable technique is to use a polygonal approximation before finding the convexity of a region. The numerical boundaries we are interested in are all simple polygons.


11.1.7 Skeleton
An important way to represent the shape of a structure in a planar area is to reduce it to a graph. This simplification can be achieved by obtaining the skeleton of the region through a refinement (also called skeletonization) algorithm.
The skeleton of a region can be defined by the Median Axis Transformation (MAT) proposed by Blum.
Area MAT has an intuitive definition based on the so-called "prairie fire concept". Think of an image area as a flat prairie composed of licorice, and suppose to be lit by prairie boundaries. The line of fire advances at the same speed towards the center of the area. The MAT of an area is a collection of multiple fire-line arrival points at the same time.
Although the MAT of a region produces an intuitively satisfying skeleton, implementing this definition directly requires a lot of computation. The implementation involves calculating the distance of each interior point to each point on a region boundary. In order to improve the computational efficiency, many algorithms have been proposed, that is, a refinement algorithm that iteratively deletes the boundary points of a region. When deleting these points, the following constraints must be met: (1) the endpoints cannot be deleted; (2) the connectivity cannot be destroyed; ( 3) Do not cause excessive corrosion of the area.


An algorithm for refining the binary region is given below. Suppose the value of the area point is 1 and the value of the background point is 0. This method applies two basic steps in succession to the boundary points of a given area, which are pixels with a value of 1 and at least one adjacent pixel with a value of 0. Step 1 marks a contour point p1 as a point to be deleted if the following conditions are met:
(a)2<=N(p1)<=6
(b)T(p1)=1
(c)p2·p4·p6 = 0
(d)p4·p6·p8 = 0
N(p1) represents the number of non-zero pixels of p1, T(p1) represents the sorted sequence p2, The number of transitions from 0 to 1 in p3,...,p8,p9,p2
In step 2, keeping (a)(b) conditions unchanged, (c)(d) becomes (c')(d' )
(c')p2·p4·p8 = 0
(d')p2·p6·p8 = 0 Apply
step 1 to all boundary pixels of the considered binary region. If any one or several of (a) to (d) are not satisfied, keep the value of the point in question unchanged. If all conditions are met, the point is marked for deletion, but it is required that the point cannot be deleted until all boundaries have been processed. This delay prevents changes to data structures during algorithm execution. After step 1 is performed for all boundary points, the marked points (marked with 0 value) are deleted. Then, in the same way as step 1, apply step 2 to the result obtained.


In this way, the algorithm steps of one iteration of the refinement algorithm are as follows: (1) apply step 1 to mark the bia nodes to be deleted; (2) delete the marked points; (3) apply step 2 to mark the remaining boundary points to be deleted ; (4) Delete the marked point. This process is applied repeatedly until there are no more point positions to delete, at which point the algorithm terminates and the skeleton of the region is generated.












Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325983678&siteId=291194637
Recommended