A method and device for matching the gray level histogram of a magnetic resonance image

By establishing the average gray-level histogram and Gaussian process regression model of the image dataset, and combining the template histogram for gray-level mapping, the problem of weakened individual characteristics of magnetic resonance images was solved, and accurate gray-level correction and lesion differentiation were achieved.

CN116071263BActive Publication Date: 2025-12-30NANJING AIYING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310109149.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-14
Publication Date
2025-12-30
Estimated Expiration
2043-02-14

AI Technical Summary

Technical Problem

Existing technologies, when performing grayscale correction on MRI images from different manufacturers and models, can easily weaken or eliminate the original individual characteristics, affecting the distinction between lesions and normal tissues.

Method used

Multiple image datasets were established, and an average gray-level histogram was generated for each image dataset. A Gaussian process regression model was used to establish the mapping relationship between the combination of imaging parameters and the gray-level histogram. The template histogram was used to correct the gray-level mapping function.

Benefits of technology

It corrects for differences in grayscale distribution caused by different influencing factors, while preserving the grayscale distribution specificity of individual images and improving the ability to distinguish between lesions and normal tissues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116071263B_ABST
    Figure CN116071263B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a kind of magnetic resonance image gray histogram matching method and device, first, establish multiple image data sets, respectively according to the image of all samples in each image data set, the average gray histogram of corresponding image data set is generated.For each image data set, Gaussian process regression model between imaging parameter combination and average gray histogram is established.Then, the image to be matched and the physical parameter data and imaging parameter combination data of the image to be matched are obtained, the Gaussian process regression model corresponding to the image to be matched is determined according to the physical parameter data of the image to be matched.The imaging parameter combination data of the image to be matched is substituted into corresponding Gaussian process regression model, and the approximate gray histogram of the image to be matched is generated.Finally, a preset template histogram is obtained, and the gray level mapping function of the image to be matched is established using the approximate gray histogram and the template histogram.The gray level mapping function is used to correct the gray level of the image to be matched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of magnetic resonance imaging technology, specifically relating to a grayscale histogram matching method and apparatus for magnetic resonance images. Background Technology

[0002] The grayscale values ​​of magnetic resonance images are easily affected by factors such as the strength of the scanner's main magnetic field, the strength and rate of change of the gradient magnetic field, the performance of the radio frequency transmitting and receiving coils, and spatial distribution. Therefore, there are significant differences between magnetic resonance images generated by scanners from different manufacturers and even different models from the same manufacturer. Even the same model or the same scanner will exhibit noticeable deviations when operating in different environments, undergoing calibration and maintenance, and varying in service life. Furthermore, even with the same imaging sequence (a specific combination of magnetic resonance imaging steps that yields a particular image effect), the specific control programs and internal algorithms or models from different manufacturers are not entirely identical, resulting in images with inherent biases.

[0003] When radiologists manually review images, they primarily focus on contrast, i.e., the relative difference in gray levels, and are therefore insensitive to the systematic differences listed above. However, when processing images using computers, deviations in absolute gray levels can have a significant impact. Therefore, before automating image processing or using artificial intelligence methods such as machine learning to process and analyze images from different manufacturers and instrument models, it is necessary to perform gray-level normalization correction.

[0004] Commonly used grayscale normalization methods include maximum-minimum normalization, mean-variance normalization, histogram equalization, and histogram matching. Maximum-minimum normalization simply subtracts the minimum value from the grayscale value of all pixels and then divides by the difference between the maximum and minimum values. This ensures that the dynamic range of grayscale values ​​for all images is between 0 and 1. However, the maximum and minimum values ​​are easily affected by noise or outliers, and this normalization method only guarantees the consistency of the upper and lower limits of the grayscale distribution; it cannot control other distribution parameters. Similarly, mean-variance normalization only guarantees the mean and variance of the grayscale distribution. Although this method is not sensitive to noise or outliers, it still cannot effectively normalize images with significant differences in grayscale distribution curves. Compared to the above two methods, histogram equalization and histogram matching adjust the entire grayscale distribution histogram, making the histograms of all images approach a uniform distribution (histogram equalization) or approach the distribution of a certain template image (histogram matching).

[0005] However, directly applying histogram equalization or matching to each specific image may weaken or eliminate its inherent individual characteristics. For example, the histogram of an image containing diseased tissue will naturally show a difference in grayscale distribution compared to an image of normal tissue. Histogram equalization or matching cannot distinguish between this difference and the difference caused by the scanner, and will adjust them together, which may adversely affect the distinction between lesions and normal tissues. Summary of the Invention

[0006] This invention provides a grayscale histogram matching method and apparatus for magnetic resonance images to solve the problem that existing technologies weaken or eliminate the original individual characteristics of magnetic resonance images.

[0007] To address the aforementioned technical problems, the present invention discloses the following technical solutions:

[0008] One aspect of the present invention provides a grayscale histogram matching method for magnetic resonance images, comprising:

[0009] Multiple image datasets are established, each sample in the image dataset consists of an independent image, as well as a combination of various physical parameters and a set of imaging parameters for the image; wherein, the physical parameters include at least the manufacturer and instrument model of the scanner that generated the image; the images of each sample in the image dataset have the same physical parameter data, but the physical parameter data of the sample images in different image datasets are not completely the same;

[0010] Generate the average grayscale histogram of the corresponding image dataset based on the images of all samples in each image dataset;

[0011] For each image dataset, a Gaussian process regression model is established between the combination of imaging parameters and the average gray-level histogram, where the combination of imaging parameters is the input variable and the probability of each gray level appearing in the average gray-level histogram is the output variable.

[0012] Acquire the image to be matched, as well as the physical parameter data and imaging parameter combination data of the image to be matched;

[0013] Determine the Gaussian process regression model corresponding to the image to be matched based on the physical parameter data of the image to be matched;

[0014] Substitute the combined imaging parameters of the image to be matched into the corresponding Gaussian process regression model to generate an approximate grayscale histogram of the image to be matched.

[0015] Based on the human body parts in the image to be matched, obtain a preset template histogram;

[0016] A gray-level mapping function for the image to be matched is established using an approximate gray-level histogram and a template histogram.

[0017] Gray-level correction is performed on the image to be matched based on the gray-level mapping function.

[0018] Optionally, generating the average grayscale histogram of the corresponding image dataset based on the images of all samples in each image dataset includes:

[0019] For each image dataset, a corresponding average grayscale histogram is generated as follows:

[0020] Obtain the grayscale histogram of the image in each sample of the image dataset;

[0021] Calculate the average probability of each gray level appearing in all the gray level histograms;

[0022] Generate an average grayscale histogram of the image dataset based on all the stated average values.

[0023] Optionally, for each image dataset, a Gaussian process regression model is established between the combination of imaging parameters and the average gray-level histogram, including:

[0024] For each image dataset, a Gaussian process regression model is established according to the following formula:

[0025]

[0026] Where i is the i-th image dataset, and k is the number of image datasets; in the average grayscale histogram of the current image dataset, the grayscale level ranges from 0 to n. For the average gray-level histogram of the i-th image dataset, the Gaussian process regression model corresponding to gray level 0, and so on. Let y0 be the Gaussian process regression model corresponding to gray level n in the average gray level histogram of the i-th image dataset; x is the data of the imaging parameter combination in the i-th image dataset; y0 is the probability of gray level 0 occurring in the average gray level histogram of the current image dataset, and so on, y n Let n be the probability of gray level n appearing in the average gray level histogram of the current image dataset.

[0027] Optionally, determining the Gaussian process regression model corresponding to the image to be matched based on the physical parameter data of the image to be matched includes:

[0028] Based on the physical parameter data of the image to be matched, determine the image dataset corresponding to the image to be matched;

[0029] The Gaussian process regression model corresponding to the image dataset is used as the Gaussian process regression model corresponding to the image to be matched.

[0030] Optionally, the step of substituting the combined imaging parameters of the image to be matched into the corresponding Gaussian process regression model to generate an approximate grayscale histogram of the image to be matched includes:

[0031] Substitute the combined imaging parameters of the image to be matched into the corresponding Gaussian process regression model to calculate the initial probability of each gray level.

[0032] The initial probability of each gray level is mapped using the following softmax formula to obtain the approximate probability of each gray level:

[0033]

[0034] Where, q j p1 is the initial probability of gray level j; p1 is the approximate probability of gray level j.

[0035] An approximate gray-level histogram of the image to be matched is generated using the approximate probability of each gray level.

[0036] Optionally, the step of establishing a gray-level mapping function for the image to be matched using an approximate gray-level histogram and a template histogram includes:

[0037] Obtain the probability of each gray level appearing in the template histogram;

[0038] For each gray level in the approximate gray level histogram, the corresponding template gray level is obtained in the template histogram using the following method:

[0039] Acquisition The z with the smallest absolute value r Values, where s1 is the probability of gray level j appearing in the template histogram, p1 is the probability of gray level j appearing in the approximate gray level histogram, and y i z is the gray level in the approximate gray-level histogram. r The gray levels in the template histogram;

[0040] z r As with y i Corresponding template grayscale levels;

[0041] Based on each gray level in the approximate gray level histogram, and the corresponding template gray level, a mapping function between the approximate gray level histogram and the template histogram is established.

[0042] Optionally, the grayscale correction of the image to be matched based on the grayscale mapping function includes:

[0043] Obtain the grayscale level of each pixel in the image to be matched;

[0044] The gray level of each pixel in the image to be matched is reassigned using a gray level mapping function to obtain the corrected image to be matched.

[0045] Another aspect of the present invention provides a grayscale histogram matching device for magnetic resonance images, comprising:

[0046] The image dataset creation module is used to create multiple image datasets. Each sample in the image dataset consists of an independent image, as well as a combination of various physical parameters and a set of imaging parameters for the image. The physical parameters include at least the manufacturer and model of the scanner that generated the image. The images of each sample in the image dataset have the same physical parameter data, but the physical parameter data of the sample images in different image datasets are not completely the same.

[0047] The average grayscale histogram generation module is used to generate an average grayscale histogram corresponding to the image dataset based on the images of all samples in each image dataset.

[0048] The Gaussian process regression model building module is used to build a Gaussian process regression model between the combination of imaging parameters and the average gray level histogram for each image dataset. The combination of imaging parameters is the input variable, and the probability of each gray level appearing in the average gray level histogram is the output variable.

[0049] The image acquisition module is used to acquire the image to be matched, as well as the physical parameter data and imaging parameter combination data of the image to be matched;

[0050] The Gaussian process regression model determination module is used to determine the Gaussian process regression model corresponding to the image to be matched based on the physical parameter data of the image to be matched.

[0051] The approximate grayscale histogram generation module is used to substitute the imaging parameter combination data of the image to be matched into the corresponding Gaussian process regression model to generate an approximate grayscale histogram of the image to be matched.

[0052] The template histogram acquisition module is used to obtain a preset template histogram based on the human body parts in the image to be matched.

[0053] The gray-level mapping function establishment module is used to establish a gray-level mapping function for the image to be matched using an approximate gray-level histogram and a template histogram.

[0054] The correction module is used to perform grayscale correction on the image to be matched based on the grayscale mapping function.

[0055] This invention discloses a method and apparatus for matching grayscale histograms of magnetic resonance images. First, multiple image datasets are established. Each sample in the image dataset consists of an independent image, as well as a combination of various physical parameters and a set of imaging parameters. Based on the images of all samples in each image dataset, an average grayscale histogram of the corresponding image dataset is generated. For each image dataset, a Gaussian process regression model is established between the combination of imaging parameters and the average grayscale histogram.

[0056] Then, the image to be matched, as well as the physical parameter data and imaging parameter combination data of the image to be matched, are obtained; the Gaussian process regression model corresponding to the image to be matched is determined based on the physical parameter data of the image to be matched; the imaging parameter combination data of the image to be matched is substituted into the corresponding Gaussian process regression model to generate an approximate grayscale histogram of the image to be matched.

[0057] Finally, based on the human body parts in the image to be matched, a preset template histogram is obtained; using the approximate grayscale histogram and the template histogram, a grayscale mapping function for the image to be matched is established; and grayscale correction is performed on the image to be matched based on the grayscale mapping function.

[0058] In the embodiments disclosed in this invention, for an image to be matched, its approximate gray-level histogram is calculated, and the approximate gray-level histogram, rather than the gray-level histogram of the image to be matched, is used to match the template histogram. The method provided by the embodiments of this invention can both correct for differences in gray-level distribution caused by different influencing factors and preserve the gray-level distribution specificity of different individual images. Attached Figure Description

[0059] Figure 1 A schematic flowchart of a grayscale histogram matching method for magnetic resonance images provided in an embodiment of the present invention;

[0060] Figure 2 An embodiment of the present invention provides a Figure 1 Flowchart of step S102;

[0061] Figure 3 An embodiment of the present invention provides a Figure 1 Flowchart of step S105;

[0062] Figure 4 An embodiment of the present invention provides a Figure 1 Flowchart of step S109;

[0063] Figure 5 This is a schematic diagram of a grayscale histogram matching device for magnetic resonance imaging provided in an embodiment of the present invention. Detailed Implementation

[0064] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0065] Figure 1 This is a flowchart illustrating a grayscale histogram matching method for magnetic resonance images disclosed in an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes the following steps:

[0066] Step S101: Establish multiple image datasets.

[0067] Each sample in the image dataset consists of an independent image, along with various physical parameters of that image and a set of imaging parameters. In other words, a sample includes: a magnetic resonance imaging (MRI) image, and various physical parameters of that MRI image and a set of imaging parameters. Different samples contain different images.

[0068] Magnetic resonance imaging (MRI) is an image obtained by scanning a specific area of ​​a person's body using a scanner. For example, a scanner may be used to scan areas such as the head and neck, chest, abdomen, and hips of a person being tested. The person being tested can be either a person with a disease or a healthy person.

[0069] The types of image physical parameters include at least the manufacturer and model of the scanner that generated the image. For example, the image physical parameter data in a sample might be: Manufacturer XX, Model YY-YY. In actual use, scanners of the same model may exhibit deviations in imaging under different working environments, calibration and maintenance conditions, and service life. Therefore, in some embodiments of the present invention, the physical parameters may also include the identification ID of different scanners.

[0070] The imaging parameter combination of an image shall include at least the following parameter types: imaging sequence type, repetition time, echo time, reversal time, and receiving bandwidth.

[0071] To achieve more accurate grayscale histogram matching of newly scanned magnetic resonance images, a large number of samples are needed to construct the image dataset.

[0072] Using the physical parameter data of the images in the samples, all samples are classified. Specifically, samples containing images with the same physical parameter data are grouped into one class, creating an image dataset. After classifying each sample in this way, multiple image datasets are obtained. In each image dataset, the sample images (i.e., the images in the samples) have the same physical parameter data, but the physical parameter data of the sample images in different image datasets are not completely identical.

[0073] For example, the image datasets are A, B, and C. The physical parameter data for each sample image in A is: XX manufacturer, YY-YY model; the physical parameter data for each sample image in B is: XX manufacturer, ZZ-ZZ model; and the physical parameter data for each sample image in C is: PP manufacturer, P1-11 model.

[0074] Step S102: Generate the average grayscale histogram of the corresponding image dataset based on the images of all samples in each image dataset.

[0075] In one embodiment of the present invention, such as Figure 2 As shown, this step can be completed in the following way:

[0076] For each image dataset, a corresponding average grayscale histogram is generated as follows:

[0077] Step S201: Obtain the grayscale histogram of the image in each sample of the image dataset.

[0078] Using existing methods, the grayscale histogram of each sample image in the current image dataset is taken. From the grayscale histogram, the range of grayscale levels and the probability of each grayscale level appearing can be obtained.

[0079] Step S202: Calculate the average probability of each gray level appearing in all gray level histograms.

[0080] Since the physical parameter data of each sample image in the image dataset is consistent, the range of gray levels in the gray level histogram of each sample image is the same. For example, the range of gray levels can be 0-65535.

[0081] After obtaining the grayscale histogram of each sample image in the current image dataset, for each grayscale level, the average probability of its occurrence in all grayscale histograms corresponding to the current image dataset is calculated.

[0082] Taking gray level 6 as an example, if the current image dataset contains s samples, then the current image dataset has s gray level histograms. The sum of the probabilities of gray level 6 appearing in each gray level histogram is calculated, and the sum is divided by s. The calculated value is the average probability of gray level 6 appearing in all gray level histograms corresponding to the current image dataset.

[0083] Step S203: Generate the average grayscale histogram corresponding to the image dataset based on all average values.

[0084] After calculating the average probability of each gray level appearing in all gray level histograms corresponding to the current image dataset in step S202, a new gray level histogram is generated based on each gray level and its corresponding average value. This gray level histogram is the average gray level histogram of the current image dataset.

[0085] Step S103: For each image dataset, establish a Gaussian process regression model between the combination of imaging parameters and the average gray-level histogram.

[0086] The combination of imaging parameters is the input variable, and the probability of each gray level appearing in the average gray-level histogram is the output variable.

[0087] In one embodiment of the present invention, this step can be accomplished in the following manner:

[0088] For each image dataset, a Gaussian process regression model is established according to the following formula:

[0089]

[0090] Where i is the i-th image dataset, and k is the number of image datasets; in the average grayscale histogram of the current image dataset, the grayscale level ranges from 0 to n. For the average gray-level histogram of the i-th image dataset, find the Gaussian process regression model corresponding to gray level 0 (a Gaussian process regression model can be constructed using existing methods), and so on. Let y0 be the Gaussian process regression model corresponding to gray level n in the average gray level histogram of the i-th image dataset; x is the data of the imaging parameter combination in the i-th image dataset; y0 is the probability of gray level 0 occurring in the average gray level histogram of the current image dataset, and so on, y n Let n be the probability of gray level n appearing in the average gray level histogram of the current image dataset.

[0091] Step S104: Obtain the image to be matched, as well as the physical parameter data and imaging parameter combination data of the image to be matched.

[0092] The image to be matched is a magnetic resonance imaging image that requires grayscale correction. In the embodiments disclosed in this invention, the types of physical parameters of the image to be matched are consistent with the types of physical parameters of the sample images in the image dataset. For example, the physical parameters of the image to be matched are the scanner manufacturer and instrument model. Simultaneously, the types of parameters included in the imaging parameter combination of the image to be matched are consistent with the types of parameters included in the imaging parameter combination of the sample images in the image dataset. For example, the types of parameters included in the imaging parameter combination of the image to be matched are: imaging sequence type, repetition time, echo time, inversion time, and receiving bandwidth.

[0093] Step S105: Determine the Gaussian process regression model corresponding to the image to be matched based on the physical parameter data of the image to be matched.

[0094] In one embodiment of the present invention, such as Figure 3 As shown, this step can be achieved in the following way:

[0095] Step S501: Determine the image dataset corresponding to the image to be matched based on the physical parameter data of the image to be matched.

[0096] After obtaining the physical parameter data of the image to be matched, among all image datasets, an image dataset whose physical parameter data is consistent with that of the image to be matched is identified. That is, the physical parameter data of the sample images in this image dataset are the same as those of the image to be matched. For example, if the physical parameter data of the image to be matched is: XX manufacturer, YY-YY model, find an image dataset containing sample images whose physical parameter data is also XX manufacturer, YY-YY model, and use this image dataset as the image dataset corresponding to the image to be matched.

[0097] Step S502: Use the Gaussian process regression model corresponding to the image dataset as the Gaussian process regression model corresponding to the image to be matched.

[0098] After determining the image dataset corresponding to the image to be matched, the Gaussian process regression model corresponding to the image dataset is used as the Gaussian process regression model corresponding to the image to be matched.

[0099] Step S106: Substitute the imaging parameter combination data of the image to be matched into the corresponding Gaussian process regression model to generate an approximate grayscale histogram of the image to be matched.

[0100] In one embodiment of the present invention, this step is implemented in the following manner:

[0101] (1) Substitute the imaging parameter combination data of the image to be matched into the corresponding Gaussian process regression model to calculate the initial probability of each gray level.

[0102] Substituting the data of the imaging parameter combination of the image to be matched into the corresponding Gaussian process regression model, in the aforementioned embodiment, the Gaussian process regression model can be expressed by the following formula:

[0103]

[0104] in, This is the Gaussian process regression model corresponding to gray level 0, and so on. Here, is the Gaussian process regression model corresponding to gray level n; x represents the data of the imaging parameter combination of the image to be matched; y0 is the probability of gray level 0 occurring, and so on, y ndenoted as , where is the probability of gray level n appearing; n is the maximum value of the gray level.

[0105] The probability of gray level occurrence calculated by the Gaussian process regression model is used as the initial probability of gray level, thereby obtaining the initial probability of each gray level in the image to be matched.

[0106] Since it cannot be guaranteed that the sum of the calculated initial probabilities of all gray levels is 1, it is necessary to perform a softmax mapping on the initial probabilities of the gray levels to obtain an approximate probability for each gray level.

[0107] (2) The initial probability of each gray level is mapped using the following formula via softmax to obtain the approximate probability of each gray level:

[0108]

[0109] Where, q j p is the initial probability of gray level j; j is the approximate probability of gray level j; n is the maximum value of gray level j.

[0110] (3) Using the approximate probability of each gray level, generate an approximate gray level histogram of the image to be matched.

[0111] After obtaining the approximate probability of each gray level, an approximate gray level histogram of the image to be matched is generated based on the value of each gray level and the corresponding approximate probability.

[0112] Step S107: Obtain a preset template histogram based on the human body parts in the image to be matched.

[0113] In the embodiments disclosed in this invention, multiple template histograms are pre-set, each template histogram being obtained from an image of a certain part of the human body, with different template histograms corresponding to different parts of the human body. For example, template histograms corresponding to the head and neck, the chest, the abdomen, and the hips are pre-set.

[0114] The method employs existing techniques for identifying human body parts in images to obtain the human body parts displayed in the image to be matched. Based on the human body parts in the image to be matched, the corresponding template histogram is determined and obtained. For example, if the human body part in the image to be matched is the head and neck, then a preset template histogram for the head and neck is obtained.

[0115] Step S108: Use the approximate grayscale histogram and the template histogram to establish a grayscale mapping function for the image to be matched.

[0116] In the embodiments disclosed in this invention, this step can be accomplished in the following manner:

[0117] (1) Obtain the probability of each gray level appearing in the template histogram.

[0118] The template histogram consists of gray levels and the probability of each gray level appearing. The probability of each gray level appearing in the template histogram can be directly obtained from the content of the template histogram.

[0119] (2) For each gray level in the approximate gray level histogram, obtain the corresponding template gray level in the template histogram using the following method:

[0120] Acquisition The z with the smallest absolute value r Value, where s j p1 is the probability of gray level j appearing in the template histogram, p1 is the probability of gray level j appearing in the approximate gray level histogram, and y is the probability of gray level j appearing in the approximate gray level histogram. A z is the gray level in the approximate gray-level histogram. r This represents the grayscale level in the template histogram.

[0121] The above method can be understood as: using an enumeration method, for each y A , determine and The z value that is closest to the two r The value of .

[0122] z r As with y i The corresponding template grayscale level.

[0123] Using the above method, we obtain the template gray level in the template histogram for each gray level in the approximate gray level histogram.

[0124] (3) Based on each gray level in the approximate gray level histogram and the template gray level corresponding to each gray level in the approximate gray level histogram, establish a mapping function between the approximate gray level histogram and the template histogram.

[0125] After obtaining the template gray level in the template histogram for each gray level in the approximate gray level histogram, the gray level mapping function z = g(y) can be obtained. The purpose of the gray level mapping function is to determine which gray level z each gray level y in the image to be matched should be adjusted to after gray level correction.

[0126] Step S109: Perform grayscale correction on the image to be matched based on the grayscale mapping function.

[0127] In one embodiment of the present invention, such as Figure 4 As shown, this step can be completed by the following sub-steps:

[0128] Step S901: Obtain the gray level of each pixel in the image to be matched.

[0129] Step S902: Use the gray level mapping function to reassign the gray level of each pixel in the image to be matched, and obtain the corrected image to be matched.

[0130] After obtaining the gray level y of each pixel in the image to be matched, the corrected gray level z corresponding to each y is calculated according to the gray level mapping function, that is, the gray level of each pixel after gray level correction is obtained.

[0131] The gray level y of each pixel in the image to be matched is adjusted to the gray level z after gray level correction, thereby completing the gray level correction of the image to be matched.

[0132] Figure 5 This is a schematic diagram of a grayscale histogram matching device for magnetic resonance images disclosed in an embodiment of the present invention, as shown below. Figure 5 As shown, the device includes the following modules:

[0133] The image dataset creation module 11 is configured to create multiple image datasets. Each sample in the image dataset consists of an independent image, as well as a combination of various physical parameters and a set of imaging parameters for the image. The physical parameters include at least the manufacturer and model of the scanner that generated the image. The images of each sample in the image dataset have the same physical parameter data, but the physical parameter data of the sample images in different image datasets are not completely the same.

[0134] The average grayscale histogram generation module 12 is configured to generate an average grayscale histogram corresponding to the image dataset based on the images of all samples in each image dataset.

[0135] The Gaussian process regression model building module 13 is configured to build a Gaussian process regression model between the imaging parameter combination and the average gray level histogram for each image dataset, wherein the imaging parameter combination is the input variable and the probability of each gray level appearing in the average gray level histogram is the output variable.

[0136] The image acquisition module 14 is configured to acquire the image to be matched, as well as the physical parameter data and imaging parameter combination data of the image to be matched;

[0137] The Gaussian process regression model determination module 15 is configured to determine the Gaussian process regression model corresponding to the image to be matched based on the physical parameter data of the image to be matched.

[0138] The approximate grayscale histogram generation module 16 is configured to substitute the imaging parameter combination data of the image to be matched into the corresponding Gaussian process regression model to generate an approximate grayscale histogram of the image to be matched.

[0139] The template histogram acquisition module 17 is configured to acquire a preset template histogram based on the human body parts in the image to be matched.

[0140] The gray-level mapping function establishment module 18 is configured to establish a gray-level mapping function for the image to be matched using an approximate gray-level histogram and a template histogram.

[0141] The correction module 19 is configured to obtain the corrected grayscale histogram of the image to be matched based on the grayscale mapping function.

[0142] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A method of histogram matching of a magnetic resonance image, characterized by, The method comprises the following steps: establishing a plurality of image data sets, each sample in the image data set being composed of an independent image, a plurality of physical parameters of the image, and a set of imaging parameters; wherein the physical parameters at least include the manufacturer and instrument model of the scanner for generating the image; the image of each sample in the image data set has the same physical parameter data, and the physical parameter data of the images of the samples in different image data sets are not completely the same; generating an average gray level histogram of each image data set according to the images of all samples in each image data set respectively; for each image data set, a Gaussian process regression model between the set of imaging parameters and the average gray level histogram is established, wherein the set of imaging parameters is the input variable, and the probability of each gray level appearing in the average gray level histogram is the output variable; obtaining a to-be-matched image, and physical parameter data and imaging parameter combination data of the to-be-matched image; determining the Gaussian process regression model corresponding to the to-be-matched image according to the physical parameter data of the to-be-matched image; substituting the imaging parameter combination data of the to-be-matched image into the corresponding Gaussian process regression model to generate an approximate gray level histogram of the to-be-matched image; obtaining a preset template histogram according to a human body part in the to-be-matched image; establishing a gray level mapping function of the to-be-matched image by using the approximate gray level histogram and the template histogram; performing gray correction on the to-be-matched image based on the gray level mapping function.

2. The method of claim 1, wherein, The method of generating an average gray level histogram of each image data set according to the images of all samples in each image data set respectively comprises the following steps: for each image data set, the corresponding average gray level histogram is generated in the following manner: obtaining the gray level histogram of the image of each sample in the image data set; respectively calculating the average value of the probability of each gray level appearing in all the gray level histograms; generating the average gray level histogram of the image data set according to all the average values.

3. The method of claim 2, wherein, The method of establishing a Gaussian process regression model between the set of imaging parameters and the average gray level histogram for each image data set comprises the following steps: for each image data set, the Gaussian process regression model is established in the following manner: where i is the i-th image dataset, k is the number of image datasets; in the average gray level histogram of the current image dataset, the range of gray level is 0 to n; is the Gaussian process regression model corresponding to the gray level 0 in the average gray level histogram of the i-th image dataset, and so on, is the Gaussian process regression model corresponding to the gray level n in the average gray level histogram of the i-th image dataset; x is the data of the imaging parameter combination in the i-th image dataset; y0 is the probability of the occurrence of the gray level 0 in the average gray level histogram of the current image dataset, and so on, y n is the probability of the occurrence of the gray level n in the average gray level histogram of the current image dataset.

4. The method of claim 3, wherein, The method of determining the Gaussian process regression model corresponding to the to-be-matched image according to the physical parameter data of the to-be-matched image comprises the following steps: determining the image data set corresponding to the to-be-matched image according to the physical parameter data of the to-be-matched image; taking the Gaussian process regression model corresponding to the image data set as the Gaussian process regression model corresponding to the to-be-matched image.

5. The method of claim 4, wherein, The method of substituting the imaging parameter combination data of the to-be-matched image into the corresponding Gaussian process regression model to generate an approximate gray level histogram of the to-be-matched image comprises the following steps: substituting the imaging parameter combination data of the to-be-matched image into the corresponding Gaussian process regression model to calculate the initial probability of each gray level; performing softmax mapping on the initial probability of each gray level in the following manner to obtain the approximate probability of each gray level: wherein q1 is the initial probability of gray level j; p1 is the approximate probability of gray level j; generating the approximate gray level histogram of the to-be-matched image by using the approximate probability of each gray level.

6. The method of claim 5, wherein, The gray level mapping function of the image to be matched is established by using the approximate gray histogram and the template histogram, and the method comprises the following steps: Obtain the probability of each gray level appearing in the template histogram; For each gray level in the approximate gray histogram, the corresponding template gray level in the template histogram is obtained by the following method: acquiring a z value that minimizes the absolute value r where si is the probability of occurrence of gray level j in the template histogram, pi is the probability of occurrence of gray level j in the approximated gray histogram, y i is the gray level in the approximated gray histogram, and z r is the gray level in the template histogram; z r corresponding to y i template gray level; According to each gray level in the approximate gray histogram and the template gray level corresponding to each gray level in the approximate gray histogram, a mapping function between the approximate gray histogram and the template histogram is established.

7. The method of claim 6, wherein, The gray level mapping function of the image to be matched is established by using the approximate gray histogram and the template histogram, and the method comprises the following steps: Obtain the probability of each gray level appearing in the template histogram; For each gray level in the approximate gray histogram, the corresponding template gray level in the template histogram is obtained by the following method:

8. A device for histogram matching of a magnetic resonance image, characterized in that According to each gray level in the approximate gray histogram and the template gray level corresponding to each gray level in the approximate gray histogram, a mapping function between the approximate gray histogram and the template histogram is established. The gray level mapping function of the image to be matched is established by using the approximate gray histogram and the template histogram, and the method comprises the following steps: An image data set establishing module is configured to establish a plurality of image data sets, each sample in the image data set being composed of an independent image and a combination of a plurality of physical parameters and an imaging parameter group of the image, wherein the physical parameters at least include the manufacturer and the instrument model of a scanner generating the image; the image of each sample in the image data set has the same physical parameter data, and the physical parameter data of the sample images in different image data sets are not completely the same; An average gray histogram generating module is configured to generate an average gray histogram corresponding to each image data set according to the images of all samples in each image data set; A Gaussian process regression model establishing module is configured to establish a Gaussian process regression model between the imaging parameter combination and the average gray histogram for each image data set, wherein the imaging parameter combination is an input variable, and the probability of each gray level appearing in the average gray histogram is an output variable; A to-be-matched image obtaining module is configured to obtain a to-be-matched image, physical parameter data and imaging parameter combination data of the to-be-matched image; A Gaussian process regression model determining module is configured to determine a corresponding Gaussian process regression model of the to-be-matched image according to the physical parameter data of the to-be-matched image; An approximate gray histogram generating module is configured to input the imaging parameter combination data of the to-be-matched image into the corresponding Gaussian process regression model to generate an approximate gray histogram of the to-be-matched image; A template histogram obtaining module is configured to obtain a preset template histogram according to a human body part in the to-be-matched image; A gray level mapping function establishing module is configured to establish a gray level mapping function of the to-be-matched image by using the approximate gray histogram and the template histogram; A correction module is configured to perform gray correction on the to-be-matched image based on the gray level mapping function.

Citation Information

Patent Citations

  • Normalization method for multi-feature point constraint histogram of remote sensing image color normalization

    CN105279745A

  • Grayscale normalization method and apparatus for nuclear magnetic resonance image

    CN105989371A