I. Introduction
Image processing encompasses two primary categories: Analog Image Processing and Digital Image Processing. Digital image processing, in particular, involves the conversion of image information signals into digital signals. These digital signals are then subject to computer-based analysis, processing, and manipulation before being stored in computer-readable form. The primary advantage of this approach is that computers cannot process analog image information directly, and converting images to a digital format allows for data compression and efficient image transmission [
1,
2,
3].
To facilitate this conversion, a two-dimensional array is often used to represent the shape of a digital image. This array consists of a grid of pixels, each pixel defined by its coordinates (x, y) within the grid. The values associated with each pixel, typically in the RGB (red, green, blue) color space, determine the color and intensity of that pixel within the image. Signal processing techniques allow us to calculate and interpret these pixel coordinates and their corresponding values within the two-dimensional plane space.
By applying specific algorithms, we can pinpoint the location of pixels with particular shapes or find pixels that meet certain criteria. This technology is known as signal processing technology. One example of this is the Roberts gradient method, which can be used to detect edges within an image. This edge detection technique involves convolving an image matrix with two specific convolution kernels [
4]. The concept of convolution appears in many fields, such as signals and systems, digital signal processing, image classification, and so on. So, what is convolution? What is the use of convolution? How do you compute convolution? In order to fully understand convolution, this paper will study the convolution algorithm of digital image processing technology from the physical sense.
In general, in order to calculate the convolution of an image, it is necessary to rotate the convolution kernel by 180° and then align the centre of the convolution kernel with the centre of the calculated pixel. If the image size is exceeded, 0 is added at the edge.
Figure 1.
Image convolution operation principle.
Figure 1.
Image convolution operation principle.
The convolution kernel is used as a set value template matrix, and the input image to be processed is used as the prototype matrix. The image convolution operation is mainly carried out by overcovering the central pixel of the template matrix (called anchor point) on the prototype matrix elements to be calculated. The central pixel points are aligned with the pixels on the prototype matrix one by one (the edge pixels cannot align the anchor points, so the convolution calculation cannot be performed. Convolution can only be performed after processing by edge pixels), and then compute the sum of the product of the element values and the values in the convolution kernel being covered. Assign this sum to the current anchor, and that's how convolution works.
III. Application of Digital Image Processing Technology
Digital image processing courses have strong comprehensiveness and intersectionality. Visual information, as an essential source of information, plays a vital role in human development [
12]. Digital image processing is an important required course and core course for computer science and technology majors, as well as an essential elective course for related majors such as communication engineering. Of course, there are many methods of digital image processing (nearest neighbour method, bilinear interpolation method, more neighboring points interpolation method); the following focus on the analysis of the bilinear interpolation method and combined with the effect of the nearest neighbour method for comparative analysis.
In daily life, digital image processing algorithms combined with deep learning are applied more and more widely. There are many forms of algorithms, such as 256 colour transformation gray level map, Walsh transform, binarisation, threshold transform, Fourier transform, discrete cosine transform, etc., in which the binary change and threshold transform are relatively high in utilisation.
f(x,y) represents the output image, and g(u,v) represents the input image. The geometric operation of enlarging or reducing an image can be defined as:
If: u0=a(x,y)=x/c; v0=b(x,y)=y/d. This enlarges the image c times in the X-axis and d times in the Y-axis.
For example, if you enlarge a 200×200 image g(u,v) by 1.5 times, you will get a new image f(x,y) of 300×300. The process of producing a new image is actually the process of assigning values to 300×300 pixels.
If f(150,150) is assigned:
F (150150) = g (150/1.5, 150/1.5) = g (100100);
If f(100,100) is assigned:
F (100100) = g (100/1.5, 100/1.5) = g (66.7, 66.7).
Assuming we know the coordinates (x0,y0) and (x1,y1), we want to find the value of x on the line at some point in the interval [x0,x1]. As shown in the figure:
Figure 2.
One-dimensional linear interpolation model for digital image.
Figure 2.
One-dimensional linear interpolation model for digital image.
If such models and formulas are applied in image processing, the final result should be:
The second is the bilinear digital image processing model. We calculate that the point (0,1) in g should correspond to the end (0,0.67) in f, but there is no such coordinate in f, so we use linear interpolation to calculate the pixel value at (0,0.67).
The two-line value of the image processing algorithm is realised by the weight formula above.
Figure 3.
Bilinear interpolation image processing model.
Figure 3.
Bilinear interpolation image processing model.
The so-called bilinear interpolation, that is, continuous use of three-dimensional linear interpolation, and finally obtain g(u0,v0).
First: g(u0,v ') by g(u ',v ') and g(u '+1,v') one-dimensional linear interpolation.
Second time: g(u0,v '+1) by g(u',v '+1) and g(u' +1,v '+1) one-dimensional linear interpolation.
Third: g(u0,v0) by g(u0,v ') and g(u0,v '+1) one-dimensional linear interpolation.
There are two main algorithmic ideas in bilinear interpolation: the first is double, which refers to the value of (x, y) in two directions, generally taking two values in the x direction and two values in the y direction; The second is linear, the two values taken in each direction are calculated as linear functions, and the actual value is generally calculated with the weights in the x and y directions, similar to the first function, the closer the mapping point is, the higher the weight is, and the overall weight sum =1.
According to the above algorithm idea, by mapping 4 points around the points, the colour of the new pixel can have a simple colour change that is different from that of the nearest neighbour interpolation algorithm. Therefore, the image interpolation algorithm can be improved.
However, the bilinear interpolation algorithm still has its shortcomings; simple linear changes will lead to edge blurring, and it will be obvious that the interpolation data is inconsistent at the edge where the color changes are large. In addition, due to the multiplication of linear weights and pixel values, there will be a certain low-pass filtering, the high-frequency component will be weakened, and the correct pixel value may not be obtained in places with large colour changes.