Measurement Model for Medical Image Feature Matrix Similarity Based on CNN

,


Introduction
With the continuous development of visualization technology and computer graphics, the research on the medical image is also deepening. e basis of medical image research is feature analysis. erefore, at present, taking medical images as the research object, the integration of research on the extraction method of medical image feature points has become a hot research direction [1]. At the same time, there have been many studies on the similarity measurement of image features, which provide more useful information for the in-depth analysis and application of medical images. Many achievements have been made in medical image feature analysis and similarity measurement at home and abroad. Abdar et al. [2] proposed a medical image classi cation and fusion model, which mainly uses the binary residual feature fusion method to solve the uncertainty of the algorithm. is method makes a detailed analysis of the medical image features and obtains a good image classi cation e ect. However, this method takes a long time; Shu et al. [3] proposed an initial spatial convolution block to collect the context information related to the decoding stage, extract and accumulate features from di erent paths and establish associations between structural features and semantic features for medical image segmentation. However, the practical applicability of this method is relatively weak. Poudel and Lee [4] established a multi-scale global feature map and used the attention mechanism to suppress noise and bad features, resulting in the complete recovery of context feature dependence, and completed the feature extraction of medical images, which has a high recall and precision. However, it takes a long time. Wenping et al. [5] proposed an improved random walk node similarity measurement method: a random walk similarity measurement method based on relative entropy. e transition probability distribution of the node is constructed according to the transition probability of the node arriving at the inuential node in the network after the multi-step random walk. e relative entropy of the transition probability distribution of two nodes is calculated to obtain the di erence score between node pairs in the network. en the similarity matrix between network nodes is obtained. RE-model algorithm performs well in symmetry, network propagation, and community discovery, but the measurement e ect is not ideal. Feng, et al. [6] established the isometric isomorphism model of multi-scale spatial entities from the viewpoint of metric geometry. e geometric and topological similarity measurement of graphics is expressed in multiple scales for planar and linear spatial entities with different complexities. is method can simultaneously take into account the changes in geometry and topology of multi-scale spatial entities and conform to the multi-scale abstraction law of spatial entities, but the similarity measurement takes a long time. Wang et al. [7] proposed a spatiotemporal trajectory similarity measurement method using Hausdorff distance. Starting from the three features of spatiotemporal trajectory, a spatiotemporal trajectory reorganization strategy for similarity measurement is proposed. e traditional idea of similarity measurement with a point as the center is changed to track segment as the center, and the track spatiotemporal clustering experiment is carried out with micro-blog check-in track data and taxi GPS track data. is method can effectively calculate the similarity of spatiotemporal trajectories and meet the needs of spatiotemporal trajectories clustering, but the measurement accuracy is not ideal. e original similarity measurement method is easy to ignore the analysis of image details, resulting in unsatisfactory calculation results. erefore, this paper proposes a similarity measurement model of the medical image feature matrix based on CNN. Starting from the global and local, the feature points of the medical image are extracted in an orderly, and CNN is introduced to construct the feature matrix, to complete the construction of the medical image feature matrix similarity measurement model. To ensure the use effect of the similarity measurement model based on CNN designed in this study, after the model is built, the test analysis method is used to verify the model in this paper. e contributions of this paper are as follows: (1) Starting from the global and local, the feature points of medical images are extracted orderly, taking into account the details of medical images, which provides the basis for improving the accuracy of the algorithm calculation; (2) CNN is used to construct the similarity measurement model of the feature matrix to improve the performance of the model; (3) Using different data sets, the performance of this model is tested under different indicators to verify the efficiency of this model. e former mainly reflects the statistical information of the image, while the latter describes the image as a whole based on local structure, texture, and other details [8,9]. Aiming at the deficiency of the original similarity measurement model, the acquisition of the image feature matrix is optimized to ensure the effectiveness of acquiring image feature information. In the process of image feature acquisition, scale-invariant feature mode is selected to extract the relevant information in a medical image. is method can deal with translation, rotation, scaling, brightness change, and other external factors. It also maintains certain stability for visual changes and applies to the scaling and rotation changes of human organs in the medical image [10].

Proposed Model
A medical image equalization algorithm with segmentation factors is introduced. Firstly, the medical image of the input image is divided into two sub-medical images according to the threshold. In this process, the average brightness of the output image is retained, and the disadvantage of brightness drift of the output image is overcome. Suppose the input image is X, the medical image H(k) of the grayscale of the input image k is defined as where n(k) is the frequency of the k grayscale pixel in the image, and L is the highest grayscale in the image. e probability density function of image p(k) is According to the threshold τ, the medical image grayscale [0, L − 1] of the input image is divided into two parts: low square and high-quality medical image, which are expressed by H low (k) and H up (k). e range of their grayscale is [0, τ − 1] and [τ, L − 1]. Probability density function of sub medical image n low and n up are the total number of pixels in low-quality medical image area and high-quality medical image area. e probability density function of a medical image is shown in (3) and (4): τ � ⌊median · r⌋.
As mentioned in the introduction, the literature [4] method emphasizes the high-frequency pixels of the image, which is easy to cause the loss of details of the output image, and the phenomenon that the low-frequency pixels are swallowed by the adjacent high-frequency pixels. rough equations (6) and (7), the modified medical image equalization algorithm modifies the low-quality medical image and the high-quality medical image and overcomes the problems of the literature [4] method.
Medical image equalization is the last step to modify the medical image equalization algorithm. e cumulative probability density function for medical image equalization in the literature [4] algorithm is c(k).
e transformation function f(k) is used to remap the grayscale k of the input image. e definition of the transformation function f(k) is shown in the following equation: where X 0 and X L−1 are the minimum value and the maximum value of the image grayscale. From (9), it can be seen that the grayscale of the input image through the literature [4] method is remapped to the entire dynamic range Consistent with the literature [4] method, the submedical image equalization equation of the modified medical image equalization algorithm is shown in (10). e medical image of the modified grayscale can be regarded as the cropped pixels that are reassigned to the medical image before the medical image is equalized. Finally, the final enhanced image is obtained by equalizing the sub-medical image.
e modified medical image equalization algorithm enhances the input image through medical image segmentation, correction, and equalization. Compared with the literature [4] algorithm, the modified medical image equalization algorithm has a higher signal-to-noise ratio on the premise of preserving image details. e image size of the medical image is set under different sizes, which can be obtained by convolution of the original image and Gauss: where (x, y) is the original position of the image, z is the scale spatial factor, G(x, y, z) is the two-dimensional Gaussian function, p is the original medical image, and A is the spatial scale of the medical image. When acquiring feature points of medical images, the DoG operator [11] is used to process medical images. e operator can be expressed as is operator is used to calculate the points on the image, and the calculated values are connected to obtain the eigenvalue curve of the image [12,13]. en, the fitting function is used to accurately obtain the position and scale of image feature points, and unstable feature points are removed, to enhance the stability and antimanufacturing ability of image feature points, as shown in Figure 1.
Following the above process, feature points of medical images are extracted orderly, and the feature points in the images are integrated and stored in the medical image database [14].

Modeling of Similarity Measurement for the Constructing
Medical Image Feature Matrix. According to the medical image features acquired in 2.1, the CNN is used to construct the medical image feature matrix, which is used as the basis of the measurement model.
In this study, CNN is used to classify the extracted feature points. is part is mainly related to the convolution layer of the neural network [15]. erefore, the image data processing process of the convolution layer in this model is set as follows: where f 1 (a) and f 2 (a) refer to the image information to be processed, and * is the convolution calculation symbol. To improve the accuracy of feature classification, a Gaussian convolution [16,17] check is used to process the image data in this part, and the classification results of feature points are obtained. e processing results are output in the form of a matrix. Suppose the output feature points matrix is set as a set, then w � w 1 , w 2 , . . . , w n , in which n refers to the number of medical images [18], and w i refers to the feature matrix corresponding to the medical image i. en the similarity measurement equation of the image matrix can be obtained by using Mahalanobis distance: where t is the measurement time, w i , w j is the corresponding feature vector in the image i， j, d(w i , w j ) u is the distance from image w i to image w j . e more similar the two are, the smaller the value of d(w i , w j ) u is. In this model, u is the similarity measurement matrix of two images [19]. To ensure the validity of its numerical value, it is set as a symmetric positive definite matrix c.
where y is the feature quantity of image classification. en the characteristics of the above equation can be reflected as Mathematical Problems in Engineering Integrate (14) and (16) to obtain the following similarity measurement model, as follows: To prevent the above equation from overfitting during image processing [20], it is rewritten as where R S is the model constraint, y is the measurement model component. en the final model processing equation is where y * is the optimal similarity measurement model, R 1 is constraint condition of the subject, R 2 is the constraint condition of the main feature, and R 3 is regular constraint. For the optimization of this model, it is necessary to solve many of the above items. erefore, in the process of calculation, the above equation should be used for nonlinear problem planning, to obtain the optimal similarity measurement model. is part is connected with the abovementioned medical image feature extraction part to complete the construction process of the feature similarity measurement model of the medical image. So far, the similarity measurement model of the medical image feature matrix based on CNN has been designed, as shown in Figure 2.

Data Sets and Evaluating
Indicator. MURA data set and MRNet data set were used for analysis. MURA data set: one of the largest X-ray database at present, there are a large number of muscle and bone X-ray images, including shoulder, humerus, elbow, forearm, wrist, palm, and fingers. e images in this dataset are manually marked by doctors. MRNet data set: this data set is the MRI data of the knee joint, including 1370 MRI images and 1104 abnormal examination images such as anterior cruciate ligament tear and meniscus tear, which is suitable for the analysis and research of medical image features. From the above two data sets, one thousand medical image data are selected as the data source. First, the selected data are preprocessed to avoid noise, redundant information, and other interference, and then two thousand data are divided into 4 points for cross-validation. e performance of this model is fully verified through many experiments. e test platform used in this test consists of two parts. Because of the particularity of the signal of the medical image acquisition site, the medical image acquisition equipment cannot take real photos. erefore, it only shows the same prototype as the test equipment. To ensure the effectiveness of this test, the first step of this experiment is the global similarity measurement of medical images. In the second part, the local comparison is used to improve the detail of the design model test in this paper.
Error rate: in the calculation of medical image feature data, the function objective is optimized through spatial constraints. To verify the accuracy of the proposed method, the error rate is selected as an index for comparative analysis.
Measurement time: to verify the classification efficiency of the proposed method, the classification time in different iteration times is selected as the indicator.
Fitting degree of measurement: to verify the accuracy of the method, a section of data is input and different methods are selected for fitting degree analysis. e fitting degree directly determines the classification performance of the method.

Results and Discussion.
In this test, any image is selected as the key image of similarity measurement, and the methods in Literature [2], Literature [3], Literature [4], and the design model in this paper are used to perform similarity measurement on the images in the image database and obtain similar images. rough the image extraction results, the differences between the methods in Literature [2], Literature [3], Literature [4], and the design model in this paper are obtained, as shown in Figure 3. rough the above settings, the image extraction results of literature [2] method, literature [3] method, literature [4] method, and the design model in the paper are shown in Figure 4.
According to the above experimental results, the simulation measurement accuracy of the design model in this paper is better than that of the methods in Literature [2], Literature [3], and Literature [4]. Similar medical images with high accuracy can be obtained by using the model designed in this paper. e methods in Literature [2], Literature [3], and Literature [4] have poor accuracy for image similarity measurement and cannot extract all medical images with feature information in the database. e universal joint graph is selected as the test sample for local test. It is known that there are 150 images with the following joint characteristics in the database. e design model in this paper and the methods in Literature [2], Literature [3], and Literature [4] are used to perform similarity measurement on the image data in the database to extract images with the same features. In this part of the test, the above step is repeated for a total of 5 times, and the accuracy of image extraction is calculated, as shown in Figure 5.
e following test results are obtained through multiple experiments. To ensure the effectiveness of the test results, only two decimal places of the calculation results are reserved, as shown in Table 1.
According to Table 1. In the local similarity measurement test, the image extraction accuracy of the design model in this paper is better than that of the methods in Literature [2], Literature [3], and Literature [4]. It has a high similarity measurement ability for the images in the medical image database. By integrating the experimental results of the above two parts, it can be seen that the similarity measurement model of the medical image feature matrix based on CNN designed in this paper can achieve good results in both global similarity measurement and local similarity measurement. erefore, the similarity measurement model of the medical image feature matrix based on CNN designed in this paper is better than the methods in Literature [2], Literature [3], and Literature [4] and has higher measurement accuracy, as shown in Figure 6. e features extracted in this test are shown in the circle in Figure 6.
rough the above settings, the methods in Literature [2], Literature [3], Literature [4], and the image extraction results of the design model in this paper are shown in Figure 7.
It can be seen from the above experimental results that the detail processing effect of the design model in this paper is better than that of the methods in Literature [2] and Literature [3]. e image of small details can be effectively obtained by using the model designed in this paper. e methods in Literature [2] and Literature [3] have a poor effect on obtaining the details of the image and cannot obtain the image consistent with the details of the test image.

Mathematical Problems in Engineering
To test the accuracy of this method in similarity measurement of medical image features, the proposed method is compared with the traditional methods in Literature [2], Literature [3], and Literature [4]. With 200 medical images used in the database, four methods are used to analyze the error rate, As shown in Figure 8.    As can be seen from Figure 8, the error rate of the method proposed in this paper is smaller than that of the other three methods in different iteration times. e highest error rate is only about 0.21, and the minimum error rate can be 0.01. e decrease in error rate is the largest. e minimum error rate of literature [2] method, literature [3] method, and literature [4] method is also between 0.03 and 0.05. erefore, the proposed method has obvious advantages in the accuracy of image feature detection.
To further verify the measurement efficiency of the proposed method, the measurement time is taken as the experimental index to compare the four methods. In the   Mathematical Problems in Engineering experiment, 200 medical images in the database are selected, and the number of iterations is 30, as shown in Figure 9. According to Figure 9, the measurement time of the method proposed in this paper is the lowest at the 10 th iteration, only about 25 s, and the highest at the 25 th iteration, about 43 s. However, the minimum time of the method in Literature [2], Literature [3], and Literature [4] is 73 s, 71 s, and 43 s, respectively, which are higher than the maximum time of the proposed method. And the measurement time variation of this method is smaller than that of the other three methods. erefore, it can be considered that the proposed method has high measurement efficiency.
Taking the fitting degree as the test index, the comparative experiments of the four methods are performed. e experimental results obtained according to the experimental indexes in Section 3.1 are shown in Figure 10. Figure 10 shows that the fitting degree of the proposed method in this paper is the highest among the four methods, which can reach about 91%, and it reaches 100% when the fitting degree is the highest. However, the fitting degree of the methods in Literature [2], Literature [3], and Literature [4] is relatively low. In particular, the fitting degree of the methods in Literature [2] is only about 15%, and the fitting degree of the methods in Literature [3] and Literature [4] is about 51% and 71%, respectively, which is quite different from the fitting degree of the methods in this paper. erefore, it can be seen that the method proposed in this paper has obvious advantages in fitting degree and meets the actual needs.

Conclusion
With the continuous development of medical image imaging technology, there are gradually more ways to obtain medical images. Medical image has the advantages of low cost, simple operation, and easy preservation, as well as enhancing people's health awareness, thus it has been widely used in medical treatment in recent years. To further analyze medical images and obtain more useful information, this paper proposes a similarity measurement model of medical image feature matrix based on CNN. e global and local information of the medical image is analyzed, the image feature points are extracted orderly, and the CNN is input to construct the feature matrix. Based on the CNN operation, the similarity measurement model of the medical image feature matrix is constructed, and the model design is completed. e results show that the proposed model has a good similarity measurement effect in global, local, and detailed aspects, and the maximum error rate of this model is only about 0.21, the minimum operation time is only about 25 s, and the overall fitting degree can reach about 91%, which has significantly superior performance compared with traditional methods.
In the research of medical images, it is an important direction for the development of medical images in the future to realize the diagnosis of disease according to the different locations and the similarity of location. In future research into medical images, it is necessary to not only focus on medical knowledge but also learn from the corresponding model recognition and bionics knowledge, to integrate multiple patterns, obtain better similarity measurement methods, and make more breakthroughs. In this study, we only optimize the insufficient use of the previous model, and the research depth is insufficient. In the future, we need to continue to find better calculation methods to improve the use effect of the similarity measurement model.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.    Mathematical Problems in Engineering