Abstract

Medical images play an important role in modern medical diagnosis. Many clinicians make correct and appropriate diagnosis and treatment plans by means of medical images. With the development of science and technology, the application of medical image needs not only to simply read the image, but also to fuse advanced technology to analyze and process the image from a deeper level, such as the proposal of virtual surgery. Therefore, this article focuses on several key issues of medical image segmentation and virtual surgery. First, medical images are preprocessed by gray level transformation, interpolation, and noise elimination techniques. Second, level set model-based segmentation algorithm is adopted and improved. Finally, a constrained Delaunay tetrahedron method based on a point-by-point insertion method is proposed to reconstruct the tetrahedron mesh model. In order to eliminate the thin element, the tetrahedron mesh model is optimized. The simulation results show that this article improves the segmentation algorithm based on the level set model, which effectively improves the contradiction between the convergence accuracy and the convergence speed of the algorithm. The proposed tetrahedral mesh reconstruction algorithm realizes the generation of tetrahedral finite element meshes with complex boundaries and improves the quality of the volume model by optimizing the model.

1. Introduction

From the invention of X-ray in 1898 by Rontgen to the appearance of X-ray computed tomography in 1970s, the mode of medical diagnosis has changed greatly. Doctors’ diagnosis relies more and more on visual image information. The emergence of magnetic resonance imaging (MR), positron emission computed tomography, and other imaging equipment has broadened the vision of doctors and brought great help to their diagnosis and treatment. Using computer graphics and image processing technology to extract and display three-dimensional image information can help medical staff simulate the treatment and operation process. The application of computer graphics and image technology to three-dimensional medical data mainly focuses on the visualization of three-dimensional medical images. The research of visualization and the rapid development of virtual reality technology have jointly promoted the development of virtual surgery technology [1, 2]. Virtual Reality (VR) technology combines multimedia technology with simulation technology to create a virtual environment with vivid audio-visual and tactile effects, which enable users to experience and interact in a natural way in the virtual environment to generate their own immersive feelings and experiences [35]. Therefore, in order to study how to design and construct an immersive virtual reality system, it is necessary to include computer graphics, image processing and pattern recognition, intelligent interface technology, artificial intelligence technology, multisensor technology, voice processing and audio technology, network technology, parallel processing technology, and high-performance computer system, etc. Virtual surgery system is the application of virtual reality technology in modern medicine. Zhu et al. proposed an algorithm based on image fusion to enhance the performance and robustness of image dehazing. Based on a set of gamma-corrected underexposed images, a pixel weight map is constructed by analyzing global and local exposures to guide the fusion process. The brightness spatial dependence of the fused image is reduced, and the color saturation is balanced during the dehazing process. The performance of the proposed solution is confirmed in both theoretical analysis and comparative experiments [6]. Combining the characteristics of CNNs and transformer, Li et al. proposes a dual encoder–decoder structure of X-shaped network (X-Net). It can be a good substitute for traditional pure convolutional medical image segmentation network. In the encoding stage, local and global features are simultaneously extracted by two encoders, convolutional downsampling, and transformer, and then fused by skip connections [7].

With the popularization and development of medical images in clinical diagnosis, the role of medical images goes far beyond the visual observation of their anatomical structures. It is necessary to accurately locate, segment, extract, and quantitatively analyze areas of interest such as anatomical structures and lesion areas with the help of computer and image graphics technology. It is further used in image registration, 3D reconstruction, surgical simulation, intraoperative navigation, radiation therapy planning, disease progression tracking, computer-assisted surgery, and other technologies. This undoubtedly has far-reaching significance for improving the utilization value of image data, and can greatly improve the accuracy and correctness of clinical diagnosis.

Image preprocessing is to separate each text image and hand it over to the recognition module for recognition. This process is called image preprocessing. In image analysis, the processing performed before feature extraction, segmentation, and matching are performed on an input image. Although there are hundreds or even thousands of image segmentation methods, owing to the complexity of human anatomy, there is irregularity of the shape of tissues and organs and the differences between individuals. The general image segmentation method directly applied to the medical image cannot obtain the ideal segmentation effect. Medical image segmentation is a difficult task, and there is still no general theory and method for medical image segmentation.

In the research and application of images, people are often only interested in some parts of the image, usually called the foreground, and the rest is usually called the background. Image segmentation is the technology and process of dividing the image into distinct regions and extracting the foreground. As an important part of medical image analysis, image segmentation plays an important role in a large number of medical image applications, such as tissue volume quantification, diagnosis, lesion location, anatomical structure research, treatment, partial volume correction of functional imaging data, and surgical operation combined with computer technology. The quality of image segmentation directly affects the final result of image analysis.

Three-dimensional reconstruction of medical images is to study how to construct three-dimensional geometric models of tissues or organs from two-dimensional sequence images acquired by various medical imaging devices and to render and display them on the computer screen “authentically.” These medical imaging techniques include computed tomography (CT), magnetic resonance imaging (MIR), ultrasound (US), positron emission tomography (PET), single photon emission tomography (SPECT), etc. Three-dimensional reconstruction of medical images can be used in surgical planning, simulation, plastic and prosthetic surgery, radiotherapy planning, anatomy teaching, and so on. At present, in the research of three-dimensional reconstruction of medical images, there are two main methods of geometric model construction: surface model and volume model. Surface model refers to the use of surface mesh model to represent the object of study. Volume model is constructed and represented by the corresponding two-dimensional unit filled with the whole model space.

With the development of science and technology, the application of medical image is needed not only to simply read the image but also to fuse advanced technology to analyze and process the image from a deeper level. Therefore, this article studies the segmentation technology in medical segmentation and virtual surgery and the three-dimensional reconstruction technology of medical image.

The innovations of this article are as follows: (1) Preprocessing medical images through grayscale transformation, interpolation, and noise removal. The principle of grayscale transformation is to stretch the grayscale values near the grayscale range and compress the grayscale levels far from the tissue according to the grayscale range of the tissue to be displayed. (2) The segmentation algorithm based on the level set model is adopted, and the algorithm is improved. The contradiction between the convergence accuracy and the convergence speed of the algorithm is effectively improved. (3) A constrained Delaunay tetrahedral mesh reconstruction method based on point-by-point interpolation is proposed. In order to eliminate thin elements, the tetrahedral mesh model is optimized, and the effective tetrahedral mesh model with complex boundaries is generated well, and the quality of the volume model is improved through optimization.

2. Proposed Method

2.1. Medical Image Preprocessing
2.1.1. CT Value and Grayscale Transformation

Nowadays, CT machines are usually equipped with DICOM interface, which can be used to directly obtain the original data files of CT conforming to DICOM protocol. According to the imaging principle of CT machine, it is known that the CT value of the corresponding pixels is recorded in the data domain of data elements conforming to DICOM protocol, not the gray value of the general image.

CT value is a physical quantity indicating the attenuation degree of X-ray after passing through tissues. It is determined by the absorption coefficient of various tissues to X-ray. Based on the absorption coefficient of water, the formula for calculating CT value is shown in formula (1):

The principle of gray transformation in this article is to stretch the gray value near the gray range according to the gray range of the organization to be displayed and compress the gray level far away from it. Here, we introduce the concept of “window width” and “window position” in CT. If a CT value corresponds to the position of the gray-level center, then the CT value represents the window position. The window width indicates the range of CT values displayed.

Let X be the value of the original image pixels and Y be the value of the transformed image. The transformed Y value ranges from 0 to 255 gray scale, L is the center value of the window, and W is the width value of the window. The transformation formula is shown in formula (2):

Suppose the original image, consider each pixel, as an ant, then the ant includes the image's grayscale, gradient, and neighborhood features. The distance from any pixel is to expressed as Euclidean distance:

In formula (3), m is the dimension of the ant (m takes 3), and p is the weighting factor (which will be set according to the degree of influence of each component of the pixel). Let b be the clustering radius and be the pheromone, then we have

At this time, if the path probability from to is selected as , then

As the ants move, the pheromone on each path will change. After one cycle, the pheromone on each path is adjusted by the following formula:

In the formula, ρ is the attenuation degree of the pheromone over time and is the increment of the path pheromone in this cycle:

In the formula, is the pheromone left in the path of the kth ant in this cycle. Let the selected initial cluster center be Cj (V; G; Ne), and the guiding function (the similarity between the pixel and the cluster center) is

The state of a single ant includes position information r and movement direction information θ. The transition probability of ants between different pixels is

Formula (9) is a two-parameter pheromone weighting function. The pheromone intensity of pixel r is σ(r), β is used to control the possibility of ants moving along the pheromone gradient direction, and 1/δ is the sensitivity of ants to pheromone. Taking into account, the inertia of the ant's motion, that is, the probability of its forward movement is relatively large. After adding a weighting coefficient , the transition probability of the ant from pixel k to i at time t is the following:

In formula (10), j/k is the neighboring pixel of pixel k. is the difference between the direction of pixel i relative to k at (t−1), and the previous movement direction of the ant. The pheromone release amount is the following:

In formula (11), n is a constant release; p is a constant; when the same window is taken around pixels k, and I is the similarity of pixels between windows:

In the formula, (a + b + c) = 1. m is the average grayscale intensity of the window pixels. σ is the variance of the gray-scale intensity of the window pixels. S is the difference in the grayscale histogram of the window pixels:

A mapping UA: X⟶[0, 1] can be constructed, which is a membership function. In particular, a fuzzy relationship ρ defined on X is a subset of X × X, with

The fuzzy relationship ρ has reflexivity, symmetry, and transitivity and is an equivalent relationship. In image segmentation, the space X corresponds to the image pixel feature space, and the fuzzy subset A is the fuzzy classification relative to the segmentation target.

The basic idea of region growth is to merge pixels with similar characteristics into a certain region. First, determine a seed pixel as the starting point of growth for each region that needs to be segmented, as shown in Figure 1.

Then, according to certain growth criteria, the surrounding pixels with the same or similar characteristics are merged into the area where the seed pixels are located, and these new pixels are used as seeds to continue to grow as shown in Figure 2.

The segmentation process of the graph cut algorithm is shown in Figure 3. The solid line in the figure is n-links, and the dotted line is t-links. The source and sink points in the figure have been marked with S and T. The goal of graph cut is to find A secant line minimizes the addition of the cut t-link weight and n-link weight. After the segmentation is completed, it is divided into two parts, one part is only connected to the source point, and the other part is only connected to the sink point. The segmentation of the corresponding image is completed. In Figure 3(c), the green line is a secant, and 3(d) shows the final segmentation result.

The experiment template was established, and the traditional Hough transform detection algorithm and the straight line precision detection algorithm proposed in this chapter were used for comparative experiments. The detection results of the slope and intercept of the four straight lines are shown in Tables 1 and 2. After adding random noise on the four straight lines, Tables 3 and 4 show the corresponding test results.

In the absence of noise, the accuracy of the straight line detection algorithm proposed in this chapter is much higher than that of the Hough transform; after adding random noise, the accuracy of the improved algorithm decreases, but the accuracy is still higher than that of the Hough transform.

2.1.2. Fault Interpolation

Tomographic images, such as CT and MRI, scan data are the intensity (gray) values of each slice position, and there is no data at the inter space of each slice. Sometimes, it is necessary to reconstruct the surface or three-dimensional structure of an object from some scanned slice data. Because of the insufficient number of slices, the third-dimensional information is lacking. The reconstructed image is often a very thin segment, resulting in severe distortion and loss of three-dimensional significance. At this point, we need to insert some layers into these layers. But the data of these new insertion layers are not directly from the actual test, but calculated by the algorithm with the existing layers. Sometimes an image wants to be observed from a particular angle or section. The observation plane may not pass through the original data lattice. At this time, gray interpolation is also needed for the display surface.

Three linear interpolation methods are commonly used in three-dimensional image interpolation, in which the nearest adjacent points are set as follows: , , , , , , , . Let x, y, and z denote the distance between the sampling point and the 000 point, then the value of the sampling point is the following:

A total of seven linear interpolations are performed in three directions. The advantage of this algorithm is that it is fast, and the interpolation effect is better when the distance between adjacent two pieces is not large. Because its information is only related to the adjacent two sides, it is a local interpolation. In order to improve the accuracy, there are also points in 18 or even 26 domains for interpolation, which will cost more computing time and storage space, and the interpolation effect is only slightly improved. In general, the accuracy of cubic linear interpolation using points in eight domains is enough to meet the needs.

2.1.3. Image Noise Cancellation

When the input image signal is mixed with noise, it is almost impossible to filter all the noise without losing the strength of the original signal. Therefore, there are two requirements for filtering: (1) to maximize signal loss, not to damage the contour and edge of the image and other important information; (2) to filter out as much noise as possible, so that the image is clear and visual effect is good.

Aiming at the particularity of sequential medical images, we have implemented two kinds of filters: one-dimensional spatial filtering and two-dimensional spatial filtering. Two-dimensional spatial filtering is for a single image, filtering on the two-dimensional XY plane of the image, and one-dimensional spatial filtering is for the sequence image, filtering in the one-dimensional Z direction of the sequence image. For sequential images, three-dimensional spatial filtering is theoretically feasible, but its time complexity and space complexity are very high. Therefore, the filtering operation in this article is divided into two steps. First, one-dimensional spatial filtering is carried out between sequential images, and then two-dimensional spatial filtering is carried out in a single image. In this way, on the one hand, the upper and lower correlation of sequence images is utilized, on the other hand, the high complexity of three-dimensional spatial filtering is avoided. Experiments show that this filtering method can achieve good results.

Two-dimensional spatial filtering is the central issue of filtering research. In this article, two-dimensional spatial filtering is discussed more, while one-dimensional spatial filtering principle is relatively simple. In one-dimensional spatial filtering, we use a median filter with a window length of 5. In the research of two-dimensional spatial filtering, this article adopts the commonly used neighborhood averaging method, which is a low-pass filtering method [810].

For each pixel in the image, take an area centered on it and replace the gray value of the pixel with the weighted average value of the gray level of each pixel in the area. This is the neighborhood averaging method. The specific method is to take a square area, called a smooth window or mask, which is a two-dimensional array of weights [1113]. The filtering process is to slide the window on the image and update the gray value of the pixels facing the center of the window according to the following formula (4). When each pixel is scanned once, the smoothing of an image is completed. This is the simplest way to smooth the image on the real plane. Let be an image to be smoothed. The size of the smoothing window is (ZN + 1) x (ZN + 1), and the value of N is usually 1 or 2. Then the smoothed image can be represented as follows:where represents the pixels corresponding to the smoothing window in the original image, represents the processed image, and is the weight value in the smoothing window. Sometimes, for convenience, the weight is normalized to make , so that formula (4) has only the remaining molecular terms. In addition, generally speaking, the bigger the window, the stronger the smoothing ability. However, the noise elimination degree and the attenuation degree of the original image signal are proportional to the size of the window, so it is not that the larger the window, the better. In practice, windows of 3 × 3 and 5 × 5 sizes are commonly used.

2.2. Medical Image Segmentation

This article studies segmentation and 3D reconstruction in medical image segmentation and virtual surgery. After grayscale transformation, interpolation and denoising preprocessing of the image, an improved level set model segmentation algorithm is used to achieve medical image segmentation. Image segmentation is to distinguish different meaningful regions in an image and determine their boundaries, so that the separated regions do not overlap and overlap, and there is only one belonging region for any point in the image. Image segmentation is mainly based on various features of the image, which mainly includes image gray, color, texture, local statistical features, spectral features, or some prior knowledge.

The medical image of the computer X-ray photography system is 12 Bit (4096 gray scale), the data volume of a CR is 8 MB, the data volume of an ultrasound image is 512 × 512 × 8 bit, and a digital X-ray photography system. The medical image data volume of the chest radiograph is 16 MB, and the data volume of a breast DR is 4096 × 4096 × 12 Bit. Table 5 shows the data volume requirements for different medical images.

In clinical application, the imbalance of gray level has a great influence on image segmentation. If the adjustment of gray level before image segmentation will increase the complexity of processing tasks, it is not a good method. Now, we add the task of gray-level imbalance correction to the process of image segmentation, and the segmentation and gray-level correction are carried out simultaneously.

Local Binary Fitting (LBF) energy [1416] model can well combine gray-level imbalance correction with segmentation algorithm, and improve the Piecewise Constant (PC) [1719] model commonly used in segmentation. In the PC model, there are the following definitions. In the given image : , is the definition space of the image, and if C is a closed contour, then the local gray matching energy is the following:

Among them, and are the adjusted gray values of the partition area, which are the gray values of the interior of the contour, respectively, and are the weight parameters, respectively.

Considering that the gray value of a single pixel may deviate from its proper gray value due to noise or other factors, we need to take the pixels near the point into account to reduce the influence of this factor. Now, we introduce the energy function of the modified PC model with the Gauss kernel function to construct the energy of the LBF model. For a point in the image, the local energy is the following:

The Gauss kernel function is defined as follows:

Such a Gauss kernel function satisfies the following conditions:

Now, that the local energy of each point is obtained, the global energy is the following:

Now, we rewrite the energy function represented by the above formula into the level set form, so that we can judge the outline from the level set function, then the local energy of any point can be rewritten as follows:

Then, for the global energy function, we rewrite it into the form of level set function and get it:where .

For most active contour models, how to locate the target contour quickly and accurately is the main improvement of the algorithm. But in the general algorithm, if we need to speed up the algorithm, we need to increase the time step, but in this way, the contour cannot converge to the target boundary, resulting in erroneous results. If we want to locate accurately, we need to reduce the time step, so the convergence speed will be reduced correspondingly, affecting the speed of the algorithm. Here we use the method of variable time step to reconcile this contradiction, as shown in formula (21).where is the time step we used, is the time step commonly used in the level set algorithm mentioned above, is the Gauss kernel function, so that the flatter region in the image (x) is larger, so the time step will become larger, and in the position of the larger gradient (x) is close to 1, so recovery becomes the common time step. Because of the large gradient at the edge of the image target, only when approaching the edge of the target can the time step become smaller to slow down the evolution speed to improve the evolution accuracy. At the distance from the edge of the target, the time step will become larger to improve the evolution speed. Therefore, with such a time step, time can be focused on determining the boundary, which can not only accelerate the evolution speed but also ensure the accuracy of the problem.

2.3. Three-Dimensional Reconstruction of Medical Images
2.3.1. Generation of Delaunay Tetrahedron Mesh by Point-by-Point Insertion Method

The algorithm is an extension of the point-by-point insertion method proposed by Watson in three-dimensional space. The idea of the algorithm is to define an initial mesh containing all the nodes, insert a node into the mesh, and find out the tetrahedral elements containing all the outer spheres. These elements are deleted to form a cavity containing inserting nodes, which are connected with each triangular surface of the cavity to form a new tetrahedral mesh. Repeat this process until the end of the partition, and finally delete the invalid tetrahedron.

The steps of point-by-point insertion are as follows:(1)The initial mesh can be used to construct a tetrahedron element with a large enough set of known points. An appropriate choice is to make the inner receptacle of the tetrahedron element an outer receptacle of a bounded box with axially aligned points. The reason for this is to ensure that the deletion of the relevant units containing the vertices of the outsourced large tetrahedron unit does not lead to the deletion of tetrahedrons that should not be deleted when inserting a known set of points.(2)The outsourced tetrahedron is added to the tetrahedron mesh as the first subdivision tetrahedron.(3)Insert other input points, insert one at a time, and process as follows:(1)Search all tetrahedrons in the tetrahedron mesh and find those tetrahedrons whose outer spheres contain insertion points.(2)Delete all the tetrahedrons in the previous step and form a cavity. Connect the inserted points with the boundary of the cavity to form a new tetrahedron element.(4)When all points are inserted, the relevant tetrahedral elements containing the vertices of outsourced large tetrahedral elements are deleted, and the resulting meshes are the Delaunay tetrahedral subdivision of these points.

According to the characteristics of Delaunay triangulation, if the boundary of the three-dimensional data domain is convex, the data domain will be able to achieve Delaunay triangulation with the same boundary. Because of the complexity of human tissue, there are both convex and concave surfaces. The tetrahedral mesh generated by this algorithm has the problem of boundary inconsistency mentioned above. To solve this problem, we introduce a three-dimensional constrained Delaunay tetrahedral method to solve the problem of boundary inconsistency effectively.

In order to enable the PACS server to meet the requirements of image information flow at any time and ensure the data throughput capacity of the system, it is necessary to design the prefetching and preallocation scheduling control mechanism of the PACS, so as to avoid the overload and even paralysis of the network caused by the peak use of the system. Figure 4 shows the distribution of the hospital's daily peaks of patient image information call.

2.3.2. Three-Dimensional Constrained Delaunay Tetrahedron

The so-called “constrained Delaunay tetrahedral” subdivision refers to the tetrahedral subdivision based on Delaunay criterion under certain conditions. Constraints refer to the existence of boundary edges and boundary surfaces in a three-dimensional model. The following steps are given for the constrained Delaunay tetrahedral algorithm:(1)Read the boundary points, interior points, and the initial division of the boundary (obtained from the reconstructed surface model).(2)The constraints of partition are obtained from the initial partition of boundary, that is, the set of constrained edges and the set of constrained triangular surfaces.(3)Delaunay triangulation is performed for boundary points and interior points using the point-by-point insertion algorithm in the previous section.(4)Detecting which boundary edges and boundary surfaces are lost.(5)Restoration of constrained edges.(6)Restoration of constraint surface.(7)Using the dyeing method [2023] to delete the useless units outside the entity and get the final segmentation results.

2.3.3. Elimination of Silver Tetrahedron Thin Element

Canvendish divides Silver tetrahedral units into two categories in his article. The first one is that there are two common nodes in the four adjacent tetrahedrons of Silver element. Assuming that ABCD is a Silver element, its four adjacent tetrahedrons are ACDE, ABCE, BCDG, and ABCE, respectively. Among them, ACDE and ABCE have a common node E. For this kind of Silver element, elimination method is very simple, as long as the deletion method is adopted, the Silver tetrahedral element ABCD will be deleted from the tetrahedral grid, the original two elements ACDE, ABCE into BCDE, ABDE. In fact, after a local transformation, Silver tetrahedron elements are deleted without affecting the quality of all its adjacent tetrahedrons.

The second type is that there are no two common nodes in the four adjacent tetrahedrons of the element, and ABCD is a Silver element. There are no two common nodes in the four adjacent tetrahedrons of the element. At this time, the problem cannot be solved by deleting the Silver element directly. If the Silver element ABCD is deleted directly, the topological relationship between the remaining adjacent elements cannot be guaranteed, resulting in incompatibility of the generated grid topology. Canvendish's method is to move one of the four nodes A, B, C, and D, that is, to “pull” the flat unit ABCD. When pulling, it should be noted that the node cannot be pulled at will, otherwise, it may lead the mobile node to the interior of other cells and lead to the error of intersection of cells.

3. Experiments

In order to measure the performance of the filtering algorithm, the signal-to-noise ratio (SNR) [24, 25] is introduced to evaluate the filtering effect of the algorithm. The lower the signal-to-noise ratio, the worse the signal quality; the higher the signal-to-noise ratio, the better the signal quality [26]. One of the purposes of filtering is to improve the signal-to-noise ratio of signals. The formula for calculating SNR is as follows:

PS and PN represent the effective power of signal and noise, respectively.

In this article, human brain image is segmented by segmentation algorithm [27]. The simulation data used in the experiment are provided by McConell Brain Imaging Center and Montreal Neuroscience Research. The simulation data are generated by a MR simulator, which allows some imaging parameters (noise, offset field, etc.) to be independently adjusted. The advantage of this method is that it can test the algorithm quantitatively in different environments by using different quality images. The real segmentation of this model is expressed in the form of membership functions, which represent the probability that each voxel belongs to different classes. Only white matter, gray matter, and cerebrospinal fluid member functions were used in the experiment. In order to evaluate the experimental results, a criterion is needed to quantitatively represent the results. The Internet brain segmentation database provides an average coincidence measure to evaluate the segmentation results. Now let us briefly introduce: for any type , represents the set of artificially segmented voxels belonging to , represents the set of automatically segmented voxels belonging to , then the average coincidence measure is defined as the ratio of the total number of voxels belonging to both segmentations, expressed in mathematical form as follows:

The population size in SEA and DGEA algorithms is 100, while the population size in JSVH, SIHV, and ROSN are all 20. The dimension of particles in all algorithms is 30, and the maximum number of iterations is 2000. Each instance was run independently for 100 times, and the average optimal objective function value and variance were recorded in Table 6.

It can be seen from Table 7 that no matter which of β or α is equal to a fixed value, when the other is linearly reduced from 0.8 to 0.5, ROSN can have the best search accuracy. You can keep β between [0.8, 0.5] and decrease linearly, and let α be equal to a different fixed value and test again to finally determine the value of α. The test results are shown in Table 8.

In the experiment and simulation work of this article, the hardware configuration of the computer is as follows:(1)Processor: Inter i5 2.50 GHz(2)Memory: 4 GB(3)Operating system: Windows 7 64 ultimate(4)The simulation software is matlab 2016b

4. Discussion

Before medical image segmentation, image preprocessing is needed to enhance image quality. First, human brain CT images are transformed into gray images, which are shown in Figure 5(a). This is due to the wide range of CT values of medical image data, and image pixel data are generally stored in 16-bit integers. Gray-scale display devices are generally 8-bit, that is to say, image pixel data must be converted to 8-bit range before display. The image display mapped directly from 16 bits to 8 bits in the whole range will lose its diagnostic value. Therefore, a series of algorithms are needed to convert the original image data to the displayed image data.

Since the imaging principles of the endoscope and the camera are similar, in order to accurately and effectively calibrate the stereoscopic endoscope, the two-step calibration method of Zhang Zhengyou is used to separately calibrate the internal and external parameters of each camera. The multiple images of the calibration grid captured by the camera from different angles are collected and analyzed to solve the internal and external parameters of the camera. Endoscope calibration is the process of solving the spatial transformation matrix Treg of the stereoscopic endoscope video in Figure 6.

Then the gray image is equalized, and the processed image is shown in Figure 7(b). If the gray level distribution of the image is not uniform, the gray level distribution is concentrated in the narrow teaching range, which makes the details of the image not clear enough and the contrast is low. Therefore, image equalization can be used to make the gray scale of the image an open or an even distribution, so as to increase contrast, make the details of the image clear, and thus enhance the quality of the image. As can be seen from Figure 7(b), compared with the gray-level image in Figure 7(a), the image equalization process makes the image stretch nonlinearly and redistributes the gray value of the image, so that the gray level of the image in a certain range is approximately equal.

First, this article uses one-dimensional spatial filtering (median filter) and two-dimensional spatial filtering (domain averaging) to filter the image. The results are shown in Figure 5, where Figure 5(a) is an equalized image with noise and Figure 5(b) is a result image after filtering. It can be seen from Figure 5(a) that compared with Figure 7(b), the image information blurred by adding noise is disadvantageous to the subsequent image processing; from Figure 5(b), it can be seen that the image blurring is improved after filtering, and the image information is effectively restored to avoid the noise in the process of processing affecting the subsequent image segmentation.

In order to express the quality of the filtered image more clearly, the signal-to-noise ratio (SNR) is introduced as an evaluation index. The data of SNR before and after filtering are shown in Table 9. From the data in Table 9, we can see that after filtering, the signal-to-noise ratio of the image is increased by 11.35, which shows that the filtering process can effectively enhance the information of the image and provide better image quality for subsequent processing.

If the medical image processed by the improved ACO segmentation algorithm is lower than the quality of the random additional data of the imaging device, it is required to indicate whether the difference in quality will affect the clinical diagnosis. The readers use the naked eye to compare the quality of the medical image processed by the ACO segmentation algorithm and the quality of the random additional data of the imaging equipment, as shown in Table 10.

Table 11 shows the results of two image readers using the improved ACO segmentation method to evaluate the quality of 200 images and the quality of random additional data.

Table 12 shows the results of two film readers comparing the image quality of the 200-frame improved deformation model segmentation algorithm and the quality of random additional data.

There are 175 medical images with a score of “0,” that is, the quality of the two medical images is the same, accounting for 87.5% of all 200 medical images.

In this article, four groups of experiments were carried out from the simplest experiment, in which the voxel size was 1 mm. The noise of the first group of experiments is 3%, without migration field; the noise of the second group is 9%, which is used to test the robustness of the algorithm without migration field; the noise of the third group is 3%, and the migration field is 40%, which is used to test the robustness of the algorithm in the presence of migration field; the noise of the fourth group is 9%, and the migration field is 40%. The robustness of the algorithm in the case of noise and offset field. The experimental results are shown in Table 13. From Table 13, it can be seen that the AOM of white matter segmentation is stable at about 0.9, and that of gray matter segmentation is stable at about 0.79. Compared with the AOM of the first group and the second group, it can be seen that the robustness of the segmentation algorithm used in this article is very good when the noise is different. By comparing the AOM, of the first group and the third group, we can see that there is not much change to the AOM value after the migration field is added, and it is shown that the algorithm has good stability in the presence of the migration field. In addition, as long as , it is considered as a good segmentation, so the performance of the segmentation algorithm in this article is superior.

In order to better illustrate the advantages of this segmentation algorithm, this article uses the traditional K-means segmentation algorithm, FCM segmentation algorithm, KFCM segmentation algorithm as a comparison, comparing the data as shown in Table 14, drawing a broken line graph as shown in Figure 8.

Combining Table 14 and Figure 9, we can see that the lowest overall AOM value is K-means segmentation algorithm, which is 0.67, which is not a good segmentation algorithm; while FCM and KFCM are segmentation algorithms, the overall AOM values are 0.71 and 0.75, respectively, which can segment images well; the best overall AOM value is the proposed segmentation algorithm in this article, is 0.85, which shows the superiority of the segmentation algorithm in this article (Figure 10).

In order to verify the effectiveness of the fuzzy weighted entropy formula proposed in the article, this article selects medical images and ordinary images for comparison experiments. The comparison diagrams are shown in Figures 9, 11 and 12, and the respective normalized gray histograms are obtained as the graphs. 10, Figures 13 and 14.

The purpose of abdominal CT examination is to know whether there are infectious diseases in abdominal organs. As shown in Figure 9.

Compared with CT, brain magnetic resonance has the unique advantages of no radiation damage, no bone artifacts, multifaceted, and multiparameter imaging, high soft tissue resolution, and the ability to display vascular structures without the use of contrast agents. As shown in Figure 11.

The comparison results of liver CT are shown in Figure 15. It can be seen that the effect of this article is better and the picture is clearer.

The above three sets of experimental results show that the weighted entropy method proposed in the article is significantly better than the Cheng method and the Kapur method in various performances. At the same time, the weighted entropy method proposed in the article can also obtain better segmentation results for different types of images. Combined with the level set model segmentation algorithm proposed in this article, the parameter values are screened to select the appropriate parameter values. Table 15 shows the parameters of the membership function and their cut-off values.

Image-based semantic segmentation is shown in Figure 16. The original image is a HE-stained pathological section of a mouse liver. Image segmentation is the process of dividing an image into several disjoint small local areas according to certain principles. It is one of the most basic research fields in image processing. At present, there are many image segmentation methods, among which the watershed algorithm is a region-based image segmentation algorithm. The watershed algorithm has been widely used in medical images, pattern recognition, and other fields because of its convenient implementation.

The c-means image segmentation with blurred local information is shown in Figure 17.

The image segmentation based on the watershed algorithm is shown in Figure 18. Watershed is a classical calculation method. The traditional watershed segmentation method is a mathematical morphological segmentation method based on topology theory. Representing the altitude of the point, each local minimum and its affected area is called a catchment basin, and the boundary of the catchment basin forms a watershed. The concept and formation of the watershed can be illustrated by simulating the immersion process.

5. Conclusion

Nowadays, it is very popular for doctors to make correct diagnosis by means of medical images, but simply staying at the level of reading images cannot meet the development of the times, more need to integrate advanced technology, more in-depth use of image processing technology, virtual surgery is a good way of application. In this article, the segmentation and three-dimensional reconstruction in medical image segmentation and virtual surgery are studied. After image preprocessing with gray-level change, interpolation, and noise elimination, the improved level set model segmentation algorithm is used to realize medical image segmentation. Experiments show that this method has good segmentation effect. By comparison with several traditional segmentation algorithms, the K-means segmentation algorithm has the lowest overall AOM value, which is 0.67, which is not a good segmentation algorithm. The overall AOM values of the FCM and KFCM segmentation algorithms are 0.71 and 0.75, respectively, which can segment the image well; the best overall AOM value is the segmentation algorithm proposed in this article, which is 0.85, which shows the superiority of the segmentation algorithm in this article. Then, a constrained Delaunay tetrahedron method based on point-by-point insertion method is proposed. On the basis of mesh reconstruction, the tetrahedron mesh model is optimized to eliminate thin elements effectively, and the tetrahedron effective element mesh model with complex boundary is well generated, and the quality of the volume model is improved by optimization. However, due to the limitations of experimental techniques, there are still some finer works that have not been studied in depth. For the automatic segmentation technology of medical images, we will continue to carry out further research and discussion.

Data Availability

This article does not cover data research. No data were used to support this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.