Craniocerebral disease area identification and detection method and system based on MRI image

The method optimizes pixel gradients in MRI images to enhance brain disease edges, improving segmentation and recognition precision by analyzing multiple scale windows and distributions, addressing the issue of unclear boundaries and noise in anisotropic diffusion filters.

CN120318105AInactive Publication Date: 2025-07-15THE THIRD PEOPLES HOSPITAL OF SHENZHEN
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510248105.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-07-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, when the anisotropic diffusion filtering algorithm enhances the MRI image, it cannot effectively enhance the edge part of the cranial brain disease area, resulting in incomplete segmentation and low recognition detection accuracy.

Method used

By analyzing the pixel point gradient values in the grayscale image in multi-scale, constructing multi-scale gradient coefficients and local anomalies, optimizing the gradient values of each pixel point, and using adaptive gradient values for image enhancement.

Benefits of technology

It improves the enhancement effect of the edge part of the craniocerebral disease area, prevents the edge of the normal tissue area from being over-enhanced, and improves the accuracy of identification and detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318105A_ABST
    Figure CN120318105A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a craniocerebral disease area identification and detection method and system based on an MRI (Magnetic Resonance Imaging) image, and the method comprises the steps: obtaining a plurality of sub-images with different scales according to a gray level image of the craniocerebral MRI image; performing multi-scale analysis on the gradient value of any pixel point according to each sub-image to obtain a multi-scale gradient coefficient of any pixel point; obtaining a multi-scale local anomaly degree according to the gray values of the pixel points in different local ranges of any pixel point and the distribution in the gradient direction; optimizing the gradient value of any pixel point according to the multi-scale gradient coefficient and the multi-scale local anomaly degree to obtain a self-adaptive gradient value, and performing image enhancement on the grayscale image by using an anisotropic diffusion filtering algorithm according to the self-adaptive gradient value of each pixel point so as to identify a craniocerebral disease region. And the effect of performing image enhancement on the MRI image by using the anisotropic diffusion filtering algorithm is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular, to a method and system for identifying and detecting brain disease regions based on MRI images. Background Art

[0002] Brain diseases such as brain tumors and strokes seriously threaten human health, and early diagnosis and treatment are crucial. Due to its advantages such as non-invasiveness and high resolution, MRI imaging technology has become an important means for diagnosing brain diseases. However, due to the irregular lesions and unclear boundaries with normal brain tissues in the brain disease regions, there will be edge blurring problems when segmenting MRI images, which affects the accurate segmentation and identification of disease regions.

[0003] In the traditional method, the MRI image is enhanced by the anisotropic diffusion filtering algorithm to enhance the brain disease region, so that when segmenting the enhanced MRI image, the edge information of the image can be effectively retained, and the noise can be suppressed, and then the brain disease region can be obtained more accurately. However, in the process of using the anisotropic diffusion filtering algorithm to enhance the MRI image, due to the irregular lesions and unclear boundaries with normal brain tissues in the brain disease region, there are fuzzy boundaries in the disease region, and the gradient corresponding to the pixel points at the fuzzy boundaries is small, resulting in a large diffusion coefficient obtained by the anisotropic diffusion filtering algorithm through the gradient. The too large diffusion coefficient will cause the edge region of the brain disease to not be effectively enhanced, and the enhancement effect on the edge part of the brain disease region in the MRI image is not good, and then the subsequent segmentation of the brain disease region is incomplete, and the accuracy of identifying and detecting the brain disease region is greatly reduced.

[0004] Therefore, how to optimize the gradient of pixel points in the MRI image and improve the effect of using the anisotropic diffusion filtering algorithm to enhance the MRI image has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method and system for identifying and detecting brain disease regions based on MRI images to solve the problem of how to optimize the gradient of pixel points in the MRI image and improve the effect of using the anisotropic diffusion filtering algorithm to enhance the MRI image.

[0006] In a first aspect, an embodiment of the present invention provides a method for identifying and detecting brain disease regions based on MRI images, the method comprising the following steps:

[0007] Obtain the cranial MRI image of a patient, perform grayscale processing on the cranial MRI image to obtain a grayscale image of the cranial MRI image;

[0008] Downsample the grayscale image to obtain a preset number of sub-images of different scales. For any pixel point in the grayscale image, obtain the target pixel point of the any pixel point according to each sub-image, and obtain the multi-scale gradient coefficient of the any pixel point according to the gradient value of each target pixel point and the scale of each sub-image;

[0009] Centered on the any pixel point, construct at least two windows of different preset sizes, and obtain the multi-scale local anomaly degree of the any pixel point according to the distribution of the grayscale values and gradient directions of the pixel points in each window;

[0010] Optimize the gradient value of the any pixel point according to the multi-scale gradient coefficient and multi-scale local anomaly degree of the any pixel point to obtain the adaptive gradient value of the any pixel point. Obtain the adaptive gradient values of all pixel points in the grayscale image. According to the adaptive gradient value of each pixel point in the grayscale image, use the anisotropic diffusion filtering algorithm to enhance the grayscale image to obtain a brain enhanced image, and identify the brain disease area of the patient according to the brain enhanced image.

[0011] Preferably, the obtaining the target pixel point of the any pixel point according to each sub-image includes:

[0012] For any sub-image, upsample the any sub-image to obtain a target sub-image, and the scale of the target sub-image is the same as the scale of the grayscale image;

[0013] Taking the lower left corner of the grayscale image as the origin, construct the two-dimensional rectangular coordinate system corresponding to the grayscale image. According to the two-dimensional rectangular coordinate system, obtain the coordinates of the any pixel point, obtain the two-dimensional rectangular coordinate system of the target sub-image, and obtain the pixel point with the same coordinates as the any pixel point in the target sub-image, denoted as the target pixel point.

[0014] Preferably, the obtaining the multi-scale gradient coefficient of the any pixel point according to the gradient value of each target pixel point and the scale of each sub-image includes:

[0015] Calculate the reciprocal of the sum of the scale of each sub-image and a preset constant respectively to obtain the eigenvalue of the corresponding sub-image. According to the reciprocal of the sum of the scale of the grayscale image and the preset constant, obtain the eigenvalue of the grayscale image. Calculate the cumulative eigenvalue sum between all sub-images and the grayscale image, and calculate the proportion of the eigenvalue of any sub-image in the cumulative eigenvalue sum to obtain the feature weight of the any sub-image;

[0016] Calculate the proportion of the eigenvalue of the grayscale image in the cumulative eigenvalue to obtain the feature weight of the grayscale image. According to the feature weight of the sub-image corresponding to the target sub-image where each target pixel point is located and the feature weight of the grayscale image corresponding to any pixel point, perform a weighted sum of the gradient values of each target pixel point of any pixel point and the gradient value of any pixel point to obtain the multi-scale gradient coefficient of any pixel point.

[0017] Preferably, obtaining the multi-scale local anomaly degree of any pixel point according to the distribution of the grayscale values and gradient directions of the pixel points in each window includes:

[0018] Obtain the multi-scale local contrast enhancement factor of any pixel point according to the difference between the grayscale values of all pixel points in the grayscale image and the grayscale values of all pixel points in each window;

[0019] Obtain the multi-scale local complexity of any pixel point according to the grayscale values and gradient directions of the pixel points in each window;

[0020] Calculate the product between the multi-scale local contrast enhancement factor and the multi-scale local complexity of any pixel point to obtain the multi-scale local anomaly degree of any pixel point.

[0021] Preferably, obtaining the multi-scale local contrast enhancement factor of any pixel point according to the difference between the grayscale values of all pixel points in the grayscale image and the grayscale values of all pixel points in each window includes:

[0022] Calculate the average value and standard deviation of the grayscale values of all pixel points in the grayscale image to obtain the global grayscale mean and global grayscale standard deviation. For any window, calculate the average value and standard deviation of the grayscale values of all pixel points in the any window to obtain the local grayscale mean and local grayscale standard deviation;

[0023] Calculate the absolute value of the difference between the local grayscale mean and the global grayscale mean, and record the ratio between the absolute value of the difference and the global grayscale standard deviation as the first contrast;

[0024] Calculate the ratio between the local grayscale standard deviation and the global grayscale standard deviation, use the ratio as the independent variable of the exponential function with the natural constant as the base to obtain the first function value, and subtract the first function value from the constant 1 to obtain the second contrast;

[0025] Calculate the product between the first contrast and the second contrast to obtain the local contrast of any window, and calculate the average value of the local contrasts of all windows corresponding to any pixel point to obtain the multi-scale local contrast enhancement factor of any pixel point.

[0026] Preferably, obtaining the multi-scale local complexity of any pixel point according to the gray value and gradient direction of the pixel points in each window includes:

[0027] For any window corresponding to any pixel point, obtain the gray information entropy of any window according to the gray values of all pixel points in any window, and calculate the average value of the gray information entropies of all windows corresponding to any pixel point to obtain the multi-scale gray complexity of any pixel point;

[0028] Denote the pixel points other than any pixel point in any window as neighborhood pixel points, obtain the tissue consistency index within any window according to the gradient direction similarity between each neighborhood pixel point and any pixel point, and calculate the average value of the tissue consistency indices within all windows corresponding to any pixel point to obtain the multi-scale gradient direction complexity;

[0029] Calculate the product between the multi-scale gray complexity and the multi-scale gradient direction complexity to obtain the multi-scale local complexity of any pixel point.

[0030] Preferably, obtaining the tissue consistency index within any window according to the gradient direction similarity between each neighborhood pixel point and any pixel point includes:

[0031] For any neighborhood pixel point, calculate the square of the Euclidean distance between any pixel point and any neighborhood pixel point, and the square of the difference in gray values between any pixel point and any neighborhood pixel point, add the square of the Euclidean distance and the square of the difference in gray values, and denote the reciprocal of the arithmetic square root of the added result as the weight of the gradient direction of any neighborhood pixel point;

[0032] After performing weighted summation on the gradient directions of all neighborhood pixel points and then calculating the mean value, obtain the weighted neighborhood gradient direction mean value of any pixel point, use the absolute value of the difference between the gradient direction of any pixel point and the weighted neighborhood gradient direction mean value as the independent variable of the cosine function to obtain the second function value, and subtract the second function value from the constant 1 to obtain the tissue consistency index within any window.

[0033] Preferably, optimizing the gradient value of any pixel point according to the multi-scale gradient coefficient and multi-scale local anomaly degree of the any pixel point to obtain the adaptive gradient value of the any pixel point includes:

[0034] Calculating the product between the multi-scale gradient coefficient and the multi-scale local anomaly degree of the any pixel point, linearly normalizing the result of the product to obtain the importance degree of the any pixel point, and calculating the sum between the constant 1 and the importance degree to obtain the adaptive gradient adjustment factor of the any pixel point;

[0035] Calculating the product between the gradient value of the any pixel point and the adaptive gradient adjustment factor to obtain the adaptive gradient value of the any pixel point.

[0036] In a second aspect, an embodiment of the present invention further provides a system for identifying and detecting a craniocerebral disease region based on an MRI image, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements a method for identifying and detecting a craniocerebral disease region based on an MRI image as described in the first aspect.

[0037] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:

[0038] The present invention acquires the cranial MRI image of a patient, performs grayscale processing on the cranial MRI image to obtain the grayscale image of the cranial MRI image; downsamples the grayscale image to obtain a preset number of sub-images of different scales. For any pixel point in the grayscale image, the target pixel point of the any pixel point is obtained according to each sub-image, and according to the gradient value of each target pixel point and the scale of each sub-image, the multi-scale gradient coefficient of the any pixel point is obtained; with the any pixel point as the center, at least two windows of different preset sizes are constructed, and according to the distribution of the grayscale values and gradient directions of the pixel points in each window, the multi-scale local abnormality degree of the any pixel point is obtained; according to the multi-scale gradient coefficient and multi-scale local abnormality degree of the any pixel point, the gradient value of the any pixel point is optimized to obtain the adaptive gradient value of the any pixel point, the adaptive gradient values of all pixel points in the grayscale image are obtained, and according to the adaptive gradient value of each pixel point in the grayscale image, the anisotropic diffusion filtering algorithm is used to perform image enhancement on the grayscale image to obtain the cranial enhanced image, and the cranial disease area of the patient is identified according to the cranial enhanced image. Among them, first, according to the gradient values of the sub-images at different scales of the grayscale image, by fusing the gradient information of multiple scales, the multi-scale gradient coefficient of each pixel point in the grayscale image is obtained to retain the gradient response of the real edge while suppressing the false gradient caused by noise; then, the multi-scale analysis of the distribution of the grayscale values and the distribution of the gradient directions within the local range of each pixel point is performed to obtain the multi-scale local abnormality degree; finally, according to the multi-scale gradient coefficient and the multi-scale local abnormality degree, the gradient value of each pixel point is optimized to obtain the adaptive gradient value of each pixel point, so that the adaptive gradient values of the pixel points at the edge of the cranial disease area are larger, improving the enhancement effect on the edge part of the cranial disease area and preventing the edge part of the normal tissue area from being over-enhanced, thereby improving the effect of using the anisotropic diffusion filtering algorithm to perform image enhancement on the grayscale image of the cranial MRI image. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0040] Figure 1 It is a flowchart of a method for identifying and detecting a cranial disease area based on an MRI image provided in Embodiment 1 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] Embodiments of the present disclosure will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where like or similar reference numerals designate like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0042] It should be noted that the terms "first", "second", etc. in the specification of the present disclosure and the above accompanying drawings are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure.

[0043] To illustrate the technical solution of the present invention, specific embodiments will be used for illustration below.

[0044] See Figure 1 , which is a flowchart of a method for identifying and detecting a cranial disease region based on an MRI image provided in the first embodiment of the present invention. As Figure 1 shown, the method may include:

[0045] Step S101, obtaining a cranial MRI image of a patient, performing grayscale processing on the cranial MRI image to obtain a grayscale image of the cranial MRI image.

[0046] Since some boundaries of the cranial disease region are blurred, when segmenting the grayscale image of the cranial MRI image, the cranial disease region cannot be well segmented. Therefore, before segmenting the cranial MRI image, it is necessary to first perform enhancement processing on the cranial MRI image to improve the segmentation integrity of the disease region.

[0047] In the traditional method, the MRI image is enhanced by the anisotropic diffusion filtering algorithm to enhance the brain disease area, so that when segmenting the enhanced MRI image, the edge information of the image can be effectively retained while suppressing noise, and then the brain disease area can be obtained more accurately. However, in the process of using the anisotropic diffusion filtering algorithm to enhance the MRI image, since the lesions in the brain disease area are mostly irregular and the boundary with the normal brain tissue is not clear, there is a blurred boundary in the disease area, and the gradient corresponding to the pixel points at the blurred boundary is small, resulting in a large diffusion coefficient obtained by the anisotropic diffusion filtering algorithm through the gradient. The too large diffusion coefficient will cause the edge part of the brain disease area to not be effectively enhanced, and the enhancement effect on the edge part of the brain disease area in the MRI image is not good, which in turn leads to incomplete segmentation of the brain disease area and greatly reduces the accuracy of the recognition and detection of the brain disease area.

[0048] Therefore, in the embodiment of the present invention, first, a grayscale image of the brain MRI image is obtained, and then each pixel point in the grayscale image is analyzed at multiple scales to optimize the gradient value of each pixel point, so as to obtain the adaptive gradient value of each pixel point, thereby improving the enhancement effect of the brain disease area in the MRI image by using the anisotropic diffusion filtering algorithm.

[0049] Specifically: after collecting the brain MRI image of the patient through a medical device, the brain MRI image is grayscale processed to obtain a grayscale image of the brain MRI image. The grayscale image is read using OpenCV to obtain the grayscale value of each pixel point in the grayscale image, and then the gradient value and gradient direction of each pixel point in the grayscale image are obtained through the Sobel operator. Here, OpenCV and the Sobel operator are prior arts and will not be elaborated here.

[0050] Step S102, downsample the grayscale image to obtain a preset number of sub-images of different scales. For any pixel point in the grayscale image, obtain the target pixel point of the any pixel point according to each sub-image, and obtain the multi-scale gradient coefficient of the any pixel point according to the gradient value of each target pixel point and the scale of each sub-image.

[0051] Since the brain disease area is a part of the area different from the normal brain tissue, there are relatively significant edge or structural changes between it and the normal brain tissue, that is, the pixel points at the edge between the brain disease area and the normal brain tissue area have the characteristic of a large gradient value. Therefore, in the embodiment of the present invention, the edge degree of each pixel point in the grayscale image of the brain MRI image is analyzed according to the gradient value, so as to improve the enhancement effect on the edge part of the brain disease area in the MRI image by using the anisotropic diffusion filtering algorithm.

[0052] Considering that some noise pixel points also have the characteristic of large gradient values, if the edge degree of each pixel point is analyzed only based on the gradient value of each pixel point in the grayscale image of the cranial MRI image, it is very likely to mistake the noise for the pixel points located at the edge between the cranial disease area and the normal brain tissue area. Therefore, in the embodiments of the present invention, a Gaussian pyramid of the grayscale image is constructed, and then the gradient value of each pixel point in the grayscale image is analyzed at multiple scales based on the Gaussian pyramid to fuse the multi-scale gradient information, retain the gradient response of the real edge, and at the same time suppress the false gradient caused by noise, so as to obtain the multi-scale gradient coefficient of each pixel point, which is used to characterize the edge degree of each pixel point: the larger the multi-scale coefficient of a certain pixel point, the greater its edge degree, that is, the greater the possibility that the pixel point is the pixel point at the edge between the cranial disease area and the normal brain tissue area.

[0053] Specifically: when downsampling the grayscale image to obtain the Gaussian pyramid, since it is necessary to better calculate the gradient change of the pixel points, the number of downsampling layers should be no less than two. At the same time, in order to reduce the computational complexity, the number of downsampling layers should not be too large. Therefore, in the embodiments of the present invention, the number of layers of the Gaussian pyramid is set to 5. There is no limitation here, and the implementer can set the number of layers of the Gaussian pyramid according to the specific scenario. First, perform Gaussian smoothing and downsampling operations on the grayscale image of the cranial MRI image to obtain a five-layer pyramid, which includes the original image (the grayscale image of the cranial MRI image) and 4 downsampling layers, that is, 4 sub-images with different scales (different resolutions), so as to analyze the gradient value of the pixel points in the grayscale image at multiple scales and effectively remove the false edges caused by noise. Then, use the Sobel operator to calculate the initial gradient value of each pixel point in each scale of the sub-image, and linearly normalize the initial gradient value of each pixel point to obtain the corresponding gradient value. Among them, using the Sobel operator to calculate the gradient value of the pixel point and linear normalization are prior arts, which will not be elaborated here.

[0054] Considering that there is some fusion between the edge part of the cranial disease area and the normal tissue, higher weights need to be assigned to the sub-images with smaller scales to better capture details. In the embodiments of the present invention, the weight corresponding to each sub-image is denoted as the feature weight. Taking the s-th sub-image as an example, the specific acquisition method of the feature weight of the s-th sub-image is as follows:

[0055] Calculate the reciprocal of the sum of the scale of each sub-image and a preset constant respectively to obtain the eigenvalue of the corresponding sub-image. According to the reciprocal of the sum of the scale of the grayscale image and the preset constant, obtain the eigenvalue of the grayscale image. Calculate the cumulative value of the eigenvalues between all sub-images and the grayscale image. Calculate the proportion of the eigenvalue of the s-th sub-image in the cumulative value of the eigenvalues to obtain the feature weight of the s-th sub-image.

[0056] In one embodiment, the calculation formula for the feature weight of the s-th sub-image is as follows:

[0057]

[0058] where w s represents the feature weight of the s-th sub-image, z s represents the scale of the s-th sub-image, c represents a preset constant, z r represents the scale of the r-th sub-image, L represents the number of sub-images of the grayscale image (in the embodiment of the present invention, L = 4), and a represents the scale of the grayscale image.

[0059] It should be noted that c is set to 2 to prevent the denominator from being 0, and there is no limitation here. The implementer can set it according to the specific scenario. To better capture details, the larger the scale of the s-th sub-image, the smaller its corresponding feature weight.

[0060] Similarly, the feature weights of each sub-image and the feature weight of the grayscale image are obtained.

[0061] When performing multi-scale analysis on the gradient value of each pixel point in the grayscale image through a five-layer pyramid, since the scales (resolutions) of each sub-image are different, that is, the number of pixel points contained in each sub-image is different, and the scale of each sub-image is smaller than the scale of the grayscale image, in the embodiment of the present invention, each sub-image is upsampled using the bilinear interpolation method to obtain a target sub-image with the same scale as the grayscale image, so as to perform multi-scale analysis on the gradient value of each pixel point in the grayscale image. Among them, upsampling using the bilinear interpolation method is a prior art and will not be elaborated here.

[0062] Taking the i-th pixel point in the grayscale image as an example, first, in the target sub-image corresponding to each sub-image, the target pixel point of the i-th pixel point is obtained, and then, according to the feature weight of the sub-image corresponding to the target sub-image where each target pixel point is located and the feature weight of the grayscale image corresponding to the i-th pixel point, multi-scale analysis is performed on the gradient value of the i-th pixel point in the grayscale image to obtain the multi-scale gradient coefficient of the i-th pixel point in the grayscale image. Among them, the specific process of obtaining the target pixel point of the i-th pixel point in the target sub-image corresponding to each sub-image is as follows:

[0063] Taking the lower left corner of the grayscale image as the origin, a two-dimensional rectangular coordinate system corresponding to the grayscale image is constructed. According to the two-dimensional rectangular coordinate system, the coordinates of the i-th pixel point are obtained. For any target sub-image, the two-dimensional rectangular coordinate system of any target sub-image is obtained. According to the two-dimensional rectangular coordinate system of any target sub-image, the pixel point with the same coordinates as the i-th pixel point in the target sub-image is obtained and denoted as the target pixel point.

[0064] Similarly, the target pixel of the i-th pixel is obtained in each target sub-image, and all the target pixels of the i-th pixel are obtained. Further, according to the feature weight of the sub-image corresponding to the target sub-image where each target pixel is located, and the feature weight of the grayscale image corresponding to the i-th pixel, the multi-scale gradient coefficient of the i-th pixel in the grayscale image is obtained. The larger the multi-scale gradient coefficient of the i-th pixel, the more the i-th pixel conforms to the characteristics of the pixel at the edge between the brain disease area and the normal brain tissue area. Specifically:

[0065] Calculate the proportion of the eigenvalue of the grayscale image in the cumulative eigenvalue to obtain the feature weight of the grayscale image. According to the feature weight of the sub-image corresponding to the target sub-image where each target pixel is located, and the feature weight of the grayscale image corresponding to the i-th pixel, the gradient value of each target pixel of the i-th pixel and the gradient value of the i-th pixel are weighted and summed to obtain the multi-scale gradient coefficient of the i-th pixel.

[0066] In one embodiment, the calculation formula of the multi-scale gradient coefficient of the i-th pixel is:

[0067]

[0068] where DT i represents the multi-scale gradient coefficient of the i-th pixel, L represents the number of sub-images of the grayscale image (in the embodiment of the present invention, L = 4), w s represents the feature weight of the s-th sub-image, d i,s represents the gradient value of the target pixel of the i-th pixel in the grayscale image in the target sub-image of the s-th sub-image, w o represents the feature weight of the grayscale image, and g i represents the gradient value of the i-th pixel.

[0069] It should be noted that the larger the gradient value, the larger DT i , the greater the possibility that the i-th pixel is a pixel at the edge between the brain disease area and the normal brain tissue area.

[0070] Step S103: Centering on the any pixel, at least two windows with different preset sizes are constructed, and according to the distribution of the grayscale values and gradient directions of the pixels in each window, the multi-scale local abnormality degree of the any pixel is obtained.

[0071] In cranial MRI images, not only are there edges in the cranial disease regions, but also in the normal tissue regions. Moreover, the edges between the cranial disease regions and the normal tissue regions are not clear, resulting in edge blurring problems during the segmentation of MRI images. Consequently, when using the anisotropic diffusion filtering algorithm to enhance the cranial MRI images, the edge parts of the cranial disease regions cannot be effectively enhanced, further affecting the accurate segmentation and recognition of the disease regions. Therefore, in order to effectively enhance the edge parts of the cranial disease regions, after obtaining the multi-scale gradient coefficient of the $i$-th pixel through step S102, it is also necessary to further analyze the $i$-th pixel in the grayscale image of the cranial MRI image according to the characteristics of the cranial disease regions to determine whether it is a pixel of the cranial disease region, facilitating the subsequent optimization of the gradient value of the pixel and improving the enhancement effect of the cranial disease regions in the cranial MRI image.

[0072] Considering that the cranial disease regions exhibit relatively significant local heterogeneity in MRI images, that is, large local gray differences and high gray standard deviations. At the same time, since the cranial disease regions are generally irregularly distributed and the internal tissue distribution uniformity is poor (such as malignant tumor infiltrative growth regions, hemorrhage, etc.), their local gray distributions are complex and the gradients have inconsistent directions. Based on the above characteristics, a window of a preset size is established with the $i$-th pixel as the center. Then, according to the gray value characteristics and gradient value characteristics of the pixels within the window, it is determined whether the $i$-th pixel is a pixel of the cranial disease region. However, a single scale has limitations. That is, if the size of the window is set to be small, it is more sensitive to noise and may misidentify noise as pixels of the cranial disease region; if the size of the window is set to be large, it may contain pixels of the cranial disease region and pixels of multiple normal tissue regions, and thus it is impossible to accurately detect whether the $i$-th pixel is a pixel of the cranial disease region. Therefore, in the embodiments of the present invention, three $n \times n$ windows are established with the $i$-th pixel as the center to perform multi-scale analysis on the $i$-th pixel in the grayscale image, obtaining the multi-scale local abnormality degree of the $i$-th pixel for determining whether the $i$-th pixel is a pixel of the cranial disease region, where $n$ takes 3, 9, and 15 respectively. There is no limitation here, and the implementer can set the number of windows and the window size according to the specific scenario. To avoid the constructed window not being centered on the $i$-th pixel, the value of $n$ should be an odd number.

[0073] The steps to obtain the multi-scale local abnormality degree of the $i$-th pixel are as follows:

[0074] (1) According to the differences between the gray values of all pixels in the grayscale image and the gray values of all pixels in each window corresponding to the $i$-th pixel, the multi-scale local contrast enhancement factor of the $i$-th pixel is obtained.

[0075] Since the boundaries between the diseased regions of the brain and the normal tissues are rather blurred, when enhancing the grayscale image of brain MRI images, it is impossible to accurately determine whether the pixel points at the boundaries belong to the diseased regions of the brain. Considering that the pixel points at the boundaries of the diseased regions of the brain also belong to the diseased regions of the brain and they also exhibit significant local heterogeneity, that is, large local grayscale differences and high grayscale standard deviations. Therefore, in the embodiments of the present invention, according to the differences between the grayscale values of all pixel points in the grayscale image and the grayscale values of all pixel points in each window corresponding to the i-th pixel point, the multi-scale local contrast enhancement factor of the i-th pixel point is obtained to preliminarily determine whether the i-th pixel point belongs to the pixel points of the diseased regions of the brain. The specific steps for obtaining the multi-scale local contrast enhancement factor of the i-th pixel point are as follows:

[0076] Calculate the average value and standard deviation of the grayscale values of all pixel points in the grayscale image to obtain the global grayscale mean and the global grayscale standard deviation. For any window, calculate the average value and standard deviation of the grayscale values of all pixel points in the any window to obtain the local grayscale mean and the local grayscale standard deviation;

[0077] Calculate the absolute value of the difference between the local grayscale mean and the global grayscale mean, and denote the ratio between the absolute value of the difference and the global grayscale standard deviation as the first contrast;

[0078] Calculate the ratio between the local grayscale standard deviation and the global grayscale standard deviation, take the ratio as the independent variable of the exponential function with the natural constant as the base to obtain the first function value, and subtract the first function value from the constant 1 to obtain the second contrast;

[0079] Calculate the product between the first contrast and the second contrast to obtain the local contrast of the any window, and calculate the average value of the local contrasts of all windows corresponding to the any pixel point to obtain the multi-scale local contrast enhancement factor of the i-th pixel point.

[0080] In an embodiment, the calculation formula for the multi-scale local contrast enhancement factor of the i-th pixel point is:

[0081]

[0082] Wherein, represents the multi-scale local contrast enhancement factor of the i-th pixel point, M represents the number of windows corresponding to the i-th pixel point (in the embodiments of the present invention, M = 3), μi m represents the local grayscale mean of all pixel points in the m-th window corresponding to the i-th pixel point, μ represents the global grayscale mean of all pixel points in the grayscale image, σ represents the global grayscale standard deviation of all pixel points in the grayscale image, σi mIt represents the local gray standard deviation of all pixel points in the m-th window corresponding to the i-th pixel point, 1 represents a constant, e represents the natural constant, and || represents the absolute value symbol.

[0083] It should be noted that That is the first contrast. The larger |μi m −μ| is, the greater the difference between the gray values within the local range of the i-th pixel point and the gray value of the gray image, the more significant the local heterogeneity of the i-th pixel point, and thus the greater the first contrast. The larger it is, the greater the possibility that the i-th pixel point is a pixel point in the cranial disease area; That is the second contrast. The larger σi m is, the greater the local gray standard deviation of all pixel points in the m-th window corresponding to the i-th pixel point, the more chaotic the gray value distribution of all pixel points in the m-th window corresponding to the i-th pixel point, the more significant the local heterogeneity of the i-th pixel point, and thus the greater the second contrast. The larger it is, the greater the possibility that the i-th pixel point is a pixel point in the cranial disease area.

[0084] (2) Obtain the multi-scale local complexity of the i-th pixel point according to the gray values and gradient directions of the pixel points in each window corresponding to the i-th pixel point.

[0085] Since the cranial disease area is generally irregularly distributed and the internal tissue distribution uniformity is poor (such as the infiltrative growth area of malignant tumors, bleeding, etc.), it shows complex local gray distribution and inconsistent gradient directions in the gray image. Therefore, in the embodiments of the present invention, first, according to the distribution of the gray values of each pixel point in each window corresponding to the i-th pixel point, obtain the multi-scale gray complexity of the i-th pixel point, then according to the similarity of the gradient directions of each pixel point in each window corresponding to the i-th pixel point, obtain the multi-scale gradient direction complexity of the i-th pixel point, and finally combine the multi-scale gray complexity and multi-scale gradient direction complexity of the i-th pixel point to obtain the multi-scale local complexity of the i-th pixel point.

[0086] Among them, the specific steps to obtain the multi-scale gray complexity of the i-th pixel point are as follows:

[0087] For any window corresponding to the i-th pixel point, obtain the gray information entropy of the any window according to the gray values of all pixel points in the any window, calculate the average value of the gray information entropies of all windows corresponding to the i-th pixel point, and obtain the multi-scale gray complexity of the any pixel point.

[0088] In an embodiment, the calculation formula for the multi-scale gray complexity of the i-th pixel point is:

[0089]

[0090] Among them, represents the multi-scale gray complexity of the i-th pixel point, M represents the number of windows corresponding to the i-th pixel point (in the embodiment of the present invention, M = 3), and P i,m (j) represents the probability that the gray value is j in the m-th window corresponding to the i-th pixel point.

[0091] It should be noted that {―∑ j P i,m (j) × log[P i,m (j)]} is the gray information entropy of any window corresponding to the i-th pixel point. The larger the gray information entropy, the more complex the gray value distribution of the pixel points in the m-th window corresponding to the i-th pixel point, and the more significant the local heterogeneity of the i-th pixel point. Furthermore, the larger DH i , the greater the possibility that the i-th pixel point is a pixel point in the cranioencephalic disease area.

[0092] Furthermore, according to the similarity of the gradient directions of each pixel point in each window corresponding to the i-th pixel point, the multi-scale gradient direction complexity of the i-th pixel point is obtained. Specifically:

[0093] For any window corresponding to the i-th pixel point, the pixel points in the any window other than the any pixel point are denoted as neighborhood pixel points;

[0094] For any neighborhood pixel point, calculate the square of the Euclidean distance between the i-th pixel point and the any neighborhood pixel point, and the square of the difference in gray values between the i-th pixel point and the any neighborhood pixel point. Add the square of the Euclidean distance and the square of the difference in gray values, and denote the reciprocal of the arithmetic square root of the added result as the weight of the gradient direction of the any neighborhood pixel point. Among them, the Euclidean distance is the prior art and will not be elaborated here;

[0095] After weighted summing the gradient directions of all neighborhood pixel points and calculating the mean value, the weighted neighborhood gradient direction mean value of the i-th pixel point is obtained. Take the absolute value of the difference between the gradient direction of the any pixel point and the weighted neighborhood gradient direction mean value as the independent variable of the cosine function to obtain the second function value, and subtract the second function value from the constant 1 to obtain the tissue consistency index within the any window;

[0096] Calculate the average value of the tissue consistency indices within all windows corresponding to the i-th pixel point to obtain the multi-scale gradient direction complexity.

[0097] In an embodiment, the calculation formula for the multi-scale gradient direction complexity of the i-th pixel point is:

[0098]

[0099] Among them, represents the multi-scale gradient direction complexity of the i-th pixel point, M represents the number of windows corresponding to the i-th pixel point (in the embodiments of the present invention, M = 3), represents the gradient direction of the i-th pixel point in the m-th window corresponding to the i-th pixel point, F m represents the number of neighboring pixel points of the i-th pixel point in the m-th window corresponding to the i-th pixel point, represents the square of the difference in gray value between the i-th pixel point and the k-th neighboring pixel point in the m-th window corresponding to the i-th pixel point, represents the square of the Euclidean distance between the i-th neighboring pixel point and the k-th neighboring pixel point in the m-th window corresponding to the i-th pixel point, represents the gradient direction of the k-th neighboring pixel point in the m-th window corresponding to the i-th pixel point, cos() represents the cosine function, 1 represents a constant, and || represents the absolute value symbol.

[0100] It should be noted that is the tissue consistency index, the value range of is in [0, π], and further the value range of is in [1, -1], and the value range of the tissue consistency index is in [0, 2]. is the weighted neighborhood gradient direction mean of the i-th pixel point, is the weight of the gradient direction of the k-th neighboring pixel point in the m-th window corresponding to the i-th pixel point. Since the window corresponding to the i-th pixel point may contain pixel points in the cranioencephalic disease area and pixel points in the normal tissue area, in order to prevent pixel points in the normal tissue area from being misjudged as pixel points in the cranioencephalic disease area, in the embodiments of the present invention, according to the Euclidean distance and gray value difference between the neighboring pixel point and the i-th pixel point, the weight of the gradient direction of the neighboring pixel point is obtained, that is the smaller the difference between the gray value of the i-th pixel point and the gray value of the k-th neighboring pixel point, that is the smaller, the more similar the i-th pixel point and the k-th neighboring pixel point are, and further the larger, the more likely the i-th pixel point and the k-th neighboring pixel point are pixel points in the same tissue area; the smaller the Euclidean distance between the i-th pixel point and the k-th neighboring pixel point, that is the smaller, the closer the distance between the i-th pixel point and the k-th neighboring pixel point is, and further the larger, the more likely the i-th pixel point and the k-th neighboring pixel point are pixel points in the same tissue area. The larger it is, the more likely the k-th neighborhood pixel is a pixel in the craniocerebral disease area. The larger it is, the more likely the i-th pixel and the k-th neighborhood pixel are both pixels in the craniocerebral disease area. The larger it is, the more complex the gradient direction distribution of the pixels in the m-th window corresponding to the i-th pixel is, the more significant the local heterogeneity of the i-th pixel is, and thus the larger the tissue consistency index is. The larger it is, the more likely the i-th pixel is a pixel in the craniocerebral disease area.

[0101] After obtaining the multi-scale gradient direction complexity of the i-th pixel, calculate the product between the multi-scale gradient direction complexity and the multi-scale gray complexity of the i-th pixel to obtain the multi-scale local anomaly degree of the i-th pixel. The calculation formula for the multi-scale local anomaly degree of the i-th pixel is:

[0102]

[0103] Among them, represents the multi-scale local anomaly degree of the i-th pixel. represents the multi-scale gray complexity of the i-th pixel. represents the multi-scale gradient direction complexity of the i-th pixel.

[0104] It should be noted that The larger it is, the more complex the gray value distribution of the pixels in the local range of the i-th pixel is, the more significant the local heterogeneity of the i-th pixel is, and thus The larger it is, the greater the possibility that the i-th pixel is a pixel in the craniocerebral disease area; The larger it is, the more inconsistent the gradient directions of the pixels in the local range of the i-th pixel are, the more significant the local heterogeneity of the i-th pixel is, and thus The larger it is, the greater the possibility that the i-th pixel is a pixel in the craniocerebral disease area.

[0105] (3) The multi-scale local contrast enhancement factor and multi-scale local complexity of the i-th pixel to obtain the multi-scale local anomaly degree of the i-th pixel.

[0106] Specifically: Calculate the product between the multi-scale gray complexity and the multi-scale gradient direction complexity to obtain the multi-scale local complexity of the i-th pixel.

[0107] In an embodiment, the calculation formula for the multi-scale local anomaly degree of the i-th pixel is:

[0108]

[0109] Among them, DY i represents the multi-scale local anomaly degree of the i-th pixel point, represents the multi-scale local contrast enhancement factor of the i-th pixel point, represents the multi-scale local anomaly degree of the i-th pixel point.

[0110] It should be noted that, the larger it is, the greater the difference between the gray value within the local range of the i-th pixel point and the gray value of the gray image, and thus the larger DY i the larger it is, the greater the possibility that the i-th pixel point is a pixel point in the cranial disease area; the larger it is, the more complex the gray value distribution of the pixel points within the local range of the i-th pixel point and the more inconsistent the gradient directions, and thus the larger DY i the larger it is, the greater the possibility that the i-th pixel point is a pixel point in the cranial disease area.

[0111] Thus, the multi-scale local anomaly degree of the i-th pixel point in the gray image is obtained.

[0112] Step S104: Optimize the gradient value of any pixel point according to the multi-scale gradient coefficient and multi-scale local anomaly degree of the any pixel point to obtain the adaptive gradient value of the any pixel point, obtain the adaptive gradient values of all pixel points in the gray image, and perform image enhancement on the gray image by using the anisotropic diffusion filtering algorithm according to the adaptive gradient value of each pixel point in the gray image to obtain a cranial enhanced image, and identify the cranial disease area of the patient according to the cranial enhanced image.

[0113] Through steps S102 and S103, the multi-scale gradient coefficient and multi-scale local anomaly degree of the i-th pixel point in the gray image are obtained. Combining the multi-scale gradient coefficient and multi-scale local anomaly degree, the importance degree of the i-th pixel point is obtained, which is used to characterize the possibility that the i-th pixel point is a pixel point at the edge of the cranial disease area. Specifically:

[0114] Calculate the product between the multi-scale gradient coefficient and multi-scale local anomaly degree of the i-th pixel point, and linearly normalize the result of the product to obtain the importance degree of the i-th pixel point. Among them, linear normalization is a prior art and will not be elaborated here.

[0115] In an embodiment, the calculation formula for the importance degree of the i-th pixel point is:

[0116]

[0117] Among them, Z iIndicates the importance level of the i-th pixel point. Represents the multi-scale gradient coefficient of the i-th pixel point, DY i Represents the multi-scale local anomaly degree of the i-th pixel point, and nrom() represents the linear normalization function.

[0118] It should be noted that The larger it is, the greater the possibility that the i-th pixel point is a pixel point at the edge between the cranial disease area and the normal brain tissue area, DY i The larger it is, the greater the possibility that the i-th pixel point is a pixel point in the cranial disease area, and thus Z i The larger it is, the greater the possibility that the i-th pixel point is a pixel point at the edge part of the cranial disease area.

[0119] Furthermore, according to the importance level of the i-th pixel point, the gradient value of the i-th pixel point is optimized to obtain the adaptive gradient value of the i-th pixel point, so that the adaptive gradient values of the pixel points at the edge part of the cranial disease area are larger. Thus, when using the anisotropic diffusion filtering algorithm to enhance the grayscale image of the cranial MRI image, it can avoid the situation that the diffusion coefficient calculated using the original gradient value of the pixel point cannot effectively enhance the edge part of the cranial disease area, and effectively enhance the cranial disease area. The specific steps to obtain the adaptive gradient value of the i-th pixel point are as follows:

[0120] Calculate the sum between the constant 1 and the importance level to obtain the adaptive gradient adjustment factor of any pixel point;

[0121] Calculate the product between the gradient value of any pixel point and the adaptive gradient adjustment factor to obtain the adaptive gradient value of any pixel point.

[0122] In an embodiment, the calculation formula for the adaptive gradient value of the i-th pixel point is:

[0123] t′ i =(1 + Z i )×t i

[0124] Wherein, t′ i represents the adaptive gradient value of the i-th pixel point, Z i represents the importance level of the i-th pixel point, and t i represents the gradient value of the i-th pixel point.

[0125] It should be noted that the larger Z i is, the greater the possibility that the i-th pixel point is a pixel point in the cranial disease area, and the more likely the i-th pixel point is a pixel point at the edge part of the cranial disease area. Thus, t′ iThe larger it is, the larger the adaptive gradient value of the i-th pixel point.

[0126] Similarly, the adaptive gradient value of each pixel point in the grayscale image is obtained. Further, according to the adaptive gradient value of each pixel point, the anisotropic diffusion filtering algorithm is used to enhance the grayscale image of the cranial MRI image to obtain a cranial enhanced image. The anisotropic diffusion filtering algorithm is a prior art and will not be elaborated here.

[0127] After obtaining the cranial enhanced image, the edges of all regions in the cranial enhanced image are obtained through the Canny edge detection algorithm and marked. Then, the cranial enhanced image is segmented through the watershed algorithm to obtain multiple closed regions. Further, the gray-level co-occurrence matrix of each closed region in the cranial enhanced image is obtained to calculate relevant features such as the contrast, energy, and entropy of each closed region. Since the cranial disease region shows characteristics such as drastic internal gray-level changes, complex structures, uneven gray-level distributions, and irregular textures, in the gray-level co-occurrence matrix of the closed region corresponding to the cranial disease region, the values far from the diagonal are higher, the probability distribution is dispersed, and the probability distribution is uneven, that is, the characteristics of the cranial disease region are high contrast, high entropy, and low energy. Therefore, after calculating the contrast, energy, and entropy of each closed region, the threshold of the cranial disease region is set by the threshold method. If any two of the contrast, energy, and entropy exceed the preset threshold, it is marked as a suspected cranial disease region: the contrast threshold is set to 50, the energy threshold is set to 0.1, and the entropy threshold is set to 4. When any closed region satisfies any two of the contrast being greater than 50, the energy being less than 0.1, and the entropy being greater than 4, any closed region is marked as a cranial disease region and highlighted in the cranial MRI image. Among them, the way to obtain the preset threshold is: extract GLCM parameters from a large number of samples of normal and diseased regions, and draw a histogram or probability density function to determine the optimal threshold through a significance test (such as a t-test). For example, the mean contrast of normal tissue is 20, and the mean contrast of the diseased region is 80. Then, in the embodiments of the present invention, the contrast threshold is set to 50. Among them, the Canny edge detection algorithm, the watershed algorithm, the gray-level co-occurrence matrix, the GLCM parameters, the significance test, etc. are prior arts and will not be elaborated here.

[0128] It should be noted that the focus of the present invention is: how to optimize the gradient value of each pixel point in the cranial MRI image according to the characteristics of the cranial disease region, so that the adaptive gradient value of the pixel points in the edge part of the cranial disease region is larger, thereby improving the effect of using the anisotropic diffusion filtering algorithm to enhance the grayscale image of the cranial MRI image. After enhancing the grayscale image of the cranial MRI image by using the anisotropic diffusion filtering algorithm, obtaining the cranial disease region is a prior art and will not be elaborated here.

[0129] In summary, the present invention obtains the cranial MRI image of a patient, performs grayscale processing on the cranial MRI image to obtain a grayscale image of the cranial MRI image; downsamples the grayscale image to obtain a preset number of sub-images of different scales. For any pixel point in the grayscale image, the target pixel point of the any pixel point is obtained according to each sub-image, and according to the gradient value of each target pixel point and the scale of each sub-image, a multi-scale gradient coefficient of the any pixel point is obtained; taking the any pixel point as the center, at least two windows of different preset sizes are constructed, and according to the distribution of the grayscale values and gradient directions of the pixel points in each window, the multi-scale local abnormality degree of the any pixel point is obtained; according to the multi-scale gradient coefficient and multi-scale local abnormality degree of the any pixel point, the gradient value of the any pixel point is optimized to obtain the adaptive gradient value of the any pixel point, the adaptive gradient values of all pixel points in the grayscale image are obtained, and according to the adaptive gradient value of each pixel point in the grayscale image, the anisotropic diffusion filtering algorithm is used to perform image enhancement on the grayscale image to obtain a cranial enhanced image, and the cranial disease area of the patient is identified according to the cranial enhanced image. Among them, first, according to the gradient values of the sub-images at different scales of the grayscale image, by fusing multi-scale gradient information, the multi-scale gradient coefficient of each pixel point in the grayscale image is obtained to retain the gradient response of the real edge while suppressing the false gradient caused by noise; then, a multi-scale analysis is performed on the distribution of the grayscale values and the distribution of the gradient directions within the local range of each pixel point to obtain the multi-scale local abnormality degree; finally, according to the multi-scale gradient coefficient and the multi-scale local abnormality degree, the gradient value of each pixel point is optimized to obtain the adaptive gradient value of each pixel point, so that the adaptive gradient values of the pixel points at the edge of the cranial disease area are larger, improving the enhancement effect on the edge part of the cranial disease area and preventing the edge part of the normal tissue area from being over-enhanced, thereby improving the effect of using the anisotropic diffusion filtering algorithm to perform image enhancement on the grayscale image of the cranial MRI image.

[0130] Based on the same inventive concept as the above method, an embodiment of the present invention further provides a cranial disease area recognition and detection system based on an MRI image, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above methods for recognizing and detecting a cranial disease area based on an MRI image are implemented.

[0131] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for identifying and detecting brain disease regions based on MRI images, characterized in that, The method for identifying and detecting brain disease regions based on MRI images includes: Obtain the brain MRI image of a patient, perform grayscale processing on the brain MRI image to obtain the grayscale image of the brain MRI image; Perform downsampling on the grayscale image to obtain a preset number of sub-images of different scales. For any pixel point in the grayscale image, obtain the target pixel point of the any pixel point according to each sub-image, and obtain the multi-scale gradient coefficient of the any pixel point according to the gradient value of each target pixel point and the scale of each sub-image; Taking the any pixel point as the center, construct at least two windows of different preset sizes, and obtain the multi-scale local abnormality degree of the any pixel point according to the distribution of the grayscale values and gradient directions of the pixel points in each window; Optimize the gradient value of the any pixel point according to the multi-scale gradient coefficient and multi-scale local abnormality degree of the any pixel point to obtain the adaptive gradient value of the any pixel point. Obtain the adaptive gradient values of all pixel points in the grayscale image. According to the adaptive gradient value of each pixel point in the grayscale image, use the anisotropic diffusion filtering algorithm to perform image enhancement on the grayscale image to obtain a brain enhanced image, and identify the brain disease region of the patient according to the brain enhanced image.

2. The method for identifying and detecting brain disease regions based on MRI images according to claim 1, wherein The obtaining the target pixel point of the any pixel point according to each sub-image includes: For any sub-image, perform upsampling on the any sub-image to obtain a target sub-image, and the scale of the target sub-image is the same as the scale of the grayscale image; Taking the lower left corner of the grayscale image as the origin, construct the two-dimensional rectangular coordinate system corresponding to the grayscale image. According to the two-dimensional rectangular coordinate system, obtain the coordinates of the any pixel point, obtain the two-dimensional rectangular coordinate system of the target sub-image, and obtain the pixel point with the same coordinates as the any pixel point in the target sub-image, denoted as the target pixel point.

3. The method for identifying and detecting a brain disease region based on an MRI image according to claim 2, wherein, The obtaining the multi-scale gradient coefficient of the any pixel point according to the gradient value of each target pixel point and the scale of each sub-image includes: Calculate the reciprocal of the sum of the scale of each sub-image and a preset constant respectively to obtain the eigenvalue of the corresponding sub-image. Obtain the eigenvalue of the grayscale image according to the reciprocal of the sum of the scale of the grayscale image and the preset constant. Calculate the cumulative eigenvalue of all sub-images and the grayscale image, and calculate the proportion of the eigenvalue of any sub-image in the cumulative eigenvalue to obtain the feature weight of the any sub-image; Calculate the proportion of the eigenvalue of the grayscale image in the cumulative eigenvalue to obtain the feature weight of the grayscale image. According to the feature weight of the sub-image corresponding to the target sub-image where each target pixel point is located and the feature weight of the grayscale image corresponding to the any pixel point, perform weighted summation on the gradient value of each target pixel point of the any pixel point and the gradient value of the any pixel point to obtain the multi-scale gradient coefficient of the any pixel point.

4. The method for identifying and detecting brain disease regions based on MRI images according to claim 1, characterized in that Obtaining the multi-scale local anomaly degree of any one of the pixel points according to the distribution of the gray values and gradient directions of the pixel points in each of the windows includes: Obtaining the multi-scale local contrast enhancement factor of any one of the pixel points according to the difference between the gray values of all the pixel points in the gray image and the gray values of all the pixel points in each of the windows; Obtaining the multi-scale local complexity of any one of the pixel points according to the gray values and gradient directions of the pixel points in each of the windows; Calculating the product between the multi-scale local contrast enhancement factor and the multi-scale local complexity of any one of the pixel points to obtain the multi-scale local anomaly degree of any one of the pixel points.

5. The method for identifying and detecting brain disease regions based on MRI images according to claim 4, wherein The obtaining the multi-scale local contrast enhancement factor of any one of the pixel points according to the difference between the gray values of all the pixel points in the gray image and the gray values of all the pixel points in each of the windows includes: Calculating the average value and standard deviation of the gray values of all the pixel points in the gray image to obtain the global gray mean value and global gray standard deviation, and for any one of the windows, calculating the average value and standard deviation of the gray values of all the pixel points in the any one of the windows to obtain the local gray mean value and local gray standard deviation; Calculating the absolute value of the difference between the local gray mean value and the global gray mean value, and denoting the ratio between the absolute value of the difference and the global gray standard deviation as the first contrast; Calculating the ratio between the local gray standard deviation and the global gray standard deviation, taking the ratio as the independent variable of an exponential function with the natural constant as the base to obtain the first function value, and obtaining the second contrast by subtracting the first function value from the constant 1; Calculating the product between the first contrast and the second contrast to obtain the local contrast of any one of the windows, and calculating the average value of the local contrasts of all the windows corresponding to any one of the pixel points to obtain the multi-scale local contrast enhancement factor of any one of the pixel points.

6. The method for identifying and detecting brain disease regions based on MRI images according to claim 4, wherein The obtaining the multi-scale local complexity of any one of the pixel points according to the gray values and gradient directions of the pixel points in each of the windows includes: For any one of the windows corresponding to any one of the pixel points, obtaining the gray information entropy of any one of the windows according to the gray values of all the pixel points in the any one of the windows, and calculating the average value of the gray information entropies of all the windows corresponding to any one of the pixel points to obtain the multi-scale gray complexity of any one of the pixel points; Denoting the pixel points other than any one of the pixel points in any one of the windows as neighborhood pixel points, obtaining the tissue consistency index within any one of the windows according to the gradient direction similarity between each of the neighborhood pixel points and any one of the pixel points, and calculating the average value of the tissue consistency indexes within all the windows corresponding to any one of the pixel points to obtain the multi-scale gradient direction complexity; Calculating the product between the multi-scale gray complexity and the multi-scale gradient direction complexity to obtain the multi-scale local complexity of any one of the pixel points.

7. The method for identifying and detecting a craniocerebral disease region based on an MRI image according to claim 6, wherein The obtaining the tissue consistency index within any one of the windows according to the gradient direction similarity between each of the neighborhood pixel points and any one of the pixel points includes: For any neighborhood pixel point, calculate the square of the Euclidean distance between the any pixel point and the any neighborhood pixel point, and the square of the difference in gray value between the any pixel point and the any neighborhood pixel point, add the square of the Euclidean distance and the square of the difference in gray value, and denote the reciprocal of the arithmetic square root of the added result as the weight of the gradient direction of the any neighborhood pixel point; After weighted summing the gradient directions of all neighborhood pixel points and calculating the mean value, obtain the weighted neighborhood gradient direction mean value of the any pixel point, take the absolute value of the difference between the gradient direction of the any pixel point and the weighted neighborhood gradient direction mean value as the independent variable of the cosine function to obtain the second function value, and subtract the second function value from the constant 1 to obtain the tissue consistency index within the any window.

8. The method for identifying and detecting brain disease regions based on MRI images according to claim 1, wherein The optimizing the gradient value of the any pixel point according to the multi-scale gradient coefficient and multi-scale local abnormality degree of the any pixel point to obtain the adaptive gradient value of the any pixel point includes: Calculate the product between the multi-scale gradient coefficient and the multi-scale local abnormality degree of the any pixel point, linearly normalize the result of the product to obtain the importance degree of the any pixel point, and calculate the sum between the constant 1 and the importance degree to obtain the adaptive gradient adjustment factor of the any pixel point; Calculate the product between the gradient value of the any pixel point and the adaptive gradient adjustment factor to obtain the adaptive gradient value of the any pixel point.

9. A brain disease region recognition and detection system based on MRI images, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for identifying and detecting brain disease regions based on MRI images according to any one of claims 1-8.

Citation Information

Cited By

  • Liver cancer tumor visual detection method based on nuclear magnetic resonance image analysis

    CN121033087A

  • Brain small blood vessel image recognition and analysis method for cognitive function impairment analysis

    CN121170859A

  • Method and system for detecting edge grinding quality of mobile phone glass cover plate

    CN121458653A

  • Building construction quality detection method and system

    CN121504821A

  • Impression roller pressure uniformity analysis method based on indentation image features

    CN121544617A