An image filtering enhancement method for cardiac magnetic resonance images
The K-means clustering algorithm extracts the connection domain of the cardiac magnetic resonance image and calculates the enhancement index. The areas of the same tissue and organ are merged, and the enhancement coefficients are obtained for region-based enhancement. This solves the problem of untargeted enhancement in the existing technology, improves the clarity of key parts of the image, and assists doctors in better diagnosis of diseases.
Patent Information
- Application Number
- CN202411836606.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-12-13
AI Technical Summary
In the prior art, cardiovascular magnetic resonance imaging lacks targetedness when image enhancement, and it is easy to enhance unnecessary organ tissues and other unrelated pixel points, resulting in unsatisfactory enhancement effect.
The K-means clustering algorithm is used to extract the communication domain of the cardiac magnetic resonance image, calculate the enhancement index and merge the adjacent communication domains belonging to the same tissue and organ, obtain the enhancement coefficient of the image area, and perform the image enhancement enhancement in the region.
It improves the clarity of key parts of the cardiac magnetic resonance image, making the key areas of the image clearer and more discernible, and assists doctors in better disease prevention and treatment.
Smart Images

Figure CN119904394B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of image data processing, and in particular relates to an image filtering and enhancement method for cardiac magnetic resonance images. Background Art
[0002] Cardiovascular magnetic resonance imaging (CMRI) is a non-invasive medical imaging technique used to assess the function and structure of the cardiovascular system. It leverages the fundamental principles of magnetic resonance imaging to address the unique challenges of imaging the cardiovascular system, optimizing existing MRI (Magnetic Resonance Imaging) technology and enhancing its clinical value. Cardiac magnetic resonance imaging (CMR) plays a significant role in the clinical diagnosis of cardiovascular disease.
[0003] However, under existing technical conditions, after medical images are acquired, a single enhancement coefficient is often used to perform a uniform linear enhancement transformation on the entire image area. This method lacks targeted enhancement processing for key organs and tissues, and is prone to enhancing interference information. It often enhances unnecessary organs and tissues and other irrelevant pixels, resulting in unsatisfactory results. Summary of the Invention
[0004] In order to solve the above problems, the present disclosure provides an image filtering and enhancement method for cardiac magnetic resonance images, the method comprising:
[0005] Performing filtering on the original cardiac magnetic resonance image to obtain a preprocessed image;
[0006] Extracting a connected domain of the preprocessed image according to a K-means clustering algorithm to obtain an enhancement index of the connected domain;
[0007] Merging two adjacent connected domains belonging to the same tissue organ according to the enhancement index of the connected domain to obtain an image region to be enhanced;
[0008] Obtaining an image enhancement coefficient for the image area to be enhanced;
[0009] Performing region-by-region image enhancement on the pre-processed image according to the image enhancement coefficient of the image region to be enhanced.
[0010] Optionally, obtaining the enhancement index of the connected domain includes:
[0011] Obtaining a first average grayscale value of pixels in the connected domain, an area of the connected domain, and a variance of the grayscale values of all pixels in the connected domain;
[0012] Obtaining a second average grayscale value of adjacent connected domains of the connected domain;
[0013] An enhancement index of the connected domain is obtained according to the first average grayscale value, the second average grayscale value, the region area, and the variance.
[0014] Optionally, obtaining the enhancement index of the connected domain according to the first average grayscale value, the second average grayscale value, the region area, and the variance includes the following formula:
[0015]
[0016] Among them, Z D is the enhancement index of the connected domain, is the first average grayscale, is the second average grayscale, a D is the area of the connected domain, S D is the variance of the grayscale values of all pixels in the connected domain, X is the number of the adjacent connected domain of D connected domain, and E is the total number of connected domains.
[0017] Optionally, merging two adjacent connected domains belonging to the same tissue organ according to the enhancement index of the connected domain to obtain the image region to be enhanced includes:
[0018] Obtaining a merging coefficient of the two adjacent connected domains that belong to the same tissue organ and need to be merged;
[0019] Normalizing the merging coefficient to obtain a merging probability;
[0020] According to the merging probability, the two adjacent connected domains belonging to the same tissue organ are merged to obtain the image region to be enhanced.
[0021] Optionally, the step of obtaining a merging coefficient of two adjacent connected domains that belong to the same tissue organ and need to be merged comprises the following formula:
[0022]
[0023] Among them, P 12 is the merging coefficient of two adjacent connected domains, is the absolute value of the grayscale difference between two adjacent connected domains, |Z1-Z2| is the absolute value of the enhancement index difference between two adjacent connected domains, a1 and a2 are the areas of two adjacent connected domains, d 12 is the distance between the two closest points in two adjacent connected domains.
[0024] Optionally, merging the two adjacent connected domains belonging to the same tissue organ according to the merging probability to obtain the image region to be enhanced includes:
[0025] When the merging probability is greater than a first threshold, determining that the two adjacent connected domains belong to the same tissue organ, and merging the two adjacent connected domains;
[0026] The merging process is repeatedly performed to obtain the image area to be enhanced.
[0027] Optionally, obtaining the image enhancement coefficient of the image area to be enhanced includes:
[0028] Obtaining an enhancement index of the image area to be enhanced;
[0029] An image enhancement coefficient of the image area to be enhanced is obtained according to the enhancement index of the image area to be enhanced.
[0030] Optionally, obtaining an enhancement index of the image area to be enhanced includes:
[0031] The average value of the enhancement indices of the two adjacent connected domains is used as the enhancement index of the image region to be enhanced.
[0032] Optionally, acquiring an image enhancement coefficient of the image area to be enhanced according to the enhancement index of the image area to be enhanced includes:
[0033] Obtaining an initial image enhancement coefficient for the image region to be enhanced according to an enhancement index of the image region to be enhanced;
[0034] A mapping interval adjustment is performed on the initial image enhancement coefficient to obtain the image enhancement coefficient of the image area to be enhanced.
[0035] Optionally, obtaining the initial image enhancement coefficient of the image area to be enhanced according to the enhancement index of the image area to be enhanced comprises the following formula:
[0036]
[0037] Among them, k H is the initial image enhancement coefficient, n is the upper boundary of the initial image enhancement coefficient mapping interval, Z H is the enhancement index of the image area to be enhanced, Z min is the minimum value of the enhancement index of the image area to be enhanced, Z max is the maximum value of the enhancement index of the image area to be enhanced.
[0038] Optionally, the performing mapping interval adjustment on the initial image enhancement coefficient to obtain the image enhancement coefficient of the image area to be enhanced includes:
[0039] Acquire a first area of the image region to be enhanced where the initial image enhancement coefficient is greater than 1;
[0040] Obtaining a ratio of the first area to the total area of the preprocessed image;
[0041] An upper boundary of the initial image enhancement coefficient mapping interval is adjusted so that the ratio is within a range between a second threshold and a third threshold, to obtain the image enhancement coefficient of the image area to be enhanced, wherein the second threshold is less than the third threshold.
[0042] In summary, the disclosed embodiment provides an image filtering and enhancement method for cardiac magnetic resonance images, the method comprising: filtering the original cardiac magnetic resonance image to obtain a preprocessed image; extracting the connected domain of the preprocessed image according to the K-means clustering algorithm to obtain an enhancement index of the connected domain; merging two adjacent connected domains belonging to the same tissue organ according to the enhancement index of the connected domain to obtain an image region to be enhanced; obtaining an image enhancement coefficient of the image region to be enhanced; and performing regional image enhancement on the preprocessed image according to the image enhancement coefficient of the image region to be enhanced. The disclosed embodiment can extract the connected domain of the image according to the result obtained by the K-means clustering algorithm, and calculate the enhancement coefficient of each region in combination with the actual needs of image enhancement and the characteristics of each region, and use different enhancement coefficients to enhance different regions of the image, so that the key parts of the image are clearer and more distinguishable, and better assist doctors in the prevention and treatment of diseases. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the implementation scheme of the present disclosure, the following will briefly introduce the drawings required for use in the implementation scheme. It should be understood that the drawings only show certain implementation schemes of the present disclosure and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on the drawings without paying any creative work.
[0044] Figure 1 The figure is a flowchart showing a method for image filtering and enhancement of cardiac magnetic resonance images according to an exemplary embodiment.
[0045] Figure 2 The figure is a schematic diagram showing a connected domain of a pre-processed image extracted according to a K-means clustering algorithm according to an exemplary embodiment.
[0046] Figure 3 The figure is a schematic diagram showing a cardiac magnetic resonance image after regional image enhancement according to an exemplary embodiment.
[0047] Figure 4The figure is a flowchart of an image filtering and enhancement method for cardiac magnetic resonance images according to a first exemplary embodiment.
[0048] Figure 5 is a flowchart of an image filtering and enhancement method for cardiac magnetic resonance images according to a second exemplary embodiment.
[0049] Figure 6 is a flowchart of an image filtering and enhancement method for cardiac magnetic resonance images according to a third exemplary embodiment.
[0050] Figure 7 The figure is a flowchart of an image filtering and enhancement method for cardiac magnetic resonance images according to a fourth exemplary embodiment.
[0051] Figure 8 is a flowchart of an image filtering and enhancement method for cardiac magnetic resonance images according to a fifth exemplary embodiment.
[0052] Figure 9 is a flowchart of an image filtering and enhancement method for cardiac magnetic resonance images according to a sixth exemplary embodiment.
[0053] Figure 10 is a flowchart of an image filtering and enhancement method for cardiac magnetic resonance images according to a seventh exemplary embodiment. DETAILED DESCRIPTION
[0054] In order to clearly illustrate the technical features of this solution, the present disclosure is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.
[0055] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0056] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0057] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0058] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0059] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly indicated in the context, they should be understood as "one or more". In the description of the present disclosure, unless otherwise specified, "multiple" refers to two or more than two, and other quantifiers are similar; "at least one item (individual)", "one (individual) or multiple items (individuals)" or similar expressions refer to any combination of these items (individuals), including any combination of single items (individuals) or plural items (individuals). For example, at least one item (individual) a can represent any number of a; for another example, one (individual) or multiple items (individuals) among a, b and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple; "and / or" is a kind of association relationship that describes the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.
[0060] Although operations or steps are described in a particular order in the drawings in the embodiments of the present disclosure, this should not be understood as requiring that these operations or steps be performed in the particular order shown or in a serial order, or that all of the operations or steps shown be performed to obtain a desired result. In the embodiments of the present disclosure, these operations or steps may be performed serially; these operations or steps may also be performed in parallel; or some of these operations or steps may be performed.
[0061] At the same time, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of relevant laws, regulations and relevant provisions. The present disclosure is described below in conjunction with specific embodiments.
[0062] First, the application scenarios of the present disclosure are described. In the prior art, when performing linear enhancement on medical images, only a single enhancement coefficient is often used for the entire image. This often results in the enhancement of unnecessary tissues and organs and other irrelevant pixels, making it impossible to clearly present the image portions that require attention, resulting in unsatisfactory image enhancement results.
[0063] In response to the above problems, the embodiment of the present disclosure performs connected domain extraction and analysis on cardiac magnetic resonance images based on the K-means clustering algorithm. By calculating the grayscale distribution of the connected domain part, the grayscale difference with the adjacent area, and the regional area elements, targeted enhancement indicators are obtained. The partitions are optimized according to the actual situation, and a reasonable indicator mapping range is calculated. The enhancement coefficients of each area in the image are adaptively obtained, and different enhancement coefficients are used to enhance different areas of the image, so that the key parts of the image are clearer and more distinguishable, which can better assist doctors in disease prevention and treatment.
[0064] Figure 1 FIG. 1 is a flow chart showing a method for image filtering and enhancement of cardiac magnetic resonance images according to an exemplary embodiment. Figure 1 As shown, the embodiment of the present disclosure provides an image filtering enhancement method for cardiac magnetic resonance images, which may include the following steps:
[0065] In step S10, filtering is performed on the original cardiac magnetic resonance image to obtain a pre-processed image.
[0066] In this step, the original cardiac magnetic resonance image is filtered to obtain a pre-processed image. For example, the cardiac region magnetic resonance image obtained from the magnetic resonance device can be gray-scaled and filtered to remove noise to obtain the pre-processed image.
[0067] In step S20, a connected domain of the preprocessed image is extracted according to a K-means clustering algorithm, and an enhancement index of the connected domain is obtained.
[0068] In this step, the connected domain of the preprocessed image is extracted according to the K-means clustering algorithm, and the enhancement index of the connected domain is obtained. For example, Figure 2 FIG is a schematic diagram showing a connected domain of a pre-processed image extracted using a K-means clustering algorithm according to an exemplary embodiment. Figure 2As shown in the figure, in order to focus on enhancing the key connected areas of the image and improve the image contrast, the connected areas to be enhanced need to meet the following conditions: (1) there is a small grayscale difference between the area and the adjacent areas; (2) the area of the area is small (when the area of a certain area is too small, not enhancing it may result in unclear key information); (3) the grayscale value distribution in the area is uniform (areas with uniform grayscale distribution can better express the detailed information in the area by giving them a larger enhancement coefficient).
[0069] Exemplarily, the first average grayscale value of the pixels in the connected domain, the area of the connected domain, and the variance of the grayscale values of all pixels in the connected domain can be obtained, and then the second average grayscale value of the adjacent connected domain of the connected domain can be obtained. Then, the enhancement index of the connected domain can be obtained based on the first average grayscale value, the second average grayscale value, the area, and the variance.
[0070] In step S30, two adjacent connected domains belonging to the same tissue organ are merged according to the enhancement index of the connected domain to obtain an image region to be enhanced.
[0071] In this step, two adjacent connected domains belonging to the same tissue or organ are merged based on the enhancement index of the connected domain to obtain the image region to be enhanced. For example, a merging coefficient can be obtained for the two adjacent connected domains belonging to the same tissue or organ and to be merged, and then the merging coefficient is normalized to obtain a merging probability. Then, based on the merging probability, the two adjacent connected domains belonging to the same tissue or organ are merged to obtain the image region to be enhanced.
[0072] In step S40, the image enhancement coefficient of the image area to be enhanced is obtained.
[0073] In this step, the image enhancement coefficient of the image region to be enhanced is obtained. Exemplarily, the image enhancement coefficient of the image region to be enhanced can be obtained by obtaining an enhancement index of the image region to be enhanced and then obtaining the image enhancement coefficient of the image region to be enhanced based on the enhancement index of the image region to be enhanced.
[0074] In step S50, the pre-processed image is enhanced by region according to the image enhancement coefficient of the image region to be enhanced.
[0075] In this step, the pre-processed image is enhanced by region based on the image enhancement coefficient of the image region to be enhanced. For example, by performing regional image enhancement with different enhancement coefficients on different regions of the pre-processed image, the key parts of the image can be made clearer and more discernible, thereby better assisting doctors in disease prevention and treatment. Figure 3FIG. 1 is a schematic diagram of a cardiac magnetic resonance image after regional image enhancement according to an exemplary embodiment. Figure 3 As shown, it can be seen that the clarity of the cardiac magnetic resonance image after regional image enhancement using different enhancement coefficients is significantly improved.
[0076] In summary, the disclosed embodiment provides an image filtering and enhancement method for cardiac magnetic resonance images, the method comprising: filtering the original cardiac magnetic resonance image to obtain a preprocessed image; extracting the connected domain of the preprocessed image according to the K-means clustering algorithm to obtain an enhancement index of the connected domain; merging two adjacent connected domains belonging to the same tissue organ according to the enhancement index of the connected domain to obtain an image region to be enhanced; obtaining an image enhancement coefficient of the image region to be enhanced; and performing regional image enhancement on the preprocessed image according to the image enhancement coefficient of the image region to be enhanced. The disclosed embodiment can extract the connected domain of the image according to the result obtained by the K-means clustering algorithm, and calculate the enhancement coefficient of each region in combination with the actual needs of image enhancement and the characteristics of each region, and use different enhancement coefficients to enhance different regions of the image, so that the key parts of the image are clearer and more distinguishable, which can better assist doctors in the prevention and treatment of diseases.
[0077] Figure 4 FIG. 1 is a flow chart of an image filtering and enhancement method for cardiac magnetic resonance images according to a first exemplary embodiment. Figure 4 As shown, obtaining the enhancement index of the connected domain may include the following steps:
[0078] In step S201 , a first average grayscale value of pixels in the connected domain, an area of the connected domain, and a variance of the grayscale values of all pixels in the connected domain are obtained.
[0079] In this step, the first average gray value of the pixels in the D connected domain is obtained The area of the connected domain a D And the variance S of the grayscale values of all pixels in the connected domain D .
[0080] In step S202, a second average grayscale value of adjacent connected domains of the connected domain is obtained.
[0081] In this step, the second average gray value of the adjacent connected domain of the D connected domain is obtained
[0082] In step S203, an enhancement index of the connected component is obtained according to the first average gray value, the second average gray value, the region area, and the variance.
[0083] In this step, according to the first average gray value The second average gray value Area a D and variance S D , get the enhanced index Z of the D connected domain D .
[0084] In some embodiments, according to the first average gray value The second average gray value The area a D and the variance S D , get the enhanced index Z of the D connected domain D , which can include the following formula:
[0085]
[0086] Among them, Z D is the enhancement index of the connected domain, is the first average grayscale, is the second average grayscale, a D is the area of the connected domain, S D is the variance of the grayscale values of all pixels in the connected domain, X is the number of the adjacent connected domain of D connected domain, and E is the total number of connected domains.
[0087] In the above formula, Represents the minimum value of the grayscale difference between the connected domain D and other adjacent connected domains. When there are adjacent areas with small grayscale value differences, The minimum value of the gray value difference can be obtained, which is not affected by other areas with large gray value differences. The smaller the gray value difference, the better the enhancement index Z. D The bigger, and as The increase of the value enhances the index Z D The less affected; D The smaller it is, the smaller the area is. In this case The larger the value, the corresponding enhancement index Z D The larger the area, the stronger the index Z D The smaller the impact; grayscale variance S D The smaller it is, the more uniform the grayscale value distribution of pixels in the area is. D 2 +1) The larger the value, the corresponding enhancement index Z D The larger the S D The increase of the enhancement index Z D The greater the impact.
[0088] Figure 5FIG. 1 is a flow chart of an image filtering and enhancement method for cardiac magnetic resonance images according to a second exemplary embodiment. Figure 5 As shown, merging two adjacent connected domains belonging to the same tissue organ according to the enhancement index of the connected domain to obtain the image region to be enhanced may include the following steps:
[0089] In step S301, the merging coefficient of the two adjacent connected domains that belong to the same tissue organ and need to be merged is obtained.
[0090] In this step, the merging coefficient P of two adjacent connected domains belonging to the same tissue organ and needing to be merged is obtained. 12 . For example, in order to ensure that the same organ region has the same enhancement coefficient on the basis of a small gray value difference, so that the enhanced image is clearer, it is necessary to further calculate the enhancement index of each connected domain obtained. The same organ region should meet the following conditions: (1) The connected domains belonging to the tissue organ are adjacent (two unconnected regions must not belong to the same organ); (2) There are differences in gray values in different parts of the same organ in the magnetic resonance image. The difference must be a small difference. Two regions with too large a difference cannot belong to the same organ. Therefore, the gray values in the two connected domains should be similar; (3) The indicators of the same organ region should all be relatively small. Therefore, the enhancement indexes calculated for the two connected domains belonging to the same organ should be similar; (4) In the image, ordinary tissue regions usually appear as connected domains with larger areas. To ensure that the enhancement coefficient of ordinary tissue regions does not change during processing, the area of the two connected domains should not be too large before merging.
[0091] In some embodiments, the merging coefficient P of the two adjacent connected domains belonging to the same tissue organ and needing to be merged is obtained. 12 , which can include the following formula:
[0092]
[0093] Among them, P 12 is the merging coefficient of two adjacent connected domains, is the absolute value of the grayscale difference between two adjacent connected domains, |Z1-Z2| is the absolute value of the enhancement index difference between two adjacent connected domains, a1 and a2 are the areas of two adjacent connected domains, d 12 is the distance between the two closest points in two adjacent connected domains.
[0094] In the above formula, Represents the gray value difference between two connected domains. The smaller the value, the closer the gray values between the two regions are. The merging coefficient P of the two connected domains needs to be merged. 12 The bigger, and as The value increases, the merging coefficient P12 The amplitude of the change becomes smaller and smaller; |Z1-Z2| represents the difference in the enhancement index between the two connected domains. The smaller the value, the closer the enhancement index between the two connected domains is, and the merging coefficient P of the two connected domains needs to be merged. 12 The larger the value of |Z1-Z2| is, the larger the merging coefficient P is. 12 The amplitude of the change becomes smaller and smaller; the larger the area of the two connected domains, and The smaller the value, the more the two connected domains need to be merged. 12 The larger the value, the greater the difference between the two. 12 ≠0, that is, when the two connected domains have no connected parts, the merging coefficient P of the two connected domains needs to be merged 12 is 0.
[0095] In step S302, the merging coefficient is normalized to obtain a merging probability.
[0096] In this step, the merging coefficient P 12 Normalize it and map it to the interval [0,1] to get the merger probability P' 12 .
[0097] In step S303, the two adjacent connected domains belonging to the same tissue organ are merged according to the merging probability to obtain the image region to be enhanced.
[0098] In this step, according to the merging probability P' 12 , merge the two adjacent connected domains belonging to the same tissue organ to obtain the image area to be enhanced.
[0099] Figure 6 FIG. 1 is a flow chart of an image filtering enhancement method for cardiac magnetic resonance images according to a third exemplary embodiment. Figure 6 As shown, merging the two adjacent connected domains belonging to the same tissue organ according to the merging probability to obtain the image region to be enhanced may include the following steps:
[0100] In step S3031, when the merging probability is greater than a first threshold, it is determined that the two adjacent connected domains belong to the same tissue organ, and the two adjacent connected domains are merged.
[0101] In this step, the merging probability P' 12 If the value is greater than the first threshold, the two adjacent connected domains are determined to belong to the same tissue organ, and the two adjacent connected domains are merged. For example, the first threshold may be 0.8.
[0102] In step S3032, the merging process is repeatedly performed to obtain the image area to be enhanced.
[0103] In this step, the above-mentioned merging process step S3031 is repeatedly performed until there is no more mergable area, and the image area to be enhanced can be obtained.
[0104] Figure 7 FIG. 1 is a flow chart of an image filtering and enhancement method for cardiac magnetic resonance images according to a fourth exemplary embodiment. Figure 7 As shown, obtaining the image enhancement coefficient of the image area to be enhanced may include the following steps:
[0105] In step S401, an enhancement index of the image region to be enhanced is obtained.
[0106] In this step, the enhancement index Z of the image area to be enhanced is obtained H For example, the mean value of the enhancement indexes of the two adjacent connected domains can be used as the enhancement index Z of the image region to be enhanced. H .
[0107] In step S402, an image enhancement coefficient of the image region to be enhanced is obtained according to the enhancement index of the image region to be enhanced.
[0108] In this step, the image enhancement coefficient of the image region to be enhanced is obtained according to the enhancement index of the image region to be enhanced. H , obtain the initial image enhancement coefficient k of the image area to be enhanced H , and then the initial image enhancement coefficient k H A mapping interval adjustment is performed to obtain the image enhancement coefficient of the image area to be enhanced.
[0109] Figure 8 FIG. 1 is a flow chart of an image filtering and enhancement method for cardiac magnetic resonance images according to a fifth exemplary embodiment. Figure 8 As shown, obtaining the enhancement index of the image area to be enhanced may include the following steps:
[0110] In step S4011, the average value of the enhancement indices of the two adjacent connected components is used as the enhancement index of the image region to be enhanced.
[0111] In this step, the mean of the enhancement indices of the two adjacent connected domains is used as the enhancement index Z of the image region to be enhanced. H .
[0112] Figure 9FIG. 1 is a flow chart of an image filtering and enhancement method for cardiac magnetic resonance images according to a sixth exemplary embodiment. Figure 9 As shown, obtaining the image enhancement coefficient of the image area to be enhanced according to the enhancement index of the image area to be enhanced may include the following steps:
[0113] In step S4021, an initial image enhancement coefficient of the image region to be enhanced is obtained according to the enhancement index of the image region to be enhanced.
[0114] In this step, according to the enhancement index Z of the image area to be enhanced H , get the initial image enhancement coefficient k of the image area to be enhanced H .
[0115] In some embodiments, the enhancement index Z of the image area to be enhanced is H , obtain the initial image enhancement coefficient k of the image area to be enhanced H , which can include the following formula:
[0116]
[0117] Among them, k H is the initial image enhancement coefficient, n is the upper boundary of the initial image enhancement coefficient mapping interval, Z H is the enhancement index of the image area to be enhanced, Z min is the minimum value of the enhancement index of the image area to be enhanced, Z max is the maximum value of the enhancement index of the image area to be enhanced.
[0118] In the above formula, the initial image enhancement coefficient k H The value range of , the mapping interval is [0, n]. The upper boundary n of the initial image enhancement coefficient mapping interval is to be determined.
[0119] In step S4022, the mapping interval of the initial image enhancement coefficient is adjusted to obtain the image enhancement coefficient of the image area to be enhanced.
[0120] In this step, the initial image enhancement coefficient k H The mapping interval is adjusted to obtain the image enhancement coefficient of the image area to be enhanced. That is, a reasonable value of the upper boundary n of the initial image enhancement coefficient mapping interval is selected, so that the image enhancement coefficient of the image area to be enhanced can be obtained according to Formula 3.
[0121] Figure 10 FIG. 1 is a flow chart of an image filtering and enhancement method for cardiac magnetic resonance images according to a seventh exemplary embodiment. Figure 10As shown, the mapping interval adjustment of the initial image enhancement coefficient to obtain the image enhancement coefficient of the image area to be enhanced may include the following steps:
[0122] In step S40221, a first area of the image region to be enhanced whose initial image enhancement coefficient is greater than 1 is obtained.
[0123] In this step, the initial n value is given first, and then the first area A of the image region to be enhanced with an initial image enhancement coefficient greater than 1 is obtained. LS .
[0124] In step S40222, the ratio of the first area to the total area of the pre-processed image is obtained.
[0125] In this step, the first area A is obtained. LS The total area A of the preprocessed image T The ratio β.
[0126] In step S40223, the upper boundary of the initial image enhancement coefficient mapping interval is adjusted so that the ratio is within the interval between the second threshold and the third threshold, and the image enhancement coefficient of the image area to be enhanced is obtained, wherein the second threshold is less than the third threshold.
[0127] In this step, a fixed step size can be used to adjust the upper boundary n of the initial image enhancement coefficient mapping interval. Exemplarily, the fixed step size can be 0.1, so that the ratio β is between the second threshold and the third threshold. At this time, the value of n is determined, and the image enhancement coefficient of the image area to be enhanced can be obtained according to Formula 3, where the second threshold is less than the third threshold. Exemplarily, the second threshold can be 0.3, and the third threshold can be 0.7.
[0128] For example, if the ratio β is less than 0.3, the image enhancement coefficient of the image region to be enhanced is generally too small, and the value n needs to be increased. If the ratio β is greater than 0.7, the image enhancement coefficient of the image region to be enhanced is generally too large, and the value n needs to be reduced. When the ratio β is in the range [0.3, 0.7], the image enhancement coefficient of the image region to be enhanced is considered to be appropriate.
[0129] In summary, the disclosed embodiment provides an image filtering and enhancement method for cardiac magnetic resonance images, the method comprising: filtering the original cardiac magnetic resonance image to obtain a preprocessed image; extracting the connected domain of the preprocessed image according to the K-means clustering algorithm to obtain an enhancement index of the connected domain; merging two adjacent connected domains belonging to the same tissue organ according to the enhancement index of the connected domain to obtain an image region to be enhanced; obtaining an image enhancement coefficient of the image region to be enhanced; and performing regional image enhancement on the preprocessed image according to the image enhancement coefficient of the image region to be enhanced. The disclosed embodiment can extract the connected domain of the image according to the result obtained by the K-means clustering algorithm, and calculate the enhancement coefficient of each region in combination with the actual needs of image enhancement and the characteristics of each region, and use different enhancement coefficients to enhance different regions of the image, so that the key parts of the image are clearer and more distinguishable, and better assist doctors in the prevention and treatment of diseases.
[0130] In another exemplary embodiment, the present disclosure further provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implements the steps of the image filtering and enhancement method for cardiac magnetic resonance images provided by the present disclosure.
[0131] In another exemplary embodiment, a computer program product is also provided, which includes a computer program that can be executed by a programmable electronic device, and has a code portion for performing the above-mentioned image filtering enhancement method for cardiac magnetic resonance images when executed by the programmable electronic device.
[0132] The above-described embodiments merely represent several implementation methods of the present disclosure. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present disclosure. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present disclosure, all of which fall within the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be determined by the appended claims.
Claims
1. A method for image filtering and enhancement of cardiac magnetic resonance images, characterized in that: The method comprises: Performing filtering on the original cardiac magnetic resonance image to obtain a preprocessed image; Extracting a connected domain of the preprocessed image according to a K-means clustering algorithm to obtain an enhancement index of the connected domain; Merging two adjacent connected domains belonging to the same tissue organ according to the enhancement index of the connected domain to obtain an image region to be enhanced; Obtaining an image enhancement coefficient for the image area to be enhanced; performing region-by-region image enhancement on the preprocessed image according to the image enhancement coefficient of the image region to be enhanced; The obtaining of the enhancement index of the connected domain includes: Obtaining a first average grayscale value of pixels in the connected domain, an area of the connected domain, and a variance of the grayscale values of all pixels in the connected domain; Obtaining a second average grayscale value of adjacent connected domains of the connected domain; Obtaining an enhancement index of the connected domain according to the first average grayscale value, the second average grayscale value, the region area, and the variance; The step of merging two adjacent connected domains belonging to the same tissue organ according to the enhancement index of the connected domain to obtain the image region to be enhanced includes: Obtaining a merging coefficient of the two adjacent connected domains that belong to the same tissue organ and need to be merged; Normalizing the merging coefficient to obtain a merging probability; According to the merging probability, the two adjacent connected domains belonging to the same tissue organ are merged to obtain the image region to be enhanced.
2. The image filtering and enhancement method for cardiac magnetic resonance images according to claim 1, characterized in that: The method of obtaining the enhancement index of the connected domain according to the first average grayscale value, the second average grayscale value, the region area, and the variance includes the following formula: in, is the enhancement index of the connected domain, is the first average grayscale, is the second average grayscale, is the area of the connected domain, is the variance of the grayscale values of all pixels in the connected domain, X is the number of the adjacent connected domain of D connected domain, and E is the total number of connected domains.
3. The image filtering and enhancement method for cardiac magnetic resonance images according to claim 1, characterized in that: The method of obtaining the merging coefficient of the two adjacent connected domains belonging to the same tissue organ and needing to be merged includes the following formula: in, is the merging coefficient of two adjacent connected domains, is the absolute value of the grayscale difference between two adjacent connected domains, is the absolute value of the difference between the enhancement indexes of two adjacent connected domains, are the areas of two adjacent connected domains, is the distance between the two closest points in two adjacent connected domains.
4. The image filtering and enhancement method for cardiac magnetic resonance images according to claim 1, characterized in that: Merging the two adjacent connected domains belonging to the same tissue organ according to the merging probability to obtain the image region to be enhanced includes: When the merging probability is greater than a first threshold, determining that the two adjacent connected domains belong to the same tissue organ, and merging the two adjacent connected domains; The merging process is repeatedly performed to obtain the image area to be enhanced.
5. The image filtering and enhancement method for cardiac magnetic resonance images according to claim 1, characterized in that: The obtaining of the image enhancement coefficient of the image area to be enhanced includes: Obtaining an enhancement index of the image area to be enhanced; Obtaining an image enhancement coefficient for the image area to be enhanced according to an enhancement index of the image area to be enhanced; The average value of the enhancement indices of the two adjacent connected domains is used as the enhancement index of the image region to be enhanced.
6. The image filtering and enhancement method for cardiac magnetic resonance images according to claim 5, characterized in that: The acquiring, according to the enhancement index of the image area to be enhanced, an image enhancement coefficient of the image area to be enhanced comprises: Obtaining an initial image enhancement coefficient for the image region to be enhanced according to an enhancement index of the image region to be enhanced; A mapping interval adjustment is performed on the initial image enhancement coefficient to obtain the image enhancement coefficient of the image area to be enhanced.
7. The image filtering and enhancement method for cardiac magnetic resonance images according to claim 6, characterized in that: The step of obtaining the initial image enhancement coefficient of the image region to be enhanced according to the enhancement index of the image region to be enhanced comprises the following formula: in, is the initial image enhancement coefficient, The upper boundary of the initial image enhancement coefficient mapping interval, is the enhancement index of the image area to be enhanced, is the minimum value of the enhancement index of the image area to be enhanced, is the maximum value of the enhancement index of the image area to be enhanced.
8. The image filtering and enhancement method for cardiac magnetic resonance images according to claim 6, characterized in that: The step of adjusting the mapping interval of the initial image enhancement coefficient to obtain the image enhancement coefficient of the image area to be enhanced includes: Acquire a first area of the image region to be enhanced where the initial image enhancement coefficient is greater than 1; Obtaining a ratio of the first area to the total area of the preprocessed image; An upper boundary of the initial image enhancement coefficient mapping interval is adjusted so that the ratio is within a range between a second threshold and a third threshold, to obtain the image enhancement coefficient of the image area to be enhanced, wherein the second threshold is less than the third threshold.
Citation Information
Patent Citations
Nuclear magnetic resonance image enhancement method based on image processing
CN115100304A
Intelligent monitoring system and monitoring method for building hanging basket
CN115690693A