A method for assisted recognition of medical imaging features of spondyloarthritis
By performing local grayscale histogram equalization and grayscale stretching on MRI images of spondyloarthritis, the problem of increasing overall grayscale value of the image in the prior art is solved, and the contrast of the edema area and the readability of the image are improved.
Patent Information
- Application Number
- CN202411803158.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-12-10
AI Technical Summary
The existing direct histogram equalization of MRI images of the entire spondylitis will lead to an increase in the overall grayscale value of the image, increasing the difficulty of image reading.
By obtaining the T1-weighted image and the T2-weighted image of the patient's spinal MRI image, the target area is filtered according to the grayscale value and grayscale changes of each pixel point, and each target area is obtained through edge detection and information weight calculation. The mapping adjustment coefficient and correction enhancement coefficient of the two are carried out, and the local grayscale histogram equalization and grayscale stretching are carried out to generate the final enhanced image.
The contrast of the edema area of spondyloarthritis is improved, the difference between T1-weighted images and T2-weighted images is retained, and the difficulty of reading MRI images by doctors when identifying spondyloarthritis is reduced.
Smart Images

Figure CN119295362B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for assisting in identifying medical image features of spinal arthritis. Background Art
[0002] Spinal arthritis is mainly diagnosed through medical imaging such as MRI (Magnetic Resonance Imaging), CT (Computed Tomography) and X-ray. MRI is widely used in the early diagnosis and treatment of spinal arthritis. The obvious feature of spinal arthritis is the accumulation of fluid caused by increased interstitial fluid, also known as bone marrow edema. In the clinical application of MRI, T1-weighted images and T2-weighted images are the two main image recognition and comparison methods. Different tissue structures in the image are identified by the different signal characteristics shown in T1-weighted images and T2-weighted images respectively. T1-weighted images Soft tissues such as fat, periosteum, and fat pads have high signals, and edema has low signals, which is reflected in the T1-weighted image as high grayscale values of pixels corresponding to soft tissues such as fat, periosteum, and fat pads, and low grayscale values of edema areas. In the T2-weighted image, areas with high water content such as fluid accumulation and edema have high signals, while sclerotic tissue and cavities or degenerated tissues after bone destruction have low signals, which is reflected in the T2-weighted image as high grayscale values of pixels corresponding to areas with high water content such as fluid accumulation and edema, and low grayscale values of sclerotic tissue and cavities or degenerated tissues after bone destruction.
[0003] There are a large number of pixels with grayscale values of 0 in MRI images. Directly performing histogram equalization on the entire image will cause the overall grayscale value of the image to increase, and the contrast of the edema area used to observe inflammation may be reduced, resulting in the inability to retain the details of the edema area used to observe inflammation, which increases the difficulty of reading MRI images. Summary of the invention
[0004] The present invention provides a method for auxiliary recognition of medical image features of spinal arthritis, so as to solve the problem that directly performing histogram equalization on the entire spinal arthritis MRI image will lead to an increase in the overall grayscale value of the image, thereby increasing the difficulty of image reading.
[0005] The present invention provides a method for assisting in the identification of medical imaging features of spinal arthritis using the following technical solutions:
[0006] An embodiment of the present invention provides a method for medical image feature-assisted recognition of spondyloarthritis, the method comprising the following steps:
[0007] Obtaining a T1-weighted image and a T2-weighted image of the patient's spinal MRI image, and recording the T2-weighted image as the original image;
[0008] According to the gray value of each pixel in the original image and the gray change performance of each pixel in multiple gray stretching, the target area in the original image is obtained;
[0009] The area corresponding to each target area in the T1-weighted image is recorded as the control area of each target area; the information weight of each target area is obtained according to the gray value distribution of each target area; the edges of all target areas and all control areas are obtained by edge detection algorithm, and the difference edges and difference parts of all target areas in the original image are obtained according to the shape difference of the edges of all target areas and control areas; the mapping adjustment coefficient of each target area is obtained according to the information weight of each target area and the gray value difference of all pixels in the difference part and the corresponding pixels in the control area; the gray histogram of each target area is equalized according to the mapping adjustment coefficient to obtain a local enhanced image;
[0010] According to the gradient change of each difference edge in each target area in the original image and the local enhanced image, the correction enhancement coefficient of each target area is obtained; the local enhanced image is grayscale stretched according to the correction enhancement coefficient of each target area to obtain the final enhanced image.
[0011] Furthermore, the obtaining of the target area in the original image includes:
[0012] Preset the stretching coefficient and step size, stretch the original image several times, obtain the stretching times corresponding to the first time each pixel in the original image reaches the saturation state, and record it as the saturation times of each pixel;
[0013] The probability of edema area at the i-th pixel The calculation method is:
[0014]
[0015] Where: Represents the gray value of the i-th pixel in the original image, represents the number of saturation times of the i-th pixel, Represents the variance of the grayscale value of the i-th pixel in all stretched result images, represents the linear normalization function;
[0016] A target threshold is preset, and all pixels in the original image whose probability of edema area is greater than the target threshold are recorded as target pixels; several connected domains formed by all target pixels are recorded as high signal areas, and the area surrounded by the minimum circumscribed circle of each high signal area is recorded as the target area.
[0017] Furthermore, obtaining the information weight of each target area includes:
[0018] The information weight of the kth target area in the original image The calculation method is:
[0019]
[0020] Where: represents the number of target pixels in the kth target area, represents the mean of the edema area probabilities of all pixels in the kth target area, represents the maximum grayscale value of all pixels in the kth target area, represents the minimum grayscale value of all pixels in the kth target area, It means to avoid hyperparameters with denominator equal to 0. It represents the ratio of the number of pixels with gray value t in the kth target area to the total number of pixels in the kth target area. represents the linear normalization function.
[0021] Furthermore, the obtaining of the difference edges and difference parts of all target areas in the original image includes:
[0022] For all target areas and control areas, edge detection algorithms are used to obtain edge pixels of all target areas and all control areas, and the edge formed by the edge pixels of the target area is recorded as the target edge, and the edge formed by the edge pixels of the control area is recorded as the control edge; for all target edges and all control edges, the leftmost endpoint of the two endpoints of the edge is taken as the starting point to obtain the eight-neighborhood chain code of each edge to form a chain code sequence of each edge;
[0023] The contrast difference of the rth target edge in the kth target region of the original image The calculation method is:
[0024]
[0025] Where: represents the number of pixels on the edge of the rth target in the kth target area of the original image, The absolute value of the difference between the chain code of the f-th pixel point on the r-th target edge in the k-th target region of the original image and the f-th pixel point on the corresponding control edge, represents the displacement deviation of the f-th pixel point on the r-th target edge in the k-th target area of the original image, represents the linear normalization function;
[0026] A difference threshold is preset, and all target edges whose contrast differences are less than or equal to the difference threshold in the kth target region of the original image are recorded as non-difference target edges, and other target edges are recorded as difference edges. The area completely surrounded by non-difference edges in the kth target region of the original image is recorded as the non-difference part, and all areas except the non-difference part are recorded as the difference part.
[0027] Furthermore, the specific method for obtaining the displacement deviation is:
[0028] The distance between any pixel point of the target edge and the nearest pixel point among all corresponding pixels of all comparison edges in the original image is recorded as the displacement deviation of the pixel point of the target edge.
[0029] Furthermore, the specific method for obtaining the corresponding comparison edge is:
[0030] The pixel point that is closest to any pixel point on the target edge and all corresponding pixels on the reference edges in the original image is recorded as the reference point of the pixel point on the target edge;
[0031] For any target edge, several control edges containing control points of the pixel points on the target edge are obtained and recorded as reference control edges of the target edge. The reference control edge containing the largest number of control points of the pixel points on the target edge is used as the control edge corresponding to the target edge.
[0032] Further, obtaining the mapping adjustment coefficient of each target area includes:
[0033] Obtain the information weight of the control area of each target area in the T1-weighted image; the mapping adjustment coefficient of the kth target area in the original image The calculation method is:
[0034]
[0035] Where: represents the information weight of the kth target area, represents the information weight of the control area of the kth target area, Represents the number of pixels in the difference part of the k-th target area, Represents the gray value of the jth pixel in the difference part of the kth target area, Represents the gray value of the corresponding pixel of the jth pixel in the control area of the difference part of the kth target area, represents the Sigmoid function, Represents preset hyperparameters.
[0036] Furthermore, the obtaining of the local enhanced image includes:
[0037] Grayscale histogram equalization is performed on each target area of the original image, and the obtained image is recorded as the local enhanced image; for the kth target area, the grayscale range of the kth target area is mapped to The local enhanced image is obtained in the range of represents the minimum grayscale value of all pixels in the kth target area, As the lower limit of the mapping range; represents the maximum grayscale value of all pixels in the kth target area, represents the mapping adjustment coefficient of the kth target area, Serves as the upper limit of the mapping range.
[0038] Further, obtaining the correction enhancement coefficient of each target area includes:
[0039] Obtain the contrast difference of each difference edge in the local enhanced image. When the kth target area of the local enhanced image has the vth difference edge satisfying When , calculate the gradient correction coefficient of the vth difference edge in the kth target area of the local enhanced image :
[0040]
[0041] Where: represents the contrast difference of the vth difference edge in the kth target region of the original image, represents the contrast difference of the vth difference edge in the kth target region of the local enhanced image, represents the number of pixels of the vth difference edge in the kth target area of the original image, Represents the grayscale gradient amplitude of the cth pixel at the vth target edge in the kth target area of the original image, Represents the grayscale gradient amplitude of the cth pixel at the vth target edge in the kth target area of the local enhanced image;
[0042] The average value of the gradient correction coefficients of all difference edges in the kth target area of the local enhanced image is normalized by a linear normalization function to obtain a normalized result, and the sum of the normalized result and 1 is recorded as the correction enhancement coefficient of the kth target area.
[0043] Furthermore, obtaining the final enhanced image includes:
[0044] Grayscale stretching is performed on all target areas of the local enhanced image with the corresponding modified enhancement coefficient, and the result after grayscale stretching is performed on all target areas of the local enhanced image with the corresponding modified enhancement coefficient is recorded as the final enhanced image.
[0045] The beneficial effects of the technical solution of the present invention are as follows: the present invention obtains the target area in the original image according to the grayscale value of each pixel in the original image and the grayscale change performance of each pixel in multiple grayscale stretching, and preliminarily screens the pixels that may reflect the edema characteristics of spinal arthritis through the change of grayscale value; obtains the information weight of each target area according to the grayscale value distribution of each target area, and reflects the size of the grayscale range that each target area needs to be mapped to when performing local enhancement through the information weight; obtains the difference edges and difference parts of all target areas in the original image according to the shape difference of the edges between all target areas and the control area, and reflects the different characteristics exhibited by the T1-weighted image and the T2-weighted image with the difference part; obtains the mapping adjustment coefficient of each target area according to the information weight of each target area and the grayscale value difference between all pixels in the difference part and the corresponding pixels in the control area, and adjusts the mapping adjustment coefficient according to the edema characteristics of spinal arthritis in the T1-weighted image and the T2-weighted image. Different signal manifestations are presented, and the target area is compared with the control area to obtain the mapping adjustment coefficient, so as to more accurately determine the area reflecting the edema characteristics of spinal arthritis that needs to be enhanced and the degree of enhancement; according to the change in the gradient of each difference edge in each target area in the original image and the local enhanced image, the corrected enhancement coefficient of each target area is obtained, and the local enhanced image is feedback-adjusted by analyzing the gradient change of the difference edge before and after histogram equalization, and then the local enhanced image is grayscale stretched according to the corrected enhancement coefficient of each target area to obtain the final enhanced image, so that the final enhanced image can enhance the contrast and ensure the difference between T1-weighted images and T2-weighted images; by combining the characteristic differences between T1-weighted images and T2-weighted images, the T2-weighted image is locally enhanced, which improves the contrast of the area that can reflect spinal arthritis, ensures the difference between T1-weighted images and T2-weighted images, and reduces the difficulty of doctors reading MRI images when identifying spinal arthritis. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 The present invention is a flowchart of the steps of a method for medical image feature-assisted identification of spinal arthritis. DETAILED DESCRIPTION
[0048] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following is a detailed description of the specific implementation method, structure, characteristics and effects of a spinal arthritis medical image feature auxiliary identification method proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0049] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0050] The specific scheme of the medical image feature-assisted identification method for spinal arthritis provided by the present invention is described in detail below with reference to the accompanying drawings.
[0051] See also Figure 1 , which shows a flowchart of a method for medical image feature-assisted identification of spinal arthritis provided by an embodiment of the present invention, the method comprising the following steps:
[0052] Step S001: Acquire a T1-weighted image and a T2-weighted image of a patient's spine MRI image.
[0053] The purpose of this embodiment is to use the T1-weighted image as a reference to locally enhance the T2-weighted image so that the T2-weighted image can better represent the edema area with high water content. Therefore, the T1-weighted image and T2-weighted image of the spinal MRI image are first obtained.
[0054] Specifically, the patient is made to lie flat on the MRI table, ensuring that the spine is aligned with the scanning area, and the patient's spine is scanned using an MRI scanning device. Different scanning parameters are set to obtain T1-weighted images and T2-weighted images of the spine MRI. In this embodiment, the scanning parameters for obtaining the T1-weighted image are set to an echo time of 10 milliseconds, a repetition time of 600 milliseconds, a sequence type of fast spin echo, and a slice thickness of 5 millimeters. The scanning parameters for obtaining the T2-weighted image are set to an echo time of 80 milliseconds, a repetition time of 2000 milliseconds, a sequence type of fast spin echo, and a slice thickness of 5 millimeters. Other embodiments may set other scanning parameters, which are not specifically limited in this embodiment.
[0055] Step S002: Acquire the target area in the original image.
[0056] It should be noted that due to the complex content and extreme distribution of grayscale values in T1-weighted images and T2-weighted images, directly performing histogram equalization on the entire image cannot achieve the purpose of enhancing image readability. On the contrary, it may cause loss of image details. Therefore, it is necessary to determine several target areas of bone marrow edema in T2-weighted images that can reflect the characteristics of spinal arthritis, and perform local enhancement using the target areas as the targets of enhancement.
[0057] It should be further explained that, according to the characteristics of T2-weighted MRI images, areas with high water content appear as high signals in T2-weighted images. Therefore, by performing multiple grayscale stretches on the pixels in the T2-weighted images and analyzing the probability that each pixel is an edema area based on the stability of the grayscale changes of each pixel during the multiple grayscale stretches,
[0058] Specifically, the T2-weighted image is recorded as the original image, the initial stretching coefficient is preset to 1.2, the step size is 0.1, and the saturation ratio is 30%. All pixels of the original image are grayscale stretched by the stretching coefficient, that is, the grayscale values of all pixels are multiplied by 1.2 to obtain the first stretching result image of the original image. The sum of the stretching coefficient and the step size is used as the new stretching coefficient, and all pixels of the original image are grayscale stretched by the new stretching coefficient to obtain the second stretching result image of the original image. Similarly, the grayscale stretching is repeated until the number of pixels with a grayscale value of 255 in the most recent stretching result image of the original image accounts for more than the saturation ratio of all pixels, and then the grayscale stretching is stopped.
[0059] Furthermore, when the grayscale value of a pixel reaches 255, it is recorded that the pixel reaches the saturation state. The number of stretching times corresponding to the first time each pixel in the original image reaches the saturation state is recorded as the saturation number of each pixel. In particular, when the pixel has reached a grayscale value of 255 before stretching, the saturation number of the pixel is recorded as 1. When the grayscale value of the pixel is still less than 255 when the grayscale stretching is stopped, the saturation number of the pixel is recorded as the stretching number when the grayscale stretching is stopped. The probability of edema area of the i-th pixel in the original image is The calculation method is:
[0060]
[0061] Where: Represents the gray value of the i-th pixel in the original image, represents the number of saturation times of the i-th pixel, Represents the variance of the grayscale value of the i-th pixel in all stretched result images, Represents a linear normalization function, the normalized object is all pixels .
[0062] It should be noted that The larger the value of is, the larger the gray value of the i-th pixel in the original image is, the more it appears as a high signal, and the greater the probability of the i-th pixel being an edema area; The smaller the value of reflects that the number of stretches that the i-th pixel has gone through to reach a grayscale value of 255 in the multiple stretching results is less, and the smaller the change in the grayscale value is, reflecting that the grayscale value of the i-th pixel is more stable in multiple grayscale stretching, and the probability of the edema area of the i-th pixel is greater. Similarly, the probability of the edema area of all pixels in the original image is obtained.
[0063] It should be further explained that the greater the probability of the edema area of each pixel, the more likely it is that the pixel is a pixel where bone marrow edema occurs. In order to clearly show the edema area and facilitate doctors to observe the location and morphology of edema during diagnosis and determine the nature of bone marrow edema, it is necessary to increase the contrast between the edema area and the pixels around the edema area. Therefore, the pixels of the edema area are screened out according to the edema area probability of each pixel, and the connected domain formed by the pixels of the edema area is extended to obtain a target area composed of several edema areas and pixels around the edema areas.
[0064] Specifically, the preset target threshold is 0.7. This embodiment is described by taking this as an example. All pixel points in the original image whose probability of edema area is greater than the target threshold are recorded as target pixel points, and several connected domains formed by all target pixel points are recorded as high signal areas. The area surrounded by the minimum circumscribed circle of each high signal area is recorded as the target area. In particular, when the target areas overlap, the two overlapping target areas are merged into the same target area, and the two high signal areas corresponding to the two overlapping target areas are also merged into the same high signal area.
[0065] Step S003, obtaining the information weight of each target area; obtaining the difference edges and difference parts of all target areas in the original image; obtaining the mapping adjustment coefficient of each target area; and obtaining a local enhanced image.
[0066] It should be noted that when locally enhancing the target area in the T2-weighted image, since the grayscale value distribution of pixels in each target area is different, in order to make the target area clearly show the image texture characteristics in the target area, the information content of each target area is analyzed; the greater the information content of the target area, the more complex the texture of the target area, and the more details need to be expressed. Therefore, when locally enhancing the target area, the grayscale value of the target area needs to be mapped to a larger range to obtain a greater contrast to reflect the details in the target area; the information weight of each area is calculated through the grayscale entropy of each target area and the grayscale value extreme difference of the pixels in each target area. The larger the information weight, the greater the information content of the target area, and the grayscale value of the target area needs to be mapped to a larger range when performing local enhancement.
[0067] Specifically, the information weight of the kth target area in the original image is The calculation method is:
[0068]
[0069] Where: represents the number of target pixels in the kth target area, represents the mean of the edema area probabilities of all pixels in the kth target area, represents the maximum grayscale value of all pixels in the kth target area, represents the minimum grayscale value of all pixels in the kth target area, represents a hyperparameter that avoids the denominator being 0. This embodiment is described by taking x=1 as an example. Other embodiments may be set to other values, which are not specifically limited in this embodiment. It represents the ratio of the number of pixels with gray value t in the kth target area to the total number of pixels in the kth target area. Represents a linear normalization function, and the normalized object is each target area in the original image .
[0070] It should be noted that The larger the value of is, the more pixels reflecting bone marrow edema characteristics are in the k-th target area, and the k-th target area is more likely to be a target area that needs local enhancement, and the greater the information weight of the k-th target area is; Indicates the range of the grayscale values of all pixels in the k-th target area. The smaller the value, the smaller the difference in the grayscale values of the pixels in the k-th target area. When the k-th target area is locally enhanced, the more the contrast of the k-th target area needs to be increased, and the greater the information weight of the k-th target area. The grayscale information entropy of the k-th target area is represented. The larger the grayscale information entropy is, the more complex the texture in the k-th target area is, and the larger the information weight of the k-th target area is. The grayscale information entropy is a well-known technology and is not described in detail in this embodiment. Similarly, the information weight of each target area is obtained.
[0071] It should be further explained that, due to the different components of tissue structures, the pixels of high signal and low signal shown in T2-weighted images and T1-weighted images are different. For example, there are two different tissue structures in an area, and the lipid content of the two different tissue structures is similar, but the water content is different. Therefore, the two tissue structures will show an obvious edge in the T2-weighted image, but not in the T1-weighted image, resulting in the phenomenon that the characteristics of T2-weighted images and T1-weighted images are different. When T2-weighted images and T1-weighted images are actually used in the diagnosis of spinal arthritis, it is usually necessary to compare the difference between T2-weighted images and T1-weighted images at the same position to reflect the shape, position, size and other states of bone marrow edema, so that doctors can make subsequent diagnoses of patients based on the state of bone marrow edema in combination with other clinical symptoms. Therefore, it is necessary to obtain the difference between the characteristics of T2-weighted images and T1-weighted images in order to identify and locate bone marrow edema.
[0072] Specifically, since the T2-weighted image and the T1-weighted image are images obtained for the same part through different scanning parameters, the pixels at the same position of the T2-weighted image and the T1-weighted image are one-to-one corresponding, and the area corresponding to each target area in the original image in the T1-weighted image is recorded as the control area; it should be noted that, for any target area and the control area corresponding to the target area, the edges of the high-signal and low-signal parts inside the target area and the edges inside the control area are not necessarily completely consistent, and the differences in the characteristics of the target area relative to the control area are analyzed by performing edge detection on the target area and the control area respectively.
[0073] Specifically, the Canny edge detection algorithm is used for all target areas and control areas to obtain edge pixels of all target areas and all control areas, and the edge formed by the edge pixels of the target area is recorded as the target edge, and the edge formed by the edge pixels of the control area is recorded as the control edge; for all target edges and all control edges, the leftmost endpoint of the two edge endpoints is used as the starting point to obtain the eight-neighborhood chain code of each edge to form a chain code sequence of each edge, wherein the eight-neighborhood chain code is a well-known technology and is not described in detail in this embodiment; the distance between any pixel point of the target edge and the nearest pixel point of all corresponding pixels of all control edges in the original image is recorded as the displacement deviation of the pixel point of the target edge, and the nearest pixel point is used as the control point of the pixel point of the target edge; for any target edge, several control edges containing the control points of the pixel point on the target edge are obtained, which are recorded as the reference control edges of the target edge, and the reference control edge containing the largest number of control points of the pixel point on the target edge is used as the control edge corresponding to the target edge; the shape difference between the target edge and the corresponding control edge is compared; the control difference of the rth target edge in the kth target area of the original image The calculation method is:
[0074]
[0075] Where: represents the number of pixels on the edge of the rth target in the kth target area of the original image, The absolute value of the difference between the chain code of the f-th pixel point on the r-th target edge in the k-th target region of the original image and the f-th pixel point on the corresponding control edge, represents the displacement deviation of the f-th pixel point on the r-th target edge in the k-th target area of the original image, Represents a linear normalization function, and the normalized object is all edges of all target regions. .
[0076] Furthermore, a difference threshold of 0.5 is preset, and this embodiment is described by taking this as an example, and all target edges whose comparison differences are less than or equal to the difference threshold in the kth target area of the original image are recorded as non-difference target edges, and other target edges are recorded as difference edges, and the area completely surrounded by non-difference edges in the kth target area of the original image is recorded as non-difference parts, and all areas except the non-difference parts are recorded as difference parts. Similarly, the difference edges and difference parts of all target areas in the original image are obtained.
[0077] It should be further explained that the edema area shows a high signal in the T2-weighted image and a low signal in the T1-weighted image, indicating that there is an obvious gray value difference between the pixels of the edema area in the T2-weighted image and the T1-weighted image, and the gray value of the pixels of the edema area in the T2-weighted image is greater than that in the T1-weighted image; the difference part of all target areas in the original image reflects the part with different characteristics in the T2-weighted image and the T1-weighted image. Therefore, through the gray value difference between all pixels of the difference part of the target area and the corresponding pixels of the control area, it is possible to avoid structures such as the spinal cord that contain both lipids and water, and have similar signal expressions in the T2-weighted image and the T1-weighted image, and obtain the mapping adjustment coefficient for each target area.
[0078] Specifically, the information weight of the control area of each target area in the T1-weighted image is obtained (according to the calculation method of the information weight of the target area in the original image, the information weight of the corresponding control area in the T1-weighted image is calculated); the mapping adjustment coefficient of the kth target area in the original image The calculation method is:
[0079]
[0080] Where: represents the information weight of the kth target area, represents the information weight of the control area of the kth target area, Represents the number of pixels in the difference part of the k-th target area, Represents the gray value of the jth pixel in the difference part of the kth target area, Represents the gray value of the corresponding pixel of the jth pixel in the control area of the difference part of the kth target area, represents the Sigmoid function, represents the preset hyperparameter. In this embodiment, y=2. The value is limited to The values in other embodiments are within the range and are not specifically limited in this embodiment.
[0081] It should be noted that The larger the value, the richer the texture of the k-th target area and the control area corresponding to the k-th target area in the original image. When the k-th target area is locally enhanced, it should be mapped to a larger grayscale range. The cumulative sum of the grayscale value differences between all pixels of the difference part of the k-th target area and the corresponding pixels of the control area. The larger the value, the greater the grayscale value difference of the corresponding pixels. The k-th target area is more likely to be an area where bone marrow edema occurs. When the k-th target area is locally enhanced, the larger the grayscale range to be mapped to, the greater the mapping adjustment coefficient of the k-th target area. Similarly, the mapping adjustment coefficients of all target areas in the original image are obtained.
[0082] Furthermore, grayscale histogram equalization is performed on each target area of the original image, and the obtained image is recorded as a local enhanced image; taking the kth target area as an example, the grayscale range of the kth target area is mapped to The local enhanced image is obtained in the range of represents the minimum grayscale value of all pixels in the kth target area, As the lower limit of the mapping range; represents the maximum grayscale value of all pixels in the kth target area, represents the mapping adjustment coefficient of the kth target area, As the upper limit of the mapping range; in particular, when When the value of is greater than 255, it is set to 255. Grayscale histogram equalization is a well-known technology and will not be described in detail in this embodiment.
[0083] Step S004, obtaining a correction enhancement coefficient for each target area; performing grayscale stretching on the local enhanced image according to the correction enhancement coefficient for each target area to obtain a final enhanced image.
[0084] It should be noted that after grayscale histogram equalization of each target area, the original pixel grayscale distribution may be distorted due to the extreme distortion, resulting in the original difference edge in the original image being reduced after grayscale histogram equalization, and the feature difference between the T2-weighted image and the T1-weighted image cannot be retained. Therefore, it is necessary to analyze the changes in the difference edge before and after grayscale histogram equalization and then perform feedback adjustment on the local enhanced image, so as to enhance the contrast of the target area while retaining the part of the target area that is different from the T1-weighted image feature, so as to obtain an enhanced result with high readability that retains the feature.
[0085] Specifically, similar to the method of obtaining the contrast difference of the rth target edge in the kth target region of the original image, the contrast difference of each difference edge in the local enhanced image is obtained. Taking the kth target region of the local enhanced image as an example, when the kth target region of the local enhanced image has the vth difference edge satisfying When , calculate the gradient correction coefficient of the vth difference edge in the kth target area of the local enhanced image :
[0086]
[0087] Where: represents the contrast difference of the vth difference edge in the kth target region of the original image, represents the contrast difference of the vth difference edge in the kth target region of the local enhanced image, represents the number of pixels of the vth difference edge in the kth target area of the original image, Represents the grayscale gradient amplitude of the cth pixel at the vth target edge in the kth target area of the original image, Represents the grayscale gradient amplitude of the cth pixel at the vth target edge in the kth target region of the local enhanced image.
[0088] It should be noted that It represents the ratio of the contrast difference of the vth difference edge in the kth target area before and after grayscale histogram equalization. The larger the value, the greater the contrast difference of the vth difference edge in the kth target area before and after grayscale histogram equalization. The more it is necessary to correct the vth difference edge in the kth target area, the larger the gradient correction coefficient. It represents the cumulative difference between the grayscale gradient amplitude of all pixels of the vth difference edge in the kth target area before and after grayscale histogram equalization. The larger the value, the greater the gradient change of the vth difference edge in the kth target area, and the greater the gradient correction coefficient of the vth difference edge in the kth target area. When , the gradient correction coefficient of the vth difference edge in the kth target area of the local enhanced image is recorded as 0.
[0089] Furthermore, the average value of the gradient correction coefficients of all difference edges in the kth target area of the local enhanced image is normalized by a linear normalization function, and the sum of the normalized result and 1 is recorded as the correction enhancement coefficient of the kth target area. The value range of the correction enhancement coefficient is , grayscale stretching is performed on the kth target area of the local enhanced image with the corrected enhancement coefficient. Similarly, the corrected enhancement coefficients of all target areas are obtained, and grayscale stretching is performed on all target areas of the local enhanced image with the corresponding corrected enhancement coefficients. The result after grayscale stretching of all target areas of the local enhanced image with the corresponding corrected enhancement coefficients is recorded as the final enhanced image. The final enhanced image is used for auxiliary analysis by doctors to achieve auxiliary recognition of medical imaging features of spinal arthritis.
[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for assisted recognition of medical image features of spinal arthritis, characterized in that: The method comprises the following steps: Obtaining a T1-weighted image and a T2-weighted image of the patient's spinal MRI image, and recording the T2-weighted image as the original image; According to the gray value of each pixel in the original image and the gray change performance of each pixel in multiple gray stretching, the target area in the original image is obtained; The step of obtaining the target area in the original image includes: Preset the stretching coefficient and step size, stretch the original image several times, obtain the stretching times corresponding to the first time each pixel in the original image reaches the saturation state, and record the saturation times of each pixel; when the gray value of the pixel reaches 255, it is recorded as the pixel reaching the saturation state; The probability of edema area at the i-th pixel The calculation method is: Where: Represents the gray value of the i-th pixel in the original image, represents the number of saturation times of the i-th pixel, Represents the variance of the grayscale value of the i-th pixel in all stretched result images, represents the linear normalization function; A target threshold is preset, and all pixels in the original image whose probability of edema area is greater than the target threshold are recorded as target pixels; several connected domains formed by all target pixels are recorded as high signal areas, and the area surrounded by the minimum circumscribed circle of each high signal area is recorded as the target area; The area corresponding to each target area in the T1-weighted image is recorded as the control area of each target area; the information weight of each target area is obtained according to the gray value distribution of each target area; the edges of all target areas and all control areas are obtained by edge detection algorithm, and the difference edges and difference parts of all target areas in the original image are obtained according to the shape difference of the edges of all target areas and control areas; the mapping adjustment coefficient of each target area is obtained according to the information weight of each target area and the gray value difference of all pixels in the difference part and the corresponding pixels in the control area; the gray histogram of each target area is equalized according to the mapping adjustment coefficient to obtain a local enhanced image; According to the gradient change of each difference edge in each target area in the original image and the local enhanced image, the correction enhancement coefficient of each target area is obtained; the local enhanced image is grayscale stretched according to the correction enhancement coefficient of each target area to obtain the final enhanced image.
2. According to claim 1, a method for medical image feature-assisted recognition of spondyloarthritis is characterized in that: The step of obtaining the information weight of each target area includes: The information weight of the kth target area in the original image The calculation method is: Where: represents the number of target pixels in the kth target area, represents the mean of the edema area probabilities of all pixels in the kth target area, represents the maximum grayscale value of all pixels in the kth target area, represents the minimum grayscale value of all pixels in the kth target area, It means to avoid hyperparameters with denominator equal to 0. It represents the ratio of the number of pixels with gray value t in the kth target area to the total number of pixels in the kth target area. represents the linear normalization function.
3. According to claim 1, a method for medical image feature-assisted recognition of spinal arthritis is characterized in that: The step of obtaining the difference edges and difference parts of all target areas in the original image includes: For all target areas and control areas, edge detection algorithms are used to obtain edge pixels of all target areas and all control areas, and the edge formed by the edge pixels of the target area is recorded as the target edge, and the edge formed by the edge pixels of the control area is recorded as the control edge; for all target edges and all control edges, the leftmost endpoint of the two endpoints of the edge is taken as the starting point to obtain the eight-neighborhood chain code of each edge to form a chain code sequence of each edge; The contrast difference of the rth target edge in the kth target region of the original image The calculation method is: Where: represents the number of pixels on the edge of the rth target in the kth target area of the original image, The absolute value of the difference between the chain code of the f-th pixel point on the r-th target edge in the k-th target region of the original image and the f-th pixel point on the corresponding control edge, represents the displacement deviation of the f-th pixel point on the r-th target edge in the k-th target area of the original image, represents the linear normalization function; A difference threshold is preset, and all target edges whose contrast differences are less than or equal to the difference threshold in the kth target region of the original image are recorded as non-difference target edges, and other target edges are recorded as difference edges. The area completely surrounded by non-difference edges in the kth target region of the original image is recorded as the non-difference part, and all areas except the non-difference part are recorded as the difference part.
4. According to claim 3, a method for medical image feature-assisted recognition of spinal arthritis is characterized in that: The specific method for obtaining the displacement deviation is: The distance between any pixel point of the target edge and the nearest pixel point among all corresponding pixels of all comparison edges in the original image is recorded as the displacement deviation of the pixel point of the target edge.
5. According to claim 3, a method for medical image feature-assisted recognition of spinal arthritis is characterized in that: The specific method for obtaining the corresponding comparison edge is: The pixel point that is closest to any pixel point on the target edge and all corresponding pixels on the reference edges in the original image is recorded as the reference point of the pixel point on the target edge; For any target edge, several control edges containing control points of the pixel points on the target edge are obtained and recorded as reference control edges of the target edge. The reference control edge containing the largest number of control points of the pixel points on the target edge is used as the control edge corresponding to the target edge.
6. The method for medical image feature-assisted recognition of spinal arthritis according to claim 1, characterized in that: The obtaining of the mapping adjustment coefficient of each target area includes: Obtain the information weight of the control area of each target area in the T1-weighted image; the mapping adjustment coefficient of the kth target area in the original image The calculation method is: Where: represents the information weight of the kth target area, represents the information weight of the control area of the kth target area, Represents the number of pixels in the difference part of the k-th target area, Represents the gray value of the jth pixel in the difference part of the kth target area, Represents the gray value of the corresponding pixel of the jth pixel in the control area of the difference part of the kth target area, represents the Sigmoid function, Represents preset hyperparameters.
7. The method for medical image feature-assisted recognition of spinal arthritis according to claim 1, characterized in that: The step of acquiring the local enhanced image comprises: Grayscale histogram equalization is performed on each target area of the original image, and the obtained image is recorded as the local enhanced image; for the kth target area, the grayscale range of the kth target area is mapped to The local enhanced image is obtained in the range of represents the minimum grayscale value of all pixels in the kth target area, As the lower limit of the mapping range; represents the maximum grayscale value of all pixels in the kth target area, represents the mapping adjustment coefficient of the kth target area, Serves as the upper limit of the mapping range.
8. The method for medical image feature-assisted recognition of spinal arthritis according to claim 3, characterized in that: The step of obtaining the correction enhancement coefficient of each target area includes: Obtain the contrast difference of each difference edge in the local enhanced image. When the kth target area of the local enhanced image has the vth difference edge satisfying When , calculate the gradient correction coefficient of the vth difference edge in the kth target area of the local enhanced image : Where: represents the contrast difference of the vth difference edge in the kth target region of the original image, represents the contrast difference of the vth difference edge in the kth target region of the local enhanced image, represents the number of pixels of the vth difference edge in the kth target area of the original image, Represents the grayscale gradient amplitude of the cth pixel at the vth target edge in the kth target area of the original image, Represents the grayscale gradient amplitude of the cth pixel at the vth target edge in the kth target area of the local enhanced image; The average value of the gradient correction coefficients of all difference edges in the kth target area of the local enhanced image is normalized by a linear normalization function to obtain a normalized result, and the sum of the normalized result and 1 is recorded as the correction enhancement coefficient of the kth target area.
9. The method for medical image feature-assisted recognition of spinal arthritis according to claim 1, characterized in that: The obtaining of the final enhanced image comprises: Grayscale stretching is performed on all target areas of the local enhanced image with the corresponding modified enhancement coefficient, and the result after grayscale stretching is performed on all target areas of the local enhanced image with the corresponding modified enhancement coefficient is recorded as the final enhanced image.
Citation Information
Patent Citations
Spine endoscope image automatic enhancement method
CN116596810A
Blurred image optimization enhancement method based on artificial intelligence
CN117314801A