CN116977162A - Image registration method and device, storage medium and electronic equipment - Google Patents

Image registration method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN116977162A
CN116977162A CN202311239268.6A CN202311239268A CN116977162A CN 116977162 A CN116977162 A CN 116977162A CN 202311239268 A CN202311239268 A CN 202311239268A CN 116977162 A CN116977162 A CN 116977162A
Authority
CN
China
Prior art keywords
image
sub
pixel
layer
target
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.)
Granted
Application number
CN202311239268.6A
Other languages
Chinese (zh)
Other versions
CN116977162B (en
Inventor
周琦超
肖远彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Manteia Data Technology Co ltd In Xiamen Area Of Fujian Pilot Free Trade Zone
Original Assignee
Manteia Data Technology Co ltd In Xiamen Area Of Fujian Pilot Free Trade Zone
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Manteia Data Technology Co ltd In Xiamen Area Of Fujian Pilot Free Trade Zone filed Critical Manteia Data Technology Co ltd In Xiamen Area Of Fujian Pilot Free Trade Zone
Priority to CN202311239268.6A priority Critical patent/CN116977162B/en
Publication of CN116977162A publication Critical patent/CN116977162A/en
Application granted granted Critical
Publication of CN116977162B publication Critical patent/CN116977162B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Apparatus For Radiation Diagnosis (AREA)

Abstract

The application discloses an image registration method, an image registration device, a storage medium and electronic equipment. The method comprises the following steps: layering the reference image and the floating image according to a preset layering mode to obtain N layers of sub-images; determining a target image layer according to the number relation between a first pixel point in a sub-reference image and a second pixel point in a sub-floating image in each layer of sub-images; acquiring coordinates of difference pixel points in each target image layer; updating the sub-reference image in the target image layer according to the difference point coordinates to obtain an updated N-layer sub-image, and generating an updated reference image by the N-layer reference image in the updated N-layer sub-image; and performing deformation registration operation through the updated reference image and the updated floating image to obtain a deformation registration image. The application solves the problem of lower accuracy of the deformation result of the floating image caused by larger range of the difference area between the reference image and the floating image used in deformation alignment in the related technology.

Description

Image registration method and device, storage medium and electronic equipment
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.
After the deformation registration algorithm is used for carrying out deformation on the image to be registered, the similarity between the deformed image and the reference image is required to be maximized or the difference is required to be minimized. Therefore, the space transformation parameters are required to be continuously and iteratively calculated through an optimization algorithm, and the similarity degree of the deformed floating image and the reference image is measured by utilizing the similarity degree, so that the two images are spatially aligned, and an accurate registration image is obtained.
However, when the deformation registration is performed on the image to be registered, the deformation registration operation has a general problem that when a large difference exists between the reference image and the floating image, a target area exists in the floating image, but the reference image does not have a corresponding target area, so that when the deformation registration is performed, the obtained deformation result has a cavity in the target area, and the accuracy of the deformation registration result is reduced.
For example, fig. 1 is a schematic diagram of a reference image used in an optional prior art registration operation, fig. 2 is a schematic diagram of a floating image used in an optional prior art registration operation, and fig. 3 is a schematic diagram of a deformed registration result obtained in an optional prior art registration operation, as shown in fig. 1 to 3, when the registration operation is performed using fig. 1 and fig. 2, since the difference between the image outside the block area in fig. 1 and the image outside the block area in fig. 2 is large and the area of the image outside the block area occupies a large proportion of the entire image, the deformed registration image obtained when the deformed registration operation is performed using the reference image in fig. 1 and the floating image in fig. 2 may generate a plurality of void areas as shown in fig. 3, thereby reducing the accuracy of the deformed registration result.
Aiming at the problem that in the related art, the accuracy of the deformation result of the floating image is lower due to the fact that the difference between the reference image and the floating image in the deformation registration operation is large, 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 related art, the accuracy of a deformation result of a floating image is lower due to the fact that the difference between a reference image and the floating image in deformation registration operation is larger.
According to one aspect of the present application, a method of image registration is provided. The method comprises the following steps: obtaining a reference image and a floating image in an image to be registered, and layering the reference image and the floating image according to a preset layering mode to obtain N layers of sub-images, wherein each layer of sub-image comprises a sub-reference image and a sub-floating image, and N is a positive integer; determining target image layers according to the number relation between a first pixel point in a sub-reference image and a second pixel point in a sub-floating image in each layer of sub-images to obtain M target image layers; acquiring coordinates of difference pixel points in a first pixel point and a second pixel point in each target image layer to obtain M groups of difference point coordinates; updating sub-reference images in M target image layers according to M groups of difference point coordinates to obtain updated N-layer sub-images, and generating updated reference images by the N-layer reference images in the updated N-layer sub-images; and inputting the updated reference image and the floating image into a deformation registration model to obtain a target deformation field, and deforming the floating image by using the target deformation field to obtain a deformation registration image.
Optionally, determining the target image layers according to the number relationship between the first pixel point in the sub-reference image and the second pixel point in the sub-floating image in each layer of sub-images, and obtaining the M target image layers includes: respectively calculating the first number of first pixel points in a sub-reference image and the second number of second pixel points in a sub-floating image in each layer of sub-image to obtain N number groups; calculating the ratio of the second quantity to the first quantity in each quantity group to obtain N ratios, and determining target values in the N ratios to obtain M target values, wherein M is a positive integer and is smaller than N; and determining the sequence number of the image layer of the sub-image to which each target value belongs to obtain M target image layers.
Optionally, calculating the first number of first pixels in the sub-reference image and the second number of second pixels in the sub-floating image in each layer of sub-image respectively, to obtain N number groups includes: obtaining a sub-reference image of any layer, obtaining a target sub-reference image, and determining a pixel value of each pixel point in the target sub-reference image to obtain a plurality of first pixel values; counting the number of pixel values larger than a pixel threshold value in a plurality of first pixel values to obtain a first number, and determining the pixel points with the first pixel values larger than the pixel threshold value as first pixel points; acquiring a sub-floating image of any layer to obtain a target sub-floating image, and determining a pixel value of each second pixel point in the target sub-floating image to obtain a plurality of second pixel values; counting the number of pixel values larger than the pixel threshold value in the plurality of second pixel values to obtain a second number, and determining the pixel point with the second pixel value larger than the pixel threshold value as a second pixel point; the first number and the second number in each layer of sub-images are determined as a group of numbers, and N number groups are obtained.
Optionally, determining the target value of the N ratios, obtaining the M target values includes: and calculating the absolute value of the difference value of the ratio between the adjacent layers, and acquiring target values from the absolute values between the adjacent layers to obtain M target values, wherein the target values refer to the ratio related to the absolute value larger than the absolute value threshold.
Optionally, updating the sub-reference images in the M target image layers according to the M sets of difference point coordinates includes: for each group of difference point coordinates, determining a target image layer to which the difference point coordinates belong, and acquiring a sub-reference image and a sub-floating image under the target image layer; replacing the pixel value of the difference point coordinate in the sub-reference image with the pixel value of the difference point coordinate in the sub-floating image of the same layer to obtain an updated sub-reference image; and acquiring updated sub-reference images corresponding to each group of difference point coordinates, obtaining M updated sub-reference images, and replacing the sub-reference images in the image layer to which the M groups of difference point coordinates in the N-layer sub-images belong by using the M updated sub-reference images to obtain updated N-layer sub-images.
Optionally, obtaining coordinates of difference pixels in the first pixel point and the second pixel point in each target image layer, where obtaining M sets of coordinates of difference pixels includes: for each target image layer, acquiring coordinates of each first pixel point in a sub-reference image in the target image layer to obtain a first coordinate set, and acquiring coordinates of each second pixel point in a sub-floating image in the target image layer to obtain a second coordinate set; coordinates included in the second set of coordinates but not included in the first set of coordinates are acquired to obtain a set of difference point coordinates.
Optionally, before layering the reference image and the floating image in a preset layering manner, the method further includes: for a reference image and a floating image, acquiring a maximum pixel value and a minimum pixel value in the image, and subtracting the pixel value of each pixel point in the image from the minimum pixel value to obtain a plurality of target difference values; calculating the difference between the maximum pixel value and the minimum pixel value to obtain candidate difference values, and calculating the ratio of each target difference value to the candidate difference value to obtain a plurality of candidate pixel values; multiplying each candidate pixel value by a preset constant to obtain a plurality of target pixel values; updating pixel values in the image by the plurality of target pixel values to obtain an updated image, and layering the reference image and the floating image according to a preset layering mode by using the updated image.
Optionally, after obtaining coordinates of difference pixels in the first pixel point and the second pixel point in each target image layer, obtaining M sets of coordinates of difference points, the method further includes: inputting a reference image and a floating image in an image to be registered into a deformation registration model to obtain a candidate deformation field; initializing deformation field parameters corresponding to M groups of difference point coordinates in the candidate deformation field to obtain an updated candidate deformation field; and deforming the floating image by using the updated candidate deformation field to obtain a deformation registration image.
According to another aspect of the present application, an image registration apparatus is provided. The device comprises: the layering unit is used for acquiring a reference image and a floating image in the image to be registered, layering the reference image and the floating image according to a preset layering mode to obtain N layers of sub-images, wherein each layer of sub-image comprises a sub-reference image and a sub-floating image, and N is a positive integer; the determining unit is used for determining target image layers according to the number relation between the first pixel points in the sub-reference image and the second pixel points in the sub-floating image in each layer of sub-image to obtain M target image layers; the first acquisition unit is used for acquiring coordinates of difference pixel points in a first pixel point and a second pixel point in each target image layer to obtain M groups of difference point coordinates; the generating unit is used for updating the sub-reference images in the M target image layers according to the M groups of difference point coordinates to obtain updated N-layer sub-images, and generating updated reference images from the N-layer reference images in the updated N-layer sub-images; and the deformation unit is used for inputting the updated reference image and the floating image into the deformation registration model to obtain a target deformation field, and deforming the floating image by using the target deformation field to obtain a deformation registration image.
According to another aspect of the present application, 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 application, 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: obtaining a reference image and a floating image in an image to be registered, and layering the reference image and the floating image according to a preset layering mode to obtain N layers of sub-images, wherein each layer of sub-image comprises a sub-reference image and a sub-floating image, and N is a positive integer; determining target image layers according to the number relation between a first pixel point in a sub-reference image and a second pixel point in a sub-floating image in each layer of sub-images to obtain M target image layers; acquiring coordinates of difference pixel points in a first pixel point and a second pixel point in each target image layer to obtain M groups of difference point coordinates; updating sub-reference images in M target image layers according to M groups of difference point coordinates to obtain updated N-layer sub-images, and generating updated reference images by the N-layer reference images in the updated N-layer sub-images; and inputting the updated reference image and the floating image into a deformation registration model to obtain a target deformation field, and deforming the floating image by using the target deformation field to obtain a deformation registration image. The method solves the problem that in the related art, the accuracy of the deformation result of the floating image is lower due to the fact that the difference between the reference image and the floating image in the deformation registration operation is large. The reference image and the floating image are layered, the number relation between the pixel points of the partial areas in the two images in each layer is respectively determined, the number of difference layers is determined according to the number relation, the difference pixel points of the partial areas in the two images in the number of difference layers are obtained, the pixel values of the difference pixel points in the floating image are used for filling the pixel values of the difference pixel points in the reference image, the image difference area in the reference image is filled, and when the filled image is used for registration operation, no hole exists in the registered image, so that the effect of improving the accuracy of the registered 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 schematic illustration of an alternative prior art reference image used in performing a registration operation;
FIG. 2 is a schematic illustration of an alternative prior art floating image for use in performing a registration operation;
FIG. 3 is a schematic illustration of an alternative prior art deformation registration result obtained when performing a registration operation;
FIG. 4 is a flow chart of an image registration method provided in accordance with an embodiment of the present application;
FIG. 5 is a graph of ratio versus number of layers provided in accordance with an embodiment of the present application;
FIG. 6 is a flow chart of an alternative image registration method provided in accordance with an embodiment of the present application;
fig. 7 is a schematic diagram of an image registration apparatus provided according to an embodiment of the present application;
fig. 8 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 which 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, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party. 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.
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.
According to an embodiment of the present application, an image registration method is provided.
Fig. 4 is a flowchart of an image registration method provided according to an embodiment of the present application. As shown in fig. 4, the method comprises the steps of:
step S402, obtaining a reference image and a floating image in an image to be registered, and layering the reference image and the floating image according to a preset layering mode to obtain N layers of sub-images, wherein each layer of sub-image comprises a sub-reference image and a sub-floating image, and N is a positive integer.
It should be noted that, the image to be registered may be an image group that a user needs to perform registration, including a reference image and a floating image, where the reference image is a reference image, and the floating image is an image that needs to perform registration operation. 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 computed tomography) device and an image captured by an OCT (Optical Coherence Tomography ) medical imaging device.
Specifically, since the reference image and the floating image are both 3D images, in order to facilitate image processing, layering operations with the same manner can be performed on the reference image and the floating image along the same coordinate axis direction to obtain a plurality of image layers with the same number, and subsequent comparison and filling operations are performed on the sub-reference image and the sub-floating image in each image layer, so that difficulty in image processing is reduced.
When layering an image, the number of layers needs to be determined first, the number of layers needs to be determined according to the size of the image and the display content in the image, and after the number of layers is determined, the layering direction needs to be determined, so that the image can be layered in the direction, for example, the image can be layered along the Z-axis direction in a three-dimensional coordinate system.
Step S404, determining target image layers according to the number relation between the first pixel points in the sub-reference image and the second pixel points in the sub-floating image in each layer of sub-image, and obtaining M target image layers.
Specifically, after layering is completed, N-layer sub-images may be obtained, and at this time, a number relationship between a first pixel point in a sub-reference image and a second pixel point in a sub-floating image in each layer of sub-images needs to be calculated respectively, so as to determine whether the layer of sub-images needs to be processed according to the number relationship.
For example, the first pixel point may be a pixel point in the sub-reference image, where the pixel value of the pixel point is greater than a certain pixel threshold value a, the second pixel point may be a pixel point in the sub-floating image, where the pixel value of the pixel point is greater than the pixel threshold value a, and the number relationship may be a difference value, a sum of numbers, or a ratio of numbers of the first pixel point and the second pixel point, where the number relationship may be selected according to the processing effect of the image.
Further, after the number relation is determined, the number of layers of the sub-images to be processed can be determined according to the number relation, for example, if the number relation of the sub-images of the first layer is that the ratio is greater than 20, the first layer is determined to be the target image layer, and if the number relation of the sub-images of the 100 th layer is that the ratio is less than 5, the 100 th layer is not the target image layer, so that the multi-layer images are screened according to the number relation, the sub-images to be processed are obtained, and the processing flow of the images is simplified.
In step S406, coordinates of difference pixels in the first pixel point and the second pixel point in each target image layer are obtained, so as to obtain M groups of difference point coordinates.
Specifically, since the number of pixels between the first pixel in the sub-reference image and the second pixel in the sub-floating image is different, it is necessary to determine the difference pixel existing in the sub-floating image but not in the sub-reference image, and further determine the coordinates of the pixel to be filled in the sub-reference image.
Step S408, updating sub-reference images in M target image layers according to M groups of difference point coordinates to obtain updated N-layer sub-images, and generating updated reference images from the N-layer reference images in the updated N-layer sub-images.
Specifically, after the difference point coordinates are obtained, the pixel values of the pixel points at the difference point coordinate positions in the sub-floating image can be given to the pixel points at the difference point coordinate positions in the sub-reference image, so that the effect of updating the sub-reference image is achieved, after the sub-reference image in each target image layer is updated, the updated sub-reference image and the rest sub-reference images which are not updated are combined to obtain the reference image in the updated 3D state, and therefore the updated reference image can be used for completing the image registration operation, wherein the pixel values can be gray values, the gray of black is the minimum value of 0, and the gray value of white is the maximum value.
For example, in the case of coexisting in 150 layers of sub-images, after sub-reference images in the sub-images of the 1 st layer to the 50 th layer and the 100 th layer to the 150 th layer need to be updated, updating pixel values of the sub-reference images according to pixel values of difference point coordinates of sub-floating images corresponding to each layer of sub-images respectively, thereby obtaining updated sub-reference images, and splicing the updated sub-reference images and sub-reference images of the 51 th layer to the 99 th layer, which are not updated, according to a layer number sequence, thereby obtaining updated reference images.
It should be noted that after the updating of the reference image is completed, it is further required to determine whether the above pixel value changing operations are performed in all preset directions, where the preset directions may include multiple directions, for example, an X-axis direction, a Y-axis direction, and a Z-axis direction, and after the performing of the layering and image updating operations in the Z-axis direction is completed, the layering and image updating operations are also required to be performed in the X-axis direction and the Y-axis direction, so that layering and image updating are performed on the reference image in all three coordinate axis directions, and further, the filling effect of the pixel values of the pixels in the reference image is ensured.
Step S410, inputting the updated reference image and the floating image into a deformation registration model to obtain a target deformation field, and deforming the floating image by using the target deformation field to obtain a deformation registration image.
Specifically, after the updated reference image is obtained, the updated reference image and the floating image in the image to be registered can be input into an existing deformation registration model, a target deformation field is determined through the deformation registration model, the floating image is deformed according to the target deformation field, and therefore a more accurate deformation registration image is obtained, wherein the deformation registration model can be used for registering the reference image and the floating image through the steps of generating the deformation field, using the deformation field to register the deformation field, and updating the deformation field according to a registration result, so that the target deformation field for registering the floating image is obtained.
According to the image registration method provided by the embodiment of the application, the reference image and the floating image in the image to be registered are obtained, and the reference image and the floating image are layered according to a preset layering mode to obtain N layers of sub-images, wherein each layer of sub-image comprises one sub-reference image and one sub-floating image, and N is a positive integer; determining target image layers according to the number relation between a first pixel point in a sub-reference image and a second pixel point in a sub-floating image in each layer of sub-images to obtain M target image layers; acquiring coordinates of difference pixel points in a first pixel point and a second pixel point in each target image layer to obtain M groups of difference point coordinates; updating sub-reference images in M target image layers according to M groups of difference point coordinates to obtain updated N-layer sub-images, and generating updated reference images by the N-layer reference images in the updated N-layer sub-images; and inputting the updated reference image and the floating image into a deformation registration model to obtain a target deformation field, and deforming the floating image by using the target deformation field to obtain a deformation registration image. The method solves the problem that in the related art, the accuracy of the deformation result of the floating image is lower due to the fact that the difference between the reference image and the floating image in the deformation registration operation is large. The reference image and the floating image are layered, the number relation between the pixel points of the partial areas in the two images in each layer is respectively determined, the number of difference layers is determined according to the number relation, the difference pixel points of the partial areas in the two images in the number of difference layers are obtained, the pixel values of the difference pixel points in the floating image are used for filling the pixel values of the difference pixel points in the reference image, the image difference area in the reference image is filled, and when the filled image is used for registration operation, no hole exists in the registered image, so that the effect of improving the accuracy of the registered image is achieved.
Optionally, in the image registration method provided by the embodiment of the present application, determining the target image layers according to a number relationship between a first pixel point in a sub-reference image and a second pixel point in a sub-floating image in each layer of sub-images, where obtaining M target image layers includes: respectively calculating the first number of first pixel points in a sub-reference image and the second number of second pixel points in a sub-floating image in each layer of sub-image to obtain N number groups; calculating the ratio of the second quantity to the first quantity in each quantity group to obtain N ratios, and determining target values in the N ratios to obtain M target values, wherein M is a positive integer and is smaller than N; and determining the sequence number of the image layer of the sub-image to which each target value belongs to obtain M target image layers.
Specifically, for each layer of sub-image, the number of pixels in the sub-reference image may be obtained, and the first pixel may be selected from the number of pixels, and similarly, the number of pixels in the sub-floating image may be obtained, and the second pixel may be selected from the number of pixels, thereby obtaining the first number of pixels and the second number of pixels.
For example, whether the pixel point is the first pixel point or the second pixel point may be determined by determining the magnitude of the pixel value of the pixel point.
Further, after the number of the first pixel points and the second pixel points is determined, the ratio of the second number to the first number of each layer may be calculated as shown in formula 1:
(1)
wherein, the liquid crystal display device comprises a liquid crystal display device,for the ratio of the second number of layers to the first number of layers, l is the number of layers, M represents the sub-floating picture, F represents the sub-reference picture, C represents the number, N is the total number of layers of the sub-picture,/->For a second number of sub-floating pictures in the first layer,/for a second number of sub-floating pictures in the second layer,/for a second number of>Is a first number of sub-reference pictures in the first layer. And determining an abnormal ratio, namely a target value, so as to determine the layer number of the sub-image corresponding to the target value as a target image layer, and further processing the image in the target image layer.
In order to accurately determine the number of the first pixel points and the second pixel points, optionally, in the image registration method provided by the embodiment of the present application, calculating the first number of the first pixel points in the sub-reference image and the second number of the second pixel points in the sub-floating image in each layer of sub-images respectively, to obtain N number groups includes: obtaining a sub-reference image of any layer, obtaining a target sub-reference image, and determining a pixel value of each pixel point in the target sub-reference image to obtain a plurality of first pixel values; counting the number of pixel values larger than a pixel threshold value in a plurality of first pixel values to obtain a first number, and determining the pixel points with the first pixel values larger than the pixel threshold value as first pixel points; acquiring a sub-floating image of any layer to obtain a target sub-floating image, and determining a pixel value of each second pixel point in the target sub-floating image to obtain a plurality of second pixel values; counting the number of pixel values larger than the pixel threshold value in the plurality of second pixel values to obtain a second number, and determining the pixel point with the second pixel value larger than the pixel threshold value as a second pixel point; the first number and the second number in each layer of sub-images are determined as a group of numbers, and N number groups are obtained.
Specifically, for any layer of sub-image, when the first pixel point and the second pixel point are selected, the pixel values of all the pixel points in the sub-reference image in the layer of sub-image can be determined, and the pixel points with the pixel values larger than the pixel threshold value are selected from the pixel values, so that a plurality of first pixel points are obtained. Likewise, the same method may be adopted to select a pixel point with a pixel value greater than a pixel threshold value from all the pixel points in the sub-floating image, so as to obtain a plurality of second pixel points.
Further, the number of the first pixel points in the same layer is calculated to obtain a first number, the number of the second pixel points is calculated to obtain a second number, the first number and the second number in each layer of sub-image can be counted by using the method, the first number and the second number are determined to be a number group, and N number groups are obtained.
Optionally, in the image registration method provided by the embodiment of the present application, determining target values in the N ratios, obtaining M target values includes: and calculating the absolute value of the difference value of the ratio between the adjacent layers, and acquiring target values from the absolute values between the adjacent layers to obtain M target values, wherein the target values refer to the ratio related to the absolute value larger than the absolute value threshold.
Specifically, after the N ratios are obtained, the target value may be determined by calculating the absolute value of the difference between the ratios corresponding to the adjacent layers.
For example, the ratio of the first layer is 240, the ratio of the second layer is 200, the absolute value of the difference is 40, the ratio of the 260 th layer is 50, the ratio of the 261 st layer is 200, the absolute value of the difference is 150, and in the case that the absolute value threshold is 5, the absolute value corresponding to the absolute value greater than 5 is determined as the target value, namely, the first layer, the second layer, the 260 th layer and the 261 st layer.
Fig. 5 is a graph of the relationship between the ratio and the number of layers, as shown in fig. 5, in the case of a larger number of layers, since the relationship between the ratio and the number of layers is a U-shaped graph, the absolute value of the difference can be calculated in a manner of calculating from data on two sides to the center, that is, the absolute value of the difference between the first layer and the second layer and between the last layer and the last layer is calculated from the edge layer to the center layer, and the calculation is stopped when the absolute value of the difference is smaller than the preset difference, at this time, not only all target values can be ensured to be obtained, but also the calculation times can be reduced, and the calculation efficiency can be improved.
Optionally, in the image registration method provided by the embodiment of the present application, obtaining coordinates of difference pixels in the first pixel point and the second pixel point in each target image layer, where obtaining M sets of coordinates of difference points includes: for each target image layer, acquiring coordinates of each first pixel point in a sub-reference image in the target image layer to obtain a first coordinate set, and acquiring coordinates of each second pixel point in a sub-floating image in the target image layer to obtain a second coordinate set; coordinates included in the second set of coordinates but not included in the first set of coordinates are acquired to obtain a set of difference point coordinates.
Specifically, after the determination of the target image layer is completed, the pixel points in the sub-reference image in the target image layer, which need to be changed, can be further determined. When the sub-reference image is changed, the pixel value in the sub-floating image is given to the sub-reference image, and when the first pixel point and the second pixel point are selected, the selected pixel point is the pixel point with the pixel value larger than the threshold value, so that the number of the second pixel points in the sub-floating image is larger than that of the second pixel points in the sub-floating image, and the difference point between the sub-reference image and the sub-floating image can be determined by determining the coordinates of the pixel points which are positioned in the second pixel point but not positioned in the first pixel point, so that a group of difference point coordinate sets can be obtained.
Optionally, in the image registration method provided by the embodiment of the present application, updating sub-reference images in M target image layers according to M sets of difference point coordinates includes: for each group of difference point coordinates, determining a target image layer to which the difference point coordinates belong, and acquiring a sub-reference image and a sub-floating image under the target image layer; replacing the pixel value of the difference point coordinate in the sub-reference image with the pixel value of the difference point coordinate in the sub-floating image of the same layer to obtain an updated sub-reference image; and acquiring updated sub-reference images corresponding to each group of difference point coordinates, obtaining M updated sub-reference images, and replacing the sub-reference images in the image layer to which the M groups of difference point coordinates in the N-layer sub-images belong by using the M updated sub-reference images to obtain updated N-layer sub-images.
Specifically, after determining the M sets of difference point coordinates, the sub-reference image in the sub-image in each target image layer may be changed according to the difference point coordinate corresponding to the layer, that is, the pixel value of the pixel point at the difference point coordinate in the sub-reference image is changed to the pixel value of the pixel point at the difference point coordinate in the sub-floating image in the same layer, so as to complete the update operation of the sub-reference image.
Further, after updating the sub-reference image in each target image layer, the updated sub-reference image and the remaining sub-reference image which are not updated are combined to obtain an updated reference image in a 3D state, so that the image registration operation can be completed by using the updated reference image, wherein the pixel value can be a gray value, the gray of black is a minimum value of 0, and the gray value of white is a maximum value.
For example, in the case of coexisting in 150 layers of sub-images, after sub-reference images in the sub-images of the 1 st layer to the 50 th layer and the 100 th layer to the 150 th layer need to be updated, updating pixel values of the sub-reference images according to pixel values of difference point coordinates of sub-floating images corresponding to each layer of sub-images respectively, thereby obtaining updated sub-reference images, and splicing the updated sub-reference images and sub-reference images of the 51 th layer to the 99 th layer, which are not updated, according to a layer number sequence, thereby obtaining updated reference images.
Optionally, in the image registration method provided by the embodiment of the present application, before layering the reference image and the floating image in a preset layering manner, the method further includes: for a reference image and a floating image, acquiring a maximum pixel value and a minimum pixel value in the image, and subtracting the pixel value of each pixel point in the image from the minimum pixel value to obtain a plurality of target difference values; calculating the difference between the maximum pixel value and the minimum pixel value to obtain candidate difference values, and calculating the ratio of each target difference value to the candidate difference value to obtain a plurality of candidate pixel values; multiplying each candidate pixel value by a preset constant to obtain a plurality of target pixel values; updating pixel values in the image by the plurality of target pixel values to obtain an updated image, and layering the reference image and the floating image according to a preset layering mode by using the updated image.
It should be noted that, before image layering, the reference image and the floating image in the to-be-registered image need to be preprocessed, so that normal execution of the subsequent image changing process is ensured, and the execution efficiency and accuracy of the subsequent image changing process are improved.
Specifically, after the reference image and the floating image are obtained, the floating image after rigid registration is required to be subjected to rigid registration, the pixel value of each pixel point in the reference image and the floating image after rigid registration is subjected to normalization processing, so that the pixel value of each pixel point in the image is unified into a certain pixel value range, and further, the second pixel point in the floating image and the first pixel point in the reference image can be more accurately determined.
In the normalization operation, the pixel values of the pixels in each reference image or floating image may be normalized using equation 2, where equation 2 is as follows:
(2)
wherein, the liquid crystal display device comprises a liquid crystal display device,pixel value for P-point in normalized image, for>Pixel value of P point in image before normalization, P is any pixel point in image, ">And->Is a preset constant, and is implemented by +. >Can be-1000 @, ->Can be 3000 +.>For the minimum pixel value in the image before normalization, < +.>Is the maximum pixel value in the image before normalization.
After the normalization operation of the pixel values of the reference image and the floating image is completed, the obtained updated reference image and floating image can be used as the image to be registered to carry out subsequent layering operation.
Optionally, in the image registration method provided by the embodiment of the present application, after acquiring coordinates of difference pixels in a first pixel point and a second pixel point in each target image layer, obtaining M sets of difference point coordinates, the method further includes: inputting a reference image and a floating image in an image to be registered into a deformation registration model to obtain a candidate deformation field; initializing deformation field parameters corresponding to M groups of difference point coordinates in the candidate deformation field to obtain an updated candidate deformation field; and deforming the floating image by using the updated candidate deformation field to obtain a deformation registration image.
Specifically, when registration is performed, the registered image obtained by registering the floating image through the target deformation field obtained through training is used, so that after the initial reference image and the floating image are used for registration, deformation field parameters corresponding to M groups of difference point coordinates are initialized after the candidate deformation field is obtained, and therefore when registration is performed, when the pixels corresponding to the M groups of difference point coordinates are registered, the parameters are initialized, the pixels at the positions of the M groups of difference point coordinates in the floating image are not changed after registration, and therefore a difference region with difference between the floating image and the reference image cannot be deformed, and a cavity problem cannot exist.
Fig. 6 is a flowchart of an alternative image registration method according to an embodiment of the present application, as shown in fig. 6, a reference image F0 and a floating image M0 are first acquired, M0 is rigidly registered to obtain M1, and F0 and M1 are normalized to obtain a reference image F1 and a floating image M2.
Designating layering directions in the X, Y, Z three directions, layering F1 and M2 in the layering directions, calculating the first number of first pixel points in each layer of sub-reference image, calculating the second number of second pixel points in each layer of sub-floating image, calculating the ratio R of the second number to the first number in each layer, calculating the absolute value D of the ratio difference between adjacent layers according to the ratio R after the ratio R is obtained, acquiring a target value from the absolute value D, determining a target layer corresponding to the target value, and determining a difference coordinate set between the sub-reference image and the sub-floating image in the target layer.
And replacing the pixel value of the difference coordinate in the sub-reference image with the pixel value of the difference coordinate in the sub-floating image in each layer, generating an updated reference image F2 according to the replaced sub-reference image, judging whether the updating operation of the reference image in the X, Y, Z three directions is completed or not at this time, and if not, re-executing the steps of designating the layering direction in the X, Y, Z three directions and layering the F1 and the M2 in the layering direction, wherein the layering operation is required in the new direction.
Under the condition that the updating operation of the reference images in the three directions X, Y, Z is completed, F2 and M2 are input into a deformation registration model to obtain a target deformation field, and the target deformation field is used for registering M2 to obtain a registration result. The reference image and the floating image are layered, the number relation between the pixel points of the partial areas in the two images in each layer is respectively determined, the number of difference layers is determined according to the number relation, the difference pixel points of the partial areas in the two images in the number of difference layers are obtained, the pixel values of the difference pixel points in the floating image are used for filling the pixel values of the difference pixel points in the reference image, the image difference area in the reference image is filled, and when the filled image is used for registration operation, no hole exists in the image obtained through registration, so that the effect of improving the accuracy of the registered image is achieved.
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. 7 is a schematic diagram of an image registration apparatus provided according to an embodiment of the present application. As shown in fig. 7, the apparatus includes: layering unit 71, determining unit 72, generating unit 73, deforming unit 74.
And a layering unit 71, configured to acquire a reference image and a floating image in the image to be registered, and layer the reference image and the floating image according to a preset layering manner, so as to obtain N layers of sub-images, where each layer of sub-image includes one sub-reference image and one sub-floating image, and N is a positive integer.
A determining unit 72, configured to determine target image layers according to a number relationship between a first pixel point in a sub-reference image and a second pixel point in a sub-floating image in each layer of sub-images, so as to obtain M target image layers; the first acquisition unit is used for acquiring coordinates of difference pixel points in the first pixel point and the second pixel point in each target image layer to obtain M groups of difference point coordinates.
The generating unit 73 is configured to update sub-reference images in M target image layers according to M sets of difference point coordinates, obtain updated N-layer sub-images, and generate updated reference images from N-layer reference images in the updated N-layer sub-images.
And a deformation unit 74, configured to input the updated reference image and the floating image into a deformation registration model to obtain a target deformation field, and deform the floating image using the target deformation field to obtain a deformation registration 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 layering unit 71, and the reference image and the floating image are layered according to a preset layering mode to obtain N layers of sub-images, wherein each layer of sub-image comprises one sub-reference image and one sub-floating image, and N is a positive integer; the determining unit 72 determines target image layers according to the number relationship between the first pixel points in the sub-reference image and the second pixel points in the sub-floating image in each layer of sub-images, so as to obtain M target image layers; the first acquisition unit is used for acquiring coordinates of difference pixel points in a first pixel point and a second pixel point in each target image layer to obtain M groups of difference point coordinates; the generating unit 73 updates sub-reference images in the M target image layers according to the M sets of difference point coordinates to obtain updated N-layer sub-images, and generates updated reference images from the N-layer reference images in the updated N-layer sub-images; the deformation unit 74 inputs the updated reference image and the floating image into the deformation registration model to obtain a target deformation field, and deforms the floating image using the target deformation field to obtain a deformation registration image. The method solves the problem that in the related art, the accuracy of the deformation result of the floating image is lower due to the fact that the difference between the reference image and the floating image in the deformation registration operation is large. The reference image and the floating image are layered, the number relation between the pixel points of the partial areas in the two images in each layer is respectively determined, the number of difference layers is determined according to the number relation, the difference pixel points of the partial areas in the two images in the number of difference layers are obtained, the pixel values of the difference pixel points in the floating image are used for filling the pixel values of the difference pixel points in the reference image, the image difference area in the reference image is filled, and when the filled image is used for registration operation, no hole exists in the registered image, so that the effect of improving the accuracy of the registered image is achieved.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the determining unit 72 includes: the first calculation module is used for respectively calculating the first number of first pixel points in the sub-reference image and the second number of second pixel points in the sub-floating image in each layer of sub-image to obtain N number groups; the second calculation module is used for calculating the ratio of the second quantity to the first quantity in each quantity group to obtain N ratios, and determining target values in the N ratios to obtain M target values, wherein M is a positive integer and is smaller than N; and the first determining module is used for determining the image layer sequence number of the sub-image to which each target value belongs to obtain M target image layers.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the first calculating module includes: the first acquisition sub-module is used for acquiring sub-reference images of any layer to obtain a target sub-reference image, determining the pixel value of each pixel point in the target sub-reference image and obtaining a plurality of first pixel values; the first statistics sub-module is used for counting the number of pixel values larger than a pixel threshold value in a plurality of first pixel values to obtain a first number, and determining the pixel point with the first pixel value larger than the pixel threshold value as a first pixel point; the second acquisition sub-module is used for acquiring a sub-floating image of any layer to obtain a target sub-floating image, determining the pixel value of each second pixel point in the target sub-floating image and obtaining a plurality of second pixel values; the second statistical sub-module is used for counting the number of the pixel values larger than the pixel threshold value in the plurality of second pixel values to obtain a second number, and determining the pixel point with the second pixel value larger than the pixel threshold value as a second pixel point; and the determining submodule is used for determining the first quantity and the second quantity in each layer of sub-image as a group of quantity to obtain N quantity groups.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the second calculating module includes: and the calculating submodule is used for calculating the absolute value of the difference value of the ratio between the adjacent layers and obtaining target values from the absolute value between the adjacent layers to obtain M target values, wherein the target values are the ratio related to the absolute value which is larger than the absolute value threshold.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the generating unit 73 includes: the second determining module is used for determining a target image layer to which the difference point coordinates belong for each group of the difference point coordinates, and acquiring a sub-reference image and a sub-floating image under the target image layer; the first replacing module is used for replacing the pixel value of the difference point coordinate in the sub-reference image with the pixel value of the difference point coordinate in the same-layer sub-floating image to obtain an updated sub-reference image; and the second replacing module is used for acquiring updated sub-reference images corresponding to each group of difference point coordinates, obtaining M updated sub-reference images, and replacing the sub-reference images in the image layer to which the M groups of difference point coordinates in the N-layer sub-images belong by using the M updated sub-reference images to obtain updated N-layer sub-images.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the determining unit 72 includes: the first acquisition module is used for acquiring the coordinates of each first pixel point in the sub-reference image in the target image layer for each target image layer to obtain a first coordinate set, and acquiring the coordinates of each second pixel point in the sub-floating image in the target image layer to obtain a second coordinate set; the second obtaining module is configured to obtain coordinates that are included in the second coordinate set but are not included in the first coordinate set, and obtain a set of coordinates of the difference point.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the apparatus further includes: the acquisition unit is used for acquiring the maximum pixel value and the minimum pixel value in the image for the reference image and the floating image, and subtracting the pixel value of each pixel point in the image from the minimum pixel value to obtain a plurality of target difference values; the first calculation unit is used for calculating the difference between the maximum pixel value and the minimum pixel value to obtain candidate difference values, and calculating the ratio between each target difference value and the candidate difference value to obtain a plurality of candidate pixel values; the second calculation unit is used for multiplying each candidate pixel value with a preset constant to obtain a plurality of target pixel values; and an updating unit for updating pixel values in the image by the plurality of target pixel values, obtaining an updated image, and performing a step of layering the reference image and the floating image using the updated image.
Optionally, in the image registration apparatus provided in the embodiment of the present application, the apparatus further includes: the registration unit is used for inputting the reference image and the floating image in the image to be registered into the deformation registration model to obtain a candidate deformation field; the initializing unit is used for initializing deformation field parameters corresponding to M groups of difference point coordinates in the candidate deformation field to obtain an updated candidate deformation field; and the deformation unit is used for deforming the floating image by using the updated candidate deformation field to obtain a deformation registration image.
The image registration apparatus includes a processor and a memory, and the layering unit 71, the determining unit 72, the generating unit 73, the deforming unit 74, and the like are stored in the memory as program units, 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 related art, due to the fact that the difference between the reference image and the floating image in deformation registration operation is large, the accuracy of the deformation result of the floating image is low 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 application 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 application provides a processor which is used for running a program, wherein the image registration method is executed when the program runs.
As shown in fig. 8, an embodiment of the present application provides an electronic device, where the electronic device 80 includes a processor, a memory, and a program stored on the memory and executable on the processor, and the steps of the image registration method are implemented by the processor when the processor executes 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 (11)

1. A method of image registration, comprising:
obtaining a reference image and a floating image in an image to be registered, and layering the reference image and the floating image according to a preset layering mode to obtain N layers of sub-images, wherein each layer of sub-image comprises a sub-reference image and a sub-floating image, and N is a positive integer;
Determining target image layers according to the number relation between a first pixel point in a sub-reference image and a second pixel point in a sub-floating image in each layer of sub-images to obtain M target image layers, wherein M is a positive integer and is smaller than N;
acquiring coordinates of difference pixel points in a first pixel point and a second pixel point in each target image layer to obtain M groups of difference point coordinates;
updating sub-reference images in the M target image layers according to the M groups of difference point coordinates to obtain updated N-layer sub-images, and generating updated reference images by the N-layer reference images in the updated N-layer sub-images;
and inputting the updated reference image and the floating image into a deformation registration model to obtain a target deformation field, and deforming the floating image by using the target deformation field to obtain a deformation registration image.
2. The method of claim 1, wherein determining the target image layers based on a quantitative relationship between a first pixel in a sub-reference image and a second pixel in a sub-floating image in each layer of sub-images, the obtaining M target image layers comprises:
respectively calculating the first number of first pixel points in a sub-reference image and the second number of second pixel points in a sub-floating image in each layer of sub-image to obtain N number groups;
Calculating the ratio of the second quantity to the first quantity in each quantity group to obtain N ratios, and determining target values in the N ratios to obtain M target values;
and determining the sequence number of the image layer of the sub-image to which each target value belongs to obtain M target image layers.
3. The method of claim 2, wherein separately calculating the first number of first pixels in the sub-reference image and the second number of second pixels in the sub-floating image in each layer of sub-images to obtain the N number groups comprises:
obtaining a sub-reference image of any layer, obtaining a target sub-reference image, and determining a pixel value of each pixel point in the target sub-reference image to obtain a plurality of first pixel values;
counting the number of pixel values larger than a pixel threshold value in the plurality of first pixel values to obtain the first number, and determining the pixel point with the first pixel value larger than the pixel threshold value as a first pixel point;
acquiring a sub-floating image of any layer to obtain a target sub-floating image, and determining a pixel value of each second pixel point in the target sub-floating image to obtain a plurality of second pixel values;
counting the number of pixel values larger than the pixel threshold value in the plurality of second pixel values to obtain the second number, and determining the pixel point with the second pixel value larger than the pixel threshold value as a second pixel point;
And determining the first number and the second number in each layer of sub-image as a group number, and obtaining the N number groups.
4. The method of claim 2, wherein determining the target value of the N ratios, resulting in M target values, comprises:
and calculating the absolute value of the difference value of the ratio between the adjacent layers, and acquiring target values from the absolute values between the adjacent layers to obtain the M target values, wherein the target values are the ratio related to the absolute value larger than an absolute value threshold.
5. The method of claim 1, wherein updating sub-reference images in the M target image layers according to the M sets of difference point coordinates comprises:
for each group of difference point coordinates, determining a target image layer to which the difference point coordinates belong, and acquiring a sub-reference image and a sub-floating image under the target image layer;
replacing the pixel value of the difference point coordinate in the sub-reference image with the pixel value of the difference point coordinate in the sub-floating image of the same layer to obtain an updated sub-reference image;
and acquiring updated sub-reference images corresponding to each group of difference point coordinates, obtaining M updated sub-reference images, and replacing the sub-reference images in the image layer to which the M groups of difference point coordinates belong in the N-layer sub-images by using the M updated sub-reference images to obtain updated N-layer sub-images.
6. The method of claim 1, wherein obtaining coordinates of difference pixels in the first pixel and the second pixel in each target image layer, the obtaining M sets of difference coordinates comprises:
for each target image layer, acquiring coordinates of each first pixel point in a sub-reference image in the target image layer to obtain a first coordinate set, and acquiring coordinates of each second pixel point in a sub-floating image in the target image layer to obtain a second coordinate set;
obtaining coordinates contained in the second coordinate set but not contained in the first coordinate set, and obtaining a group of difference point coordinates.
7. The method of claim 1, wherein prior to layering the reference image and the floating image in a preset layering manner, the method further comprises:
for the reference image and the floating image, acquiring a maximum pixel value and a minimum pixel value in the image, and subtracting the pixel value of each pixel point in the image from the minimum pixel value to obtain a plurality of target difference values;
calculating the difference between the maximum pixel value and the minimum pixel value to obtain candidate difference values, and calculating the ratio between each target difference value and the candidate difference value to obtain a plurality of candidate pixel values;
Multiplying each candidate pixel value by a preset constant to obtain a plurality of target pixel values;
updating pixel values in the image by the target pixel values to obtain an updated image, and performing layering of the reference image and the floating image according to a preset layering mode by using the updated image.
8. The method of claim 1, wherein after obtaining coordinates of a difference pixel point in the first pixel point and the second pixel point in each target image layer, obtaining M sets of difference point coordinates, the method further comprises:
inputting a reference image and a floating image in the image to be registered into the deformation registration model to obtain a candidate deformation field;
initializing deformation field parameters corresponding to the M groups of difference point coordinates in the candidate deformation field to obtain an updated candidate deformation field;
and deforming the floating image by using the updated candidate deformation field to obtain the deformation registration image.
9. An image registration apparatus, comprising:
the layering unit is used for acquiring a reference image and a floating image in the image to be registered, layering the reference image and the floating image according to a preset layering mode to obtain N layers of sub-images, wherein each layer of sub-image comprises a sub-reference image and a sub-floating image, and N is a positive integer;
The determining unit is used for determining target image layers according to the number relation between the first pixel points in the sub-reference image and the second pixel points in the sub-floating image in each layer of sub-image to obtain M target image layers, wherein M is a positive integer, and M is smaller than N;
the first acquisition unit is used for acquiring coordinates of difference pixel points in a first pixel point and a second pixel point in each target image layer to obtain M groups of difference point coordinates;
the generating unit is used for updating the sub-reference images in the M target image layers according to the M groups of difference point coordinates to obtain updated N-layer sub-images, and generating updated reference images from the N-layer reference images in the updated N-layer sub-images;
and the deformation unit is used for inputting the updated reference image and the floating image into a deformation registration model to obtain a target deformation field, and deforming the floating image by using the target deformation field to obtain a deformation registration image.
10. 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 8.
11. 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-8.
CN202311239268.6A 2023-09-25 2023-09-25 Image registration method and device, storage medium and electronic equipment Active CN116977162B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311239268.6A CN116977162B (en) 2023-09-25 2023-09-25 Image registration method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311239268.6A CN116977162B (en) 2023-09-25 2023-09-25 Image registration method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN116977162A true CN116977162A (en) 2023-10-31
CN116977162B CN116977162B (en) 2024-01-19

Family

ID=88483587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311239268.6A Active CN116977162B (en) 2023-09-25 2023-09-25 Image registration method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116977162B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651127A (en) * 2012-04-01 2012-08-29 深圳市万兴软件有限公司 Image processing method and image processing system for super-resolution reconstruction
CN103369342A (en) * 2013-08-05 2013-10-23 重庆大学 Method for inpainting and restoring processing of vacancy of DIBR (Depth Image Based Rendering) target image
CN104268894A (en) * 2014-10-17 2015-01-07 盐城工学院 Fault slice image registration method based on target object pixel projection judgment
WO2017201751A1 (en) * 2016-05-27 2017-11-30 北京大学深圳研究生院 Hole filling method and device for virtual viewpoint video or image, and terminal
CN107871325A (en) * 2017-11-14 2018-04-03 华南理工大学 Image non-rigid registration method based on Log Euclidean covariance matrix descriptors
CN109087297A (en) * 2018-08-10 2018-12-25 成都工业职业技术学院 A kind of MR method for registering images based on adaptive neighborhood selection
CN109215064A (en) * 2018-08-03 2019-01-15 华南理工大学 A kind of medical image registration method based on super-pixel guide
CN112614131A (en) * 2021-01-10 2021-04-06 复旦大学 Pathological image analysis method based on deformation representation learning
US20210390716A1 (en) * 2020-06-11 2021-12-16 GE Precision Healthcare LLC Image registration method and model training method thereof
CN114140504A (en) * 2021-12-06 2022-03-04 安徽大学 Three-dimensional interactive biomedical image registration method
CN114170276A (en) * 2021-10-15 2022-03-11 烟台大学 Magnetic resonance brain image hippocampus registration method
WO2022126333A1 (en) * 2020-12-14 2022-06-23 浙江大学 Image filling method and apparatus, decoding method and apparatus, electronic device, and medium
WO2022126331A1 (en) * 2020-12-14 2022-06-23 浙江大学 Decoding method, inter-view prediction method, decoder, and encoder
CN115096257A (en) * 2022-06-22 2022-09-23 平安煤炭开采工程技术研究院有限责任公司 Mining area mining subsidence monitoring method and device

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651127A (en) * 2012-04-01 2012-08-29 深圳市万兴软件有限公司 Image processing method and image processing system for super-resolution reconstruction
CN103369342A (en) * 2013-08-05 2013-10-23 重庆大学 Method for inpainting and restoring processing of vacancy of DIBR (Depth Image Based Rendering) target image
CN104268894A (en) * 2014-10-17 2015-01-07 盐城工学院 Fault slice image registration method based on target object pixel projection judgment
WO2017201751A1 (en) * 2016-05-27 2017-11-30 北京大学深圳研究生院 Hole filling method and device for virtual viewpoint video or image, and terminal
CN107871325A (en) * 2017-11-14 2018-04-03 华南理工大学 Image non-rigid registration method based on Log Euclidean covariance matrix descriptors
CN109215064A (en) * 2018-08-03 2019-01-15 华南理工大学 A kind of medical image registration method based on super-pixel guide
CN109087297A (en) * 2018-08-10 2018-12-25 成都工业职业技术学院 A kind of MR method for registering images based on adaptive neighborhood selection
US20210390716A1 (en) * 2020-06-11 2021-12-16 GE Precision Healthcare LLC Image registration method and model training method thereof
WO2022126333A1 (en) * 2020-12-14 2022-06-23 浙江大学 Image filling method and apparatus, decoding method and apparatus, electronic device, and medium
WO2022126331A1 (en) * 2020-12-14 2022-06-23 浙江大学 Decoding method, inter-view prediction method, decoder, and encoder
CN112614131A (en) * 2021-01-10 2021-04-06 复旦大学 Pathological image analysis method based on deformation representation learning
CN114170276A (en) * 2021-10-15 2022-03-11 烟台大学 Magnetic resonance brain image hippocampus registration method
CN114140504A (en) * 2021-12-06 2022-03-04 安徽大学 Three-dimensional interactive biomedical image registration method
CN115096257A (en) * 2022-06-22 2022-09-23 平安煤炭开采工程技术研究院有限责任公司 Mining area mining subsidence monitoring method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
NEIL KIRBY等: ""The need for application-based adaptation of deformable image registration"", 《MEDICAL PHYSICS》, no. 2013, pages 1 - 10 *
刘薇;陈雷霆;: "基于自适应切空间的MRI图像配准", 计算机应用, no. 04, pages 1 - 5 *
王雪虎;杨健;艾丹妮;王涌天;: "结合先验稀疏字典和空洞填充的CT图像肝脏分割", 光学精密工程, no. 09, pages 1 - 11 *

Also Published As

Publication number Publication date
CN116977162B (en) 2024-01-19

Similar Documents

Publication Publication Date Title
CN111192356B (en) Method, device, equipment and storage medium for displaying region of interest
US11328412B2 (en) Hierarchical learning of weights of a neural network for performing multiple analyses
US20180260962A1 (en) Feature trackability ranking, systems and methods
CN108629283B (en) Face tracking method, device, equipment and storage medium
US8630509B2 (en) Structured grids for label propagation on a finite number of layers
CN111833237B (en) Image registration method based on convolutional neural network and local homography transformation
CN111612834B (en) Method, device and equipment for generating target image
CN111161398B (en) Image generation method, device, equipment and storage medium
CN108122280A (en) The method for reconstructing and device of a kind of three-dimensional point cloud
US20200327686A1 (en) Methods, systems, articles of manufacture, and apparatus to enhance image depth confidence maps
US10453203B2 (en) Method and apparatus for generating image alignment data
CN112862738B (en) Method and device for synthesizing multi-mode image, storage medium and processor
CN116563096B (en) Method and device for determining deformation field for image registration and electronic equipment
CN116977162B (en) Image registration method and device, storage medium and electronic equipment
CN116894844A (en) Hip joint image segmentation and key point linkage identification method and device
Song et al. Noise robust image matching using adjacent evaluation census transform and wavelet edge joint bilateral filter in stereo vision
Deuerling-Zheng et al. Motion compensation in digital subtraction angiography using graphics hardware
CN115880378A (en) Method and device for determining color information in radiation field
US20220012860A1 (en) Methods and apparatus to synthesize six degree-of-freedom views from sparse rgb-depth inputs
Xia et al. A coarse-to-fine ghost removal scheme for HDR imaging
CN115953440B (en) Registration method and device of medical image, storage medium and electronic equipment
CN115861394B (en) Medical image processing method and device, storage medium and electronic equipment
Tramnitzke et al. GPU based affine linear image registration using normalized gradient fields
US11253154B2 (en) Method and system for magnetic resonance imaging
US20220188996A1 (en) Feature-free photogrammetric 3d imaging with cameras under unconstrained motion

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant