A medical image enhancement and segmentation system based on image processing
By setting a contrast threshold and generating high-contrast images using a generative adversarial network, combined with image segmentation and affine transformation, the problem of blurred muscle boundaries in MRI images was solved, achieving accuracy and reliability in muscle quantification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-10
AI Technical Summary
In existing technologies, the signal contrast between muscle tissue and surrounding non-muscle components such as fat and fascia in MRI images is low, resulting in blurred muscle boundaries and making it difficult to accurately quantify muscle volume and mass.
By setting a contrast threshold for extreme abnormal contrast, a generative adversarial network is constructed to generate high-contrast images. Then, an image segmentation model is used for semantic segmentation, and an affine transformation matrix is used to map voxel indices to three-dimensional spatial coordinates to statistically analyze the number and quality of voxels in muscle tissue.
It improves the contrast between muscle and non-muscle tissue boundaries, enhances the accuracy of image segmentation, and enables the transformation of MRI images into physically interpretable muscle quantification results.
Smart Images

Figure CN122368081A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image enhancement processing, specifically to a medical image enhancement and segmentation processing system based on image processing. Background Technology
[0002] With the development of medical imaging technology, magnetic resonance imaging (MRI) has become one of the preferred methods for assessing human muscle structure due to its advantages such as no ionizing radiation and high soft tissue resolution. However, in practical applications, accurately quantifying muscle volume and estimating its mass still faces significant technical challenges.
[0003] Prior art, patent publication number CN120047372B, discloses a method and system for enhancing medical images of jaw cysts based on image processing. This method can obtain clear edges in the image to facilitate the determination of the specific location. However, in the prior art, the original MRI images are often affected by factors such as magnetic field inhomogeneity, radio frequency noise, and individual anatomical differences, resulting in low signal contrast between muscle tissue and surrounding non-muscle components such as fat and fascia. This low contrast blurs muscle boundaries, making them difficult to reliably identify, and consequently leading to significant errors in muscle region extraction using traditional grayscale or gradient-based segmentation methods.
[0004] Although various automated segmentation algorithms based on machine learning or deep learning have been applied to muscle analysis in recent years, most of these methods directly process unoptimized raw MRI data, failing to effectively utilize the information in the contrast-enhanced images. In fact, if targeted contrast enhancement is performed on the image before segmentation to make the boundary response between muscle and non-muscle tissues more prominent, the accuracy of subsequent image segmentation can be significantly improved. Therefore, this invention provides a medical image enhancement and segmentation system based on image processing. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a medical image enhancement and segmentation processing system based on image processing, which solves the technical problems mentioned in the background art by setting a contrast threshold for extreme abnormal contrast.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A medical image enhancement and segmentation system based on image processing includes the following modules.
[0007] The image acquisition module is used to acquire magnetic resonance images of the target object and preprocess them into standardized images. The magnetic resonance image consists of K two-dimensional slices arranged continuously in the depth direction; each slice contains multiple voxels arranged in rows and columns, and the voxel position is represented by the voxel index coordinates (i,j,k), where i, j, and k represent the row index, column index, and slice index, respectively. An enhanced image generation module is used to input the standardized image into a pre-trained image enhancement model and output a high-contrast image. Among them, high-contrast images represent a boundary contrast between muscle tissue and non-muscle tissue in a standardized image that exceeds a set threshold. The mask image generation module is used to perform image semantic segmentation on high-contrast images and generate a binary mask image of K slice images; The voxel coordinate marking module is used to traverse K two-dimensional slices of the magnetic resonance image and anchor the voxel index coordinates marked as muscle tissue in the binary mask image. The three-dimensional coordinate mapping module is used to map the voxel index coordinates of the muscle tissue to three-dimensional spatial coordinates of the muscle tissue based on the affine transformation matrix attached to the magnetic resonance image. The voxel statistics module is used to count the number of voxels occupied by muscle tissue based on the three-dimensional spatial coordinates of muscle tissue and the standard voxel size attached to the magnetic resonance image. The muscle quantification module is used to calculate the total volume and estimated mass of muscle tissue based on the number of voxels and preset muscle density parameters.
[0008] In some specific embodiments, the pre-training step of the image enhancement model includes: A1. Obtain N raw magnetic resonance images from different target objects; A2. Based on N original magnetic resonance images, set a contrast threshold; A3. Increase the contrast of N original magnetic resonance images to a level greater than the contrast threshold to generate a high-contrast real image; The high-contrast real image is characterized by a boundary contrast between muscle tissue and non-muscle tissue that is higher than the contrast threshold. A4. Construct the generator G and discriminator D of the generative adversarial network, and define the generator loss function and discriminator loss function; A5. Input N original magnetic resonance images into generator G in batches, and output the high-contrast generated images corresponding to each batch. A6. Input the high-contrast generated image and the corresponding high-contrast real image into the discriminator D. The discriminator D outputs the probability that the high-contrast generated image and the high-contrast real image are judged as real. A7. Substitute the probabilities of the high-contrast generated image and the high-contrast real image being judged as real into the generator loss function and the discriminator loss function respectively to obtain the generator loss and the discriminator combined loss. A8. Iteratively update the network parameters of generator G and discriminator D based on the generator loss and the discriminator combined loss until the parameters of the generative adversarial network converge. A9. Export the convergent generator G as the image enhancement model.
[0009] In some specific embodiments, a contrast threshold is set based on N original magnetic resonance images, including: A2-1. Extract the contrast of N original magnetic resonance images; A2-2. Arrange the N contrast ratios in an ordered sequence; A2-3. Identify several abnormal extreme contrast values in the contrast sequence; A2-4. Remove several outlier extreme contrast values to generate a standard contrast sequence; A2-5. Calculate the mean contrast of the standard contrast sequence and set it as the contrast threshold.
[0010] In some specific embodiments, several anomalous extreme contrast values are identified in the contrast sequence, including: A2-3-1, Anchoring the extreme contrast at both ends of the contrast sequence; A2-3-2. Anchor three adjacent contrasts containing extreme contrasts along the ordered direction of the contrast sequence; A2-3-3, Calculate the forward first-order difference and the backward first-order difference between three adjacent contrast values; A2-3-4. Perform a proportional operation on the forward first difference and the backward first difference to obtain the first difference ratio; A2-3-5. If the first-order difference ratio is greater than the preset standard ratio, the extreme contrast among the three adjacent contrasts will be identified as an abnormal extreme contrast and removed from the contrast sequence. A2-3-6. Traverse the N contrast values in the contrast sequence until all outlier contrast values are removed.
[0011] In some specific embodiments, the expressions for the generator loss function and the discriminator loss function are as follows: The generator loss function is expressed as follows: ; in: Indicates generator loss. Image features representing the original magnetic resonance image, This represents the high-contrast generated image produced by generator G from the original magnetic resonance image x; Image features representing high-contrast real images; This indicates that the discriminator D generates high-contrast images. The probability of judging it as true. This represents the L1 loss between the generated high-contrast image and the real high-contrast image. Indicates the reconstruction weighting coefficient; The discriminator loss function is expressed as follows: ; in: Indicates discriminator loss. This represents the probability that the discriminator D will identify the high-contrast real image y as real; In some specific embodiments, N original magnetic resonance images are input into the generator G in batches, and the generator outputs high-contrast generated images corresponding to each batch, including: A5-1. Normalize each original magnetic resonance image to generate a normalized image; A5-2. Feed the normalized image into the generator G, and extract the image features of the normalized image based on the convolutional layer of the generator. A5-4. Based on the pre-trained generation parameters of generator G, feature reconstruction is performed on image features to generate high-contrast generated images with clear boundaries between muscle tissue and non-muscle tissue.
[0012] In some specific embodiments, the application steps of the mask image generation module include: B1. Based on the slice index of two-dimensional slices, sort the K two-dimensional slices of the high-contrast image into a slice sequence; The slice sequence contains K high-contrast slice images; B2. Input the K high-contrast slice images into the pre-trained image segmentation model; B3. Based on the pre-trained parameters of the image segmentation model, classify the high-contrast slice image pixel by pixel and output the predicted probability of the category corresponding to each pixel. B4. If the predicted probability of the category is greater than the set threshold, the corresponding pixel will be identified as muscle tissue; otherwise, it will be identified as non-muscle tissue. B5. Mark the mask of muscle tissue as 1 and the mask of non-muscle tissue as 0, and generate a binary mask image of K slice images.
[0013] In some specific embodiments, the mapping steps of the three-dimensional coordinate mapping module include: C1. Obtain the voxel index coordinates in muscle tissue; C2. Convert the voxel index coordinates of muscle tissue to homogeneous coordinates; C3. Multiply the transformed homogeneous coordinates with the affine transformation matrix to map them into three-dimensional spatial coordinates of the muscle tissue; C4. Traverse all voxel index coordinates of the muscle tissue until all voxel index coordinates are mapped to the three-dimensional spatial coordinates of the muscle tissue.
[0014] This invention provides a medical image enhancement and segmentation system based on image processing, which has the following beneficial effects: This invention extracts contrast from the original magnetic resonance image and constructs a contrast sequence to identify aberrant contrast extrema and removes them based on the first-order difference ratio of their neighborhood. On this basis, the mean of the remaining standard contrast sequence is used as the contrast threshold to generate a high-contrast realistic image.
[0015] Furthermore, based on the clear boundaries of high-contrast images, the semantic segmentation model can more reliably distinguish muscle regions during pixel-by-pixel classification. Finally, the total muscle volume is obtained by multiplying the number of voxels by the volume of a single voxel, and then multiplied by a preset muscle density parameter to obtain the estimated quality of muscle tissue in the magnetic resonance image. This enables the processing from the original MRI image to a physically interpretable muscle quantification result. Attached Figure Description
[0016] Figure 1 This is a structural block diagram of a medical image enhancement and segmentation system based on image processing according to the present invention; Figure 2 This is a schematic diagram of the processing flow of a medical image enhancement and segmentation system based on image processing according to the present invention; Figure 3 This is a schematic diagram of the process for setting the contrast threshold according to the present invention; Figure 4 This is a schematic diagram of the process for eliminating abnormal extreme value contrasts described in this invention; Figure 5 This is a schematic diagram of the mapping process of three-dimensional spatial coordinates according to the present invention; Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Example 1: Please refer to Figures 1 to 5 This invention provides a medical image enhancement and segmentation system based on image processing, comprising the following modules: The image acquisition module is used to acquire magnetic resonance images of the target object and preprocess them into standardized images. The magnetic resonance image consists of K two-dimensional slices arranged continuously in the depth direction; each slice contains multiple voxels arranged in rows and columns, and the voxel position is represented by the voxel index coordinates (i,j,k), where i, j, and k represent the row index, column index, and slice index, respectively. An enhanced image generation module is used to input the standardized image into a pre-trained image enhancement model and output a high-contrast image. Among them, high-contrast images represent a boundary contrast between muscle tissue and non-muscle tissue in a standardized image that exceeds a set threshold. The mask image generation module is used to perform image semantic segmentation on high-contrast images and generate a binary mask image of K slice images; The voxel coordinate marking module is used to traverse K two-dimensional slices of the magnetic resonance image and anchor the voxel index coordinates marked as muscle tissue in the binary mask image. The three-dimensional coordinate mapping module is used to map the voxel index coordinates of the muscle tissue to three-dimensional spatial coordinates of the muscle tissue based on the affine transformation matrix attached to the magnetic resonance image. The voxel statistics module is used to count the number of voxels occupied by muscle tissue based on the three-dimensional spatial coordinates of muscle tissue and the standard voxel size attached to the magnetic resonance image. Specifically, the number of voxels is obtained by counting the total number of voxel index coordinates (i,j,k) marked as muscle tissue in the binary mask; since each voxel index coordinate uniquely corresponds to a voxel unit, and its physical size is defined by the standard voxel size, the number of voxels is equal to the total number of discrete voxel units occupied by the muscle region.
[0019] The muscle quantification module is used to calculate the total volume and estimated mass of muscle tissue based on the number of voxels and preset muscle density parameters.
[0020] Specifically, the total volume equals the number of voxels multiplied by the volume of a single voxel (i.e., the product of the lengths of the standard voxel dimensions in the x, y, and z directions); the estimated mass equals the total volume multiplied by a pre-set muscle density parameter (usually 1.06 g / cm³).
[0021] In this embodiment, by preprocessing the magnetic resonance image into a standardized image and using a pre-trained image enhancement model to output a high-contrast image of the standardized image, the boundary contrast between muscle tissue and non-muscle tissue is higher than a set threshold, improving the visibility of tissue boundaries. Based on this high-contrast image, semantic segmentation is performed, and the generated binary mask image can more accurately mark muscle tissue regions, reducing missegmentation caused by low contrast. By traversing the mask image to anchor the voxel index coordinates of muscle tissue and combining them with an affine transformation matrix to map them into three-dimensional spatial coordinates, a precise correspondence from discrete voxels to physical space is achieved. On this basis, the number of voxels occupied by muscle tissue is counted according to the standard voxel size, and the total volume and estimated mass are calculated in combination with muscle density parameters, so that the muscle tissue in the magnetic resonance image is quantitatively represented.
[0022] Specifically, in this embodiment, the pre-training steps of the image enhancement model include: A1. Obtain N raw magnetic resonance images from different target objects; A2. Based on N original magnetic resonance images, set a contrast threshold; A3. Increase the contrast of N original magnetic resonance images to a level greater than the contrast threshold to generate a high-contrast real image; The high-contrast real image is characterized by a boundary contrast between muscle tissue and non-muscle tissue that is higher than the contrast threshold. A4. Construct the generator G and discriminator D of the generative adversarial network, and define the generator loss function and discriminator loss function; A5. Input N original magnetic resonance images into generator G in batches, and output the high-contrast generated images corresponding to each batch. A6. Input the high-contrast generated image and the corresponding high-contrast real image into the discriminator D. The discriminator D outputs the probability that the high-contrast generated image and the high-contrast real image are judged as real. A7. Substitute the probabilities of the high-contrast generated image and the high-contrast real image being judged as real into the generator loss function and the discriminator loss function respectively to obtain the generator loss and the discriminator combined loss. A8. Iteratively update the network parameters of generator G and discriminator D based on the generator loss and the discriminator combined loss until the parameters of the generative adversarial network converge. A9. Export the convergent generator G as the image enhancement model.
[0023] In this embodiment, a generative adversarial network is constructed using high-contrast real images as the supervision target, and the generator loss and discriminator loss are jointly optimized, so that the generator G learns the mapping relationship from the original magnetic resonance image to the high-contrast image. The generated high-contrast image retains the original structure while ensuring that the boundary contrast between muscle tissue and non-muscle tissue is stably higher than the set threshold, avoiding over-enhancement or under-enhancement caused by manual parameter tuning.
[0024] Specifically, step A2 includes: A2-1. Extract the contrast of N original magnetic resonance images; A2-2. Arrange the N contrast ratios in an ordered sequence; A2-3. Identify several abnormal extreme contrast values in the contrast sequence; A2-4. Remove several outlier extreme contrast values to generate a standard contrast sequence; A2-5. Calculate the mean contrast of the standard contrast sequence and set it as the contrast threshold.
[0025] In this embodiment, by extracting contrast from the original magnetic resonance image and constructing a contrast sequence, abnormal extreme contrast caused by imaging artifacts or individual anomalies is identified and removed, thus avoiding the interference of these outliers on the threshold setting. The mean contrast is calculated based on the standard contrast sequence after outlier removal and used as a threshold to more accurately reflect the contrast level of muscle-non-muscle tissue in normal populations.
[0026] Furthermore, steps A2-3 specifically include: A2-3-1, Anchoring the extreme contrast at both ends of the contrast sequence; A2-3-2. Anchor three adjacent contrasts containing extreme contrasts along the ordered direction of the contrast sequence; For example, extreme contrast can be either maximum contrast or minimum contrast.
[0027] A2-3-3, Calculate the forward first-order difference and the backward first-order difference between three adjacent contrast values; A2-3-4. Perform a proportional operation on the forward first difference and the backward first difference to obtain the first difference ratio; A2-3-5. If the first-order difference ratio is greater than the preset standard ratio, the extreme contrast among the three adjacent contrasts will be identified as an abnormal extreme contrast and removed from the contrast sequence. It should be noted that the standard ratio ranges from 0.8 to 1.25. This is because, ideally, the gradient changes near the extreme point in the contrast sequence should be roughly symmetrical, meaning the absolute values of the forward and backward first-order differences are similar, thus their ratio approaches 1. Setting this range [0.8, 1.25] is to tolerate natural fluctuations within a certain range (such as equipment noise and individual differences), while effectively eliminating abrupt outliers caused by artifacts and abnormal imaging conditions. When the ratio exceeds this range, it indicates significant asymmetry at the extreme point, which is highly likely to be an outlier and should be removed.
[0028] A2-3-6. Traverse the N contrast values in the contrast sequence until all outlier contrast values are removed.
[0029] In this embodiment, by quantifying the first-order difference ratio of the neighborhood of the extreme point in the contrast sequence, abrupt outlier contrast caused by imaging artifacts or abnormal physiological states can be effectively identified. The ratio of the forward and backward first-order differences is used as the criterion for judgment, which not only preserves the smooth extreme values caused by normal individual differences, but also eliminates the abnormal extreme values with significantly asymmetrical gradients.
[0030] Specifically, in this embodiment, the expressions for the generator loss function and the discriminator loss function are as follows: The generator loss function is expressed as follows: ; in: This represents the generator loss, used to measure the quality of the high-contrast image generated by the generator; its goal is to make it difficult for the discriminator to distinguish the generated image from the real high-contrast image, thereby improving the realism of the enhancement result. Image features representing the original magnetic resonance image, This represents the high-contrast generated image produced by generator G from the original magnetic resonance image x; Image features representing high-contrast real images; This indicates that the discriminator D generates high-contrast images. The probability of judging it as real reflects the degree to which the discriminator believes that the enhanced image comes from the real high-contrast image domain; The L1 loss represents the difference between a high-contrast generated image and a high-contrast real image. It is determined by calculating the sum of the absolute differences of all pixels between the two images and is used to constrain the generated image to be structurally faithful to the original image. Indicates the reconstruction weighting coefficient; like A value close to 1 indicates that the discriminator considers the generated image to be highly realistic; a value close to 0 indicates that it is considered a forgery or a low-quality image. Therefore, by minimizing the generator loss This is equivalent to maximizing the probability that the discriminator will judge the generated image as "real," that is, making the generator "deceive" the discriminator into misjudging the generated image as a real high-contrast image; furthermore, The term represents the pixel-level reconstruction loss, ensuring that the enhanced image is structurally faithful to the original image and avoiding over-stylization or distortion.
[0031] The discriminator loss function is expressed as follows: ; in: This represents the discriminator loss, which measures the discriminator's ability to distinguish between high-contrast real images and high-contrast generated images. Its goal is to minimize the discriminator loss, thereby improving the discriminator's accuracy in determining whether an image comes from the real high-contrast image domain. This represents the probability that the discriminator D will classify the high-contrast real image y as real. The closer this value is to 1, the more likely the discriminator considers the image to belong to the real high-contrast image domain. Therefore, the primary objective of the discriminator is to maximize the correct judgments of high-contrast real images, i.e., to maximize... The first objective is to minimize the error in the high-contrast generated image, i.e., to minimize D(G(x)) and make it as close to 1 as possible, so as to ensure that the high-contrast real image is correctly identified as "real". The second objective of the discriminator is to minimize the error in the high-contrast generated image, i.e. to minimize D(G(x)) and make it as close to 0 as possible, so as to avoid misidentifying the generated image as a real image.
[0032] Specifically, step A5 includes: A5-1. Normalize each original magnetic resonance image to generate a normalized image; The normalized image refers to a standardized image in which the pixel values of the original magnetic resonance image are linearly mapped to the range of [0,1] or [-1,1] to eliminate intensity differences between different scanning devices.
[0033] A5-2. Feed the normalized image into the generator G, and extract the image features of the normalized image based on the convolutional layer of the generator. A5-4. Based on the pre-trained generation parameters of generator G, feature reconstruction is performed on image features to generate high-contrast generated images with clear boundaries between muscle tissue and non-muscle tissue.
[0034] Specifically, feature reconstruction means that based on pre-trained generation parameters, the high-level image features extracted in the encoding stage are gradually restored to spatial resolution through upsampling and skip connection mechanisms, and shallow details are fused in the decoding process to finally synthesize an output image with high contrast.
[0035] Example 2: The technical solution of Example 2 differs from that of Example 1 in that it discloses the application steps of the relevant modules in Example 1.
[0036] Specifically, in this embodiment, the application steps of the mask image generation module include: B1. Based on the slice index of two-dimensional slices, sort the K two-dimensional slices of the high-contrast image into a slice sequence; The slice sequence contains K high-contrast slice images; B2. Input the K high-contrast slice images into the pre-trained image segmentation model; Specifically, in this embodiment, the image segmentation model uses U-Net or a variant thereof, and is pre-trained using a large-scale medical image dataset to optimize the classification performance for distinguishing between muscle tissue and non-muscle tissue. Specifically, in this embodiment, the image segmentation model adopts a fully convolutional neural network with an encoder-decoder structure. The encoder is used to extract high-level semantic features by downsampling layer by layer, and the decoder is used to restore spatial resolution by upsampling layer by layer. The shallow features of the encoder and the deep features of the decoder are fused through skip connections to preserve the boundary details of muscle tissue.
[0037] B3. Based on the pre-trained parameters of the image segmentation model, classify the high-contrast slice image pixel by pixel and output the predicted probability of the category corresponding to each pixel. The category prediction probability represents the confidence score of each pixel belonging to a specific category, typically ranging from [0,1]. The closer the value is to 1, the higher the model's certainty that the pixel belongs to the specified category.
[0038] B4. If the predicted probability of the category is greater than the set threshold, the corresponding pixel will be identified as muscle tissue; otherwise, it will be identified as non-muscle tissue. B5. Mark the mask of muscle tissue as 1 and the mask of non-muscle tissue as 0, generating binary mask images of K slice images. In this embodiment, high-contrast images are sorted by slice index and input into a pre-trained segmentation model based on an encoder-decoder structure. The model's pixel-by-pixel classification capability is used to output the predicted probability of muscle tissue. The predicted probability is binarized by setting a threshold. The generated binary mask image can accurately reflect the spatial distribution of muscle regions in each slice, avoiding omissions or misclassifications caused by low contrast or blurred boundaries. Specifically, in this embodiment, the mapping steps of the three-dimensional coordinate mapping module include: C1. Obtain the voxel index coordinates in muscle tissue; Magnetic resonance imaging typically includes an accompanying affine transformation matrix A; the expression for the affine transformation matrix A is as follows: ; Where R represents the rotation component. , , These represent the translation vectors along the x, y, and z axes, respectively. The affine transformation matrix A is typically a 4x4 matrix that contains not only translation, rotation, and scaling parameters, but may also include other linear transformation parameters such as shearing. This matrix is used to transform the voxel index coordinates (i,j,k) from image space to physical space.
[0039] C2. Convert the voxel index coordinates of muscle tissue to homogeneous coordinates; For each voxel index coordinate (i,j,k), convert it to homogeneous coordinate form (i,j,k,1) so that it can be multiplied with the affine transformation matrix A.
[0040] C3. Multiply the transformed homogeneous coordinates with the affine transformation matrix to map them into three-dimensional spatial coordinates of the muscle tissue; The expression for multiplying the homogeneous coordinates by the affine transformation matrix is: ; Among them, P , represents the transpose of homogeneous coordinates, that is, converting row-arranged coordinates into column-arranged coordinates for matrix operations; The coordinates represent the three-dimensional space of muscle tissue.
[0041] C4. Traverse all voxel index coordinates of the muscle tissue until all voxel index coordinates are mapped to the three-dimensional spatial coordinates of the muscle tissue.
[0042] In this embodiment, by converting the voxel index coordinates of muscle tissue into homogeneous coordinates and multiplying them with the 4×4 affine transformation matrix attached to the magnetic resonance image, a precise coordinate mapping from the image index space to the physical space is achieved. After traversing all muscle voxels to complete the mapping, the resulting set of three-dimensional spatial coordinates accurately reflects the actual spatial distribution of muscle tissue in the patient's body, providing specific calculation data for voxel counting and volume quantization.
[0043] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means.
[0044] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A medical image enhancement and segmentation system based on image processing, characterized in that, include: The image acquisition module is used to acquire magnetic resonance images of the target object and preprocess them into standardized images. The magnetic resonance image consists of K two-dimensional slices arranged continuously in the depth direction; each slice contains multiple voxels arranged in rows and columns, and the voxel position is represented by the voxel index coordinates (i,j,k), where i, j, and k represent the row index, column index, and slice index, respectively. An enhanced image generation module is used to input the standardized image into a pre-trained image enhancement model and output a high-contrast image. Among them, high-contrast images represent a boundary contrast between muscle tissue and non-muscle tissue in a standardized image that exceeds a set threshold. The mask image generation module is used to perform image semantic segmentation on high-contrast images and generate a binary mask image of K slice images; The voxel coordinate marking module is used to traverse K two-dimensional slices of the magnetic resonance image and anchor the voxel index coordinates marked as muscle tissue in the binary mask image. The three-dimensional coordinate mapping module is used to map the voxel index coordinates of the muscle tissue to three-dimensional spatial coordinates of the muscle tissue based on the affine transformation matrix attached to the magnetic resonance image. The voxel statistics module is used to count the number of voxels occupied by muscle tissue based on the three-dimensional spatial coordinates of muscle tissue and the standard voxel size attached to the magnetic resonance image. The muscle quantification module is used to calculate the total volume and estimated mass of muscle tissue based on the number of voxels and preset muscle density parameters.
2. The medical image enhancement and segmentation system based on image processing according to claim 1, characterized in that, The pre-training steps of the image enhancement model include: A1. Obtain N raw magnetic resonance images from different target objects; A2. Based on N original magnetic resonance images, set a contrast threshold; A3. Increase the contrast of N original magnetic resonance images to a level greater than the contrast threshold to generate a high-contrast real image; The high-contrast real image is characterized by a boundary contrast between muscle tissue and non-muscle tissue that is higher than the contrast threshold. A4. Construct the generator G and discriminator D of the generative adversarial network, and define the generator loss function and discriminator loss function; A5. Input N original magnetic resonance images into generator G in batches, and output the high-contrast generated images corresponding to each batch. A6. Input the high-contrast generated image and the corresponding high-contrast real image into the discriminator D. The discriminator D outputs the probability that the high-contrast generated image and the high-contrast real image are judged as real. A7. Substitute the probabilities of the high-contrast generated image and the high-contrast real image being judged as real into the generator loss function and the discriminator loss function respectively to obtain the generator loss and the discriminator combined loss. A8. Iteratively update the network parameters of generator G and discriminator D based on the generator loss and the combined loss of discriminator until the parameters of the generative adversarial network converge. A9. Export the convergent generator G as the image enhancement model.
3. The medical image enhancement and segmentation system based on image processing according to claim 2, characterized in that, Based on N original magnetic resonance images, a contrast threshold is set, including: A2-1. Extract the contrast of N original magnetic resonance images; A2-2. Arrange the N contrast ratios in an ordered sequence; A2-3. Identify several abnormal extreme contrast values in the contrast sequence; A2-4. Remove several outlier extreme contrast values to generate a standard contrast sequence; A2-5. Calculate the mean contrast of the standard contrast sequence and set it as the contrast threshold.
4. The medical image enhancement and segmentation system based on image processing according to claim 3, characterized in that, Several outlier extreme contrast values were identified in the contrast sequence, including: A2-3-1, Anchoring the extreme contrast at both ends of the contrast sequence; A2-3-2. Anchor three adjacent contrasts containing extreme contrasts along the ordered direction of the contrast sequence; A2-3-3, Calculate the forward first-order difference and the backward first-order difference between three adjacent contrast values; A2-3-4. Perform a proportional operation on the forward first difference and the backward first difference to obtain the first difference ratio; A2-3-5. If the first-order difference ratio is greater than the preset standard ratio, the extreme contrast among the three adjacent contrasts will be identified as an abnormal extreme contrast and removed from the contrast sequence. A2-3-6. Traverse the N contrast values in the contrast sequence until all outlier contrast values are removed.
5. The medical image enhancement and segmentation system based on image processing according to claim 1, wherein the expressions for the generator loss function and the discriminator loss function are: The generator loss function is expressed as follows: ; in: Indicates generator loss. Image features representing the original magnetic resonance image, This represents the high-contrast generated image produced by generator G from the original magnetic resonance image x; Image features representing high-contrast real images; This indicates that the discriminator D generates high-contrast images. The probability of judging it as true. This represents the L1 loss between the generated high-contrast image and the real high-contrast image. Indicates the reconstruction weighting coefficient; The discriminator loss function is expressed as follows: ; in: Indicates discriminator loss. This represents the probability that the discriminator D will classify the high-contrast real image y as real.
6. A medical image enhancement and segmentation system based on image processing according to claim 1, comprising inputting N original magnetic resonance images into a generator G in batches and outputting high-contrast generated images corresponding to each batch, including: A5-1. Normalize each original magnetic resonance image to generate a normalized image; A5-2. Feed the normalized image into the generator G, and extract the image features of the normalized image based on the convolutional layer of the generator. A5-4. Based on the pre-trained generation parameters of generator G, feature reconstruction is performed on image features to generate high-contrast generated images with clear boundaries between muscle tissue and non-muscle tissue.
7. A medical image enhancement and segmentation system based on image processing according to claim 1, characterized in that, The application steps of the mask image generation module include: B1. Based on the slice index of two-dimensional slices, sort the K two-dimensional slices of the high-contrast image into a slice sequence; The slice sequence contains K high-contrast slice images; B2. Input the K high-contrast slice images into the pre-trained image segmentation model; B3. Based on the pre-trained parameters of the image segmentation model, classify the high-contrast slice image pixel by pixel and output the predicted probability of the category corresponding to each pixel. B4. If the predicted probability of the category is greater than the set threshold, the corresponding pixel will be identified as muscle tissue; otherwise, it will be identified as non-muscle tissue. B5. Mark the mask of muscle tissue as 1 and the mask of non-muscle tissue as 0, and generate a binary mask image of K slice images.
8. A medical image enhancement and segmentation system based on image processing according to claim 1, characterized in that, The mapping steps of the three-dimensional coordinate mapping module include: C1. Obtain the voxel index coordinates in muscle tissue; C2. Convert the voxel index coordinates of muscle tissue to homogeneous coordinates; C3. Multiply the transformed homogeneous coordinates with the affine transformation matrix to map them into three-dimensional spatial coordinates of the muscle tissue; C4. Traverse all voxel index coordinates of the muscle tissue until all voxel index coordinates are mapped to the three-dimensional spatial coordinates of the muscle tissue.
Citation Information
Patent Citations
Medical Image Enhancement Method and System for Jaw Cysts Based on Image Processing
CN120047372B