Current location - Training Enrollment Network - Mathematics courses - What is the expansion principle in digital image processing?
What is the expansion principle in digital image processing?
1. The basic principle of image thinning

The concept of (1) image morphological processing

Morphological processing in digital image processing refers to the use of digital morphology as a tool to extract image components useful for expressing and describing the shape of regions, such as boundaries, skeletons, convex hulls, etc., and also includes pretreatment or post-processing such as morphological filtering, thinning and pruning. In image morphological processing, we are mainly interested in binary images.

In a binary image, the set of all black pixels is a complete morphological description of the image, and each component of the binary image is an element of Z2. Suppose that binary image A and morphological structure element B are sets defined on Cartesian grid, and the points with the value of 1 in the grid are elements of the set. When the origin of a structural element moves to point (x, y), it is recorded as Sxy. For simplicity, the structural elements are 3x3, all of which are 1. Under this restriction, it is logical operation that determines the output result.

⑵ Logical operation of binary image

Although the logical operation is simple in nature, it is a powerful supplementary means to realize the frontal image processing algorithm based on morphology. The main logical operations used in image processing are AND, OR and NOT, which can be combined with each other to form other logical operations.

(3) Expansion and corrosion

Expansion and corrosion are the basis of morphological processing, and many morphological algorithms are based on these two operations.

① expansion

It is based on obtaining the image of B relative to its origin and translating the image by Z. The expansion of A to B is the set of all displacements Z, so that at least one element overlaps with A.. We can rewrite the above formula as:

Structural element B can be regarded as a convolution template, but the difference is that expansion is based on set operation and convolution is based on arithmetic operation, but their processing processes are similar.

(1) scans each pixel of image a with structural element b.

(2) and structural elements and the binary images they cover.

(3) If both are 0, the pixel of the result image is 0. Otherwise it is 1.

② Corrosion

The whole process of etching groups A and B and B to A in Z is as follows:

(1) scans each pixel of image a with structural element b.

(2) and structural elements and the binary images they cover.

(3) If they are all 1, then the pixel of the resulting image is 1. Otherwise, it is 0.

The result of etching treatment is to shrink the original binary image by one circle.

(4) hit (match) or miss conversion

Suppose that set A is a set consisting of three subsets X, Y and Z, and the purpose of hitting (matching) is to find the position of X in A. We assume that X is enclosed in a small window W, and the local background of X and W is defined as the difference (W-X) of the set, then X can get an accurate fitting in A. The position set is the intersection of A's complement Ac corroded by X. We use set B to represent the composition of X and X background. You can make B = (B 1, B2), where B 1 = X and B2 = (w-x), then b in matching a can be expressed as:

A⊙B

We call it a morphological hit or miss transition.

5] refinement

Image thinning generally appears as an image preprocessing technology, and its purpose is to extract the skeleton of the source image, that is, thinning the lines with a line width greater than 1 pixel in the original image into "skeletons", which can be conveniently used to analyze the image, such as extracting the features of the image.

The basic idea of thinning is "stripping layer by layer", that is, stripping layer by layer from the edge of the line until there is one pixel left in the line. Image thinning greatly reduces the data volume of the original image and keeps the basic topological structure of its shape unchanged, thus laying the foundation for the application of feature extraction in character recognition. The thinning algorithm shall meet the following conditions:

(1) changing the strip area into thin lines;

② The thin line should be located in the center of the original strip area;

③ Thin lines should keep the topological features of the original image.

Thinning is divided into serial thinning and parallel thinning. Serial thinning is to detect points that meet the thinning conditions and delete thinning points. Parallel thinning is to mark the thinning points without deleting them, and remove the points to be thinned at one time after detecting the whole image.

The commonly used image thinning algorithms are hilditch algorithm, pavlidis algorithm and rosenfeld algorithm.

Note: Before thinning the algorithm, the image should be binarized, that is, the image only contains "black" and "white".

You can also refer to:/sunny3106/archive/2007/08/15/1745485.aspx.

The key word is mathematical morphology,