# Recognition of High Difference Features in Urban Planning Images Based on Morphological Filtering

Authors: Peipei Liu
Journal: Advances in Mathematical Physics
 (2021)

---

## Abstract

As an effective information carrier, image is the main source for human beings to obtain and exchange information. Therefore, the application field of image processing involves all aspects of human life and work. Image enhancement is an important part of image processing and plays an important role in the whole process of image processing. This paper mainly studies the image enhancement method based on partial differential equation. By analysing the combination of partial differential equation theory and enhancement, aiming at the shortcomings of low recognition accuracy, high error rate, and long time consuming in the current method of urban planning image feature recognition, a feature enhancement and simulation of urban planning image based on partial differential equation method is proposed; the preprocessing of urban planning image is realized by collecting the urban planning image. On the basis of preprocessing the urban planning image, the urban planning image is divided into several equal area subareas; the pixel gray value of each subarea and the average value of pixel distribution density of node landscape image are calculated; and whether the pixel points are at the edge of urban planning image is judged by setting the comprehensive mean threshold. According to the judgment results, the high difference features of urban planning images are intelligently recognized. Simulation results show that the proposed method can realize efficient and accurate recognition of high difference features in urban planning images.


---

## Body

## 1. Introduction

With the rapid development of multimedia digital video technology, digital image processing is more and more widely used in aerospace, national defence, monitoring, national life, multimedia technology, and other fields. It cannot only make people observe and analyse image information more directly and accurately but also make people make better use of image data [1]. Image enhancement is an important mean to improve image quality and visual effect, which provides good conditions for image subsequent processing and video tracking. It can also be considered as a technology to improve the visual effect of the image or transform the image into a technology suitable for human eye observation and machine analysis. Image enhancement is mainly to enhance the texture details of the image and adjust the brightness and contrast of the image for later observation, analysis, and further processing [2]. Among them, image texture detail enhancement refers to enhancing the edge intensity of the object on the image, so that the texture detail of the image is more prominent. Image brightness enhancement refers to brightening the dark image or the dark part of the image and darkening the highlighted image or the highlighted part of the image to make the brightness of the whole image more uniform [3]. Image contrast enhancement is to expand or shrink the gray range of the image to enrich the gray level of the image, enhance the contrast between objects in the image, and improve the visual perception effect of the image.As a new mathematical method of image processing recognized and studied in recent years, the method based on partial differential equation has irreplaceable advantages. Partial differential equation can directly deal with the visually important geometric features in the image, effectively simulate the dynamic process with visual significance, obtain better image quality, and have a certain stability [4]. Therefore, the image enhancement method based on partial differential equation has become a hot topic in the field of digital image processing. This paper mainly studies the feature enhancement and simulation of urban planning image based on partial differential equation, improves the existing methods, and puts forward its own views and transformation functions to achieve a good image enhancement effect [5]. At the same time, when solving the image enhancement method based on partial differential equation, this paper adopts the finite difference method and introduces the thermal equation, which greatly reduces the amount of calculation and improves the guarantee for realizing real-time image enhancement processing.The contents of this paper are arranged as follows: Section1 is the introduction which mainly introduces the background and research significance. Section 2 discusses the relevant work. Section 3 analyses the relevant theories of partial differential equation. Section 4 analyses the application of urban planning image feature enhancement based on partial differential equation method. In Section 5, the simulation experiment analysis of urban planning image feature enhancement based on partial differential equation method is carried out, the experimental simulation of different methods is carried out, and the experimental results are compared. Section 6 summarizes the full text, the summary of the work done in this paper, and the prospect of the next step.


## 2. Related Work

Although the image enhancement method based on partial differential equation is a relatively new image enhancement method, it has developed rapidly since its emergence and has played an important role in many image enhancement methods [6]. The principle of partial differential equation enhancement method is to enhance the image features according to the change of the specified partial differential equation function, so as to filter the noise in the image, and the solution of partial differential equation is the denoised image [7]. The image enhancement method based on partial differential equation has the characteristics of anisotropic diffusion, so it can carry out different degrees of diffusion in different regions of the image, so as to suppress noise and protect the edge texture information of the image.Relevant scholars and enterprises study the technology of image similarity. Baidu’s image search engine can find many related semantic or similar image resources according to the input semantics or pictures, and the retrieval efficiency is very high [8]. Many domestic scholars in the computer field have also done a lot of work in the research of image similarity algorithm. Guangdong University of technology applies different algorithms to analyse the similarity of images under different algorithms and gives what kind of algorithm should be used in what scene; Beijing University of Posts and Telecommunications uses the big data distributed computing framework MapReduce to study the similarity of images; this paper introduces a maximum connected region composed of the same colour and its edge colour roughness [9]. Through this improvement, the distribution of image colour can be obtained, so as to make up for the deficiency of colour histogram algorithm; the accuracy of image similarity algorithm is improved by combining the low-level features of image texture and colour [10]; by constructing his spatial colour histogram and then using cumulative histogram, the accuracy of image retrieval can be optimized [11].Relevant scholars have developed image search engines. According to the image uploaded by the user, many image resources related to the image can be quickly retrieved. Some foreign scholars also use the singular value decomposition theory to solve the image similarity algorithm [12], due to the particularity of image data and people’s different understanding of image similarity. Thus, there are some deficiencies in studying image similarity from different directions; various factors do not form a standard to study image similarity [13]. For example, in terms of image colour features, the number of colours in the image is used to calculate the image similarity. This research does not consider the specific distribution of each colour in the whole image, and the calculated image similarity in some special scenes is inconsistent with the actual situation [14]. To study the image similarity from the spatial local features of the image, SIFT algorithm or other matching feature point algorithms can be used to study the image similarity; although these algorithms have high precision, their calculation is too complex.


## 3. Theory of Partial Differential Equations

The theory of partial differential equations has two characteristics. The first is the direct relationship between theory and application and physical problems. Moreover, the theory of partial differential equation comes from the research on the specific physical problems of a single partial differential equation, so it is also called mathematical physical equation. The second point is that the theory of partial differential equations is closely related to other branches of mathematics, such as functional analysis, algebra, and complex analysis. Partial differential equation theory is a basic concept, basic idea, and basic method widely used in mathematics and related fields. At the same time, it plays an important role in the research of related problems in mathematics and physics.The partial differential equation of unknown functionλx1,x2,⋯,xn is as follows:
(1)Fx,λ,Δλ,⋯,∂jλ∂x1j1∂x2j2⋯∂xnjn=0,where x=x1,x2,⋯,xn,Δλ=λx1,λx2,⋯,λxn, and F are known functions about the independent variable x and the finite number of partial derivatives of the unknown function λ. F may not directly contain the independent variable x and the unknown function u, but must contain the partial derivative of λ.The orderj=j1+j2+⋯+jn of the highest derivative is called the order of the partial differential equation. If a function satisfying the equation is continuous within a certain variation range of its independent variable x and has all m-order continuous partial derivatives in the equation, the function is called the classical solution of the equation. In practical application, the partial differential equation is usually required to meet certain conditions. The conditions that the partial differential equation must meet are usually called the definite solution conditions. The expression of the partial differential equation and the definite solution conditions constitute the definite solution problem [15]. The common definite solution conditions include initial conditions and boundary conditions. The corresponding definite solution problems are called initial value problems and boundary value problems. When the definite solution conditions of partial differential equations change slightly, the deviation of the solution of the corresponding definite solution problem is also very small, then the solution of the definite solution problem of partial differential equations is said to be stable.In order to further understand the partial differential equation, the heat conduction problem is proposed by Fourier. Let objectψ be at point x=x1,x2,x3, and the temperature at time t is determined by function λx,t. Suppose function λx,t is in 0,τ. In order to obtain the equation describing the heat propagation process, Newton’s law is applied. Let S be a smooth surface located in object ψ and V be the unit normal vector of S. According to Newton’s law, in the time interval from t1 to t2, the heat Q passing through the surface S in the normal direction V is:
(2)Q=∫t2t1∫S∇kx∂λx,t+∂λx,t−1∂v+∂v−1dt,where ∂λ/∂v represents the derivative of function λx,t along the V direction and function kx is called the thermal conductivity of the object at point x. Since the object is isotropic to heat conduction, the function not only represents the normal direction of surface s at point x, kx∈Cψ. Heat may be generated or consumed inside the object. The heat released at time t at point x is expressed by heat source density fx,t. Within the time of the heat source at time ψ1∈ψ, the heat released by the internal area t of the object is:
(3)Q=∫t1t2∫ψ1fx,tdxdtfx,t+c.Supposef∈ψ×0,τ, in order to derive the heat conduction equation of region ψ inside the object, according to Newton’s law, the heat passing through surface ∂ψ in the time interval from time t1 to t2 is:
(4)Q=∫t1t2∫∇kx∂λ+∂λ−1∂v+cdSdt,where ∂λ/∂v is the external normal derivative of ∂ψ1. In addition, the transformation of heat in area ψ1 from time t1 to t2 can be determined by temperature transformation. This heat is:
(5)∫ψ1cxρx∇kx+λx,t2−λx,t1t2−t1dx,where ρx is the density of the object and cx is the specific heat capacity of the object at point x. The corresponding heat balance equation is:
(6)∫t1t2∫∂ψ∇kx∂λx,t∂vdSdt+∫t1t2∫ψ1fx,tdxdt.According to Gauss Ostrogratsky formula:(7)∫t1t2∫ψ1sup∑j=1n∂kx∂xj∂λ∂xjdxdt.So, the equation can be written as:(8)∫t1t2∫ψ1cxρx∂λ∂tdxdt=∫t1t2∫ψ1sup∑j=1n∂∂xjkx∂λ∂xjdxdt+∫t1t2∫ψ1fx,tdxdt.SinceΩ1a is any subregion in Ω, the time interval t1,t2 is also any time period, and the integral is a continuous function, it is deduced from the equation that the following equation holds for any point x∈ψ at any time t:
(9)cxρx∂λ∂t=limn⟶∞∑j=1nkx∂2λ/∂xj2+fx,tfx,t+c.In this equation, whena is a constant, it is called the heat conduction equation. cx,ρx, and kx representative method of image enhancement technology based on partial differential equation is histogram equalization image contrast enhancement based on partial differential equation, which has good enhancement effect. It is to transform the image detail information, brightness, and contrast information into gradient value for processing, so as to realize the purpose of image enhancement. However, according to different situations, this method still has great limitations. This paper improves it based on the idea of image enhancement based on partial differential equation and further optimizes the brightness and contrast of the image.The histogram equalization method of partial differential equation is to express the output image asIx,y,t, and its evolution equation is:
(10)∂Ix,y,t∂t=1−Ix,y,t/ψAψIx,y,t−I0x,y−AIx,y,t−1.In the formula,Iox,y is expressed as the input image, AΩ is the area of the image definition domain; it can be proved that the equation is a gradient descent flow of functional and has a unique steady-state solution.The histogram equalization method of partial differential equation is adopted, and its value meets the equation:(11)Eu,v=Eu+∫Ωv∂F∂u+v′∂F∂u′dΩ.Letr and s represent the gray values of the original image and the enhanced image, respectively, and the corresponding gray probability density functions are Eu and Ev, respectively. Generally, the gray r and s of the image are normalized. Find a gray transformation function; the gray value after transformation and the transformation function must meet the following conditions [16].
(12)Eu,v=∫Ωv∂F∂u−vddx∂F∂ux−vddy∂F∂uydxdy.By substituting the boundary conditions, it can get:(13)Eu,v=∫Ωv∂F∂u−vddx∂F∂ux−vddy∂F∂uydxdy=0.The essence of histogram equalization is to broaden the gray level with more pixels in the image and reduce the gray level with less pixels, so as to adjust the brightness and contrast of the image. The probability density function accumulation of the output image is equal to the probability density function accumulation of the input image, and the probability density function of the output image remains uniformly distributed. The steps of histogram equalization algorithm are as follows:(1)
Count the number of pixelsnk,k=0,1,⋯,L−1, of each gray level of the original image(2)
Calculate the histogram of the original image, that is, the probability density of each gray level(3)
Calculate the cumulative distribution function(4)
Calculate output gray level(5)
Using the mapping relationship, the gray level of the original image is adjusted to obtain the enhanced image, so that the image histogram is approximately evenly distributedHistogram equalization makes the gray value of the image evenly distributed among the whole 256 gray levels [17]. It can enhance the low contrast image with concentrated gray levels, and adjust the brightness of the image at the same time. The histogram equalization enhancement effect is shown in Figures 1(a) and 1(b), and the histogram statistics of the corresponding image is shown in Figures 1(c) and 1(d). The gray level distribution is uniform, and the enhancement effect is good. However, histogram equalization still has some limitations. For different images, saturation and over enhancement often occur, and the edge texture of the image cannot be sharpened, so the algorithm is not universal.Figure 1
Comparison between original image and enhanced image.
(a)
Original image(b)
Image enhanced by partial differential equation(c)
Histogram statistics of original graph(d)
Histogram statistics after enhancement


## 4. Application of Partial Differential Equation Method in Urban Planning Image Feature Enhancement

This chapter is an application of image similarity algorithm in real life. Taking the urban scene as the background, this chapter gives the core design of the urban scene monitoring system to effectively monitor the urban scene. Finally, the results will be fed back to the city managers, so that the city managers can make reasonable decisions and make our city more and more clean and orderly.


### 4.1. Overview of Urban Planning Image Research

In urban scenes, there are many places that need to use image similarity judgment. How to solve this problem with the knowledge of computer vision is the focus of this chapter [18]. The primary notion of the lookup is to display and shoot the location that wants to be monitored in this area, then normally ship the monitored video statistics to the heritage machine for applicable processing, and ultimately make corresponding selections in accordance to the processing effects [19]. The application of image similarity algorithm in urban scene can be roughly divided into the following important steps.


#### 4.1.1. Urban Scene Monitoring Design

The monitoring design of urban scene mainly uses the monitoring equipment with camera to monitor the urban scene in real time, actively monitors the video image in the urban scene, and then transmits the collected key data to the server processing system to analyse the video image content and extract the key information.


#### 4.1.2. Obtaining Key Frames

Obtaining key frames is one of the important steps of image similarity calculation. Due to the influence of various factors, there is no unified standard for the extraction method of video key frames. It can only select the appropriate key frame extraction algorithm according to the specific scene.


#### 4.1.3. Image Preprocessing Design

The image preprocessing design in this paper mainly refers to denoising the image, because the video image input to the background system is affected by the acquisition environment, such as camera’s own reasons and actual scene factors [20]. The received pictures regularly have many disadvantages, such as massive noise and inadequate distinction. In order to remedy the above problems, the bought video picture can be preprocessed.


#### 4.1.4. Image Similarity System Design

The image similarity system design is to give a general system design of the urban scene monitoring system and a detailed description of each important link in the system through the investigation of the characteristics of the urban scene and the in-depth research and analysis of some mature image similarity systems .


### 4.2. Design of Image Similarity System

The urban scene monitoring system mainly has four functional components: image processing component, early warning component, video image storage component, and video monitoring component. These functional components work together to accurately monitor the urban area. Composition of urban image monitoring system is shown in Figure2.
(1)
Monitoring module: the monitoring module is mainly used to monitor the urban areas that need to be monitored. Network cameras can be used for monitoring, and the monitored video data needs to be transmitted to the video image storage module in time within the specified time for other modules to call(2)
Video image processing module: video image processing component is one of the important components of urban scene monitoring system. Its function is to analyse the video of the storage component, obtain the key images required by the urban scene monitoring system, and then, calculate the image similarity after a series of operations such as denoising(3)
Video image storage module: the video image storage module mainly stores video or image data obtained through the monitoring component. In the specific system design, the characteristics of video images should be fully considered to ensure that there is enough storage space to store video image data. Because video and images belong to multimedia resources, the characteristics of multimedia resources are large quantity, complex resources, and complex input and output of data resources. Therefore, in the design process, we should consider the storage cycle of video data and image data and delete the data regularly(4)
Early warning module: after the image is processed by the image processing module, according to the final similarity calculation result and reasonable threshold, if the final calculation result is not less than the corresponding threshold, the system needs to make some prompt early warning information. The results of the processing are fed back to the city managers in real time, so that they can make corresponding decisions according to the final results. The overall architecture of the system is shown in Figure3Figure 2
Composition of urban image monitoring system.Figure 3
Overall architecture of image feature enhancement system.


## 4.1. Overview of Urban Planning Image Research

In urban scenes, there are many places that need to use image similarity judgment. How to solve this problem with the knowledge of computer vision is the focus of this chapter [18]. The primary notion of the lookup is to display and shoot the location that wants to be monitored in this area, then normally ship the monitored video statistics to the heritage machine for applicable processing, and ultimately make corresponding selections in accordance to the processing effects [19]. The application of image similarity algorithm in urban scene can be roughly divided into the following important steps.


### 4.1.1. Urban Scene Monitoring Design

The monitoring design of urban scene mainly uses the monitoring equipment with camera to monitor the urban scene in real time, actively monitors the video image in the urban scene, and then transmits the collected key data to the server processing system to analyse the video image content and extract the key information.


### 4.1.2. Obtaining Key Frames

Obtaining key frames is one of the important steps of image similarity calculation. Due to the influence of various factors, there is no unified standard for the extraction method of video key frames. It can only select the appropriate key frame extraction algorithm according to the specific scene.


### 4.1.3. Image Preprocessing Design

The image preprocessing design in this paper mainly refers to denoising the image, because the video image input to the background system is affected by the acquisition environment, such as camera’s own reasons and actual scene factors [20]. The received pictures regularly have many disadvantages, such as massive noise and inadequate distinction. In order to remedy the above problems, the bought video picture can be preprocessed.


### 4.1.4. Image Similarity System Design

The image similarity system design is to give a general system design of the urban scene monitoring system and a detailed description of each important link in the system through the investigation of the characteristics of the urban scene and the in-depth research and analysis of some mature image similarity systems .


## 4.1.1. Urban Scene Monitoring Design

The monitoring design of urban scene mainly uses the monitoring equipment with camera to monitor the urban scene in real time, actively monitors the video image in the urban scene, and then transmits the collected key data to the server processing system to analyse the video image content and extract the key information.


## 4.1.2. Obtaining Key Frames

Obtaining key frames is one of the important steps of image similarity calculation. Due to the influence of various factors, there is no unified standard for the extraction method of video key frames. It can only select the appropriate key frame extraction algorithm according to the specific scene.


## 4.1.3. Image Preprocessing Design

The image preprocessing design in this paper mainly refers to denoising the image, because the video image input to the background system is affected by the acquisition environment, such as camera’s own reasons and actual scene factors [20]. The received pictures regularly have many disadvantages, such as massive noise and inadequate distinction. In order to remedy the above problems, the bought video picture can be preprocessed.


## 4.1.4. Image Similarity System Design

The image similarity system design is to give a general system design of the urban scene monitoring system and a detailed description of each important link in the system through the investigation of the characteristics of the urban scene and the in-depth research and analysis of some mature image similarity systems .


## 4.2. Design of Image Similarity System

The urban scene monitoring system mainly has four functional components: image processing component, early warning component, video image storage component, and video monitoring component. These functional components work together to accurately monitor the urban area. Composition of urban image monitoring system is shown in Figure2.
(1)
Monitoring module: the monitoring module is mainly used to monitor the urban areas that need to be monitored. Network cameras can be used for monitoring, and the monitored video data needs to be transmitted to the video image storage module in time within the specified time for other modules to call(2)
Video image processing module: video image processing component is one of the important components of urban scene monitoring system. Its function is to analyse the video of the storage component, obtain the key images required by the urban scene monitoring system, and then, calculate the image similarity after a series of operations such as denoising(3)
Video image storage module: the video image storage module mainly stores video or image data obtained through the monitoring component. In the specific system design, the characteristics of video images should be fully considered to ensure that there is enough storage space to store video image data. Because video and images belong to multimedia resources, the characteristics of multimedia resources are large quantity, complex resources, and complex input and output of data resources. Therefore, in the design process, we should consider the storage cycle of video data and image data and delete the data regularly(4)
Early warning module: after the image is processed by the image processing module, according to the final similarity calculation result and reasonable threshold, if the final calculation result is not less than the corresponding threshold, the system needs to make some prompt early warning information. The results of the processing are fed back to the city managers in real time, so that they can make corresponding decisions according to the final results. The overall architecture of the system is shown in Figure3Figure 2
Composition of urban image monitoring system.Figure 3
Overall architecture of image feature enhancement system.


## 5. Analysis of Experimental Results

In order to verify the reliability of urban planning image feature enhancement based on partial differential equation method, the simulation experiment uses OpenCV Library in Intel Core i7 CPU, 2.26 GHz, 4 G RAM environment. After several groups of different experiments, the reliability and effectiveness of urban planning image feature enhancement based on partial differential equation method are verified, respectively.


### 5.1. Time Consuming Simulation of Extracting Image Singular Values

Five images with different sizes are selected, respectively. Singular value decomposition is performed on these five images to extract their singular values.According to the experimental results of Figure4, the first image (300×400) and extracting the second image (600×800) time are required, with a time difference of 5.7 times. But when the image size is (960×1280), the time difference between extracting the singular value of the first image and extracting the singular value of the fifth image is 963.45 times. This gap is very large; according to the theoretical knowledge, with the increase of the image, the time complexity of matrix singular value decomposition is O(n3). Observe the graph in Figure 4, the shape of the graph is indeed similar to that depicted by the function y=x3. Experiments show that with the increase of image scale, the time required to extract image singular values is more and more, and the time complexity is O(n3).Figure 4
Time required to extract image singular values.


### 5.2. Simulation of Calculating Image Similarity

500×333 was selected for the experiment group of different images which are tested for many times, and the image similarity algorithm based on singular value decomposition and the image similarity algorithm based on block singular value decomposition are compared, respectively. The experiment uses the Babbitt distance to measure the similarity of the vector and extracts the first 30 singular values of each subimage.According to the analysis of the experimental data in Figure5, the image similarity obtained based on singular value decomposition and the image similarity obtained based on block singular value decomposition are inconsistent, and the difference is relatively large. Observing the first group of experiments, the similarity difference between the two images is 4.53%, and the result of block based singular value decomposition algorithm is small. The image similarity calculated by the other two groups of blocks based singular value decomposition algorithm is also small, but it is close to the image similarity obtained by singular value decomposition. This phenomenon is mainly due to the segmentation of the image, and then extract the singular value of the image, which is equivalent to extracting the local features of the image. Each subimage can be regarded as a part of the whole image. The more the number of image blocks, the higher the accuracy of the algorithm; observing the time complexity of these groups of experiments, it is obvious that this time consuming algorithm based on block algorithm is less time consuming than the algorithm before block. However, with the increase of the number of blocks, it takes more time, because it also takes some time to block the image, which will affect the time consuming of the algorithm. In the actual application scenario, combined with the accuracy and time consuming of the algorithm, several groups of experiments can be carried out to obtain an optimal blocking scheme, and then, the similarity of the image is calculated.Figure 5
Comparison between original image and enhanced image.
(a)
Comparison of image similarity(b)
Comparison of time consuming


### 5.3. Performance Comparison Experiments of Different Algorithms

500×333 was selected for the experiment group of different images which are tested for many times, and the image similarity algorithm based on singular value decomposition, image similarity algorithm based on block singular value decomposition, and colour histogram algorithm are compared, respectively. The experiment uses the Babbitt distance to measure the similarity of the vector and extracts the first 30 singular values of each subimage.By analysing the experimental data in Figure6, the traditional colour histogram algorithm takes a short time to calculate the image similarity, but the singular value decomposition takes a long time to calculate the image similarity. The block singular value decomposition algorithm improves the performance of singular value decomposition to a certain extent, but the performance needs to be further optimized compared with the colour histogram algorithm. This problem will be further studied in author’s future work.Figure 6
Comparison between original image and enhanced image.
(a)
Comparison of image similarity(b)
Comparison of time consuming


### 5.4. Verification and Comparison of Similarity between Different Methods

In the experiment, two images of1920×2560 are selected for many experiments, and the improved algorithm is compared with histogram algorithm and gray level cooccurrence matrix algorithm. The experimental source image is shown in Figure 7. The experimental parameter setting colour histogram adopts the gray image of 256 colours. The value of gray level k is: k=16, 32, 64, 128. The values of distance d are 1, 3, 5, and 7. The movement angle is θ=100,450,900,1350. The weight of the improved algorithm is k1=0.3, and k2=0.5.Figure 7
Curve comparison of image similarity at different gray levels.
(a)
Gray level 16(b)
Gray level 32(c)
Gray level 64(d)
Gray level 128According to the data in Figure7, it is not difficult to find that different gray levels and distances may make the calculated image similarity results inconsistent. By analyzing the experimental data in Figure 7, we can draw the following conclusions: when the image gray level is 32 and 64, when the distance is 3, 5, and 7, the change range of broken line is very small and gradually tends to be stable. At this time, the calculated image similarity is very stable. In the specific scene of calculating image similarity, this method of multiple experiments can be used to obtain relatively stable image similarity. However, the value of image gray level will directly affect the scale of the construction matrix. The larger the value of gray level k, the longer the time consuming of the construction matrix and the longer the execution time of the whole algorithm. Considering the overall operation efficiency of the algorithm, it is generally necessary to make appropriate values according to their own scenarios. Through the analysis and comparison of several groups of experiments, the author draws the following conclusions: generally, when the gray level is 32 and the distance is 3<d<8, the relatively stable image similarity can be obtained. For the scene that requires high experimental accuracy, the gray level can be improved, and for the scene that requires high algorithm time complexity, the gray level can be reduced. Comparing the improved algorithm and gray level cooccurrence matrix algorithm, it can be seen that the two algorithms have a great impact on image similarity with the different values of gray level and pixel distance. The reason for this phenomenon is that the extracted image texture feature values are different with different gray levels and distances, so the calculated image similarity is quite different. Next, according to different distance formulas, the improved similarity algorithm is used to measure the similarity of Figures 7(c) and 7(d). Experimental parameter setting: the gray level parameter is 32, and the distance parameter is 5. The experimental results are shown in Figure 8.Figure 8
Comparison between original image and enhanced image.Different distance formulas are used to measure a group of images in the experiment. It is found that the experimental results calculated by these distance formulas are inconsistent. The calculation results of histogram intersection method and Babbitt distance are the closest, while the calculation results of Euclidean distance and cosine distance are relatively close. This shows that the use of different distance formulas does have an impact on the calculation of image similarity. A satisfactory distance measurement formula should be close to the visual characteristics of human eyes. In the specific application, several groups of experiments can be carried out to select the distance measurement formula most in line with the scene.


## 5.1. Time Consuming Simulation of Extracting Image Singular Values

Five images with different sizes are selected, respectively. Singular value decomposition is performed on these five images to extract their singular values.According to the experimental results of Figure4, the first image (300×400) and extracting the second image (600×800) time are required, with a time difference of 5.7 times. But when the image size is (960×1280), the time difference between extracting the singular value of the first image and extracting the singular value of the fifth image is 963.45 times. This gap is very large; according to the theoretical knowledge, with the increase of the image, the time complexity of matrix singular value decomposition is O(n3). Observe the graph in Figure 4, the shape of the graph is indeed similar to that depicted by the function y=x3. Experiments show that with the increase of image scale, the time required to extract image singular values is more and more, and the time complexity is O(n3).Figure 4
Time required to extract image singular values.


## 5.2. Simulation of Calculating Image Similarity

500×333 was selected for the experiment group of different images which are tested for many times, and the image similarity algorithm based on singular value decomposition and the image similarity algorithm based on block singular value decomposition are compared, respectively. The experiment uses the Babbitt distance to measure the similarity of the vector and extracts the first 30 singular values of each subimage.According to the analysis of the experimental data in Figure5, the image similarity obtained based on singular value decomposition and the image similarity obtained based on block singular value decomposition are inconsistent, and the difference is relatively large. Observing the first group of experiments, the similarity difference between the two images is 4.53%, and the result of block based singular value decomposition algorithm is small. The image similarity calculated by the other two groups of blocks based singular value decomposition algorithm is also small, but it is close to the image similarity obtained by singular value decomposition. This phenomenon is mainly due to the segmentation of the image, and then extract the singular value of the image, which is equivalent to extracting the local features of the image. Each subimage can be regarded as a part of the whole image. The more the number of image blocks, the higher the accuracy of the algorithm; observing the time complexity of these groups of experiments, it is obvious that this time consuming algorithm based on block algorithm is less time consuming than the algorithm before block. However, with the increase of the number of blocks, it takes more time, because it also takes some time to block the image, which will affect the time consuming of the algorithm. In the actual application scenario, combined with the accuracy and time consuming of the algorithm, several groups of experiments can be carried out to obtain an optimal blocking scheme, and then, the similarity of the image is calculated.Figure 5
Comparison between original image and enhanced image.
(a)
Comparison of image similarity(b)
Comparison of time consuming


## 5.3. Performance Comparison Experiments of Different Algorithms

500×333 was selected for the experiment group of different images which are tested for many times, and the image similarity algorithm based on singular value decomposition, image similarity algorithm based on block singular value decomposition, and colour histogram algorithm are compared, respectively. The experiment uses the Babbitt distance to measure the similarity of the vector and extracts the first 30 singular values of each subimage.By analysing the experimental data in Figure6, the traditional colour histogram algorithm takes a short time to calculate the image similarity, but the singular value decomposition takes a long time to calculate the image similarity. The block singular value decomposition algorithm improves the performance of singular value decomposition to a certain extent, but the performance needs to be further optimized compared with the colour histogram algorithm. This problem will be further studied in author’s future work.Figure 6
Comparison between original image and enhanced image.
(a)
Comparison of image similarity(b)
Comparison of time consuming


## 5.4. Verification and Comparison of Similarity between Different Methods

In the experiment, two images of1920×2560 are selected for many experiments, and the improved algorithm is compared with histogram algorithm and gray level cooccurrence matrix algorithm. The experimental source image is shown in Figure 7. The experimental parameter setting colour histogram adopts the gray image of 256 colours. The value of gray level k is: k=16, 32, 64, 128. The values of distance d are 1, 3, 5, and 7. The movement angle is θ=100,450,900,1350. The weight of the improved algorithm is k1=0.3, and k2=0.5.Figure 7
Curve comparison of image similarity at different gray levels.
(a)
Gray level 16(b)
Gray level 32(c)
Gray level 64(d)
Gray level 128According to the data in Figure7, it is not difficult to find that different gray levels and distances may make the calculated image similarity results inconsistent. By analyzing the experimental data in Figure 7, we can draw the following conclusions: when the image gray level is 32 and 64, when the distance is 3, 5, and 7, the change range of broken line is very small and gradually tends to be stable. At this time, the calculated image similarity is very stable. In the specific scene of calculating image similarity, this method of multiple experiments can be used to obtain relatively stable image similarity. However, the value of image gray level will directly affect the scale of the construction matrix. The larger the value of gray level k, the longer the time consuming of the construction matrix and the longer the execution time of the whole algorithm. Considering the overall operation efficiency of the algorithm, it is generally necessary to make appropriate values according to their own scenarios. Through the analysis and comparison of several groups of experiments, the author draws the following conclusions: generally, when the gray level is 32 and the distance is 3<d<8, the relatively stable image similarity can be obtained. For the scene that requires high experimental accuracy, the gray level can be improved, and for the scene that requires high algorithm time complexity, the gray level can be reduced. Comparing the improved algorithm and gray level cooccurrence matrix algorithm, it can be seen that the two algorithms have a great impact on image similarity with the different values of gray level and pixel distance. The reason for this phenomenon is that the extracted image texture feature values are different with different gray levels and distances, so the calculated image similarity is quite different. Next, according to different distance formulas, the improved similarity algorithm is used to measure the similarity of Figures 7(c) and 7(d). Experimental parameter setting: the gray level parameter is 32, and the distance parameter is 5. The experimental results are shown in Figure 8.Figure 8
Comparison between original image and enhanced image.Different distance formulas are used to measure a group of images in the experiment. It is found that the experimental results calculated by these distance formulas are inconsistent. The calculation results of histogram intersection method and Babbitt distance are the closest, while the calculation results of Euclidean distance and cosine distance are relatively close. This shows that the use of different distance formulas does have an impact on the calculation of image similarity. A satisfactory distance measurement formula should be close to the visual characteristics of human eyes. In the specific application, several groups of experiments can be carried out to select the distance measurement formula most in line with the scene.


## 6. Conclusion

This paper proposes a new solution to the problem of commodity price recognition, that is, the nonlinear dimensionality reduction method of high-dimensional data is introduced into image recognition. The eigen structure of high-dimensional data set can be found by nonlinear dimensionality reduction to obtain the feature expression vector of a single image, so as to transform the high-dimensional recognition problem into the recognition problem of relatively low-dimensional feature expression vector. Compared with frequent methods, this consideration has the following characteristics: handy and quick calculation and small storage capacity. It can absolutely mine the intrinsic data of picture statistics and leave out a giant quantity of redundant information. Each image can be processed independently; it can greatly improve the recognition effect of common methods. Thus, this expression of image data can be widely used in recognition, search, and other aspects. This method can reduce the complexity of calculation, improve the accuracy of recognition, and facilitate further processing such as image recognition and search. The defects of traditional algorithms are solved, and the commodity price recognition and simulation experiments are carried out, which verifies the feasibility of image recognition technology based on nonlinear dimensionality reduction method in commodity price recognition.



---

*Source: 3736735-2021-12-01.xml*