CN115471528A - Registration method and device for upper and lower layer images of dual-energy detector, storage medium and terminal - Google Patents

Registration method and device for upper and lower layer images of dual-energy detector, storage medium and terminal Download PDF

Info

Publication number
CN115471528A
CN115471528A CN202210898626.3A CN202210898626A CN115471528A CN 115471528 A CN115471528 A CN 115471528A CN 202210898626 A CN202210898626 A CN 202210898626A CN 115471528 A CN115471528 A CN 115471528A
Authority
CN
China
Prior art keywords
image
registered
mark
dual
center
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
Application number
CN202210898626.3A
Other languages
Chinese (zh)
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.)
Iray Technology Co Ltd
Original Assignee
Iray Technology Co Ltd
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 Iray Technology Co Ltd filed Critical Iray Technology Co Ltd
Priority to CN202210898626.3A priority Critical patent/CN115471528A/en
Publication of CN115471528A publication Critical patent/CN115471528A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4007Interpolation-based scaling, e.g. bilinear interpolation
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The invention discloses a registration method and a registration device for upper and lower layer images of a dual-energy detector, a storage medium and a terminal, wherein the method comprises the following steps: acquiring a dual-energy upper and lower layer image to be registered; acquiring the coordinates of the central position of the angle mark in the image to be registered, acquiring the coordinates of the central position of the angle mark in the standard image, and calculating the scaling of the image to be registered; obtaining a zoomed image to be registered based on the zoom ratio; acquiring the central position coordinates of the central mark in the zoomed image to be registered, acquiring the central position coordinates of the central mark in the standard image, and calculating the translation distance and the rotation angle of the image to be registered; and carrying out translation rotation on the zoomed image to be registered based on the translation distance and the rotation angle. The method is simple to implement, high in precision and high in calculation speed, can effectively reduce the calculation complexity and reduce the requirement on a computer memory, and can well accurately coincide the corresponding positions of the upper layer image and the lower layer image in the dual-energy upper and lower layer images.

Description

Registration method and device for upper and lower layer images of dual-energy detector, storage medium and terminal
Technical Field
The invention relates to the technical field of medical image processing, in particular to a registration method and device for upper and lower layer images of a dual-energy detector, a storage medium and a terminal.
Background
The current dual-energy image registration is basically based on a double-exposure method of a single-layer flat panel detector, the time difference between two exposures is difficult to shorten to a satisfactory range, and motion artifacts caused by displacement, respiration, heartbeat, shooting noise and the like of a patient can not be effectively eliminated between two exposures, so that errors can occur when the method is applied to positioning of a focus by subtraction or judging different tissue structure differences. The single exposure method adopts a dual-energy flat panel detector, so that the motion artifact caused by the problems can be effectively avoided, and the consistent weakness that two perfectly coincident images are difficult to generate due to overlong exposure interval of the double exposure method is fundamentally overcome. Therefore, the range of use of the one-shot exposure method is gradually widened.
The upper and lower receivers of the dual-energy flat panel detector adopted by the primary exposure method have certain height difference, so that the images acquired by the upper and lower layers have the difference of the magnification; meanwhile, due to the reasons that the precision of the assembly process of the upper layer and the lower layer of the dual-energy flat panel detector is not enough and the like, certain translation and rotation difference of the upper layer image and the lower layer image can be introduced. Therefore, when the single exposure method is applied to energy subtraction, direct subtraction cannot be performed, and the images of the upper layer and the lower layer need to be registered first.
The existing registration method of the upper layer and the lower layer of the double-energy detector flat plate basically uses a central cross bar as a reference object, the edge registration precision is not high due to the mode, and meanwhile, the registration method of the upper layer and the lower layer of the double-energy detector flat plate is urgently needed to solve the problems by combining the complex processing degree of the existing double-energy detector flat plate on the registration of the upper layer and the lower layer of images.
Disclosure of Invention
The invention aims to solve the technical problems of the size difference of pixels at the same position during upper and lower layer imaging caused by the height difference of the upper and lower layer images and the position translation and rotation angle difference of the upper and lower layer images caused by an assembly process in the conventional dual-energy subtraction technology, and the registration accuracy of the conventional dual-energy detector flat plate upper and lower layer image registration method is not high.
In order to solve the technical problem, the invention provides a registration method of upper and lower layer images of a dual-energy detector, which comprises the following steps:
acquiring dual-energy upper and lower layer images to be registered, and determining the images to be registered and a standard image in the dual-energy upper and lower layer images to be registered, wherein each corner of the images to be registered and the standard image is provided with a corner mark, and the centers of the images to be registered and the standard image are provided with a plurality of center marks;
acquiring the coordinates of the central position of the angle mark in the image to be registered, acquiring the coordinates of the central position of the angle mark in the standard image, and calculating the scaling of the image to be registered based on the coordinates of the central position of the angle mark in the image to be registered and the coordinates of the central position of the angle mark in the standard image;
globally scaling the image to be registered based on the scaling ratio to obtain a scaled image to be registered;
acquiring the central position coordinates of the central mark in the zoomed image to be registered, acquiring the central position coordinates of the central mark in the standard image, and calculating the translation distance and the rotation angle of the image to be registered based on the central position coordinates of the central mark in the zoomed image to be registered and the central position coordinates of all the central marks in the standard image;
translating and rotating the zoomed image to be registered based on the translation distance and the rotation angle of the image to be registered to obtain a registered image;
the image to be registered is one of an upper image and a lower image in the dual-energy upper and lower layer image to be registered, and the standard image is the other of the upper image and the lower image in the dual-energy upper and lower layer image to be registered.
Preferably, acquiring the dual-energy upper and lower layer images to be registered comprises:
acquiring initial dual-energy upper and lower layer images based on a dual-energy image detector, and respectively and sequentially performing background correction, gain correction and bad pixel correction on the initial upper layer image and the initial lower layer image in the initial dual-energy upper and lower layer images to obtain a corrected upper layer image and a corrected lower layer image;
and respectively carrying out smoothing filtering processing on the corrected upper-layer image and the corrected lower-layer image to obtain a smoothed upper-layer image and a smoothed lower-layer image, wherein the smoothed upper-layer image and the smoothed lower-layer image form an upper-layer image and a lower-layer image to be registered.
Preferably, each of said corner marks is in accordance with: d a ≥λl a And d is b ≥λl b Where a and b are the two edges nearest to the corner mark, d a And d b Respectively representing the distance between the corner mark and a side a and b, wherein lambda is a distance parameter and ranges from 3.76% to 8% a And l b Respectively representing the length of the side a and the length of the side b;
the image to be registered and the standard image respectively comprise at least two central mark points, and each central mark point conforms to the following conditions: d r ≤1.88%l e In which d is r Represents the distance from the center mark point to the center of the image to which the center mark belongs, l e Indicating the length of the shorter side of the image to which the center mark belongs.
Preferably, when the marker is a steel ball, the corner mark and the center mark are both circular, and the obtaining manner of the coordinates of the center positions of the corner mark and the center mark includes:
carrying out gray level binarization processing on the image to which the corner mark or the center mark belongs to display the contour of the corner mark or the contour of the center mark;
and obtaining the center position coordinates of the corner mark or the center mark based on the corner mark outline or the center mark outline.
Preferably, when one corner marker is disposed at each of four corners of the image to be registered and the standard image, calculating the scaling of the image to be registered based on the coordinates of the center position of the corner marker in the image to be registered and the coordinates of the center position of the corner marker in the standard image includes:
the scale in the lateral direction is:
Figure BDA0003770007700000031
the scaling in the longitudinal direction is:
Figure BDA0003770007700000032
wherein (x) i ,y i ) I e (1, 2,3, 4) represents the coordinates of the center positions of the four corner marks in the standard image, (x) i' ,y i' ) I' e (1, 2,3, 4) represents the coordinates of the central positions of the four corner marks in the image to be registered; the lateral scaling and the longitudinal scaling form the scaling of the image to be registered.
Preferably, based on the scaling, the image to be registered is subjected to global scaling processing by a bilinear interpolation method to obtain a scaled image to be registered.
Preferably, the calculating the translation distance and the rotation angle of the image to be registered based on the center position coordinates of the center mark in the scaled image to be registered and the center position coordinates of all the center marks in the standard image comprises:
the transverse translation distance is:
Figure BDA0003770007700000033
the longitudinal translation distance is:
Figure BDA0003770007700000034
calculating the rotation angle of the image to be registered based on the coordinates of the central positions of the central marks in the zoomed image to be registered and the coordinates of the central positions of all the central marks in the standard image comprises:
Figure BDA0003770007700000035
wherein (x) j ,y j ) J e (1, \8230;, n) represents the center position coordinate of the jth center mark in the standard image, (x) j” ,y j” ) J' epsilon (1, \8230;, 4) represents the center position coordinate of the jth center mark in the zoomed image to be registered, and n represents the number of the center marks in the standard image and the zoomed image to be registered.
In order to solve the technical problem, the invention also provides a registration device for upper and lower layer images of the dual-energy detector, which comprises an upper and lower layer image acquisition module, a scaling module, a translation distance and rotation angle acquisition module and a translation rotation module;
the upper and lower layer image acquisition module is used for acquiring a to-be-registered dual-energy upper and lower layer image and determining the to-be-registered image and a standard image in the to-be-registered dual-energy upper and lower layer image, wherein each corner of the to-be-registered image and each corner of the standard image are provided with a corner mark, and the centers of the to-be-registered image and the standard image are provided with a plurality of center marks;
the scale obtaining module is configured to obtain a center position coordinate of the corner mark in the image to be registered, obtain a center position coordinate of the corner mark in the standard image, and calculate a scale of the image to be registered based on the center position coordinate of the corner mark in the image to be registered and the center position coordinate of the corner mark in the standard image;
the scaling module is used for carrying out global scaling on the image to be registered based on the scaling ratio so as to obtain a scaled image to be registered;
the translation distance and rotation angle acquisition module is used for acquiring the central position coordinates of the central mark in the zoomed image to be registered, acquiring the central position coordinates of the central mark in the standard image, and calculating the translation distance and the rotation angle of the image to be registered based on the central position coordinates of the central mark in the zoomed image to be registered and the central position coordinates of all the central marks in the standard image;
the translation and rotation module is used for carrying out translation and rotation on the zoomed image to be registered based on the translation distance and the rotation angle of the image to be registered so as to obtain the registered image;
the image to be registered is one of an upper image and a lower image in the dual-energy upper and lower images to be registered, and the standard image is the other of the upper image and the lower image in the dual-energy upper and lower images to be registered.
In order to solve the above technical problem, the present invention provides a storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement a method for registering upper and lower image layers of a dual-energy detector.
In order to solve the above technical problem, the present invention provides a terminal, including: the system comprises a processor and a memory, wherein the memory is in communication connection with the processor;
the memory is used for storing computer programs, and the processor is used for executing the computer programs stored by the memory so as to enable the terminal to execute the registration method of the upper and lower layers of images of the dual-energy detector.
Compared with the prior art, one or more embodiments in the above scheme can have the following advantages or beneficial effects:
by applying the registration method of the upper and lower layer images of the dual-energy detector provided by the embodiment of the invention, the angle marks are arranged on the upper and lower layer images of the dual energy, and the scaling ratio between the upper layer image and the lower layer image is obtained based on the position coordinates of the angle marks of the upper layer image and the lower layer image in the upper and lower layer images of the dual energy; then based on the center mark in the dual-energy upper and lower layer images, obtaining the offset distance and the rotation angle between the upper layer image and the lower layer image, and further realizing the accurate matching of the pixels of the upper and lower layer images; the problems of the size difference of the same-position pixels during upper and lower imaging caused by the height difference of the upper and lower images and the position translation and rotation angle difference of the upper and lower image caused by an assembly process in the existing dual-energy subtraction technology are solved. The method is simple to implement, high in precision and high in calculation speed, can effectively reduce the calculation complexity and reduce the requirements on a computer memory, and can well accurately coincide the corresponding positions of the upper layer image and the lower layer image in the dual-energy upper and lower layer images.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart illustrating a method for registering upper and lower layer images of a dual-energy detector according to an embodiment of the present invention;
FIG. 2 is a schematic diagram showing a position of an angle mark and a center mark in an upper image and a lower image of a dual-energy detector according to a first embodiment of the present invention;
FIG. 3 shows a schematic diagram of the image comparison before and after the registration of the upper image and the lower image in the dual-energy upper and lower images of the Chinese standard box in the embodiment of the present invention;
FIG. 4 is an enlarged and schematic view of a portion of the detail of FIG. 3 according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram illustrating an upper-layer image registration device and a lower-layer image registration device of a dual-energy detector according to an embodiment of the invention;
fig. 6 shows a schematic structural diagram of a four-terminal according to an embodiment of the present invention;
Detailed Description
The following detailed description of the embodiments of the present invention will be provided with reference to the drawings and examples, so that how to apply the technical means to solve the technical problems and achieve the technical effects can be fully understood and implemented. It should be noted that, as long as there is no conflict, the embodiments and the features of the embodiments of the present invention may be combined with each other, and the technical solutions formed are within the scope of the present invention.
The dual-energy flat panel detector is a device adopted when implementing a one-time exposure method, and the upper and lower receivers of the dual-energy flat panel detector have certain height difference, so that images acquired by the upper and lower layers have difference of magnification. The existing registration method of the upper layer and the lower layer of the primary exposure basically takes a central cross bar as a reference, the edge registration precision is not high due to the mode, and the complex processing degree of the existing dual-energy detector flat plate on the registration of the upper layer image and the lower layer image is combined.
Example one
In order to solve the technical problems in the prior art, the embodiment of the invention provides a registration method for upper and lower layer images of a dual-energy detector.
FIG. 1 is a flow chart of a method for registering upper and lower layer images of a dual-energy detector according to an embodiment of the present invention; referring to fig. 1, a registration method of upper and lower layer images of a dual-energy detector according to an embodiment of the present invention includes the following steps.
Step S101, acquiring dual-energy upper and lower layer images to be registered, and determining an image to be registered and a standard image in the dual-energy upper and lower layer images to be registered, wherein the image to be registered and the standard image both comprise a plurality of angle marks and a plurality of center marks.
Specifically, acquiring initial dual-energy upper and lower layer images needing to be registered by a dual-energy image detector, wherein the initial dual-energy upper and lower layer images comprise initial upper layer images and initial lower layer images; and the acquired initial dual-energy upper and lower layer images are both still images, and further the initial upper layer image and the initial lower layer image are still images. And then respectively correcting the initial upper layer image and the initial lower layer image in the initial dual-energy upper and lower layer images to obtain a corrected upper layer image and a corrected lower layer image. The specific correction process comprises the following steps: performing background correction, gain correction and bad pixel correction on the initial upper layer image to obtain a corrected upper layer image; and similarly, performing background correction, gain correction and bad pixel correction on the initial lower layer image to obtain a corrected lower layer image. In addition, the order of the background correction, the gain correction, and the bad pixel correction performed on the image is not limited, and the image obtained by the above-described correction is uniform as a whole.
After the initial dual-energy upper and lower layer images are corrected, the corrected images need to be subjected to smooth filtering processing so as to reduce the influence of noise fluctuation on mark searching. Further, the upper layer image after the correction and the lower layer image after the correction need to be respectively subjected to smoothing filtering processing to obtain the upper layer image after the smoothing processing and the lower layer image after the lower smoothing processing. And then taking the upper layer image after the smoothing treatment and the lower layer image after the lower smoothing treatment as the dual-energy upper and lower layer images to be registered.
In order to implement the method of the present invention, before the dual-energy upper and lower layer images are obtained, a marker needs to be set in the dual-energy image detector, and the marker set in the dual-energy image detector can form a marker in the acquired dual-energy upper and lower layer images. And all the marks in the upper image and the lower image in the dual-energy upper and lower images should be in a corresponding relationship.
Further, the marker can be a steel ball, a wafer and other props capable of marking a determined position. And the marks on the dual-energy upper and lower layer images comprise corner marks arranged at four corners of the images and a plurality of center marks arranged at the periphery of the image center, wherein the corner marks arranged at the four corners of the images can be set to be one or more. And each set corner mark is required to meet the following regulation: the set corner mark should be as close as possible to the corresponding corner in the image, and each corner mark also needs to meet the following conditions: i.e. d a ≥λl a And d is b ≥λl b Where a and b are the two edges nearest to the corner mark, d a And d b Respectively representing the distance between the corner mark and the side a and the side b, wherein lambda is a distance parameter and ranges from 3.76 percent to 8 percent, and l a And l b Respectively representing the length of the a side and the length of the b side. The arrangement can ensure double-energy upper and lower image placesThe corresponding real object is positioned in the same plane at the four corner marks as much as possible, and simultaneously, the corner marks of the set pair are ensured not to be too close to the edges of the image to cause deficiency, so that the calibration result is influenced.
Each set center mark needs to meet the following conditions: i.e. d r ≤1.88%l e In which d is r Indicates the distance from the center mark point to the center of the image to which the center mark belongs, l e Indicating the length of the shorter side in the image to which the center mark belongs; and at least two central mark points are arranged. Fig. 2 is a schematic diagram illustrating an arrangement position of corner marks and center marks in upper and lower layer images of a dual-energy detector according to a first embodiment of the invention.
The position of the marker for realizing the above-described marking may be set in accordance with actual conditions, and is not limited to a large amount.
After the dual-energy upper and lower layer images to be registered are obtained, the images to be registered to be subjected to zooming movement and rotation operation and the standard images subjected to zooming movement and rotation operation and referred by the images to be registered are determined from the upper layer images and the lower layer images of the dual-energy upper and lower layer images to be registered. Specifically, the scaling movement and rotation operation may be performed on the lower layer image based on the upper layer image, and the scaling movement and rotation operation may also be performed on the upper layer image based on the lower layer image, so that the image to be registered may be set as one of the upper layer image and the lower layer image in the dual-energy upper and lower layer image to be registered, and the standard image may be set as the other of the upper layer image and the lower layer image in the dual-energy upper and lower layer image to be registered.
Step S102, obtaining the coordinates of the center position of the angle mark in the image to be registered, obtaining the coordinates of the center position of the angle mark in the standard image, and calculating the scaling of the image to be registered based on the coordinates of the center position of the angle mark in the image to be registered and the coordinates of the center position of the angle mark in the standard image.
Specifically, when the marker is a steel ball, the corner marks presented in the to-be-registered dual-energy upper and lower layer images are all circular, and the center position coordinates of the corner marks in the to-be-registered image are obtained in the following manner: carrying out gray level binarization processing on the image to be registered so as to display all corner mark outlines in the image to be registered; and then, the center coordinates of all the angle marks are obtained by using a centroid method. In the same way, the coordinate obtaining mode of the central position of the corner mark in the standard image is as follows: carrying out gray level binarization processing on the standard image to display all corner mark outlines in the standard image; and then, the center coordinates of all the angle marks are solved by using a centroid method.
And then, calculating the scaling of the image to be registered based on the obtained central position coordinates of the angle marks in the image to be registered and the central position coordinates of the angle marks in the standard image. It should be noted that, when four corners of the to-be-registered image and the standard image are each provided with an angle mark, the scaling calculation process of the to-be-registered image is as follows:
suppose (x) i ,y i ) I e (1, 2,3, 4) represents the center position coordinates of the four corner marks in the standard image, (x) i' ,y i' ) I' belongs to (1, 2,3, 4) represents the coordinates of the central positions of four corner marks in the image to be registered; the lateral scaling expression in the scaling of the image to be registered is as follows:
Figure BDA0003770007700000071
the vertical scale ratio expression in the scale ratio of the image to be registered is as follows:
Figure BDA0003770007700000072
further, the scaling in the horizontal direction and the scaling in the vertical direction form the scaling of the image to be registered.
When the four corners of the registered image and the standard image are provided with a plurality of corner marks, one corner mark can be selected from the plurality of corner marks arranged at each corner to be used for calculating the scaling, and then the scaling of the image to be registered is calculated through the expression (1) and the expression (2).
Furthermore, the angle mark used in the unique calculation of the scaling corresponding to each angle is determined based on the plurality of angle marks arranged at each angle in other reasonable modes, and then the scaling of the image to be registered is calculated through the expression (1) and the expression (2).
Furthermore, the scaling of the plurality of temporary images to be registered can be calculated through the expressions (1) and (2) based on different angle marks at each angle, and then the scaling of the images to be registered can be obtained through the calculated scaling of the plurality of temporary images to be registered.
The specific acquisition mode adopted by the scaling of the image to be registered can be determined based on actual conditions, and is not excessively limited herein. Meanwhile, it should be noted that if other props capable of marking a determined position are selected as markers, the calculation mode of the mark center position coordinates can also be changed based on actual situations, and no limitation is imposed on the calculation mode.
And S103, carrying out global scaling on the image to be registered based on the scaling ratio to obtain the scaled image to be registered.
Specifically, based on the obtained scaling, the image to be registered is subjected to global scaling processing by a bilinear interpolation method, so as to obtain a scaled image to be registered. Specifically, the method for acquiring a single pixel in the zoomed image to be registered is as follows: assuming that the pixel is a target pixel, a floating point coordinate obtained by inverse transformation of a coordinate (x, y) of the target pixel is (i + u, j + v) (where i and j are both integer parts of the floating point coordinate, and u and v are decimal parts of the floating point coordinate, and are floating point numbers in an interval of [0,1 ]), and a pixel value calculation expression of the target pixel is as follows: h (x, y) = (1-u) (1-v) f (i, j) + (1-u) vf (i, j + 1) + u (1-v) f (i +1, j) + uvf (i +1, j +) 1. That is, the pixel value of the target pixel can be determined by the pixel values corresponding to the coordinates (i, j), (i +1, j), (i, j + 1), (i +1, j + 1) in the original image. Where f (i, j) represents the pixel value at the (i, j) th position in the image to be registered before the original un-scaling. It should be noted that, in the above calculation process, the pixel values of the pixel portions outside the edge of the image to be registered before the original non-scaling operation can be replaced by 0 values. I.e. for example (i, j) is already an edge pixel in the image to be registered before the original non-scaling, the pixel values of (i +1, j + 1) and other points without corresponding pixels can be replaced with a 0 value.
Repeating the above process can obtain all pixels in the zoomed image to be registered, that is, obtain the zoomed image to be registered.
And step S104, acquiring the coordinate of the central position of the central mark in the zoomed image to be registered, acquiring the coordinate of the central position of the central mark in the standard image, and calculating the translation distance and the rotation angle of the image to be registered based on the coordinate of the central position of the central mark in the zoomed image to be registered and the coordinate of the central position of the central mark in the standard image.
Specifically, in the same manner as the obtaining of the coordinates of the center position of each corner mark in step S102, the obtaining of the coordinates of the center position of each center mark in the zoomed image to be registered is as follows: carrying out gray level binarization processing on the zoomed image to be registered so as to display all the central mark outlines in the zoomed image to be registered; and then solving the coordinates of the circle centers of all the center marks in the zoomed image to be registered by using a centroid method. The acquisition mode of the center position coordinates of each center mark in the standard image is as follows: carrying out gray level binarization processing on the standard image to display all the central mark outlines in the zoomed image to be registered; and then, solving the coordinates of the circle centers of all the center marks in the standard image by using a centroid method.
And then calculating the translation distance and the rotation angle of the image to be registered based on the obtained central position coordinates of all the central marks in the zoomed image to be registered and the central position coordinates of all the central marks in the standard image. The calculation process of the translation distance of the image to be registered specifically comprises the following steps:
suppose (x) j ,y j ) J e (1, \8230;, n) represents the center position coordinate of the jth center mark in the standard image, (x) j” ,y j” ) J'. Epsilon (1, \8230;, 4) represents the center position coordinate of the jth center mark in the zoomed image to be registered, and n represents the number of the center marks in the standard image and the zoomed image to be registered. Then the
The translation distance in the lateral direction among the translation distances of the images to be registered is expressed as:
Figure BDA0003770007700000091
the expression of the longitudinal translation distance among the translation distances of the images to be registered is:
Figure BDA0003770007700000092
the rotation angle of the image to be registered is further calculated as follows:
Figure BDA0003770007700000093
and S105, performing translation rotation on the zoomed image to be registered based on the translation distance and the rotation angle to acquire the image after registration.
Specifically, the zoomed image to be registered is translated and rotated based on the translation distance and the rotation angle of the image to be registered, so that the image to be registered after being zoomed, translated and rotated is obtained, and the image to be registered and the standard image are in a registration relationship at the moment.
FIG. 3 shows a schematic diagram of image comparison before and after registration of an upper image and a lower image in a dual-energy upper and lower image of a Chinese standard box in an embodiment of the present invention; FIG. 4 is an enlarged and schematic view of a portion of the detail of FIG. 3 according to an embodiment of the present invention; as can be seen from fig. 3 and 4, the actual information of the original image is not changed by the registration, and the registered previous layer images can be well overlapped, and the overlapping of the detail part is good.
The embodiment of the invention can solve the problem of dislocation of corresponding pixel points of upper and lower images caused by difference of imaging magnification of the upper and lower layers of the dual-energy detector in the prior art and the problem of dislocation of the upper and lower images caused by the defect which is difficult to avoid in the design and assembly process of the dual-energy detector.
According to the registration method of the upper layer image and the lower layer image of the dual-energy detector, the angle marks are arranged on the upper layer image and the lower layer image of the dual-energy detector, and the scaling ratio between the upper layer image and the lower layer image is obtained based on the position coordinates of the angle marks of the upper layer image and the lower layer image in the upper layer image and the lower layer image of the dual-energy detector; then based on the center mark in the dual-energy upper and lower layer images, obtaining the offset distance and the rotation angle between the upper layer image and the lower layer image, and further realizing the accurate matching of the pixels of the upper and lower layer images; the problems of the size difference of pixels at the same position during imaging of an upper layer and a lower layer caused by the height difference of the upper layer and the lower layer images and the position translation and rotation angle difference of the pixels of the upper layer and the lower layer caused by an assembly process in the existing dual-energy subtraction technology are solved. The method is simple to implement, high in precision and high in calculation speed, can effectively reduce the calculation complexity and the requirement on a computer memory, and can well accurately coincide the corresponding positions of the upper layer image and the lower layer image in the dual-energy upper and lower layer images.
Example two
In order to solve the technical problems in the prior art, the embodiment of the invention provides a registration device for upper and lower layer images of a dual-energy detector.
FIG. 5 is a schematic structural diagram illustrating an upper-layer image registration device and a lower-layer image registration device of a dual-energy detector according to an embodiment of the invention; referring to fig. 5, the device for registering upper and lower layer images of a dual-energy detector in the embodiment of the present invention includes an upper and lower layer image acquisition module, a scaling module, a translation distance and rotation angle acquisition module, and a translation rotation module.
The upper and lower layer image acquisition module is used for acquiring dual-energy upper and lower layer images to be registered and determining the images to be registered and standard images in the dual-energy upper and lower layer images to be registered, each corner of the images to be registered and each corner of the standard images are provided with a corner mark, and the centers of the images to be registered and the standard images are provided with a plurality of center marks;
the zoom ratio acquisition module is used for acquiring the center position coordinates of the angle marks in the image to be registered, acquiring the center position coordinates of the angle marks in the standard image, and calculating the zoom ratio of the image to be registered based on the center position coordinates of the angle marks in the image to be registered and the center position coordinates of the angle marks in the standard image;
the scaling module is used for carrying out global scaling on the image to be registered based on the scaling ratio so as to obtain the scaled image to be registered;
the translation distance and rotation angle acquisition module is used for acquiring the central position coordinates of the central mark in the zoomed image to be registered, acquiring the central position coordinates of the central mark in the standard image, and calculating the translation distance and the rotation angle of the image to be registered based on the central position coordinates of the central mark in the zoomed image to be registered and the central position coordinates of all the central marks in the standard image;
the translation and rotation module is used for carrying out translation and rotation on the zoomed image to be registered based on the translation distance and the rotation angle of the image to be registered so as to obtain the registered image;
the standard image is the other of the upper layer image and the lower layer image in the dual-energy upper and lower layer images to be registered.
According to the upper-layer and lower-layer image registration device of the dual-energy detector, the angle marks are arranged on the dual-energy upper-layer and lower-layer images, and the scaling between the upper-layer image and the lower-layer image is obtained based on the position coordinates of the angle marks of the upper-layer image and the lower-layer image in the dual-energy upper-layer and lower-layer images; then based on the center mark in the dual-energy upper-layer image and the dual-energy lower-layer image, obtaining the offset distance and the rotation angle between the upper-layer image and the lower-layer image, and further realizing the accurate matching of the pixels of the upper-layer image and the lower-layer image; the problems of the size difference of pixels at the same position during imaging of an upper layer and a lower layer caused by the height difference of the upper layer and the lower layer images and the position translation and rotation angle difference of the pixels of the upper layer and the lower layer caused by an assembly process in the existing dual-energy subtraction technology are solved. The device is simple to implement, high in precision and high in calculation speed, can effectively reduce the calculation complexity and reduce the requirements on a computer memory, and can well accurately coincide the corresponding positions of the upper image and the lower image in the dual-energy upper-layer and lower-layer images.
EXAMPLE III
In order to solve the above technical problems in the prior art, an embodiment of the present invention further provides a storage medium storing a computer program, where the computer program, when executed by a processor, can implement all the steps in the method for registering images of upper and lower layers of a dual-energy detector in the first embodiment.
The specific steps of the registration method for the upper and lower layers of the dual-energy detector and the beneficial effects obtained by applying the readable storage medium provided by the embodiment of the invention are the same as those of the first embodiment, and are not described herein again.
It should be noted that: the storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Example four
In order to solve the technical problems in the prior art, the embodiment of the invention also provides a terminal.
Fig. 6 is a schematic structural diagram of a four-terminal according to an embodiment of the present invention, and referring to fig. 6, the terminal according to this embodiment includes a processor and a memory that are connected to each other; the memory is used for storing a computer program, and the processor is used for executing the computer program stored in the memory, so that the terminal can realize all the steps of the upper and lower layer image registration method of the dual-energy detector in the embodiment when being executed.
The specific steps of the registration method of the upper and lower layers of the dual-energy detector and the beneficial effects of the terminal acquisition provided by the embodiment of the invention are the same as those of the first embodiment, and are not described herein again.
It should be noted that the Memory may include a Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The Processor may also be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components.
Although the embodiments of the present invention have been described above, the above description is only for the convenience of understanding the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A dual-energy detector upper and lower layer image registration method comprises the following steps:
acquiring a to-be-registered dual-energy upper and lower layer image, and determining the to-be-registered image and a standard image in the to-be-registered dual-energy upper and lower layer image, wherein each corner of the to-be-registered image and each corner of the standard image are provided with a corner mark, and the centers of the to-be-registered image and the standard image are provided with a plurality of center marks;
acquiring the coordinates of the central position of the angle mark in the image to be registered, acquiring the coordinates of the central position of the angle mark in the standard image, and calculating the scaling of the image to be registered based on the coordinates of the central position of the angle mark in the image to be registered and the coordinates of the central position of the angle mark in the standard image;
globally scaling the image to be registered based on the scaling ratio to obtain a scaled image to be registered;
acquiring the central position coordinates of the central mark in the zoomed image to be registered, acquiring the central position coordinates of the central mark in the standard image, and calculating the translation distance and the rotation angle of the image to be registered based on the central position coordinates of the central mark in the zoomed image to be registered and the central position coordinates of all the central marks in the standard image;
translating and rotating the zoomed image to be registered based on the translation distance and the rotation angle of the image to be registered to obtain a registered image;
the image to be registered is one of an upper image and a lower image in the dual-energy upper and lower layer image to be registered, and the standard image is the other of the upper image and the lower image in the dual-energy upper and lower layer image to be registered.
2. The method of claim 1, wherein acquiring dual-energy upper and lower layer images to be registered comprises:
acquiring initial dual-energy upper and lower layer images based on a dual-energy image detector, and respectively and sequentially performing background correction, gain correction and bad pixel correction on the initial upper layer image and the initial lower layer image in the initial dual-energy upper and lower layer images to obtain a corrected upper layer image and a corrected lower layer image;
and respectively carrying out smoothing filtering processing on the corrected upper-layer image and the corrected lower-layer image to obtain a smoothed upper-layer image and a smoothed lower-layer image, wherein the smoothed upper-layer image and the smoothed lower-layer image form an upper-layer image and a lower-layer image to be registered.
3. The method of claim 1, wherein each of the corner marks is a corner mark that conforms to: d is a radical of a ≥λl a And d is b ≥λl b Where a and b are the two edges nearest to the corner mark, d a And d b Respectively representing the distance between the corner mark and the side a and the side b, wherein lambda is a distance parameter and ranges from 3.76 percent to 8 percent, and l a And l b Respectively representing the length of the side a and the length of the side b;
the image to be registered and the standard image respectively comprise at least two central mark points, and each central mark point meets the following conditions: d r ≤1.88%l e In which d is r Indicates the distance from the center mark point to the center of the image to which the center mark belongs, l e Indicating the length of the shorter side of the image to which the center mark belongs.
4. The method of claim 1, wherein when the marker is a steel ball, the corner mark and the center mark are circular, and the obtaining of the coordinates of the center positions of the corner mark and the center mark comprises:
carrying out gray level binarization processing on the image to which the corner mark or the center mark belongs to display the contour of the corner mark or the contour of the center mark;
and obtaining the center position coordinates of the corner mark or the center mark based on the corner mark outline or the center mark outline.
5. The method according to claim 1, wherein when one corner marker is provided at each of four corners of the image to be registered and the standard image, calculating the scaling of the image to be registered based on the coordinates of the center position of the corner marker in the image to be registered and the coordinates of the center position of the corner marker in the standard image comprises:
the scale in the lateral direction is:
Figure FDA0003770007690000021
the scaling in the longitudinal direction is:
Figure FDA0003770007690000022
wherein (x) i ,y i ) I e (1, 2,3, 4) represents the coordinates of the center positions of the four corner marks in the standard image, (x) i' ,y i' ) I' belongs to (1, 2,3, 4) represents the coordinates of the central positions of four corner marks in the image to be registered; the scale in the lateral direction and the scale in the longitudinal direction form the scale of the image to be registered.
6. The method according to claim 1, wherein the image to be registered is subjected to global scaling processing by a bilinear interpolation method based on the scaling ratio to obtain a scaled image to be registered.
7. The method of claim 1, wherein calculating the translation distance and the rotation angle of the image to be registered based on the center position coordinates of the center markers in the scaled image to be registered and the center position coordinates of all the center markers in the standard image comprises:
the transverse translation distance is:
Figure FDA0003770007690000023
the longitudinal translation distance is:
Figure FDA0003770007690000024
calculating the rotation angle of the image to be registered based on the center position coordinates of the center marks in the zoomed image to be registered and the center position coordinates of all the center marks in the standard image comprises:
Figure FDA0003770007690000025
wherein (x) j ,y j ) J e (1, \8230;, n) represents the center position coordinate of the jth center mark in the standard image, (x) j” ,y j” ) J e (1, \8230;, n) represents the center position coordinates of the jth center mark in the zoomed image to be registered, and n represents the number of the center marks in the standard image and the zoomed image to be registered.
8. A registration device for upper and lower images of a dual-energy detector is characterized by comprising an upper and lower image acquisition module, a scaling module, a translation distance and rotation angle acquisition module and a translation rotation module;
the upper and lower layer image acquisition module is used for acquiring a to-be-registered dual-energy upper and lower layer image and determining the to-be-registered image and a standard image in the to-be-registered dual-energy upper and lower layer image, wherein each corner of the to-be-registered image and each corner of the standard image are provided with a corner mark, and the centers of the to-be-registered image and the standard image are provided with a plurality of center marks;
the scale obtaining module is configured to obtain a center position coordinate of the corner mark in the image to be registered, obtain a center position coordinate of the corner mark in the standard image, and calculate a scale of the image to be registered based on the center position coordinate of the corner mark in the image to be registered and the center position coordinate of the corner mark in the standard image;
the scaling module is used for carrying out global scaling on the image to be registered based on the scaling ratio so as to obtain a scaled image to be registered;
the translation distance and rotation angle acquisition module is used for acquiring the central position coordinates of the central mark in the zoomed image to be registered, acquiring the central position coordinates of the central mark in the standard image, and calculating the translation distance and the rotation angle of the image to be registered based on the central position coordinates of the central mark in the zoomed image to be registered and the central position coordinates of all the central marks in the standard image;
the translation and rotation module is used for carrying out translation and rotation on the zoomed image to be registered based on the translation distance and the rotation angle of the image to be registered so as to obtain the registered image;
the image to be registered is one of an upper image and a lower image in the dual-energy upper and lower images to be registered, and the standard image is the other of the upper image and the lower image in the dual-energy upper and lower images to be registered.
9. A storage medium having stored thereon a computer program, characterized in that the program, when being executed by a processor, is adapted to carry out the method of registration of the upper and lower level images of a dual energy detector according to any one of claims 1 to 7.
10. A terminal, comprising: the system comprises a processor and a memory, wherein the memory is in communication connection with the processor;
the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory to enable the terminal to execute the upper and lower layer image registration method of the dual-energy detector as claimed in any one of claims 1 to 7.
CN202210898626.3A 2022-07-28 2022-07-28 Registration method and device for upper and lower layer images of dual-energy detector, storage medium and terminal Pending CN115471528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210898626.3A CN115471528A (en) 2022-07-28 2022-07-28 Registration method and device for upper and lower layer images of dual-energy detector, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210898626.3A CN115471528A (en) 2022-07-28 2022-07-28 Registration method and device for upper and lower layer images of dual-energy detector, storage medium and terminal

Publications (1)

Publication Number Publication Date
CN115471528A true CN115471528A (en) 2022-12-13

Family

ID=84368173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210898626.3A Pending CN115471528A (en) 2022-07-28 2022-07-28 Registration method and device for upper and lower layer images of dual-energy detector, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN115471528A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113313707A (en) * 2021-06-25 2021-08-27 西安紫光展锐科技有限公司 Original image processing method, device, equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113313707A (en) * 2021-06-25 2021-08-27 西安紫光展锐科技有限公司 Original image processing method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN108053450B (en) High-precision binocular camera calibration method based on multiple constraints
CN111028297B (en) Calibration method of surface structured light three-dimensional measurement system
CN107665497B (en) Method for calculating cardiothoracic ratio in medical image
CA2525414C (en) Optimizing image alignment
CN108245788B (en) Binocular distance measuring device and method and accelerator radiotherapy system comprising same
WO2023206994A1 (en) Ultrasonic wide-view imaging method
WO2024011764A1 (en) Calibration parameter determination method and apparatus, hybrid calibration board, device, and medium
CN115471528A (en) Registration method and device for upper and lower layer images of dual-energy detector, storage medium and terminal
CN112288659B (en) Perspective image correction method
CN114792345B (en) Calibration method based on monocular structured light system
CN110645928A (en) Space coordinate positioning method of three-dimensional scanner
CN114612412A (en) Processing method of three-dimensional point cloud data, application of processing method, electronic device and storage medium
CN113160333A (en) Parameter optimization camera calibration method
CN108510463B (en) Method and device for correcting distorted image
CN111932443B (en) Method for improving registration accuracy of ultrasound and magnetic resonance by combining multiscale expression with contrast agent
CN110458951A (en) A kind of the modeling data acquisition methods and relevant apparatus of power grid shaft tower
CN116152068A (en) Splicing method for solar panel images
CN115880171A (en) Method, medium and system for correcting full-fundus laser scanning image
CN113012279B (en) Non-contact three-dimensional imaging measurement method and system and computer readable storage medium
CN115767049A (en) Geometric correction method and system based on image tracking
Tang Calibration and point-based registration of fluoroscopic images.
CN111696047B (en) Imaging quality determining method and system of medical imaging equipment
CN113450399B (en) Method and device for measuring cardiothoracic ratio of chest radiograph in correct position
CN111199552B (en) System and method for registering lung CT images of different periods
Peng et al. Simultaneous perimeter measurement for multiple planar objects

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