CN118350987A - Image registration method and device, storage medium and electronic equipment - Google Patents
Image registration method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN118350987A CN118350987A CN202410783994.2A CN202410783994A CN118350987A CN 118350987 A CN118350987 A CN 118350987A CN 202410783994 A CN202410783994 A CN 202410783994A CN 118350987 A CN118350987 A CN 118350987A
- Authority
- CN
- China
- Prior art keywords
- displacement
- target
- image
- pixel point
- deformation field
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000006073 displacement reaction Methods 0.000 claims abstract description 358
- 230000002159 abnormal effect Effects 0.000 claims abstract description 124
- 238000005070 sampling Methods 0.000 claims description 193
- 238000004422 calculation algorithm Methods 0.000 abstract description 11
- 238000012545 processing Methods 0.000 abstract description 11
- 238000004364 calculation method Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000010606 normalization Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 3
- 238000002059 diagnostic imaging Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000002591 computed tomography Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000012014 optical coherence tomography Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000011800 void material Substances 0.000 description 2
- 206010028980 Neoplasm Diseases 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000001959 radiotherapy Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Landscapes
- Image Processing (AREA)
Abstract
The application discloses an image registration method, an image registration device, a storage medium and electronic equipment. Relates to the technical field of image processing. The method comprises the following steps: inputting the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field; dividing three-dimensional displacement of pixel points in an initial deformation field according to three displacement directions to obtain three displacement sets; updating the abnormal pixel points according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image to obtain three updated displacement sets; and combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registration image. According to the application, the problem that in the related art, under the condition that the deformation field obtained by using the deformation registration algorithm carries out deformation registration operation on the floating image, a cavity is generated in the obtained deformation registration image is solved.
Description
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image registration method, an image registration device, a storage medium, and an electronic device.
Background
Because the image deformation registration operation has more degrees of freedom and can realize nonlinear free deformation, the deformation registration algorithm of the 3D medical image is widely applied to the aspects of radiotherapy planning, tumor diagnosis, operation guidance, treatment tracking and the like.
When the deformation registration algorithm is used to deform the image to be registered, the reference image is an image that is considered "correct" for comparison and registration of other images. A floating image is an image that needs to be registered to a reference image, typically deformed or moved. The goal of deformation registration is to match the floating image with a reference image for subsequent analysis or processing.
For a deformation registration algorithm of the 3D medical image, a deformation field is calculated according to the input reference image and the floating image, deformation displacement amounts of each pixel point in three directions are stored in the deformation field, and the floating image can be deformed through the deformation field.
However, under some conditions, the deformation field calculated by using the existing deformation registration algorithm can have the phenomenon that the real sampling points corresponding to some pixel points exceed the range of the floating image, so that when the deformation field is used for carrying out deformation registration on the floating image, a cavity can appear in the deformed floating image, and the accuracy of the deformation registration result is seriously influenced.
Aiming at the problem that in the related art, under the condition that a deformation field obtained by using a deformation registration algorithm carries out deformation registration operation on a floating image, a cavity can be generated in the obtained deformation registration image, no effective solution is proposed at present.
Disclosure of Invention
The application provides an image registration method, an image registration device, a storage medium and electronic equipment, which are used for solving the problem that in the prior art, under the condition that a deformation field obtained by a deformation registration algorithm is used for carrying out deformation registration operation on a floating image, a cavity is generated in the obtained deformation registration image.
According to one aspect of the present application, a method of image registration is provided. The method comprises the following steps: acquiring a reference image and a floating image in an image to be registered, and inputting the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is positioned in a three-dimensional coordinate system, the initial deformation field comprises a plurality of pixel points, and each pixel point carries a three-dimensional displacement; dividing three-dimensional displacement of pixel points in an initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set comprises a plurality of pixel points and displacement of each pixel point in a corresponding displacement direction; determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updating the abnormal pixel points to obtain three updated displacement sets; and combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registration image.
Optionally, determining the abnormal pixel point in each displacement set according to the three-dimensional voxel distance value and the three-dimensional layer number of the floating image, and updating the abnormal pixel point to obtain three updated displacement sets, including: determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image to obtain abnormal pixel point sets in three displacement directions; and in each displacement set, changing the displacement of the abnormal pixel point in the corresponding abnormal pixel point set to a preset value to obtain updated displacement sets in three displacement directions.
Optionally, the target displacement direction is any one displacement direction of three displacement directions, for the target displacement direction, determining the abnormal pixel point in each displacement amount set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and obtaining the abnormal pixel point set in the three displacement directions includes: acquiring a voxel spacing value of a floating image in a target displacement direction, obtaining a target voxel spacing value, and acquiring a target displacement set in the target displacement direction; determining the number of layers of the initial deformation field in the target displacement direction, obtaining a target number of layers, and determining the number of layers of each pixel point; calculating coordinate values of sampling points corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel distance value, the target displacement amount set and the layer number of each pixel point to obtain a plurality of sampling point sets, wherein each sampling point set comprises coordinate values of sampling points of the pixel points positioned in the same layer; acquiring a sampling point interval in the target displacement direction, acquiring sampling points of which the coordinate values are not in the sampling point interval, obtaining a plurality of abnormal sampling points, determining the pixel points corresponding to each abnormal sampling point as abnormal pixel points, and obtaining an abnormal pixel point set in the target displacement direction.
Optionally, calculating, layer by layer, a coordinate value of a sampling point corresponding to each pixel point in the initial deformation field in the floating image according to the target voxel distance value, the target displacement set and the layer number of each pixel point, and obtaining the plurality of sampling point sets includes: calculating coordinate values of sampling points corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer according to the sequence from the small layer number to the large layer number until no sampling points exceeding the sampling point interval exist in the sampling point set corresponding to the pixel point in the first target layer, so as to obtain a plurality of first sampling point sets; under the condition that sampling points exceeding the sampling point interval do not exist in the sampling point set corresponding to the pixel points in the first target layer, calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the target displacement direction of the floating image layer by layer according to the sequence from the large layer number to the small layer number until the sampling points exceeding the sampling point interval do not exist in the sampling point set corresponding to the pixel points in the second target layer, and obtaining a plurality of second sampling point sets; and combining the plurality of first sampling point sets and the plurality of second sampling point sets to obtain a plurality of sampling point sets.
Optionally, calculating, layer by layer, the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image according to the target voxel distance value, the target displacement set and the layer number of each pixel point includes: multiplying the number of layers of the target pixel points and the target voxel spacing value for each target pixel point to obtain a target parameter, wherein the target pixel point is any pixel point in the initial deformation field; and obtaining the displacement of the target pixel point in the target displacement direction from the target displacement set, and adding the target parameter and the displacement of the target pixel point to obtain the coordinate value of the sampling point corresponding to the target pixel point.
Optionally, acquiring the sampling point interval in the target displacement direction includes: calculating the upper limit value of the sampling point interval according to the target layer number and the target voxel spacing value; and combining the preset lower limit value and the preset upper limit value into a sampling point interval.
Optionally, in each displacement set, changing the displacement of the abnormal pixel point in the corresponding abnormal pixel point set to a preset value, and obtaining the updated displacement sets in the three displacement directions includes: and for the initial displacement set, acquiring an abnormal pixel point set corresponding to the initial displacement set, changing the displacement of the pixel points corresponding to the pixel points in the abnormal pixel point set into a preset value in the initial displacement set according to the corresponding relation between the pixel points in the abnormal pixel point set and the pixel points in the initial displacement set, and keeping the displacement of other pixel points unchanged to obtain an updated initial displacement set, wherein the initial displacement set is any one of the three displacement sets.
According to another aspect of the present application, an image registration apparatus is provided. The device comprises: the acquisition unit is used for acquiring a reference image and a floating image in an image to be registered, inputting the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is positioned in a three-dimensional coordinate system, the initial deformation field comprises a plurality of pixel points, and each pixel point carries a three-dimensional displacement; the dividing unit is used for dividing the three-dimensional displacement of the pixel points in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set comprises a plurality of pixel points and the displacement of each pixel point in the corresponding displacement direction; the updating unit is used for determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updating the abnormal pixel points to obtain three updated displacement sets; and the registration unit is used for combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registration image.
According to another aspect of the present invention, there is also provided a computer storage medium for storing a program, wherein the program when run controls an apparatus in which the computer storage medium is located to perform an image registration method.
According to another aspect of the present invention, there is also provided an electronic device comprising one or more processors and a memory; the memory has stored therein computer readable instructions for executing the computer readable instructions, wherein the computer readable instructions when executed perform a method of image registration.
According to the application, the following steps are adopted: acquiring a reference image and a floating image in an image to be registered, and inputting the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is positioned in a three-dimensional coordinate system, the initial deformation field comprises a plurality of pixel points, and each pixel point carries a three-dimensional displacement; dividing three-dimensional displacement of pixel points in an initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set comprises a plurality of pixel points and displacement of each pixel point in a corresponding displacement direction; determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updating the abnormal pixel points to obtain three updated displacement sets; and combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registration image. The problem that in the prior art, under the condition that a deformation field obtained by using a deformation registration algorithm is used for carrying out deformation registration operation on a floating image, a cavity can be generated in the obtained deformation registration image is solved. By determining the abnormal pixel points in the initial deformation field and changing the displacement amount in the abnormal pixel points, the pixel points outside the floating image cannot be registered into the image when the updated deformation field performs deformation registration operation on the floating image, so that a void cannot occur in the obtained registration image, and the effect of improving the accuracy of the registration image is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
Fig. 1 is a flowchart of an image registration method provided according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative image registration method provided in accordance with an embodiment of the present application;
Fig. 3 is a schematic view of an image registration apparatus provided according to an embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the image registration method, apparatus, storage medium and electronic device determined by the present disclosure may be used in the technical field of image processing, and may also be used in any field other than the technical field of image processing, and the application fields of the image registration method, apparatus, storage medium and electronic device determined by the present disclosure are not limited.
It should be noted that, the collected information, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) used in the present application are all information and data authorized by the user or fully authorized by each party, and the related data is collected, stored, used, processed, transmitted, provided, disclosed, applied, etc. processed, all in compliance with the related laws and regulations and standards of the related region, necessary security measures are taken, no prejudice to the public order is made, and corresponding operation entries are provided for the user to select authorized use or refused use. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
For convenience of description, the following will describe some terms or terminology involved in the embodiments of the present application:
And (3) deformation registration: deformation registration refers to the operation of matching and aligning the shape, size or position between different images or datasets. Such operations are commonly used in the fields of medical imaging, mapping, computer vision, and remote sensing image processing.
Voxel spacing value: typically used to describe the distance between voxels (volume pixels) in a three-dimensional image or volume data.
According to an embodiment of the present application, an image registration method is provided.
Fig. 1 is a flowchart of an image registration method provided according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
Step S101, a reference image and a floating image in an image to be registered are obtained, the reference image and the floating image are input into a preset deformation registration model, and an initial deformation field is obtained, wherein the initial deformation field is positioned in a three-dimensional coordinate system and comprises a plurality of pixel points, and each pixel point carries a three-dimensional displacement.
It should be noted that, the image to be registered may be an image group that a user needs to register, including a reference image and a floating image, where the reference image is a reference image, the floating image is an image that needs to register, and the reference image and the floating image may be two-dimensional images or three-dimensional images, but dimensions of the reference image and the floating image need to be consistent with the image size.
It should be noted that, when one of the two images included in the image to be registered is designated as a reference image, the other image is a floating image, which image is the reference image and which image is the floating image can be determined according to the registration requirement when the reference image and the floating image are selected, the purpose of the registration operation is to make the similarity between the registered floating image and the reference image greater than the preset similarity after the deformation registration of the floating image, and the two images included in the image to be registered can be medical images captured by two different medical imaging devices, for example, an image captured by a CT (Computer Tomography, electronic computer tomography) device and an image captured by an OCT (Optical Coherence Tomography ) medical imaging device.
Specifically, when registering the floating image according to the reference image, an existing deformation registration model may be used to determine the deformation field, that is, the initial deformation field, so that the floating image may be subsequently registered using the initial deformation field.
It should be noted that, the initial deformation field may be a three-dimensional deformation field, and is formed by a plurality of pixel points, where each pixel point includes 6 element information, which is respectively the position information (x, y, z) of each pixel point in the initial deformation field, and the displacement amount (a, b, c) corresponding to each pixel point (the displacement amount may also be referred to as a deformation amount), so that the deformation registration operation may be performed on the floating image according to the displacement amount of each pixel point in the initial deformation field, so as to obtain a registered floating image.
It should be noted that, in order to improve accuracy of the image registration operation, after obtaining a floating image in an image to be registered, the floating image may be subjected to a rigid registration operation, to obtain an updated floating image, and an initial deformation field is determined using the updated floating image and a reference image, where the rigid registration operation is an operation in which two or more images are transformed and aligned so as to have spatially the same rotation, translation, and scale transformation, so that they can be aligned and matched under a specific task.
Step S102, dividing the three-dimensional displacement of the pixel points in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set comprises a plurality of pixel points and the displacement of each pixel point in the corresponding displacement direction.
Specifically, in the case where the reference image and the floating image are both three-dimensional images, the initial deformation field is also a three-dimensional deformation field, and in this case, in order to optimize the initial deformation field, it is necessary to optimize the displacement amounts of the pixels in the deformation field in each direction, and therefore, it is necessary to divide the three-dimensional displacement amounts of the pixels in the initial deformation field in three displacement directions, so as to obtain three displacement amount sets.
For example, the three-dimensional displacement amounts of any 3 pixel points in the initial deformation field are (1, 2, 3), (2, 3, 4), (5,3,8), and when the three-dimensional displacement amounts correspond to the x-axis direction, the y-axis direction, and the z-axis direction, the three obtained displacement amounts are respectively set as follows: an x-axis direction displacement amount set (1, 2, 5), a y-axis direction displacement amount set (2, 3), and a z-axis direction displacement amount set (3, 4, 8).
Step S103, determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updating the abnormal pixel points to obtain three updated displacement sets.
Specifically, after three displacement amount sets are obtained, the displacement amount in each displacement amount set needs to be sequentially identified, so that abnormal pixel points in each displacement amount set are determined, wherein the abnormal pixel point determining mode can be used for determining whether the displacement amount is abnormal or not, namely whether the abnormal pixel points exist or not by determining real sampling point coordinates corresponding to each pixel point in an initial deformation field and judging whether the real sampling point coordinates are located in the range of a floating image or not.
When determining the coordinates of the real sampling points, the voxel space value of the floating image in the corresponding direction and the layer number of the deformation field in the corresponding direction need to be obtained, and the coordinates of the real sampling points are calculated according to the voxel space value and the layer number, wherein the layer number of the deformation field in the corresponding direction is consistent with the layer number of the floating image.
Further, after the abnormal pixel point is obtained, the displacement of the abnormal pixel point needs to be updated in the displacement set, so that the displacement set is updated, and because the pixel point corresponding to each displacement in the initial deformation field is known when the displacement set is generated, the parameter of the initial deformation field can be updated by updating the displacement in the displacement set, and the updating operation of the initial deformation field is further completed.
Step S104, combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registration image.
Specifically, after the updated displacement set is obtained, the displacement in the three displacement sets can be combined according to the pixel points to which the displacement in each displacement set belongs, so that the updated displacement of each pixel point in the deformation field is obtained, the updated deformation field is obtained, further, the deformation registration operation can be performed on the floating image by using the updated deformation field, the registration image without holes is obtained, and the technical effect of improving the accuracy of the registration image is achieved.
According to the image registration method provided by the embodiment of the application, the initial deformation field is obtained by acquiring the reference image and the floating image in the image to be registered and inputting the reference image and the floating image into a preset deformation registration model, wherein the initial deformation field is positioned in a three-dimensional coordinate system, the initial deformation field comprises a plurality of pixel points, and each pixel point carries a three-dimensional displacement; dividing three-dimensional displacement of pixel points in an initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set comprises a plurality of pixel points and displacement of each pixel point in a corresponding displacement direction; determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updating the abnormal pixel points to obtain three updated displacement sets; and combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registration image. The problem that in the prior art, under the condition that a deformation field obtained by using a deformation registration algorithm is used for carrying out deformation registration operation on a floating image, a cavity can be generated in the obtained deformation registration image is solved. By determining the abnormal pixel points in the initial deformation field and changing the displacement amount in the abnormal pixel points, the pixel points outside the floating image cannot be registered into the image when the updated deformation field performs deformation registration operation on the floating image, so that a void cannot occur in the obtained registration image, and the effect of improving the accuracy of the registration image is achieved.
In order to accurately determine an abnormal pixel point and change the abnormal pixel point to a normal pixel point, optionally, in the image registration method provided by the embodiment of the present application, determining the abnormal pixel point in each displacement set according to the three-dimensional voxel distance value and the three-dimensional layer number of the floating image, and updating the abnormal pixel point, to obtain three updated displacement sets includes: determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image to obtain abnormal pixel point sets in three displacement directions; and in each displacement set, changing the displacement of the abnormal pixel point in the corresponding abnormal pixel point set to a preset value to obtain updated displacement sets in three displacement directions.
Specifically, when determining the abnormal pixel points, the coordinates of the corresponding real sampling points of each pixel point in the floating image can be determined according to the three-dimensional voxel distance value and the three-dimensional layer number of the floating image and the displacement of each pixel point in the deformation field, so that the abnormal pixel points in the deformation field can be determined by judging whether the coordinates of the real sampling points are located outside the floating image.
Since each abnormal pixel point has displacement amounts in three directions, but not all the displacement amounts in three directions are abnormal, when determining the abnormal pixel point, it is necessary to determine the abnormal pixel point in each direction, respectively, so as to obtain an abnormal pixel point set in three displacement directions.
For example, in the x-axis direction, the abnormal pixel point set may be "pixel point 1, pixel point 2, pixel point 3", in the y-axis direction, the abnormal pixel point set may be "pixel point 2, pixel point 4, pixel point 5", and in the z-axis direction, the abnormal pixel point set may be "pixel point 6, pixel point 7, pixel point 8", thereby obtaining an abnormal pixel point set in three displacement directions.
Further, after the abnormal pixel point sets in the three displacement directions are determined, the displacement amount of the abnormal similar point in the displacement amount set in the corresponding displacement direction in each displacement direction can be changed to a preset value, wherein the preset value can be 0, so that the displacement amount sets in the three displacement directions are updated, and the updated displacement amount sets in the three displacement directions are obtained.
For example, in the x-axis direction, the displacement amounts corresponding to the pixel point 1, the pixel point 2, and the pixel point 3 are: 10, 20, 30, the displacement amounts corresponding to the pixel 1, the pixel 2, and the pixel 3 are respectively: 0,0,0.
In order to accurately determine the abnormal pixel points, optionally, in the image registration method provided by the embodiment of the present application, the target displacement direction is any one displacement direction of three displacement directions, and for the target displacement direction, determining the abnormal pixel points in each displacement amount set according to the three-dimensional voxel distance value and the three-dimensional layer number of the floating image, and obtaining the abnormal pixel point set in the three displacement directions includes: acquiring a voxel spacing value of a floating image in a target displacement direction, obtaining a target voxel spacing value, and acquiring a target displacement set in the target displacement direction; determining the number of layers of the initial deformation field in the target displacement direction, obtaining a target number of layers, and determining the number of layers of each pixel point; calculating coordinate values of sampling points corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel distance value, the target displacement amount set and the layer number of each pixel point to obtain a plurality of sampling point sets, wherein each sampling point set comprises coordinate values of sampling points of the pixel points positioned in the same layer; acquiring a sampling point interval in the target displacement direction, acquiring sampling points of which the coordinate values are not in the sampling point interval, obtaining a plurality of abnormal sampling points, determining the pixel points corresponding to each abnormal sampling point as abnormal pixel points, and obtaining an abnormal pixel point set in the target displacement direction.
It should be noted that, since each pixel point has displacement amounts in three displacement directions, and the method for determining the abnormal pixel point in each displacement direction is the same, in the present application, a method for obtaining any one of the three displacement directions as the target displacement direction is adopted to describe how to determine the abnormal pixel point in the target displacement direction, and the methods for determining the abnormal pixel point in the other two displacement directions are the same.
Specifically, when determining an abnormal pixel point in the target displacement direction, firstly, acquiring a voxel spacing value of a floating image in the target displacement direction to obtain the target voxel spacing value, acquiring a target displacement amount set in the target displacement direction and the number of layers of the floating image in the target displacement direction, calculating coordinate values of a corresponding sampling point of each pixel point in an initial deformation field in the floating image layer by layer through the target voxel spacing value, the target displacement amount set and the number of layers of each pixel point to obtain a coordinate of a corresponding real sampling point of each pixel point in the floating image, comparing the coordinate of each real sampling point with a sampling point interval of the floating image in the target displacement direction in sequence, determining the real sampling point which is not positioned in the sampling point interval as the abnormal sampling point, and determining the pixel point corresponding to the abnormal sampling point as the abnormal pixel point in the target displacement direction, thereby completing the operation of determining the abnormal pixel point in the target displacement direction.
In order to improve the recognition efficiency of abnormal pixels, optionally, in the image registration method provided by the embodiment of the present application, calculating, layer by layer, a coordinate value of a sampling point corresponding to each pixel point in an initial deformation field in a floating image according to a target voxel distance value, a target displacement set, and a layer number of each pixel point, to obtain a plurality of sampling point sets includes: calculating coordinate values of sampling points corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer according to the sequence from small layers to large layers until sampling points exceeding a sampling point interval do not exist in a sampling point set corresponding to the pixel points in the first target layer, and obtaining a plurality of first sampling point sets; under the condition that sampling points exceeding the sampling point interval do not exist in the sampling point set corresponding to the pixel points in the first target layer, calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the target displacement direction of the floating image layer by layer according to the sequence from the large layer number to the small layer number until the sampling points exceeding the sampling point interval do not exist in the sampling point set corresponding to the pixel points in the second target layer, and obtaining a plurality of second sampling point sets; and combining the plurality of first sampling point sets and the plurality of second sampling point sets to obtain a plurality of sampling point sets.
It should be noted that, under normal conditions, the abnormal pixel point is located at the edge position of the deformation field, so that the sampling point set can be obtained from the two sides to the center position by adopting the mode of normalizing the deformation field from the head and normalizing the deformation field from the tail, and whether the sampling point exceeding the sampling point interval exists in each layer of sampling points is sequentially judged until the sampling point exceeding the sampling point interval does not exist, thereby completing the obtaining operation of the sampling point set.
For example, the coordinate values of sampling points of the pixel points with the number of 0 in the initial deformation field in the target direction are calculated to obtain 100 sampling point coordinates, 50 sampling points exceeding the sampling point interval exist, the 100 sampling point coordinates are determined to be a first sampling point set, until no sampling point exceeding the sampling point interval exists in the sampling point coordinates corresponding to the nth layer, and n first sampling point sets are obtained.
Similarly, the coordinate values of sampling points of the pixel points with the number of M D in the initial deformation field in the target direction are calculated to obtain 100 sampling point coordinates, and 40 sampling points exceeding a sampling point interval exist, the 100 sampling point coordinates are determined to be a second sampling point set until no sampling point exceeding the sampling point interval exists in the sampling point coordinates corresponding to the M-th layer, and (M D -M) first sampling point sets are obtained, wherein M D can be the total number of layers of the initial deformation field, and the number of layers of the deformation field is consistent with the number of layers of the floating image.
The sampling point set is obtained in the mode from the head part and the tail part to the center, so that the number of sampling points to be checked can be effectively reduced, the judgment workload of whether the sampling points exceed a sampling point interval is improved, and the efficiency of obtaining abnormal sampling points is improved.
Optionally, in the image registration method provided by the embodiment of the present application, calculating, layer by layer, a coordinate value of a sampling point corresponding to each pixel point in the initial deformation field in the floating image according to the target voxel distance value, the target displacement set, and the layer number of each pixel point includes: multiplying the number of layers of the target pixel points and the target voxel spacing value for each target pixel point to obtain a target parameter, wherein the target pixel point is any pixel point in the initial deformation field; and obtaining the displacement of the target pixel point in the target displacement direction from the target displacement set, and adding the target parameter and the displacement of the target pixel point to obtain the coordinate value of the sampling point corresponding to the target pixel point.
Specifically, when calculating the coordinates of the sampling point corresponding to each pixel point, the calculation may be performed using formula 1, where formula 1 is as follows:
(1)
Wherein, A total number of layers of the deformation field representing the direction D of the target displacement,Represented as voxel-space values in the D-direction of the floating image,The displacement of each pixel point of the ith layer in the deformation field in the D direction is represented, and the initial value of i is 0.
The sampling point coordinates corresponding to each pixel point can be obtained through calculation according to the formula 1, and then the calculated sampling point coordinates can be compared with the sampling point interval, so that the sampling points which are not in the sampling point interval are determined, and the pixel points corresponding to the sampling points which are not in the sampling point interval are determined to be abnormal pixel points.
Optionally, in the image registration method provided by the embodiment of the present application, acquiring a sampling point interval in a target displacement direction includes: calculating the upper limit value of the sampling point interval according to the target layer number and the target voxel spacing value; and combining the preset lower limit value and the preset upper limit value into a sampling point interval.
Specifically, when determining the sampling point interval of each displacement direction, since the sampling point interval is composed of an upper limit value and a lower limit value, the lower limit value needs to be determined first, and since the sampling point interval is the range interval of the floating image, the lower limit value can be the minimum coordinates of the sampling point allowed by the floating imageSince the displacement amount is checked and normalized layer by layer from the ith layer of the deformation field to the last layer of the deformation field, the minimum allowable rangeMay be 0.
Further, in determining the upper limit value, it is possible to use a floating imageVoxel spacing in the mid-D directionAnd the number of layers of deformation field in the D directionDetermining allowable maximum coordinates of sampling pointsAnd willIs determined as the upper limit value because of the deformation fieldStarting to examine the displacement amount layer by layer toward the first layer deformation field, so the maximum allowable rangeThe calculation can be performed as in equation 2:
(2)
Wherein, As the upper limit value of the value,For the number of layers of the deformation field,Represented as voxel spacing values of the floating image in the D-direction.
I.e. the range interval is finally to be made [ [,And the sampling point interval in the target displacement direction is determined, so that the technical effect of accurately determining the sampling point interval is achieved, and the pixel point corresponding to the real sampling point in the sampling point interval is ensured to be an effective pixel point.
Optionally, in the image registration method provided by the embodiment of the present application, in each displacement set, changing the displacement of the abnormal pixel point in the corresponding abnormal pixel point set to a preset value, to obtain updated displacement sets in three displacement directions includes: and for the initial displacement set, acquiring an abnormal pixel point set corresponding to the initial displacement set, changing the displacement of the pixel points corresponding to the pixel points in the abnormal pixel point set into a preset value in the initial displacement set according to the corresponding relation between the pixel points in the abnormal pixel point set and the pixel points in the initial displacement set, and keeping the displacement of other pixel points unchanged to obtain an updated initial displacement set, wherein the initial displacement set is any one of the three displacement sets.
Specifically, after the abnormal pixel point set is determined, determining the displacement amount corresponding to the abnormal pixel point in the abnormal pixel point set in each displacement direction in the displacement amount set in the displacement direction, changing the displacement amount to a preset value, and keeping other displacement amounts unchanged, so as to obtain an updated displacement amount set in three displacement directions.
Further, since each updated displacement amount set includes the displacement amount of each pixel point in one direction, the displacement amount of each pixel point is sequentially obtained in each updated displacement amount set, so that updated displacement amount coordinates of each pixel point in three directions are obtained, and an updated deformation field is obtained.
Fig. 2 is a flowchart of an alternative image registration method according to an embodiment of the present application, where, as shown in fig. 2, when registering an image to be registered, the following steps may be adopted to perform a registration operation:
Firstly, acquiring a three-dimensional reference image F and a floating image M, and carrying out rigid registration on the floating image M based on the reference image F to obtain a floating image after rigid registration 。
Further, reference image F and floating imageInputting the deformation field to a preset deformation registration model to obtain a corresponding deformation field;
Second, for the deformation fields respectivelyThe displacement in the X direction is normalized to obtain a deformation field after the normalization in the X directionTo deformation fieldThe displacement in the Y direction is normalized to obtain a deformation field after the Y direction is normalizedTo deformation fieldThe displacement in the Z direction is normalized to obtain a deformation field after Z direction normalizationDeformation fieldAfter the displacement amount in the x, y and z directions is normalized, an omnibearing normalized deformation field is obtained。
Wherein the normalization method is shown in formula 3, wherein D represents the deformation field direction, and H and T represent the beginning of the normalization from the head and tail, respectively:
(3)
Finally, using an omni-directional canonical deformation field For floating imagesAnd (5) deforming to obtain a floating image after deformation registration.
Wherein, in the deformation fieldWhen performing normalization, first, from the deformation fieldObtaining the deformation displacement of the specified direction DSecond, for deformation fieldsStarting from the head part, normalizing the deformation field layer by layer, and obtaining the deformation field after normalizing the head directionThe normalized deformation field of the head direction is shown in formula 4:
(4)
then, to the deformation field Layer-by-layer normalized deformation field from the tail, and obtaining deformation field with normalized tail directionThe tail direction normalized deformation field is shown in formula 5:
(5)
Finally, the normalized deformation field Replacement deformation fieldThe deformation displacement in the original D direction is obtained to obtain a deformation field after the D direction is normalizedThe deformation fields in three directions are respectively normalized in the mode, so that the omni-directional normalized deformation field is obtained。
It should be noted that, when the specification is performed, the real sampling point coordinates of each pixel point in each deformation field in each direction may be calculated, and the real sampling point coordinates are compared with the sampling point ranges in the corresponding directions, so that the pixel point with the real sampling point coordinates outside the sampling point ranges is determined as an abnormal pixel point, and the displacement of the abnormal pixel point in the corresponding directions is changed to 0, thereby completing the specification of the deformation field.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides an image registration device, and the image registration device can be used for executing the image registration method provided by the embodiment of the application. The following describes an image registration apparatus provided by an embodiment of the present application.
Fig. 3 is a schematic diagram of an image registration apparatus provided according to an embodiment of the present application. As shown in fig. 3, the apparatus includes: an acquisition unit 31, a division unit 32, an update unit 33, a registration unit 34.
The obtaining unit 31 is configured to obtain a reference image and a floating image in an image to be registered, and input the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, where the initial deformation field is located in a three-dimensional coordinate system, and the initial deformation field includes a plurality of pixel points, and each pixel point carries a three-dimensional displacement.
The dividing unit 32 is configured to divide the three-dimensional displacement of the pixel points in the initial deformation field according to three displacement directions, so as to obtain three displacement sets, where each displacement set includes a plurality of pixel points and displacement of each pixel point in a corresponding displacement direction.
And an updating unit 33, configured to determine an abnormal pixel point in each displacement set according to the three-dimensional voxel distance value and the three-dimensional layer number of the floating image, and update the abnormal pixel point to obtain three updated displacement sets.
The registration unit 34 is configured to combine the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and perform a deformation registration operation on the floating image through the updated deformation field to obtain a registered image.
According to the image registration device provided by the embodiment of the application, the reference image and the floating image in the image to be registered are acquired through the acquisition unit 31, and the reference image and the floating image are input into the preset deformation registration model to obtain the initial deformation field, wherein the initial deformation field is positioned in the three-dimensional coordinate system, the initial deformation field comprises a plurality of pixel points, and each pixel point carries the three-dimensional displacement; the dividing unit 32 divides the three-dimensional displacement of the pixel points in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set comprises a plurality of pixel points and the displacement of each pixel point in the corresponding displacement direction; the updating unit 33 determines abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updates the abnormal pixel points to obtain three updated displacement sets; the registration unit 34 combines the three updated displacement amount sets according to the three displacement directions to obtain an updated deformation field, and performs deformation registration operation on the floating image through the updated deformation field to obtain a registered image. The problem that in the prior art, under the condition that deformation registration operation is carried out on a floating image by using a deformation field obtained by a deformation registration algorithm, a cavity can be generated in the obtained deformation registration image is solved, and by determining abnormal pixel points in an initial deformation field and changing the displacement in the abnormal pixel points, the updated deformation field can not register the pixel points positioned outside the floating image into the image when the deformation registration operation is carried out on the floating image, so that the cavity can not appear in the obtained registration image, and the effect of improving the accuracy of the registration image is achieved.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the updating unit 33 includes: the determining subunit is used for determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image to obtain abnormal pixel point sets in three displacement directions; and the changing subunit is used for changing the displacement of the abnormal pixel point in the corresponding abnormal pixel point set into a preset value in each displacement set to obtain updated displacement sets in three displacement directions.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the target displacement direction is any one of three displacement directions, and for the target displacement direction, the determining subunit includes: the acquisition module is used for acquiring voxel spacing values of the floating image in the target displacement direction, obtaining target voxel spacing values and acquiring a target displacement set in the target displacement direction; the first determining module is used for determining the number of layers of the initial deformation field in the target displacement direction, obtaining a target number of layers and determining the number of layers of each pixel point; the calculation module is used for calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel distance value, the target displacement set and the layer number of each pixel point to obtain a plurality of sampling point sets, wherein each sampling point set comprises the coordinate value of the sampling point of the pixel point positioned in the same layer; the second acquisition module is used for acquiring a sampling point interval in the target displacement direction, acquiring sampling points of which the coordinate values are not located in the sampling point interval, obtaining a plurality of abnormal sampling points, determining the pixel point corresponding to each abnormal sampling point as an abnormal pixel point, and obtaining an abnormal pixel point set in the target displacement direction.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the first calculating module includes: the first calculation sub-module is used for calculating coordinate values of sampling points corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer according to the sequence from the small layer number to the large layer number until no sampling points exceeding the sampling point interval exist in the sampling point set corresponding to the pixel point in the first target layer, so as to obtain a plurality of first sampling point sets; the second calculation sub-module is used for calculating the coordinate value of each pixel point in the initial deformation field in the target displacement direction of the corresponding sampling point in the floating image layer by layer according to the sequence from the large layer number to the small layer number under the condition that no sampling point exceeding the sampling point interval exists in the sampling point set corresponding to the pixel point in the first target layer, until no sampling point exceeding the sampling point interval exists in the sampling point set corresponding to the pixel point in the second target layer, so as to obtain a plurality of second sampling point sets; and the merging sub-module is used for merging the plurality of first sampling point sets and the plurality of second sampling point sets to obtain a plurality of sampling point sets.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the first calculating module includes: the third calculation sub-module is used for multiplying the number of layers of the target pixel points and the target voxel spacing value for each target pixel point to obtain a target parameter, wherein the target pixel point is any pixel point in the initial deformation field; and the fourth calculation sub-module is used for acquiring the displacement of the target pixel point in the target displacement direction from the target displacement set, and adding the target parameter and the displacement of the target pixel point to obtain the coordinate value of the sampling point corresponding to the target pixel point.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the second acquisition module includes: a fifth calculation sub-module, configured to calculate an upper limit value of the sampling point interval according to the target layer number and the target voxel spacing value; and the combination sub-module is used for combining the preset lower limit value and the preset upper limit value into a sampling point interval.
Optionally, in the image registration apparatus provided in the embodiment of the present application, in each displacement amount set, the changing subunit includes: the third obtaining module is configured to obtain, for the initial displacement set, an abnormal pixel set corresponding to the initial displacement set, change, in the initial displacement set, a displacement of a pixel corresponding to the pixel in the abnormal pixel set to a preset value according to a correspondence between the pixel in the abnormal pixel set and the pixel in the initial displacement set, and keep displacement of other pixels unchanged, so as to obtain an updated initial displacement set, where the initial displacement set is any one of the three displacement sets.
The image registration apparatus includes a processor and a memory, the acquisition unit 31, the division unit 32, the update unit 33, the registration unit 34, and the like are stored as program units in the memory, and the processor executes the program units stored in the memory to realize the corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problem that in the prior art, under the condition that a deformation field obtained by using a deformation registration algorithm performs deformation registration operation on a floating image, a cavity is generated in the obtained deformation registration image is solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the image registration method.
The embodiment of the invention provides a processor which is used for running a program, wherein the image registration method is executed when the program runs.
Fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 4, an electronic device 40 includes a processor, a memory, and a program stored on the memory and executable on the processor, where the processor implements the steps of the image registration method described above when executing the program. The device herein may be a server, PC, PAD, cell phone, etc.
The application also provides a computer program product adapted to perform a program initialized with the steps of the above-described image registration method when executed on a data processing device.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.
Claims (10)
1. A method of image registration, comprising:
Acquiring a reference image and a floating image in an image to be registered, and inputting the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is positioned in a three-dimensional coordinate system, the initial deformation field comprises a plurality of pixel points, and each pixel point carries a three-dimensional displacement;
Dividing the three-dimensional displacement of the pixel points in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set comprises the pixel points and the displacement of each pixel point in the corresponding displacement direction;
Determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updating the abnormal pixel points to obtain three updated displacement sets;
and combining the three updated displacement amount sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registration image.
2. The method of claim 1, wherein determining an outlier pixel in each set of displacement amounts from the three-dimensional voxel spacing values and the three-dimensional number of layers of the floating image and updating the outlier pixel to obtain three updated sets of displacement amounts comprises:
Determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image to obtain abnormal pixel point sets in three displacement directions;
And in each displacement set, changing the displacement of the abnormal pixel point in the corresponding abnormal pixel point set to a preset value to obtain updated displacement sets in three displacement directions.
3. The method of claim 2, wherein the target displacement direction is any one of the three displacement directions, and determining, for the target displacement direction, an abnormal pixel point in each displacement amount set according to the three-dimensional voxel pitch value and the three-dimensional layer number of the floating image, the abnormal pixel point set in the three displacement directions includes:
Acquiring a voxel spacing value of the floating image in a target displacement direction, obtaining a target voxel spacing value, and acquiring a target displacement set in the target displacement direction;
Determining the number of layers of the initial deformation field in the target displacement direction, obtaining a target number of layers, and determining the number of layers of each pixel point;
Calculating coordinate values of sampling points corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel distance value, the target displacement set and the layer number of each pixel point to obtain a plurality of sampling point sets, wherein each sampling point set comprises coordinate values of sampling points of the pixel points in the same layer;
And acquiring a sampling point interval in the target displacement direction, acquiring sampling points of which the coordinate values are not in the sampling point interval, obtaining a plurality of abnormal sampling points, determining the pixel point corresponding to each abnormal sampling point as an abnormal pixel point, and obtaining an abnormal pixel point set in the target displacement direction.
4. The method of claim 3, wherein calculating the coordinate values of the corresponding sampling points in the floating image for each pixel in the initial deformation field layer by layer according to the target voxel distance value, the target displacement amount set, and the layer number of each pixel, and obtaining a plurality of sampling point sets comprises:
Calculating coordinate values of sampling points corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer according to the sequence of the layer number from small to large until no sampling point exceeding the sampling point interval exists in the sampling point set corresponding to the pixel point in the first target layer, so as to obtain a plurality of first sampling point sets;
Under the condition that sampling points exceeding the sampling point interval do not exist in the sampling point set corresponding to the pixel points in the first target layer, calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the target displacement direction of the floating image layer by layer according to the sequence from the large layer number to the small layer number until the sampling points exceeding the sampling point interval do not exist in the sampling point set corresponding to the pixel points in the second target layer, and obtaining a plurality of second sampling point sets;
And combining the plurality of first sampling point sets and the plurality of second sampling point sets to obtain the plurality of sampling point sets.
5. A method according to claim 3, wherein calculating the coordinate value of the corresponding sampling point in the floating image for each pixel point in the initial deformation field layer by layer based on the target voxel spacing value, the target displacement amount set, and the number of layers for each pixel point comprises:
Multiplying the number of layers of the target pixel points and the target voxel distance value for each target pixel point to obtain a target parameter, wherein the target pixel point is any pixel point in the initial deformation field;
And acquiring the displacement of the target pixel point in the target displacement direction from the target displacement set, and adding the target parameter and the displacement of the target pixel point to obtain the coordinate value of the sampling point corresponding to the target pixel point.
6. A method according to claim 3, wherein obtaining the sampling point interval in the target displacement direction comprises:
calculating an upper limit value of the sampling point interval according to the target layer number and the target voxel spacing value;
And combining a preset lower limit value and the upper limit value into the sampling point interval.
7. The method of claim 2, wherein in each displacement set, changing the displacement of the abnormal pixel point in the corresponding abnormal pixel point set to a preset value to obtain updated displacement sets in three displacement directions includes:
And for an initial displacement set, acquiring an abnormal pixel point set corresponding to the initial displacement set, changing the displacement of the pixel point corresponding to the pixel point in the abnormal pixel point set into a preset value in the initial displacement set according to the corresponding relation between the pixel point in the abnormal pixel point set and the pixel point in the initial displacement set, and keeping the displacement of other pixel points unchanged to obtain an updated initial displacement set, wherein the initial displacement set is any one of the three displacement sets.
8. An image registration apparatus, comprising:
The acquisition unit is used for acquiring a reference image and a floating image in an image to be registered, and inputting the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is positioned in a three-dimensional coordinate system, the initial deformation field comprises a plurality of pixel points, and each pixel point carries a three-dimensional displacement;
the dividing unit is used for dividing the three-dimensional displacement of the pixel points in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set comprises the plurality of pixel points and the displacement of each pixel point in the corresponding displacement direction;
the updating unit is used for determining abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updating the abnormal pixel points to obtain three updated displacement sets;
and the registration unit is used for combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registration image.
9. A computer storage medium for storing a program, wherein the program when run controls a device in which the computer storage medium is located to perform the image registration method of any one of claims 1 to 7.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the image registration method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410783994.2A CN118350987A (en) | 2024-06-18 | 2024-06-18 | Image registration method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410783994.2A CN118350987A (en) | 2024-06-18 | 2024-06-18 | Image registration method and device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118350987A true CN118350987A (en) | 2024-07-16 |
Family
ID=91812422
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410783994.2A Pending CN118350987A (en) | 2024-06-18 | 2024-06-18 | Image registration method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118350987A (en) |
-
2024
- 2024-06-18 CN CN202410783994.2A patent/CN118350987A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2064652B1 (en) | Method of image processing | |
CN106033621B (en) | A kind of method and device of three-dimensional modeling | |
CN110223222B (en) | Image stitching method, image stitching device, and computer-readable storage medium | |
CN111488872B (en) | Image detection method, image detection device, computer equipment and storage medium | |
WO2021104153A1 (en) | Systems and methods for automated calibration | |
CN110751187B (en) | Training method of abnormal area image generation network and related product | |
WO2020215257A1 (en) | Image stereo matching method and assisted driving apparatus | |
CN108648145B (en) | Image splicing method and device | |
CN112884820A (en) | Method, device and equipment for training initial image registration and neural network | |
CN115457492A (en) | Target detection method and device, computer equipment and storage medium | |
WO2011163414A2 (en) | Mechanism for advanced structure generation and editing | |
EP3958170B1 (en) | Method and apparatus with liveness detection | |
CN111968160B (en) | Image matching method and storage medium | |
US20160267352A1 (en) | System and method for constructing a statistical shape model | |
CN116258725B (en) | Medical image processing method and device based on feature images and storage medium | |
CN116977671A (en) | Target tracking method, device, equipment and storage medium based on image space positioning | |
CN118350987A (en) | Image registration method and device, storage medium and electronic equipment | |
CN113111687A (en) | Data processing method and system and electronic equipment | |
CN112241984A (en) | Binocular vision sensor calibration method and device, computer equipment and storage medium | |
CN116152542A (en) | Training method, device, equipment and storage medium for image classification model | |
CN113255700B (en) | Image feature map processing method and device, storage medium and terminal | |
JP5051670B2 (en) | Image processing apparatus, image processing method, and image processing program | |
CN110322478B (en) | Feature point observation window processing method, tracking method, device, equipment and medium | |
CN116977162B (en) | Image registration method and device, storage medium and electronic equipment | |
CN115953440B (en) | Registration method and device of medical image, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination |