Computer vision foundation - one of "Digital Image Processing" study notes: The basic relationship between pixels

The concept of small and trivial "Digital Image Processing" study notes, finishing the book, it will gradually digest understand. Most of the contents of notes extracted from the contents of the book, plus a part explain the content, ease of understanding.

The basic relationship between pixels

4 neighbors, diagonal neighborhood, neighborhood 8

4 neighborhood (4-neighbors)

Coordinates \ () \ (x, y ) of pixels in the \ (P \) in the horizontal and vertical directions of the four adjacent pixels, the coordinates of which are \ ((x + 1, y ), (x-1, Y), (X, Y +. 1), (X, Y-. 1) \) , each set of pixels from the pixel \ (P \) a unit distance, referred to as pixel \ (P \) 4 o domain, with (\ N_4 (p)) \ representation.

Diagonal neighbors (diagonal neighbors)

Coordinates \ () \ (x, y ) of pixels in the \ (P \) at two of four adjacent pixels in the diagonal direction, which coordinates are \ ((x + 1, y + 1), (x . 1 +,. 1-Y), (X-. 1,. 1-Y), (. 1-X, + Y. 1) \) , the set of pixels referred to as pixel \ (P \) diagonal neighbors, with \ ( N_D (p) \) represented.

8 neighborhood (8-neighbors)

Coordinates \ () \ (x, y ) of pixels in the \ (P \) 4 neighbor and diagonal neighbors are collectively referred to eight-neighbors, with \ (N_8 (p) \) FIG.

Adjacency, connectivity, and the border region

For an adjacent pixel adjacent to the gray scale value of the pixels is determined, i.e., two pixels \ (P \) and \ (Q \) may be adjacent to the position in space, but its value is not adjacent to the pixel definition gradation within the set of pixel values, so that the two pixels are not contiguous.

Order \ (V \) is the definition of a set of values of adjacent pixels, when considering binary image (image 0 and 1 only two kinds of values of a pixel gradation value), if the pixel has a value of 1 is set to adjacent pixels, the \ (V = \ {. 1 \} \) . Larger (e.g. 256 gray levels) of gray levels in the image of the other, a set of \ (V \) generally contains more gradation values, i.e. \ (V \) may be any of a set of integers 0-255 Subset.

Adjacent 4

Consider a pixel \ (P \) , if the pixel \ (Q \) in the collection \ (N_4 (p) \) , then with \ (V \) two pixel values \ (P \) and \ (Q \) is 4 contiguous.

8 abut

Consider a pixel \ (P \) , if the pixel \ (Q \) in the collection \ (N_8 (p) \) , then with \ (V \) two pixel values \ (P \) and \ (Q \) is 8 contiguous.

m abutment (abutment mix)

Consider a pixel \ (the p-\) , if

  1. Pixel \ (Q \) in the collection \ (N_4 (p) \) , or in

  2. Pixel \ (Q \) in the collection \ (N_D (p) \) , and the set \ (N_4 (p) {\ cap} N_D (p) \) is not derived from \ (V \) pixel values.

With the \ (V \) in the value of two pixels \ (P \) and \ (Q \) is 8 contiguous.

8 is mixed abutment adjacent improvements aimed at eliminating excess brought 8 adjacent diagonal path that may arise between diagonally adjacent pixels.

path

From having coordinates \ ((x, y) \ ) pixels \ (P \) to have coordinates \ ((s, t) \ ) pixels \ (Q \) pathway is a sequence of between pixels of different coordinate value of the pixel sequences are

\ [(X_0, y_0), (x_1, y_1), ..., (xn, y_n) \]

Wherein \ ((x_0, y_0) = (X, Y), (x_n, y_n) = (S, T) \) , and the sequence between the two pixels horizontally adjacent are adjacent. \ (n-\) is the path length (in number of pixels 1 pathway). If there is a path \ ((x_0, y_0) = (x_n, y_n) \) , then this path is a closed path. May be different according to the different types of abutment (abutment 4, 8 abuts, m abutting) the type defined passage (4 passages, eight passages, m channel).

Communication

Order \ (S \) is the (set of pixel dot image) a subset of pixels in the image. If two pixels \ (P \) and \ (Q \) between an entirely \ (S \) pathway (pixels constituting the pixel \ (P \) and \ (Q \) were \ (S \) ), then said pixel \ (P \) and \ (Q \) in \ (S \) communicating in. All the pixels are taken from this pathway \ (S \) but need not take over \ (S \) in all elements.

For \ (S \) of any one pixel \ (P \) , in \ (S \) in the pixel \ (P \) pixels constituting the set of communication called \ (S \) connected components. If S is only one connected component, the \ (S \) is called the communication set ( \ (S \) in all the pixels are in communication with each other).

region

Order \ (R & lt \) is a subset of pixels in the image, if \ (R & lt \) is a set of communication, called \ (R & lt \) is a region of the image. Two regions \ (R_i \) and \ (r_j \) , if they are capable of forming a merged set of communication, area called \ (R_i \) and \ (r_j \) for the adjacent region. Areas not adjacent to the adjacent region is not referred to. When considering whether the region between adjacent generally contiguous with 4 or 8 contiguous. In order to make meaningful definition of these regions are adjacent, between adjacent regions must specify the type. That is, a contiguous manner using 4 between some regions are not contiguous and adjacent manner using 8 is adjacent, it is necessary to specify the type of abutment between the abutment prior to determining whether the region.

boundary

Suppose an image contains \ (K \) a non-adjacent region \ (R_k, k = 1,2, ..., K \) boundaries, and these areas are not in contact with the image. So \ (R_u \) indicates that this \ (K \) regions of the union, \ ((R ~ U) ^ c \) represents \ (R_u \) of complement, then \ (R_u \) of all pixels in said as a foreground image, \ ((R ~ U) ^ c \) of all pixels in the background image.

Region \ (R & lt \) boundary (also called a border or outline) is a region \ (R & lt \) with (R & lt \) \ a set of pixels adjacent to the complement thereof. That is, the border area is a set of at least one background region of the pixel region adjacent to the pixel dots. To specify the same type adjacent to the boundary of the defined area. Generally, where the processing for corner points, usually adjacent a boundary 8 between the regions and define the background.

Defined within the boundary of the boundary region is sometimes referred to, i.e., the boundary pixels are inside the region. And the inner boundary is distinguished from the outer boundary, i.e., boundary pixels in the background region. Define the outer boundary and inner boundary defined similarly, except boundary pixels from the background region, the condition becomes a pixel adjacent to the at least one region. The difference between the inner and outer boundary is very important in the design of boundary tracking algorithm, such algorithms in order to ensure the result is a closed circuit, usually to follow the development of the outer boundary. Because the internal some areas that do not form a closed path (e.g., a region of a width of one pixel line segments), it is necessary to find the boundary of the region from the background region, so that the boundary of this region can be formed around a closed path.

If the region \ (R & lt \) is the entire image, which is defined as a first boundary line of the image, first column, the last set of pixels and the last row of a configuration. The reason for this is that the definition of an image is not exceeded beyond the boundaries of adjacent pixels. Under normal circumstances, the region refers to a subset of an image, and the boundary region with no image boundary pixels are overlapped implied as part of the boundary area.

edge

Edge often appear in the discussion and the boundary region, however, there is a key difference between the edges and boundaries. Boundary finite area to form a closed path, so this is a "global" concept. And the edge guide by a value exceeding a preset threshold pixel dots. Thus the edge is a "local" concept, which is based on measurement at one point of discontinuity of gradation. Consider the overall boundary, i.e., whether the boundary pixels can be formed in a closed circuit, while considering local edge, i.e., the gray level of adjacent pixels discontinuous whether exceeds a certain threshold.

Edge points can be connected to said edge of a line, and sometimes use to calculate the boundary edge of a line connecting these, but not always. A boundary edge of the same and the exception is that a binary image. Binary image pixel grayscale values 0 and 1 only two kinds, according to the type of communication used and the edge operator, can be realized in the extracted region of the binary edge and regional boundaries are exactly the same as the. Consider edges gradation discontinuous boundary is a closed circuit is useful conceptually.

distance

Pixel in the image according to the spatial position of the arrangement, and therefore has a corresponding distance metrics.

For coordinates are \ ((x, y), (s, t), (v, w) \) pixels \ (P, Q, Z \) , if

  1. \ (D (p, q) {\ geq} 0, [D (p, q) = 0 \) if and only if \ (p = q] \)
  2. \ (D (p, q) = D (q, p) \) and
  3. \(D(p,z){\leq}D(p,q)+D(q,z)\)

The \ (D \) is the distance function or metric.

Pixel \ (P \) and \ (Q \) Euclidean distance metric is defined as follows:

\[D_e(p,q)=[(x-s)^2+(y-t)^2]^{\frac{1}{2}}\]

In the Euclidean distance measure, the pixel \ ((x, y) \ ) is less than a distance equal to a specified value \ (R & lt \) of the pixels in the \ ((x, y) \ ) is the center radius \ (R & lt \) in the region of the disc.

Pixel \ (P \) and \ (Q \) between \ (D_4 \) distance metric (city block distance) is defined as follows:

\[D_4(p,q)=|x-s|+|y-t|\]

In \ (D_4 \) at a distance metric, the pixel \ ((x, y) \ ) is less than a distance equal to a specified value \ (R & lt \) pixel to form a \ ((x, y) \ ) is diamond regional centers. For example, \ (D_4 = 1 \) pixels are \ ((x, y) \ ) of 4 neighbors.

Pixel \ (P \) and \ (Q \) between \ (D_8 \) distance metric (chessboard distance) is defined as follows:

\[D_8(p,q)={\max}(|x-s|,|y-t|)\]

In \ (D_8 \) at a distance metric, the pixel \ ((x, y) \ ) is less than a distance equal to a specified value \ (R & lt \) pixel to form a \ ((x, y) \ ) is the center square area. For example, \ (D_8 = 1 \) pixels are \ ((x, y) \ ) of the eight-neighbors.

Note that the pixel \ (P \) and \ (Q \) between \ (D_4 \) and \ (D_8 \) independent of the distance between the path metrics and any of these may be present pixel, since both the distance metric way only the coordinates of the pixel consideration. M adjacent consideration, the \ (D_m \) distance between two pixels is defined as the shortest path length m . In \ (D_m \) at a distance metric, the distance between two pixels on the path depends on the gray value of the pixel of adjacent pixels and their gray scale values. In \ (D_m \) at a distance metric, different distances may produce different grayscale value of the pixels.

Guess you like

Origin www.cnblogs.com/fffb/p/12064779.html