FuzzyClusteringAlgorithm-SegmentedMRI Images inAnalysis of Effects of Mental Imagery on Neurorehabilitation of Stroke Patients

)e study focused on the automatic segmentation of Magnetic Resonance Imaging (MRI) images of stroke patients and the therapeutic effects of Mental Imagery onmotor and neurological functions after stroke. First, the traditional fuzzy c-means (FCM) algorithm was optimized, and the optimized one was defined as filter-based FCM (FBFCM). 62 stroke patients were selected as the research subjects and randomly divided into the experimental group and the control group. )e control group accepted the conventional rehabilitation training, and the experimental group accepted Mental Imagery on the basis of the control group.)ey all had the MRI examination, and their brain MRI images were segmented by the FBFCM algorithm. )e MRI images before and after treatment were analyzed to evaluate the therapeutic effects of Mental Imagery on patients with motor and nerve dysfunction after stroke. )e results showed that the segmentation coefficient of the FBFCM algorithm was 0.9315 and the segmentation entropy was 0.1098, which were significantly different from those of the traditional fuzzy c-means (FCM) algorithm. (P< 0.05), suggesting that the FBFCM algorithm had good segmentation effects on brain MRI images of stroke patients. After Mental Imagery, it was found that the patient’s Function Independent Measure (FIM) score was 99.04± 8.19, the Modified Barthel Index (MBI) score was 51.29± 4.35, the Fugl-Meyer (FMA) score was 61.01± 4.16, the neurological deficit degree in stroke (NFDS) score was 11.48± 2.01, the NIH Stroke Scale (NIHSS) score was 10.36± 1.69, and the clinical effective rate was 87.1%, all significantly different from those of the conventional rehabilitation training group (P< 0.05). Additionally, the brain area activated by Mental Imagery was more extensive. In conclusion, the FBFCM algorithm demonstrates superb capabilities in segmenting MRI images of stroke patients and is worth promotion in clinic. Mental Imagery can promote the neurological rehabilitation of patients by activating relevant brain areas of patients.


Introduction
With the development of society and the aging of the population, the incidence of stroke is increasingly high. So far, it has become the first disability factor and the second leading cause of death worldwide [1,2]. As a blood circulation disorder of the brain tissue, it arises from the rupture, stenosis, or occlusion of the intracranial arteries caused by external factors [3]. e incidence, disability, recurrence, and mortality rate of stroke are high. Clinically, most patients are usually accompanied by a certain degree of cognitive impairment, dementia, paralysis, and other sequelae, which causes a heavy psychological burden on patients and their families [4]. e quality of life of poststroke patients largely depends on the degree of neurological rehabilitation [5]; therefore, rehabilitation treatment is currently a hot spot in clinical treatment of stroke.
With the progress of medical technology, clinical rehabilitation techniques for poststroke neurological dysfunction have been enriched. Up to now, neurological rehabilitation training for poststroke patients, such as transcranial magnetic stimulation technology, has achieved certain clinical results. Nevertheless, the high cost due to its special and huge equipment greatly limits its promotion [6,7]. Mental Imagery is a new intervention method for rehabilitation treatment. Patients need to rehearse their motor function repeatedly and then activate a specific area of the brain according to the motor memory so as to restore neurological function [8]. Mental Imagery is divided into passive imagination and active imagination. Passive imagination refers to the use of music, dancing, and other external factors to divert the patient's attention to improve the condition of the patient. Active imagination refers to the patient's conscious control of their own thinking to improve the body's ability to resist disease [9,10]. Mental Imagery is not restricted by equipment and venues, and there is no motor output, which greatly mobilizes the subjective initiative of stroke patients. Clinical studies have shown that Mental Imagery can improve the cerebral blood flow of stroke patients, thereby restoring the patient's nerve dysfunction [11].
As computer technology marches forward continuously, medical imaging technology has become indispensable for clinical disease diagnosis, and medical image processing is essential in computer-aided diagnosis [12]. Image segmentation refers to the automatic or semiautomatic extraction of the target area in the image to investigate the pathology and diagnose a certain disease. e medical images output by complex and advanced imaging instruments usually contain complex medical information, and only relying on manual or semiautomatic segmentation will affect the accuracy [13], so the automatic segmentation of medical images is very important. In the abovementioned works, Mental Imagery was performed on stroke patients first, and then the MRI image for the brain was segmented by fuzzy clustering algorithm to determine the therapeutic effects of Mental Imagery on the neurorehabilitation of stroke patients. e objective of this study was to provide an evidence-based basis for neurorehabilitation treatment of stroke patients.

Research Subjects.
In this study, 62 patients with poststroke limb dysfunction who were treated in the hospital from December 2018 to December 2019 were selected as the research subjects. e selected cases were in line with the stroke diagnostic criteria formulated at the 4th Cerebrovascular Disease Academic Conference. ey were divided into the experimental group and the control group according to the random number table method, with 31 cases in each group. In the experimental group, there were 19 males and 12 females, aged 48-79 years, with an average age of 65 ± 8.33 years. e disease course was between 9 and 54 days, with an average course of 25.21 ± 6.91 days. In the control group, there were 17 males and 14 females, aged 50∼ 78 years, with an average age of 66 ± 6.69. e disease course was between 8 and 51 days, with an average course of 24.21 ± 7.71 days. ere was no statistical difference between the two groups of patients in baseline information, and they were comparable. is study has been approved by the ethics committee of the hospital. All patients and their families have learned about the study and have signed an informed consent form.

Inclusion and Exclusion Criteria.
e subjects were selected as per the following inclusion criteria: (1) the patients were ≥18 years old, all of whom were diagnosed for the first time, and the course of the disease was less than 6 months; (2) the patients tested normal for motor sensation and visual imaging questionnaire, without cognitive dysfunction, and could cooperate to complete the relevant evaluation during treatment; (3) the patients suffered from upper limb paralysis with motor dysfunction; and (4) the patient's vital signs were stable.
Exclusion criteria were as follows: (1) the patient had aphasia or deafness; (2) the patient had severe cognitive dysfunction and communication impairment and was unable to cooperate in assessment and treatment; (3) the patient had motor dysfunction caused by other neurological diseases; (4) the patient had epilepsy, traumatic brain injury, or other serious neurological diseases; (5) the patient had bone and joint diseases and severe heart, lung, liver, and kidney injury; and (6) the patient's vital signs were unstable and they could not cooperate to complete the treatment.

Intervention Measures.
Both groups of patients were treated with basic medications. e control group received routine exercise rehabilitation training on the basis of medications once a day for 30 minutes each for a total of 6 weeks. e routine rehabilitation training included turning over, in a good limb position, relaxation, passive joint activity training, Bobath training, bed transfer, walking training, daily life training, and acupuncture massage. e experimental group received Mental Imagery on the basis of conventional rehabilitation training. After the conventional rehabilitation training, patients in the experimental group received Mental Imagery in a quiet room. e treatment was performed once a day for 30 minutes each time for a total of 6 weeks. Before the treatment, the therapist explained and demonstrated the movements for the patient. e patient needed to carefully observe the therapist's movements and repeat the movements in the memory to stimulate the nerve circuits in the brain area related to the motor function, thereby improving motor function. e patient took a supine position. During Mental Imagery, he had intermittent motor imagery based on the therapist's demonstration. After the treatment, the therapist should ask the patient about his feelings from time to time to help him make adjustments.

Fuzzy Clustering Algorithm-Based MRI Segmentation.
e individual differences and the influence of imaging equipment increase the difficulty of segmenting MRI images [14]. e image fuzziness can be well explained by fuzzy theory. Among them, the fuzzy c-means (FCM) clustering algorithm is the most classic one. It segments the image based on the ambiguity of real data. No human intervention is required in the segmentation process, which avoids manually setting the threshold in advance. e fuzzy set is different from the classic set. A classic set can be defined as follows: where H A (x) represents the characteristic function of set A. When x is in the set, its characteristic function is 1. When x ∉ A, its characteristic function is 0. It suggests that element x only belongs to a certain set, but the fuzzy set believes that the boundary of the set has fuzziness, so it is difficult to identify its characteristics. In general, we can formulate a degree of membership for each element and each collection and then map each x of the collections to a value H A (x) on the interval [0, 1]. A larger H A (x) represents a greater possibility that x belongs to A, and vice versa. erefore, the classical set can be regarded as a special fuzzy set. e universe of discourse is a discrete finite set; that is, e fuzzy set can be expressed as It is evident from equation (3) that each element x in the fuzzy set has a corresponding degree function H A (x i ). Except for the above expression, it is expressed as follows in Zadeh's paper: (4) e pairwise notation is e simple membership function method is e FCM algorithm iteratively optimizes the objective function and determines the specific category degree of each sample point according to the membership function. In order to record the membership relationship between the sample and the category, the following membership matrix can be used: During the calculation process, the following constraints should be met: e objective function of the FCM algorithm is as follows: where t represents the fuzzy factor, which determines the degree of fuzziness between different clusters of the clustered fuzzy set samples; ‖x i − h l ‖ represents a certain paradigm between the feature vector and the cluster center; H t il Indicates the membership degree value that pixel xi belongs to the lth cluster center; d 2 il represents the Euclidean space distance between sample xi and the cluster center. Normally, it should satisfy e FCM algorithm uses the multiplier method to iteratively update the objective function, and the obtained membership matrix update function expression is as follows: e update function of the cluster centers is expressed as follows: To use the FCM algorithm to segment MRI images of stroke patients, first, an original image is input; then, the fuzziness t and the number of clusters c are identified. e initial values, such as the number of iterations T, are set, and then matrix U is initialized under constraints. After initialization, the number of iterations T � T + 1 is set, and then the cluster centers and membership matrix are iteratively updated. After the update, the difference between the two adjacent cluster centers is calculated. If the difference is lower than the convergence accuracy or the number of iterations exceeds the maximum number of iterations, the calculation is ended, and the values of the cluster center and membership matrix are output at the same time. Finally, according to the principle of maximum membership, the final attribution of the pixel on the patient's MRI image is determined.
Although FCM can achieve good segmentation results, it only considers the pixel gray value of the medical image and has poor tolerance for noise on the image. In the actual segmentation process, the image will inevitably suffer from interference of noise, resulting in poor segmentation effects [15].
In order to improve the antinoise ability of the FCM algorithm, a spatial filter can be incorporated. erefore, Gaussian filter and median filter are used to filter the brain Scientific Programming MRI images of stroke patients. e optimized FCM algorithm, namely, FBFCM (filter-based FCM), can be expressed as follows: where I(x, y) represents the gray value of the pixel at point (x, y) in the original image; c is the number of cluster centers; and t is the fuzzy weighting index of the FBFCM algorithm. A larger t indicates that the smoothing effects are more obvious. N j is the neighborhood of the current pixel; N R represents the size of the pixel neighborhood, and α and β are penalty factors; h i is the set of cluster centers; H t i (x, y) is the set of fuzzy membership degrees of pixel (x, y) of the i cluster center, expressed as follows: 1, 2, 3, . . . , c), Similarly, the membership degree matrix and cluster center update function of the FCM algorithm are obtained, and the expressions are as follows: , To operate FBFCM algorithm, it is initialized first, and the termination error threshold and the maximum number of iterations T max are set at the same time. After the MRI image of the stroke patient is input, the cluster center is extracted under iterative conditions. en, the improved spatial filter is used to perform noise reduction, and G(x, y) and M(x, y) are recorded. After the noise reduction, the cluster center and fuzzy membership matrix are updated according to the FBFCM algorithm. e difference between the two adjacent cluster centers is calculated, and whether to end the operation is determined according to the termination condition of the FBFCM algorithm. At the end, the membership degree matrix is subjected to thresholding processing, with the maximum value of each row of the matrix calculated. e element with the maximum value is marked as 1, and, finally, the membership degree matrix is obtained, and the MRI image segmentation is completed (Figure 1).

Segmentation Effects.
e segmentation effects of the FBFCM algorithm on the brain MRI images of stroke patients are quantitatively analyzed factoring into the segmentation coefficient G pc and segmentation entropy G pe , expressed as follows: In the meantime, FCM, FCMS, and KFCM algorithms are introduced for comparative analysis.

Outcome Indicators.
FIM functional independence rating scale, Modified Barthel Index (MBI) scale, and simplified Fugl-Meyer scale are used to analyze the patient's motor function before and after treatment. If the FIM, MBI, and Fugl-Meyer scores are completely independent and there is no recurrence, it is considered cured; if the scores are basically independent and there is no recurrence, it is considered basically cured. e score increasing by 2 levels is considered markedly effective, the score increasing by one level is considered effective, and unchanged scores are considered ineffective. e NFDS score and NIHSS score are used to evaluate the rehabilitation of neurological dysfunction before and after treatment. A lower score indicates better effects.

Statistical
Analysis. SPSS 19.0 was used to process the data of this study. e count data were expressed in %, and the χ 2 test was used. e χ 2 test was for two independent samples. P < 0.05 was the threshold for significance.

Denoising Results of FBFCM Algorithm.
e image denoising is to improve the subjective visual quality of the image, so that the image quality after denoising is close to the original image. In the study, Gaussian filter and median filter were used to denoise the brain MRI images of stroke patients. e results were shown in Figure 2. It was found that the FBFCM algorithm retained image details well, there were a few noise points, and the tissue boundary was clear, suggesting good robustness of the FBFCM algorithm against strong noise.

Segmentation Results Based on FBFCM Algorithm.
After brain MRI examinations on 62 subjects, their MRI images were segmented by the FBFCM algorithm, and the image format was set to 512 * 512, the blur factor was set to 2, and the maximum number of iterations was 500. e segmentation result was shown in Figure 3. e FBFCM algorithm can segment the white matter, gray matter, and organs well in the MRI images of stroke patients. After the image was clustered, the gray value of the pixel at the center point replaced the gray value of the pixel in the same area, completing the image segmentation as a whole.

Segmentation Effects of Different Algorithms.
e segmentation effects of the FBFCM algorithm were evaluated factoring into the segmentation coefficient and segmentation entropy. e results showed that the segmentation coefficient V pc and segmentation entropy V pe of the FBFCM were 0.9315 and 0.1098, respectively, far better than FCM, FCMS, and KFCM algorithms, and the difference was statistically significant (P < 0.05). is suggested that, after the spatial filter was incorporated, the antinoise performance of the FBFCM algorithm was greatly enhanced, and the segmentation effects were closer to the ideal effects (Figures 4(a)  and 4(b)). Original image Image a er denoising

Evaluation of Motor Function of the Two Groups of Patients after Treatment.
e FIM, MBI, and Fugl-Meyer scores of the two groups of patients were evaluated before treatment and 6 weeks after treatment. e results were shown in Figures 5(a)-5(c). It was noted that the FIM, MBI, and FMA scores of the experimental group before treatment were 73.69 ± 2.56, 24.91 ± 5.03, and 38.01 ± 1.98; those of the control group were 71.96 ± 3.31, 25.06 ± 2.03, and 38.89 ± 3.08. e difference in FIM, MBI, and FMA values before treatment between the two groups was not statistically significant (P > 0.05). After 6 weeks of treatment, the FIM, MBI, and FMA scores of the two groups of patients increased significantly, and the difference was statistically significant compared with that before treatment (P < 0.05). After 6 weeks of treatment, the FIM, MBI, and FMA scores of the experimental group were 99.04 ± 8.19, 51.29 ± 4.35,

Original image
White matter Gray matter Organ and 61.01 ± 4.16, respectively. Compared with the control group, the differences of the three indicators were statistically significant (P < 0.05).

Evaluation of the Neurological Rehabilitation Effect of the Two Groups of Patients after Treatment.
e NFDS and NIHSS scores of the two groups of patients were evaluated before treatment and 6 weeks after treatment. e results are shown in Figure 6. It was noted that, before treatment, the scores of NFDS and NIHSS in the experimental group were 28.05 ± 3.19 and 26.81 ± 2.91, respectively, and those in the control group were 27.6 ± 2.88 and 27.23 ± 1.99, respectively. ere was no statistically significant difference in NFDS and NIHSS scores of the two groups (P > 0.05). After 6 weeks of treatment, the scores of NFDS and NIHSS in the experimental group were reduced to 11.48 ± 2.01 and 10.36 ± 1.69, respectively, which are significantly different from those in the control group (P < 0.05), suggesting that Mental Imagery demonstrated good effects on neurological rehabilitation after stroke (Figures 6(a) and 6(b)).

e Effective Rate of Clinical Treatment of the Two Groups of Patients.
After treatment, FIM, MBI, and FMA scores of the two groups of patients were analyzed. e results showed that, of the 31 patients in the control group, 2 cases were cured, 5 cases were basically cured, 7 cases were markedly effective, 6 cases were effective, and 11 cases were ineffective. e clinical effective rate of the control group was 64.5% (20/

31)
; of the 31 patients in the experimental group, 6 cases were cured, 7 cases were basically cured, 8 cases were markedly effective, 6 cases were effective, and 4 cases were ineffective. e clinical effective rate of the experimental group was 87.1% (27/31). In terms of the effective rate between the two groups of patients, the difference was statistically significant (P < 0.05) (Figure 7).

Analysis of MRI Images of Patients before and after Mental
Imagery. By analyzing the brain MRI images before and after the Mental Imagery, it was found that, before the treatment, the corticospinal tract of the patient showed compression, displacement, and interruption. A larger stroke area is closer to the internal capsule area, and damage to the corticospinal tract aggravated with the age, but it was mitigated by Mental Imagery. e comparison of the two groups of patients found that when the patients were undergoing conventional rehabilitation training or Mental Imagery, the bilateral M1, SMA, and PMC were activated. e activation area of the experimental group extended forward to the frontal middle and lower gyrus area. Compared with single conventional rehabilitation training, the brain area activated by Mental Imagery was more extensive (Figure 8).

Discussion
Stroke is a common disease of the central nervous system. It threatens the health of patients thanks to its high morbidity rate, high disability rate, and high mortality rate [16]. At present, stroke has become the main factor of adult disability, and the patients are increasingly young. With the continuous development of medical technology, the mortality rate of stroke has decreased significantly, but the disability rate continues to increase [17,18]. One disability factor after stroke is motor dysfunction, and restoring the patient's neurological function is the focus of the treatment of stroke [19]. Mental Imagery refers to an experience in which the patient's central system nerves participate in a simulated exercise in the mind without external stimulation. It aims to activate specific motor behaviors through cognitive operation process [20]. In recent years, it has been widely used in neurological rehabilitation after stroke.
In this study, the traditional FCM algorithm was improved and the improved algorithm was defined as FBFCM algorithm. e Gaussian filter and median filter were incorporated to filter MRI images of stroke patients, which enhanced the antinoise performance of the traditional FCM algorithm. e FBFCM algorithm retained the image details well and demonstrated good segmentation effects on the white matter, gray matter, and organs on the MRI image. e segmentation coefficient of the FBFCM algorithm was 0.9315, and the segmentation entropy was 0.1098. Compared with FCM, FCMS, and KFCM algorithms, its segmentation coefficient was higher, and the segmentation entropy was lower, indicating that the segmentation effects of this algorithm were better than those of the other algorithms. e motor function and neurorehabilitation effects were then evaluated after Mental Imagery. It was found that, after Mental Imagery, the patient's FIM score was 99.04 ± 8.19, MBI score was 51.29 ± 4.35, FMA score was 61.01 ± 4.16, NFDS score was 11.48 ± 2.01, and the NIHSS score was 10.36 ± 1.69, all better than those of the conventional rehabilitation training group, and the difference was statistically significant (P < 0.05). e effective rate of the Mental Imagery group was significantly higher than that of the conventional rehabilitation training group, suggesting that

Scientific Programming
Mental Imagery had better neurological rehabilitation effects for stroke patients. Finally, the brain MRI images of stroke patients were analyzed before and after treatment. e results showed that Mental Imagery activated a more extensive brain area than conventional rehabilitation treatment.

Conclusion
In this study, the FBFCM algorithm was used to segment brain MRI images of stroke patients, and the effects of Mental Imagery on neurorehabilitation after stroke were analyzed. e results of this study found that the FBFCM algorithm demonstrated superb capabilities in segmenting brain MRI images of stroke patients. Mental Imagery activated a more extensive brain area than conventional rehabilitation training. erefore, Mental Imagery was more conducive to the rehabilitation of motor and neurological functions of patients after stroke, thereby increasing clinical effective rate. However, some limitations should be noted. Although the FBFCM algorithm completes the segmentation of the MRI image, the clustering operation has changed the gray value of the original pixel of the image. In clinical practice, the doctor needs to determine the appearance time of the lesion according to the gray value, so the algorithm limits the applications of MRI to a certain extent. ese problems need to be improved in future work in order to obtain better image segmentation results.

Scientific Programming
Data Availability e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest.