Introduction to digital image processing [1/2] (from geometric transformation to image morphological analysis)

Preface

This week, I taught myself the digital image processing course of Tianjin University of Technology at Station B. This course is currently the most viewed image processing instructional video at Station B, with 198,000 views.
The author has completed the first eight chapters, a total of fourteen chapters. In this article, I will share my knowledge system framework and briefly introduce some interesting digital image processing concepts and knowledge.
Insert picture description here

curriculum structure

The course is divided into 14 chapters. The content framework of chapters 1-8 is shown in the figure below.
Insert picture description here
Readers can understand the basic knowledge composition of image processing at a glance in this knowledge structure diagram.
The author chose this course after a long time, because compared with other courses, this course pays more attention to the explanation of basic knowledge, especially for some basic concepts and algorithm implementation, which are more specific and accurate, and in the comments The district can obtain the courseware used in the course, which is very helpful for review after class.
But the course also has some problems. Some videos are only monophonic, and some are out of sync from beginning to end. Although there are subtitles (both advantages and disadvantages), some of them seem to be machine-recognized, and there are many wrong words; at the same time , This course has chapter experiments, but learners do not have source code or specific implementation method teaching (low picture quality, can not see the code), so it is suitable for beginners to establish a general understanding of image processing, as a further project in the future Basic prerequisite courses for actual combat.
But in general, this is a very good introductory image processing course at station B, especially for Xiaobai.

Geometric transformation of image

The geometric transformation of images is the first point of knowledge that refreshed me in this course.
Image geometric transformation includes image translation, mirror transformation, scaling, transposition, and rotation.
A transformation matrix is ​​introduced here. This is a very interesting place. Take the vertical scene transformation of the image as an example. The matrix transformation algorithm is:
Insert picture description here
This calculation describes the original pixel point (X0, Y0) to the target point (X1, Y1) How it was achieved.
What's interesting is that the image is two-dimensional, but the equation is three-dimensional, but the third dimension is 1 by default. The advantage of this is that the image can be translated, which can be understood as the introduction of a constant term.
Regarding the knowledge of image geometric transformation, I personally think that this part of the series of videos is more detailed (also at station B):
Insert picture description here

Using the knowledge of linear algebra to understand, the equation is actually a coordinate transformation in three-dimensional space. You can refer to this series of videos for details. It is quite lively and interesting. After watching it, it is refreshing and strong!
Insert picture description here
In addition, for multiple geometric transformations of an image, the transformation matrix is ​​multiplied by the original pixel position in turn.

Image grayscale transformation

The grayscale transformation of an image is a very magical image processing method. It puts aside the two-dimensional properties of the image itself, and instead focuses on the “one-dimensional property” of the grayscale distribution of the image. Statistics to observe the gray distribution of the entire image.
For example, if the grayscale distribution is relatively uniform, the contrast of the image is often higher; for example, if the grayscale value is generally higher, the entire image is often brighter.
The above statistical gray values ​​can be used to make a gray histogram, which is somewhat similar to the probability density function of an event (if the number of gray levels is divided by the total, it is the probability density function). In the gray histogram In, you can intuitively read the distribution of each gray level, or the proportion. Here is a grayscale histogram of an image:
Insert picture description here

Based on this analysis, an image gray scale transformation is generated to achieve some of our specific goals, such as histogram equalization and binarization based on threshold.

Convolve an image using a template

This title is actually not very accurate, it is the author's own description of this method based on my understanding.
In the image smoothing process, we use the template to scan each pixel one by one to achieve smooth filtering.
In image edge detection, we use various "operators" to scan each element to find the boundary of the object.
The scan here is what we usually call the convolution operation.
The shapes of the templates here are also varied, mostly 3 3 and its variants, as well as 5 5 templates and cross templates.
If the coefficients (weights) of the template are all positive, it can be considered as a weighted average filter. If the coefficients are positive or negative, it can be considered as a difference (differential in the discrete sense) operation to find the object boundary .
Here I want to cite a more representative operator: Gauss-Laplacian operator:
Insert picture description here
This operator (template) has both filtering and sharpening functions. It is believed that the image is a two-dimensional Gaussian distribution, which can better preserve the original The pixel information achieves the purpose of filtering at the same time, and the introduction of the difference term realizes the sharpening of the image, which is a very interesting template.

Corrosion and expansion of the image, thinning and coarsening

Image erosion is also a very interesting algorithm. Image morphology operators are used here, which are similar to the previously mentioned templates.
The specific corrosion effect can be seen in the schematic diagram: the
Insert picture description here
original image is convolved by the structural element image, and only the dark pixels in the target image are retained.
Image expansion is similar, but the effect is just the opposite.
The refinement and coarsening of the image is more interesting.
The refinement of the image can extract the skeleton of the image, which is an important topological description of the image, which has a very important meaning in understanding the meaning of the image. Refinement is the process of extracting the skeleton of the image successively under certain requirements. .
Coarsening is the refinement of the image complement, and this operational thinking cannot be said to be subtle.
Before
Insert picture description here
refinement: After refinement:
Insert picture description here

postscript

Strive to update the knowledge of chapters 9-14 next week!!!
Insert picture description here
Li
Haha who is brushing the night 20202.10.25

Guess you like

Origin blog.csdn.net/qq_41883714/article/details/109273710