An image registration method, device, computer equipment and storage medium
By introducing a weighted model into image registration to perform weighted summation and deformation field calculation on the images to be registered, the problem of insufficient accuracy in cross-modal image registration is solved, and higher image matching accuracy is achieved.
Patent Information
- Application Number
- CN202310399821.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-06
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-04-06
AI Technical Summary
In cross-modal image registration, the different sensitivities of different modalities to different types of substances lead to differences in the image representations of the same target generated in different modalities, affecting the measurement of image similarity and reducing the accuracy of image registration.
By introducing a weighted model to weight the image to be registered, the generated image to be registered is calculated, and the weights are adjusted according to the pixel distribution similarity loss, so that the pixel similarity between the generated image and the target image reaches the preset condition, thereby determining the image deformation field and completing the image registration.
It improves the accuracy of image registration, reduces the impact of pixel differences in the same image region under different modalities, and enhances the image matching effect.
Smart Images

Figure CN116543028B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image registration method, apparatus, computer device, and storage medium. Background Technology
[0002] Image registration, also known as image alignment, refers to the process of matching two or more images in space through image deformation. This establishes a mapping relationship for each pixel of the same target in different images and maps them to the same space. This enables image overlay visualization or tasks such as quantitative analysis of spatial distribution and image fusion based on image registration.
[0003] Related image registration methods are based on the correspondence between regions of the same or similar pixel intensity in an image to measure image similarity, and then transform the image according to the measured image similarity to complete image registration.
[0004] However, in cross-modal image registration, the varying sensitivities of different modalities to different types of materials lead to differences in the image representations of the same target generated in different modalities. This results in variations in the segmentation of structural regions in images of the same target generated in different modalities. Consequently, regions formed by identical or similar pixels of a target in one modality may not have corresponding structural regions in another modality, affecting the measurement of image similarity, interfering with image registration, and reducing the accuracy of image registration. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides an image registration method, apparatus, computer device, and storage medium. By increasing the similarity between the generated image to be registered and the target image to be registered, the impact of pixel differences in the same image region across different modalities is reduced, thereby improving the accuracy of image registration.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] In a first aspect, embodiments of this application disclose an image registration method, the method comprising:
[0008] Acquire a target image and a image to be registered, wherein the target image and the image to be registered are different modal images of the same object;
[0009] Obtain the target image to be registered from the target image;
[0010] The image to be registered is weighted according to a weighting model to calculate the generated image to be registered; wherein, the weighting model is a weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating based on the weights and the image to be registered.
[0011] Determine the image deformation field from which the target image to be registered is generated;
[0012] Based on the image deformation field, the image to be registered is registered with the target image.
[0013] Optionally, determining the image deformation field from the image to be registered to generate the target image includes:
[0014] A deformed image is generated based on the initial deformation field and the image to be registered;
[0015] Calculate the image similarity loss between the deformed image and the target image to be registered;
[0016] If the image similarity loss does not meet the preset completion condition, the initial deformation field is adjusted according to the image similarity loss;
[0017] If the image similarity loss meets the preset completion condition, the adjusted initial deformation field is determined as the image deformation field.
[0018] Optionally, after obtaining the target image to be registered from the target image, the method further includes:
[0019] Based on the target image to be registered and the image modal pixel distribution characteristics of the target image to be registered, the target image to be registered is preprocessed.
[0020] The step involves weighting the image to be registered according to a weighting model to calculate the generated image to be registered; wherein the weighting model is a weighting method that adjusts the weights based on the pixel distribution similarity loss between the generated image and the target image to be registered, so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating the weights and the image to be registered, including:
[0021] The preprocessed target image to be registered is weighted according to the weight model to calculate the generated image to be registered; wherein, the weight model is the weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating based on the weight and the preprocessed target image to be registered.
[0022] Optionally, after obtaining the image to be registered, the method further includes:
[0023] Normalize each pixel of the image to be registered to obtain a normalized image to be registered;
[0024] The step involves weighting the image to be registered according to a weighting model to calculate the generated image to be registered; wherein the weighting model is a weighting method that adjusts the weights based on the pixel distribution similarity loss between the generated image and the target image to be registered, so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating the weights and the image to be registered, including:
[0025] The normalized image to be registered is weighted according to a weight model to calculate the generated image to be registered; wherein, the weight model is a weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating the weight and the normalized image to be registered.
[0026] Optionally, after obtaining the target image to be registered from the target image, the method further includes:
[0027] A linear transformation is performed on the image to be registered so that the image to be registered is spatially aligned with the target image;
[0028] Determining the image deformation field from which the target image to be registered is generated from the image to be registered includes:
[0029] Determine the image deformation field from the linearly transformed image to be registered to generate the target image to be registered.
[0030] Optionally, the pixel distribution similarity loss includes the Pearson correlation coefficient and the structural similarity index.
[0031] Optionally, the image similarity loss includes the Pearson correlation coefficient, the structural similarity index, and a regularization term.
[0032] Secondly, embodiments of this application disclose an image registration apparatus, the apparatus comprising:
[0033] An image acquisition unit is used to acquire an image to be registered and a target image, wherein the image to be registered and the target image are different modal images of the same object;
[0034] An image acquisition unit is used to obtain a target image to be registered from the target image;
[0035] An image calculation unit is used to calculate a generated image to be registered by weighting the image to be registered according to a weighting model; wherein, the weighting model is a weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating based on the weights and the image to be registered.
[0036] A deformation field determination unit is used to determine the image deformation field from which the target image to be registered is generated;
[0037] An image registration unit is used to register the image to be registered with the target image based on the image deformation field.
[0038] Optionally, the deformation field determining unit is specifically used for:
[0039] A deformed image is generated based on the initial deformation field and the image to be registered;
[0040] Calculate the image similarity loss between the deformed image and the target image to be registered;
[0041] If the image similarity loss does not meet the preset completion condition, the initial deformation field is adjusted according to the image similarity loss;
[0042] If the image similarity loss meets the preset completion condition, the adjusted initial deformation field is determined as the image deformation field.
[0043] Optionally, the device further includes:
[0044] An image preprocessing unit is used to perform image preprocessing on the target image to be registered based on the target image to be registered and the image modal pixel distribution characteristics of the target image to be registered;
[0045] The image calculation unit is specifically used for:
[0046] The preprocessed target image to be registered is weighted according to the weight model to calculate the generated image to be registered; wherein, the weight model is the weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating based on the weight and the preprocessed target image to be registered.
[0047] Optionally, the device further includes:
[0048] A normalization processing unit is used to normalize each pixel of the image to be registered;
[0049] The image calculation unit is specifically used for:
[0050] The normalized image to be registered is weighted according to a weighting model to calculate the generated image to be registered; wherein, the weighting model is a weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is optional and is calculated based on the weights and the normalized image to be registered; the device further includes:
[0051] An image transformation unit is used to perform a linear transformation on the image to be registered, so that the image to be registered is spatially aligned with the target image;
[0052] The deformation field determination unit is specifically used for:
[0053] Determine the image deformation field from the linearly transformed image to be registered to generate the target image to be registered.
[0054] Optionally, the pixel distribution similarity loss includes the Pearson correlation coefficient and the structural similarity index.
[0055] Optionally, the image similarity loss includes the Pearson correlation coefficient, the structural similarity index, and a regularization term.
[0056] Thirdly, embodiments of this application disclose a computer device, which includes a processor and a memory:
[0057] The memory is used to store program code and transmit the program code to the processor;
[0058] The processor is configured to execute the image registration method as described in the first aspect and any option thereof, according to instructions in the program code.
[0059] Fourthly, embodiments of this application disclose a computer-readable storage medium for storing a computer program for performing the image registration method as described in the first aspect and any alternative to the first aspect.
[0060] As can be seen from the above technical solution, by adjusting the obtained image to be registered using a weighted model, a generated image to be registered is generated for the image to be registered. This generated image is used to represent the image to be registered. By calculating the pixel distribution similarity loss between the target image to be registered and the generated image to be registered, and training the weight parameters of the image to be registered based on the loss, the similarity calculation results reach the preset conditions, thereby improving the pixel similarity between the generated image to be registered and the target image. This reduces the difference in image pixel representation of the same type of material under different modalities, reduces the difference in structural region division of different modalities, and reduces the impact of pixel differences in the same image region of different modalities, thereby improving the accuracy of image registration. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 A flowchart illustrating an image registration method provided in this application embodiment;
[0063] Figure 2 This is an overall schematic diagram of an image registration method provided in an embodiment of this application;
[0064] Figure 3 This is a partial schematic diagram of an image registration method provided in an embodiment of this application;
[0065] Figure 4 A structural block diagram of an apparatus for image registration provided in an embodiment of this application;
[0066] Figure 5 This is a structural block diagram of a computer device for image registration provided in an embodiment of this application. Detailed Implementation
[0067] To facilitate understanding of the technical solution of this application, the technical terms used in this application will be introduced below.
[0068] In the field of image processing, image registration, as an image transformation method, refers to the process of matching two or more images in space through image deformation; it is also known as image registration. In simple terms, it's about overlaying two images. Generally, image registration is used to overlay generated images of the same object from different angles or in different modalities, placing the same object in the same position within the same image, thus combining the information stored in two images of the same object into a single image for display.
[0069] Taking a medical scenario as an example, for organs such as the brain, different medical examination methods are needed to perform fluoroscopic examinations of the organ to help doctors determine its physiological or pathological characteristics. When observing multiple images of the same organ generated by different medical examination methods, doctors can only rely on spatial imagination to overlay the images for a comprehensive judgment. However, if an image registration method is used, pre-registering and overlaying several images eliminates the need for doctors to rely on imagination; they can directly make judgments based on the registered images that store different image information.
[0070] In related technologies, intensity-based image registration methods are generally used for image registration. This involves measuring image similarity based on the correspondence between regions of the same or similar pixel intensity in an image, and then transforming the image according to the measured similarity to complete the registration. However, this registration method only achieves good results when the aforementioned correspondence exists. For example, in brain observation scenarios, one modality of images focuses more on neural pathways, while another modality focuses more on blood vessel pathways. Although the images are from the same brain, their pixel intensity region distributions are completely different, leading to a significant decrease in the accuracy of intensity-based image registration methods.
[0071] To address the aforementioned technical problems, this application provides an image registration method. A computer device can acquire an image to be registered and a target image, train a weight model using an algorithm, and weight the image to be registered according to the weight model to maximize the pixel similarity between the generated image to be registered and the target image. An image deformation field is trained using a supervised algorithm based on the target image to maximize the similarity between the deformed image obtained by deforming the generated image to be registered and the target image. Finally, the image to be registered is deformed according to the obtained image deformation field to complete the image registration.
[0072] Next, with reference to the accompanying drawings, an image registration method provided by an embodiment of this application will be described.
[0073] Please see Figure 1 , Figure 1 A flowchart of an image registration method provided in this application embodiment, the method including:
[0074] S101: Obtain the image to be registered and the target image.
[0075] The modality of the image to be registered can be single-channel, such as magnetic resonance imaging (MRI) or spatial transcriptomics; or it can be multi-channel, such as mass spectrometry imaging (MSI), spatial metabolomics, or secondary ion mass spectrometry (SIMS). The modality of the target image can also be either single-channel or multi-channel, as described above, and will not be repeated here.
[0076] In this application, when an image registration requirement is generated, the image to be registered and the target image are images of the same object in different modalities. For example, in everyday life scenarios, visible light and infrared images of animals; in medical imaging scenarios, magnetic resonance imaging and mass spectrometry imaging of the brain. Accordingly, the image registration method implemented in this application can be single-channel image to single-channel image registration, multi-channel image to single-channel image registration, single-channel image to multi-channel image registration, or multi-channel image to multi-channel image registration.
[0077] S102: Obtain the target image to be registered from the target image.
[0078] In this application, since the target image can be a single-channel image or a multi-channel image, it is necessary to obtain the target image to be registered from the target image.
[0079] If the target image is a single-channel image, it can be directly used as the target image to be registered.
[0080] If the target image is a multi-channel image, the target image to be registered is obtained from the multi-channel image.
[0081] Specifically, in some implementations of this embodiment, one image can be randomly selected from the multi-channel images as the target image to be registered.
[0082] In other implementations of this embodiment, a fixed number of images that can contain most of the information in the target image can be selected by Principal Component Analysis (PCA) or Non-negative Matrix Factorization (NMF) algorithms, and then the images can be fused using conventional image fusion algorithms. The fused images can then be used as the target images to be registered.
[0083] In some other implementations of this embodiment, the multi-channel image is mass spectrometry imaging. In this case, the channel image with the strongest signal can be selected as the target image to be registered based on the mass-to-charge ratio (M / Z) of the mass spectrometry imaging.
[0084] It is understood that the methods described above for obtaining the target image to be registered are exemplary, and the methods for obtaining the target image to be registered are not limited to the above-mentioned methods, nor are they limited to the aforementioned multi-channel images. Naturally, they can also be applied to other types of multi-channel images. Furthermore, the above methods can be used individually or in combination based on the modal features of the target image, and this application does not impose any limitations on this.
[0085] S103: Weight the image to be registered according to the weight model and calculate the image to be generated.
[0086] Understandably, different modalities of images focus on different aspects. For example, infrared images focus on objects with high heat intensity, while visible light images focus on objects with higher brightness. This results in completely different pixel distributions even for the same object across different modalities, leading to variations in pixel intensity within the same region. Therefore, in related technologies, methods that register images by matching pixel intensity across different regions can fail to match certain areas due to these varying pixel distributions, thus reducing the accuracy of image registration.
[0087] In this embodiment, to overcome the aforementioned shortcomings and improve image registration accuracy, a weighted model is introduced to weight the image to be registered and calculate the generated image to be registered. The weighted model is a weighting method that adjusts the weights based on the pixel distribution similarity loss between the generated image and the target image to be registered, so that the pixel distribution similarity loss reaches a preset condition. The generated image is obtained by calculating the weights and the image to be registered.
[0088] It is understood that this application aims to improve the pixel similarity between the generated image to be registered and the target image to be registered obtained in step S102, thereby making the generated image to be registered and the target image to be registered more similar at the pixel level, thereby reducing the phenomenon of pixel region intensity matching failure and improving the accuracy of image registration.
[0089] In some implementations of this embodiment, when the image to be registered is a single-channel image, the weight model can be a weight parameter. The image to be registered is weighted by this weight parameter to obtain a generated image. Then, the weight parameter is trained by the pixel distribution similarity loss between the generated image and the target image to be registered, so that the pixel distribution similarity between the generated image and the target image to be registered reaches a preset condition. Then, the generated image at this time, that is, the generated image calculated by the weight parameter at this time and the image to be registered, is used as the generated image to be registered.
[0090] In other implementations of this embodiment, when the image to be registered is a multi-channel image, the weighting model can be a weight matrix. For example, if there are n images to be registered, these n images are assigned weights M1, M2, ..., M... n This means that the n images to be registered are weighted together with the weight matrix, and the weight matrix is denoted by A. The weight matrix is then:
[0091] A = [a1, a2, ..., a] n (1)
[0092] Where a1, a2, ..., a n They are M1, M2, ..., M n The weight parameters are used to weight the n images to be registered using this weight matrix to obtain the generated image. At this point:
[0093] M c = a1*M1 + a2*M2 + ... + a n *M n (2)
[0094] Among them, M c This represents the generated image. Then, the weight matrix is trained using the pixel distribution similarity loss between the generated image and the target image to be registered, until the pixel distribution similarity between the generated image and the target image to be registered reaches a preset condition. The generated image at this point, i.e., the generated image calculated from the weight matrix and the target image to be registered, is then used as the generated image to be registered.
[0095] In this application, the Pearson Correlation Coefficient (PCC) can be used to measure the pixel distribution similarity between the generated image and the target image to be registered, or the Structure Similarity Index Measure (SSIM) can be used, or other parameters that can be used to determine image similarity can be used. That is, the pixel distribution similarity loss can be set using the two parameters mentioned above.
[0096] Specifically, in some implementations of this embodiment, the image pixel similarity function can be:
[0097] L sim (M c M r ) = c0 * PCC(M c M r )+c1*SSIM(M c M r (3)
[0098] In the formula, M c M generates an image for registration. r For the target image to be registered, L sim PCC(M) is an image pixel similarity function. c M r SSIM(M) represents the Pearson correlation coefficient between the generated image to be registered and the target image to be registered. c M r ) represents the structural similarity coefficient between the generated image to be registered and the target image to be registered, where c0 and c1 are the PCC(M) values, respectively. c M r ) and SSIM(M c M r The preset weights, which are related to the modality of the image to be registered and the target image, are used to adjust the proportion of Pearson correlation coefficient and structural similarity coefficient in pixel distribution similarity loss.
[0099] In the formula: L sim (M c M r The maximum value of M is 1, proving that M c and M r Completely identical; L sim (M c M r The minimum value of M is 0, proving that M... c and M r Completely different.
[0100] Based on the above, as one possible implementation method, the pixel distribution similarity loss F loss It could be:
[0101] F loss =1-L sim (M c M r (4)
[0102] In some implementations of this embodiment, F loss The trained weight model a * It could be:
[0103] a * =argmin(F loss (5)
[0104] Wherein, argmin(F loss ) is when F loss The value of the weight matrix A when it reaches its minimum value is the obtained weight model a. * .
[0105] In the training process of the weight model in this application embodiment, deep learning packages such as PyTorch and TensorFlow can be used to accelerate training. At the same time, processors with vector computing capabilities, such as Deep-Learning Processing Unit (DPU), Graphics Processing Unit (GPU), or Tensor Processing Unit (TPU), can be used to further accelerate training.
[0106] Please continue reading. Figure 1 S104: Determine the image deformation field from which the target image to be registered is generated.
[0107] The image deformation field is a mapping relationship from the image to be registered to the target image to be registered. That is, the image to be registered can be transformed into the target image after being deformed by the image deformation field.
[0108] In some implementations of this embodiment, the image deformation field is obtained by estimating the similarity between the generated image to be registered and the target image to be registered, and then iteratively optimizing through training.
[0109] In some other implementations of this embodiment, the image deformation field is directly obtained by predicting transformation parameters through a deep neural network (DNN), and by performing shift interpolation on the image to be registered through the registration pair between the image to be registered and the target image to be registered.
[0110] S105: Based on the image deformation field, register the image to be registered with the target image.
[0111] The image deformation field, obtained in steps S101 to S104, serves as the basis for image deformation in registering the image to be registered with the target image. By deforming the image to be registered using the image deformation field, the image to be registered and the target image achieve similarity in the same space, thus completing image registration.
[0112] Since image registration generally requires a balance between registration speed and accuracy, rather than excessively pursuing accuracy which would significantly prolong registration time and reduce efficiency, step S104 further includes S1041-S1044 to ensure both accuracy and speed.
[0113] S1041: Generate a deformed image based on the initial deformation field and the image to be registered.
[0114] The deformed image is obtained by deforming the image to be registered through an initial deformation field.
[0115] It is understood that the initial deformation field can be obtained by methods such as fixed variance initialization or variance scaling initialization, or it can be the image deformation field that has been formed in other image registration processes and then transferred to this embodiment as the initial deformation field.
[0116] S1042: Calculate the image similarity loss between the deformed image and the target image to be registered.
[0117] The image similarity loss may include the Pearson correlation coefficient, the structural similarity index, and a regularization term.
[0118] The regularization term can be either L1 or L2 regularization. By adding a regularization term, the deformed image obtained after the image to be registered is deformed by the image deformation field is smoother, retaining more image information. Taking brain images as an example, by adding a regularization term, the distortion caused by deformation of continuous nerves or blood vessels in brain images is reduced, thereby ensuring the accuracy of image registration while making the image more realistic.
[0119] In some implementations of this embodiment, the image similarity loss can be:
[0120] F′ loss =1-[b0*PCC(M′) c M r )+b1*SSIM(M′ c M r )]+λ*R (6)
[0121] Here, b0 and b1 are preset weights for the Pearson correlation coefficient and the structural similarity coefficient, respectively, used to adjust the influence of the two coefficients on image similarity loss. M′ c For the deformed image, R is the regularization term, and the preset λ is the coefficient of the regularization term, which is used to control the influence of the regularization term on the loss.
[0122] S1043: If the image similarity loss does not meet the preset completion condition, the initial deformation field is adjusted according to the image similarity loss.
[0123] In some implementations of this embodiment, the preset completion condition may be to set a target value for the image similarity loss. If the image similarity loss exceeds the target value, it is considered that the image similarity loss does not meet the preset completion condition.
[0124] In some other implementations of this embodiment, the preset completion condition may be the number of adjustments to the initial deformation field, such as performing 100 adjustments. If 100 adjustments are not completed, the image similarity loss is considered not to meet the preset completion condition.
[0125] S1044: If the image similarity loss meets the preset completion condition, the adjusted initial deformation field is determined as the image deformation field.
[0126] Next, please refer to Figure 2 , Figure 2 This is a schematic diagram of an image registration method provided in an embodiment of this application. It describes an implementation of an embodiment of this application using a scenario where a mass spectrometry image is used as the image to be registered with a magnetic resonance imaging image as the target image.
[0127] S201: Obtain a mass spectrometry image;
[0128] S202: Acquire magnetic resonance imaging (MRI) images;
[0129] S203: Weighted summation of mass spectrometry images using a weighted model;
[0130] S204: Perform image preprocessing on the magnetic resonance imaging image;
[0131] S205: Generate the target image to be registered;
[0132] S206: Calculate the pixel similarity between the weighted summed image and the target image to be registered;
[0133] S207: Determine whether the pixel similarity meets the preset conditions; if yes, proceed to S209; if no, proceed to S208.
[0134] S208: Training the weight model;
[0135] S209: Use the weighted summation image that satisfies pixel similarity as the image to be registered and generated;
[0136] S210: Obtain the image deformation field based on the image to be generated and the target image to be registered;
[0137] S211: Complete image registration based on the image deformation field.
[0138] Please see Figure 3 , Figure 3 This is a partial schematic diagram of an image registration method provided in an embodiment of this application. Figure 2 An expanded diagram of step S210.
[0139] S301: Obtain the image to be generated for registration;
[0140] S302: Obtain the target image to be registered;
[0141] S303: Obtain the deformed image based on the preset initial deformation field and the image to be registered;
[0142] S304: Train the initial deformation field based on the image similarity between the deformed image and the target image to be registered;
[0143] S305: Obtain the initial deformation field after training;
[0144] S306: Obtain the deformed image after training based on the image to be generated and the initial deformation field after training;
[0145] S307: Determine whether the image similarity meets the preset completion conditions; if yes, proceed to S308; if no, proceed to S304.
[0146] S308: Output the initial deformation field at this time as the image deformation field.
[0147] By setting a preset completion condition for image similarity loss, the training of the image deformation field can be stopped when the similarity between the deformed image and the target image to be registered reaches a certain level, that is, when the image similarity loss meets the preset completion condition. This reduces the image registration time and speeds up the image registration process while achieving the required image registration accuracy.
[0148] To further improve image registration accuracy, based on the above embodiments, the method further includes, after S102:
[0149] Based on the target image to be registered and the image modal pixel distribution characteristics of the target image to be registered, the target image to be registered is preprocessed.
[0150] The step involves weighting the image to be registered according to a weighting model to calculate the generated image to be registered; wherein the weighting model is a weighting method that adjusts the weights based on the pixel distribution similarity loss between the generated image and the target image to be registered, so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating the weights and the image to be registered, including:
[0151] The preprocessed target image to be registered is weighted according to the weight model to calculate the generated image to be registered; wherein, the weight model is the weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating based on the weight and the preprocessed target image to be registered.
[0152] Image preprocessing can take the form of image downsampling, sensitivity transformation, image interpolation, or image resolution transformation.
[0153] Since different modalities have different resolutions for the same part of the same object, and the pixel display may even be completely opposite, image preprocessing reduces the variation of the weight model in the image to be registered. This allows the preprocessed image to be registered to retain its original feature information as much as possible when it is pixel similar to the target image to be registered, thereby improving the accuracy of image registration.
[0154] For a specific example, when registering brain images using MSI (Microscopic Sequencing) to MRI, the two have different resolutions: MSI has a resolution of 100 μm, while MRI has a resolution of 50 μm. The pixel intensities for imaging cerebrospinal fluid (CSF) in the ventricles also differ. In MRI, CSF in the ventricles produces a high-intensity signal, appearing as a bright area on the image; while in MSI, because the ventricles are cavities rather than solids, they produce a weak signal, appearing as a dark area on the image. Because the signal intensities are completely opposite, their pixel representations are also completely opposite. Therefore, the image preprocessing method could be to downsample the MRI resolution from 50 μm to 100 μm, and then darken the bright ventricular areas using brightness transformation. This image preprocessing improves the pixel distribution similarity between the target image and the image to be registered, further enhancing image registration accuracy.
[0155] To further improve image registration efficiency and accelerate image registration speed, based on the above embodiments, the method further includes, after S101:
[0156] Normalize each pixel of the image to be registered to obtain a normalized image to be registered;
[0157] The step involves weighting the image to be registered according to a weighting model to calculate the generated image to be registered; wherein the weighting model is a weighting method that adjusts the weights based on the pixel distribution similarity loss between the generated image and the target image to be registered, so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating the weights and the image to be registered, including:
[0158] The normalized image to be registered is weighted according to a weight model to calculate the generated image to be registered; wherein, the weight model is a weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating the weight and the normalized image to be registered.
[0159] Normalization refers to a series of standard processing transformations performed on the image to be registered, transforming it into a unified and fixed standard form.
[0160] In some implementations of this embodiment, the normalization method used is minimum-maximum normalization (Min-Max normalization), and the normalization function is as follows:
[0161]
[0162] Among them, X iX represents the pixel value of a certain pixel in the image to be registered before normalization. min X represents the minimum pixel value in the image to be registered before normalization. max X represents the maximum pixel value in the image to be registered before normalization, and X represents the pixel value of a certain pixel in the image to be registered after normalization.
[0163] Taking a grayscale image as an example, assuming it has the maximum and minimum pixel values that a grayscale image can have (i.e., the cases where a pixel is displayed as the blackest or whitest), then the X of this grayscale image... max =255, X min =0, at this time if the pixel value of a certain pixel on the grayscale image is 51, that is, X i If X = 51, then after normalization, the pixel value of that pixel becomes X = 0.2, adjusting the pixel value to the range of 0-1.
[0164] By normalizing the image, the pixel value of each pixel in the image to be registered is between 0 and 1, which speeds up the calculation when performing image transformation, thereby further accelerating the image registration process.
[0165] To further improve image registration accuracy, based on the above embodiments, the method further includes, after S102:
[0166] A linear transformation is performed on the image to be registered so that the image to be registered is spatially aligned with the target image;
[0167] Determining the image deformation field from which the target image to be registered is generated from the image to be registered includes:
[0168] Determine the image deformation field from the linearly transformed image to be registered to generate the target image to be registered.
[0169] The linear transformation performed on the image to be registered can be a linear transformation such as translation, rotation, or translation, or it can be an affine transformation or other types of linear transformation.
[0170] Spatial alignment refers to ensuring that the longest horizontal distance and the longest vertical distance between the image to be registered and the target image are the same. Since the image to be registered and the target image are images of the same object, performing a linear transformation to align them spatially allows for pre-alignment of the image to be registered and the target image at a spatial level, reducing the deformation amplitude of the image deformation field on the image to be registered and further improving the image registration accuracy.
[0171] Please see Figure 4 , Figure 4This application provides a structural block diagram of an apparatus for image registration, the apparatus comprising:
[0172] Image acquisition unit 410 is used to acquire an image to be registered and a target image, wherein the image to be registered and the target image are different modal images of the same object;
[0173] Image acquisition unit 420 is used to obtain the target image to be registered from the target image;
[0174] Image calculation unit 430 is used to calculate the generated image to be registered by weighting the image to be registered according to a weight model; wherein, the weight model is a weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating based on the weight and the image to be registered.
[0175] Deformation field determination unit 440 is used to determine the image deformation field from which the target image to be registered is generated;
[0176] The image registration unit 450 is used to register the image to be registered with the target image according to the image deformation field.
[0177] As one possible implementation, the deformation field determining unit is specifically used for:
[0178] A deformed image is generated based on the initial deformation field and the image to be registered;
[0179] Calculate the image similarity loss between the deformed image and the target image to be registered;
[0180] If the image similarity loss does not meet the preset completion condition, the initial deformation field is adjusted according to the image similarity loss;
[0181] If the image similarity loss meets the preset completion condition, the adjusted initial deformation field is determined as the image deformation field.
[0182] As one possible implementation, the device further includes:
[0183] An image preprocessing unit is used to perform image preprocessing on the target image to be registered based on the target image to be registered and the image modal pixel distribution characteristics of the target image to be registered;
[0184] The image calculation unit is specifically used for:
[0185] The preprocessed target image to be registered is weighted according to the weight model to calculate the generated image to be registered; wherein, the weight model is the weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating based on the weight and the preprocessed target image to be registered.
[0186] As one possible implementation, the device further includes:
[0187] A normalization processing unit is used to normalize each pixel of the image to be registered;
[0188] The image calculation unit is specifically used for:
[0189] The normalized image to be registered is weighted according to a weighting model to calculate the generated image to be registered; wherein, the weighting model is a weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating based on the weights and the normalized image to be registered. As one possible implementation, the device further includes:
[0190] An image transformation unit is used to perform a linear transformation on the image to be registered, so that the image to be registered is spatially aligned with the target image;
[0191] The deformation field determination unit is specifically used for:
[0192] Determine the image deformation field from the linearly transformed image to be registered to generate the target image to be registered.
[0193] As one possible implementation, the pixel distribution similarity loss includes the Pearson correlation coefficient and the structural similarity index.
[0194] As one possible implementation, the image similarity loss includes the Pearson correlation coefficient, the structural similarity index, and a regularization term.
[0195] As can be seen from the above technical solution, by adjusting the obtained image to be registered using a weighted model, a generated image to be registered is generated for the image to be registered. This generated image is used to represent the image to be registered. By calculating the pixel distribution similarity loss between the target image to be registered and the generated image to be registered, and training the weight parameters of the image to be registered based on the loss, the similarity calculation results reach the preset conditions, thereby improving the pixel similarity between the generated image to be registered and the target image. This reduces the difference in image pixel representation of the same type of material under different modalities, reduces the difference in structural region division of different modalities, and reduces the impact of pixel differences in the same image region of different modalities, thereby improving the accuracy of image registration.
[0196] Please see Figure 5 , Figure 5 This application provides a structural block diagram of a computer device for image registration, which may include a processor 510 and a memory 520.
[0197] The memory 520 is used to store program code and transmit the program code to the processor;
[0198] The processor 510 is used to execute the above method according to the instructions in the program code.
[0199] This application also provides a computer-readable storage medium for storing a computer program for executing the above-described method.
[0200] Understandably, this method can be applied to processing devices capable of motion control, such as terminal devices or servers with motion control functions. This method can be executed independently by a terminal device or server, or it can be applied in network scenarios where a terminal device and a server communicate, executing in cooperation. The terminal device can be a computer, mobile phone, or similar device. The server can be an application server or a web server; in actual deployment, this server can be a standalone server or a cluster server.
[0201] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk, or optical disk, etc., and other media capable of storing program code.
[0202] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0203] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An image registration method, characterized in that, The method includes: Acquire a target image and a image to be registered, wherein the target image and the image to be registered are different modal images of the same object; Obtain the target image to be registered from the target image; The image to be registered is weighted according to a weighting model to calculate the generated image to be registered. The image to be registered is a multi-channel image, and the weighting model is a weight matrix. The multi-channel image to be registered is weighted and summed using the weight matrix to obtain the generated image. The weighting model is a weighting model that adjusts the weights based on the pixel distribution similarity loss between the generated image and the target image to be registered, so that the pixel distribution similarity loss reaches a preset condition. The generated image is calculated based on the weights and the image to be registered. Determine the image deformation field from which the target image to be registered is generated; Based on the image deformation field, the image to be registered is registered with the target image; Wherein, determining the image deformation field from which the target image is generated by the image to be registered includes: A deformed image is generated based on the initial deformation field and the image to be registered; Calculate the image similarity loss between the deformed image and the target image to be registered; the image similarity loss may include the Pearson correlation coefficient, structural similarity index, and regularization term; If the image similarity loss does not meet the preset completion condition, the initial deformation field is adjusted according to the image similarity loss; If the image similarity loss meets the preset completion condition, the adjusted initial deformation field is determined as the image deformation field.
2. The method according to claim 1, characterized in that, After obtaining the target image to be registered from the target image, the method further includes: Based on the target image to be registered and the image modal pixel distribution characteristics of the target image to be registered, the target image to be registered is preprocessed. The step involves weighting the image to be registered according to a weighting model to calculate the generated image to be registered; wherein the weighting model is a weighting method that adjusts the weights based on the pixel distribution similarity loss between the generated image and the target image to be registered, so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating the weights and the image to be registered, including: The preprocessed target image to be registered is weighted according to the weight model to calculate the generated image to be registered; wherein, the weight model is the weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating based on the weight and the preprocessed target image to be registered.
3. The method according to claim 1, characterized in that, After obtaining the image to be registered, the method further includes: Normalize each pixel of the image to be registered to obtain a normalized image to be registered; The step involves weighting the image to be registered according to a weighting model to calculate the generated image to be registered; wherein the weighting model is a weighting method that adjusts the weights based on the pixel distribution similarity loss between the generated image and the target image to be registered, so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating the weights and the image to be registered, including: The normalized image to be registered is weighted according to a weight model to calculate the generated image to be registered; wherein, the weight model is a weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is obtained by calculating the weight and the normalized image to be registered.
4. The method according to claim 1, characterized in that, After obtaining the target image to be registered from the target image, the method further includes: A linear transformation is performed on the image to be registered so that the image to be registered is spatially aligned with the target image; Determining the image deformation field from which the target image to be registered is generated from the image to be registered includes: Determine the image deformation field from the linearly transformed image to be registered to generate the target image to be registered.
5. The method according to claim 1, characterized in that, The pixel distribution similarity loss includes the Pearson correlation coefficient and the structural similarity index.
6. An image registration device, characterized in that, The device includes: An image acquisition unit is used to acquire an image to be registered and a target image, wherein the image to be registered and the target image are different modal images of the same object; An image acquisition unit is used to obtain a target image to be registered from the target image; An image calculation unit is used to calculate a generated image to be registered by weighting the image to be registered according to a weight model; wherein the image to be registered is a multi-channel image, the weight model is a weight matrix, and the multi-channel image to be registered is weighted and summed by the weight matrix to obtain the generated image; the weight model is a weight that is adjusted according to the pixel distribution similarity loss between the generated image and the target image to be registered so that the pixel distribution similarity loss reaches a preset condition; the generated image is calculated based on the weights and the image to be registered. A deformation field determination unit is used to determine the image deformation field from the image to be registered to generate the target image to be registered; wherein, determining the image deformation field from the image to be registered to generate the target image includes: generating a deformed image based on an initial deformation field and the image to be registered; calculating the image similarity loss between the deformed image and the target image to be registered; the image similarity loss may include Pearson correlation coefficient, structural similarity index, and regularization term; if the image similarity loss does not meet a preset completion condition, then adjusting the initial deformation field based on the image similarity loss; if the image similarity loss meets the preset completion condition, then determining the adjusted initial deformation field as the image deformation field; An image registration unit is used to register the image to be registered with the target image based on the image deformation field.
7. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the image registration method according to any one of claims 1-5 according to the instructions in the program code.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the image registration method according to any one of claims 1-5.
Citation Information
Patent Citations
MR image and CT image registration method and device, computer device and storage medium
CN109978784A
Full-automatic registration and segmentation method for multi-parameter magnetic resonance image
CN111260700A
