CN111544020A - Geometric correction method and device for X-ray imaging equipment - Google Patents

Geometric correction method and device for X-ray imaging equipment Download PDF

Info

Publication number
CN111544020A
CN111544020A CN202010307209.8A CN202010307209A CN111544020A CN 111544020 A CN111544020 A CN 111544020A CN 202010307209 A CN202010307209 A CN 202010307209A CN 111544020 A CN111544020 A CN 111544020A
Authority
CN
China
Prior art keywords
image
parameter value
current angle
basic
angle
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
CN202010307209.8A
Other languages
Chinese (zh)
Other versions
CN111544020B (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.)
Neusoft Medical Systems Co Ltd
Beijing Neusoft Medical Equipment Co Ltd
Original Assignee
Neusoft Medical Systems Co Ltd
Beijing Neusoft Medical Equipment 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 Neusoft Medical Systems Co Ltd, Beijing Neusoft Medical Equipment Co Ltd filed Critical Neusoft Medical Systems Co Ltd
Priority to CN202010307209.8A priority Critical patent/CN111544020B/en
Publication of CN111544020A publication Critical patent/CN111544020A/en
Application granted granted Critical
Publication of CN111544020B publication Critical patent/CN111544020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B6/00Apparatus for radiation diagnosis, e.g. combined with radiation therapy equipment
    • A61B6/58Testing, adjusting or calibrating apparatus or devices for radiation diagnosis
    • A61B6/582Calibration
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B6/00Apparatus for radiation diagnosis, e.g. combined with radiation therapy equipment
    • A61B6/50Clinical applications
    • A61B6/504Clinical applications involving diagnosis of blood vessels, e.g. by angiography
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B6/00Apparatus for radiation diagnosis, e.g. combined with radiation therapy equipment
    • A61B6/52Devices using data or image processing specially adapted for radiation diagnosis
    • A61B6/5205Devices using data or image processing specially adapted for radiation diagnosis involving processing of raw data to produce diagnostic data

Abstract

The embodiment of the invention provides a geometric correction method and a geometric correction device of X-ray imaging equipment. According to the embodiment of the invention, the first X-ray image of the correction phantom at a basic angle is acquired by the X-ray imaging equipment, the second X-ray image of the correction phantom at a current angle is acquired, the basic mapping parameter value corresponding to the basic angle is acquired according to the first X-ray image, the reference mapping parameter value corresponding to the current angle is determined according to the basic mapping parameter value and the current angle, and the target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment at the current angle and the two-dimensional projection image is acquired based on the reference mapping parameter value and the second X-ray image, so that the geometric correction of the mapping relation between the three-dimensional volume data and the two-dimensional projection image at any angle in space can be realized.

Description

Geometric correction method and device for X-ray imaging equipment
Technical Field
The invention relates to the technical field of medical imaging, in particular to a geometric correction method and a geometric correction device for X-ray imaging equipment.
Background
Since different attenuation of X-rays occurs through different tissues of the human body, information on the tissue structure inside the human body can be observed by X-ray imaging (also referred to as X-ray imaging). X-ray imaging devices are widely used in the medical field, including fluoroscopy machines, large and small C-arms, and the like.
The data acquired by the X-ray imaging device are two-dimensional projection data, and in applications, it is sometimes necessary to reconstruct these two-dimensional projection data into a three-dimensional image. In order to achieve accurate reconstruction, it is crucial to obtain an accurate mapping relationship between the three-dimensional volume data and the two-dimensional projection image. However, due to the influence of the device installation accuracy, the feedback accuracy, the measurement accuracy, and the like, the mapping relationship between the three-dimensional volume data and the two-dimensional projection image (for convenience of description, the mapping relationship is abbreviated herein) is not accurate. Therefore, the mapping relationship between the two-dimensional projection data of the X-ray imaging apparatus and the three-dimensional image needs to be corrected by geometric correction.
Disclosure of Invention
In order to overcome the problems in the related art, the invention provides a geometric correction method and a geometric correction device of an X-ray imaging device, which improve the image quality of a heart coronary vessel reconstruction image.
According to a first aspect of embodiments of the present invention, there is provided a geometry correction method of an X-ray imaging apparatus, including:
acquiring a first X-ray image of a correction phantom at a basic angle and acquiring a second X-ray image of the correction phantom at a current angle by using an X-ray imaging device;
acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and acquiring a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle based on the reference mapping parameter value and the second X-ray image.
According to a second aspect of embodiments of the present invention, there is provided a geometry correction method of an X-ray imaging apparatus, including:
acquiring a first X-ray image of a correction phantom at a basic angle by using an X-ray imaging device, and determining the current angle of the X-ray imaging device for acquiring three-dimensional volume data;
acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and if the difference value between the current angle and the basic angle is smaller than a preset value, obtaining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the reference mapping parameter value.
According to a third aspect of embodiments of the present invention, there is provided a geometry correction apparatus of an X-ray imaging device, including:
the acquisition module is used for acquiring a first X-ray image of the correction phantom at a basic angle and acquiring a second X-ray image of the correction phantom at a current angle by utilizing an X-ray imaging device;
a parameter value obtaining module, configured to obtain a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
the determining module is used for determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and the relation acquisition module is used for acquiring a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle based on the reference mapping parameter value and the second X-ray image.
According to a fourth aspect of the embodiments of the present invention, there is provided a geometry correcting apparatus of an X-ray imaging device, including:
the acquisition and determination module is used for acquiring a first X-ray image of the calibration phantom at a basic angle by using an X-ray imaging device and determining the current angle of the X-ray imaging device for acquiring three-dimensional volume data;
a parameter value obtaining module, configured to obtain a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
the parameter value determining module is used for determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and the relation acquisition module is used for acquiring a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the reference mapping parameter value if the difference value between the current angle and the basic angle is smaller than a preset value.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
according to the embodiment of the invention, the first X-ray image of the correction phantom at the basic angle is acquired by the X-ray imaging equipment, the second X-ray image of the correction phantom at the current angle is acquired, the basic mapping parameter value corresponding to the basic angle is acquired according to the first X-ray image, the reference mapping parameter value corresponding to the current angle is determined according to the basic mapping parameter value and the current angle, and the target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment at the current angle and the two-dimensional projection image is acquired based on the reference mapping parameter value and the second X-ray image, so that the geometric correction of the mapping relation between the three-dimensional volume data and the two-dimensional projection image at any angle in space can be realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a flowchart illustrating a method for geometry correction of an X-ray imaging apparatus according to an embodiment of the present invention.
FIG. 2 is an exemplary diagram of a C-arm and spatial coordinate system provided by an embodiment of the present invention.
FIG. 3 is an exemplary illustration of a first X-ray image acquired at a base angle.
Fig. 4 is an exemplary diagram of a second X-ray image acquired at a current angle.
Fig. 5 is an exemplary diagram of a binarized image.
Fig. 6 is a diagram illustrating another flowchart of a geometric correction method of an X-ray imaging apparatus according to an embodiment of the present invention.
Fig. 7 is a functional block diagram of a geometry correction device of an X-ray imaging apparatus according to an embodiment of the present invention.
Fig. 8 is another functional block diagram of a geometry correction device of an X-ray imaging apparatus according to an embodiment of the present invention.
Fig. 9 is a hardware configuration diagram of an X-ray imaging apparatus according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of embodiments of the invention, as detailed in the following claims.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of embodiments of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used to describe various information in embodiments of the present invention, the information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of embodiments of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
One application scenario of X-ray imaging devices is image reconstruction techniques. The image reconstruction is performed on the premise that the correct mapping relationship between the three-dimensional volume data and the two-dimensional projection image is found, and the mapping relationship is related to the spatial geometric position between the ray source and the detector. However, errors are always introduced into the actual spatial positions of the radiation source and the detector due to installation accuracy, feedback accuracy, measurement accuracy and the like, so that the mapping relationship between the three-dimensional volume data and the two-dimensional projection image is inaccurate, and the reconstructed image has noise and artifacts, which are not beneficial to clinical diagnosis.
One application scenario of X-ray imaging devices is the three-dimensional roadmapping technique. Roadmapping techniques are also widely used in medical imaging devices, in which a contrast-only vessel image is obtained by subtracting a contrast-free fluoroscopic image from a contrast-containing filling image during an interventional procedure. However, for some complex diagnoses and treatments, such as the judgment of multiple blood supply arteries, the roadmapping technique has difficulty in providing complete image information. In view of the application of the three-dimensional visualization technology to the medical imaging device, the three-dimensional stereoscopic blood vessel image can be displayed more truly, and if the three-dimensional stereoscopic image is displayed on the road map, a more direct and convenient image navigation can be provided for interventional therapy, which also needs to be based on a correct mapping relationship after geometric correction.
The geometric correction method of the X-ray imaging equipment provided by the embodiment of the invention can realize geometric correction (the geometric position of the detector is a spherical surface during correction) at any angle in space, so that the mapping relation between three-dimensional volume data and a two-dimensional projection image at any angle can be obtained. The mapping relation can be used for reconstructing the image and can also be used in the three-dimensional road map technology, and the three-dimensional image of the two-dimensional projection data under any angle can be obtained through the mapping relation.
The geometry correction method of the X-ray imaging apparatus is explained in detail below by way of an example.
Fig. 1 is a flowchart illustrating a method for geometry correction of an X-ray imaging apparatus according to an embodiment of the present invention. As shown in fig. 1, in the present embodiment, the geometric correction method of the X-ray imaging apparatus may include:
s101, acquiring a first X-ray image of a correction phantom at a basic angle by using an X-ray imaging device, and acquiring a second X-ray image of the correction phantom at a current angle.
S102, acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image.
S103, determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle.
And S104, acquiring a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle based on the reference mapping parameter value and the second X-ray image.
The X-ray imaging device can be a fluoroscopy machine, a large C-shaped arm, a small C-shaped arm and the like.
In this embodiment, the first X-ray image and the second X-ray image are both original images.
In this embodiment, any qualified calibration phantom may be employed.
In this embodiment, the CRA is 0 ° and the LAO may be any angle in the base angle.
In one example, the calibration phantom may be a cylinder with 108 steel balls embedded on the surface of the cylinder for rotation about the cylinder, and the steel balls are randomly sized. In the present example, the X-ray imaging device is a C-arm, see fig. 2. FIG. 2 is an exemplary diagram of a C-arm and spatial coordinate system provided by an embodiment of the present invention. In FIG. 2, SID denotes the distance from the bulb to the detector, X axe denotes the X-axis, Y axe denotes the Y-axis, and Z axe denotes the Z-axis.
Acquiring an X-ray image of the cylinder calibration phantom at a base angle LAO of 0 DEG and a base angle CRA of 0 DEG, and recording the X-ray image as a first X-ray image I1. First X-ray image I1As shown in fig. 3.
Then, under the current angle LAO of 10 ° and CRA of 20 °, an X-ray image of the cylinder calibration phantom is acquired and recorded as a second X-ray image I2. Second X-ray image I2As shown in fig. 4.
Here, LAO indicates that the C-arm rotates left and right (rotates around the X-axis in the spatial coordinate system), and CRA indicates that the C-arm rotates forward and backward (rotates around the Y-axis in the spatial coordinate system).
Fig. 3 is an exemplary diagram of a first X-ray image acquired at a base angle (LAO ═ 0 ° and CRA ═ 0 °). Fig. 4 is an exemplary diagram of a second X-ray image acquired at a current angle (LAO ═ 10 °, CRA ═ 20 °). As shown in fig. 3 and 4, the images obtained by X-ray imaging the same calibration phantom at different acquisition angles are different.
In this embodiment, the mapping relationship between the three-dimensional volume data and the two-dimensional projection image may be represented by a mapping matrix P. When the acquisition angles of the X-ray imaging devices are different, the parameters in the mapping matrix P have different values.
In this embodiment, the parameter values in the mapping matrix P corresponding to the basic angle are referred to as basic mapping parameter values.
In an exemplary implementation process, in step S102, obtaining a basic mapping parameter value corresponding to the basic angle according to the first X-ray image may include:
performing bottom-cap conversion on the first X-ray image to obtain a first conversion image;
carrying out binarization processing on the first transformed image to obtain a first binarized image;
extracting markers in the correction phantom from the first binarized image to obtain a first actual projection image;
and determining a basic mapping parameter value corresponding to the basic angle according to the first spatial position of the marker in the correction phantom at the basic angle and the projection position of the marker in the first actual projection image corresponding to the first spatial position.
For example. For the first X-ray image I1The following operations were performed:
a1, for image I1Performing bottom-cap transformation to obtain image IS1
The bottom-hat transform of image f is defined as the closing operation of f minus f, i.e.: b ishat(f)=(f·Se)-f。
Wherein the symbol "·" represents a closed operation, and Se represents a structural element.
Then IS1=Bhat(I1)=(I1·Se)-I1
The bottom-hat transform can reduce the effects of non-uniformity of light and shade for highlighting dark objects on a bright background. Thus, in this example, the steel balls in the calibration phantom are highlighted by the bottom-cap transform.
a2, for image IS1Carrying out threshold processing to only leave a binary image I only containing steel ballsE1
Suppose an image IS1The pixel value corresponding to the pixel point (m, n) in (1) is IS1(m, n) with threshold set to IS1(th), image IE1The pixel value corresponding to the middle pixel point (m, n) is IE1(m, n), if IS1(m, n) is greater than or equal to IS1(th), set IS1(m, n) ═ 1, otherwise, if IS1(m, n) is less than IS1(th), set IS1(m,n)=0。
IS1(th) the threshold value is used for distinguishing the steel balls, and in order to remove noise points in the image, the threshold value can be set as a fixed value, or the threshold value can be adjusted according to the actual situation of the image, for example, automatic threshold value selection is performed by using a method of the maximum variance of the inter-iteration classes. Image I obtained after binarizationE1As shown in fig. 5. Fig. 5 is an exemplary diagram of a binarized image.
a3 from image IE1In the middle extraction of correction body modelThe marker-steel ball of (1), obtaining a first actual projection image I corresponding to the steel ballM1
Since the steel balls on the two sides of the image are overlapped and not easy to be divided, the area limitation is adopted in the example, and only the steel ball in the middle part of the image is selected. The corresponding area of this intermediate portion is set according to the position of the overlapping steel balls.
Meanwhile, in order to match the position of the steel ball projected image with the spatial position of the steel ball, the steel balls are grouped according to a set threshold, the grouping is performed sequentially from top to bottom and from left to right according to coordinates, and if the difference of the horizontal coordinates of the adjacent steel balls is smaller than a width threshold and the difference of the vertical coordinates is smaller than a height threshold, the steel balls are regarded as the same group.
The correcting phantom used in the example is a cylinder, 108 steel balls are inlaid on the surface of the correcting phantom to rotate around the correcting phantom, the sizes of the steel balls are random, and the matching of the projection positions of the steel balls and the space positions needs to be carried out simultaneously, so that the steel balls need to be grouped in advance.
a4, correcting the actual space position (namely the first space position) of the steel ball in the phantom and the first actual projection image I according to the basic angleM1And calculating the parameter value in the mapping matrix P according to the projection position of the medium steel ball, wherein the parameter value in the mapping matrix P corresponding to the basic angle is called as a basic mapping parameter value.
In the present example, x, y and z represent the spatial coordinates of the steel ball in the calibration phantom, and u and v represent the image IM1The projection coordinate of the middle steel ball, the mapping matrix P from the three-dimensional space to the two-dimensional plane can be represented as:
[wu,wv,w]=P·[x,y,z,1]T
where w represents a scale factor.
The mapping matrix P can be decomposed as follows:
P=KR[I|-C]
wherein K is an internal parameter matrix, R and C are external parameter matrices, and I is a feature matrix. The parameters (focal length, pixel size) in the intrinsic parameter matrix are known, then six parameters in the extrinsic parameter matrix: the six parameters, i.e., the rotation angle alpha around the X axis, the rotation angle beta around the Y axis, the rotation angle gamma around the Z axis, the offset Ox with respect to the X axis, the offset Oy with respect to the Y axis, and the offset Oz with respect to the Z axis in the spatial coordinate system, can be obtained by fitting.
In an exemplary implementation process, in step S103, determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle may include:
determining a rotation angle value around the X axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the X axis in the current angle and a first angle difference corresponding to the X axis;
determining a rotation angle value around the Y axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the Y axis in the current angle and a second angle difference corresponding to the Y axis;
determining a rotation angle value around the Z axis in the basic angle as a rotation angle value around the Z axis in the reference mapping parameter value corresponding to the current angle;
determining the offset of the basic mapping parameter value relative to the X axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the X axis;
determining the offset of the basic mapping parameter value relative to the Y axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Y axis;
and determining the offset of the basic mapping parameter value relative to the Z axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Z axis.
For example.
When the base angle LAO is 0 ° and the CRA is 0 °, the rotation angle value around the X axis is alpha1(alpha1 ≈ 0 °), the rotation angle value around the Y axis is beta1(beta1 ≈ 0 °), the rotation angle around the Z axis is gamma1, the offset amount with respect to the X axis is Ox1, the offset amount with respect to the Y axis is Oy1, and the offset amount with respect to the Z axis is Oz 1.
Under the current angle LAO of 10 ° and CRA of 20 °, the rotation angle value around the X axis is alpha2(alpha2 ≈ 10 °), the rotation angle value around the Y axis is beta2(beta2 ≈ 20 °), the rotation angle around the Z axis is gamma2, the offset amount with respect to the X axis is Ox2, the offset amount with respect to the Y axis is Oy2, and the offset amount with respect to the Z axis is Oz 2.
Angular dispersion of the current angle in the LAO direction compared to the base angle
Figure BDA0002456192920000101
The angular difference η in the CRA direction is 20, then
Figure BDA0002456192920000102
beta2=beta1+η。
The remaining four parameters are equal, i.e.: gamma2 ═ gamma1, Ox2 ═ Ox1, Oy2 ═ Oy1, and Oz2 ═ Oz 1.
In an exemplary implementation, in step S104, acquiring a target mapping relationship between three-dimensional volume data and a two-dimensional projection image acquired by the X-ray imaging device at a current angle based on the reference mapping parameter value and the second X-ray image may include:
acquiring a reference projection image corresponding to the current angle according to the reference mapping parameter value;
acquiring a second actual projection image corresponding to the current angle according to the second X-ray image;
matching the reference projection image with the second actual projection image to obtain a matched image;
and determining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the second spatial position of the marker in the correction phantom at the current angle and the projection position of the marker in the matched image.
The respective steps in this embodiment will be explained in turn.
In an exemplary implementation process, acquiring a reference projection image corresponding to a current angle according to the reference mapping parameter value may include:
determining a reference mapping matrix according to the reference mapping parameter value;
and projecting the second spatial position of the marker in the correction phantom at the current angle by using the reference mapping matrix to obtain a reference projection image corresponding to the current angle.
For example.
Let the mapping matrix corresponding to the base angle be P1, and the mapping matrix corresponding to the current angle be P2. In the foregoing example, according to alpha1, beta1, gamma1, Ox1, Oy1 and Oz1 in P1, alpha2, beta2, gamma2, Ox2, Oy2 and Oz2 in P2 can be determined, and alpha2, beta2, gamma2, Ox2, Oy2 and Oz2 are substituted into the mapping matrix, so that P2 can be obtained, and P2 is the reference mapping matrix.
Assuming that the second spatial position of the marker (steel ball) in the calibration phantom at the current angle is (x2, y2, z2), the scale factor is w2, and the coordinates of the marker in the reference projection image corresponding to the current angle are (u2, v2), the reference projection image corresponding to the current angle can be obtained by the following equation:
[w2u2,w2v2,w2]=P2·[x2,y2,z2,1]T
in an exemplary implementation, acquiring a second actual projection image corresponding to the current angle according to the second X-ray image may include:
performing bottom-cap conversion on the second X-ray image to obtain a second converted image;
carrying out binarization processing on the second transformed image to obtain a second binarized image;
and extracting the marker in the correction phantom from the second binarized image to obtain a second actual projection image.
The process of obtaining the second actual projection image according to the second X-ray image is the same as the process of obtaining the first actual projection image according to the first X-ray image in the foregoing steps a 1-a 3, and is not repeated here.
In an exemplary implementation process, matching the reference projection image with the second actual projection image to obtain a matching image includes:
for each pixel point in the reference projection image, respectively finding a point closest to the pixel point from the second actual projection image, and using the point as a matching pixel point corresponding to the pixel point;
extracting target pixel points from the reference projection image, wherein the target pixel points are pixel points which have one-to-one correspondence with the matched pixel points;
and extracting target matching pixel points corresponding to the target pixel points from the second actual projection image to form a target matching point set, wherein the image corresponding to the target matching point set is a matching image.
Suppose that the pixel point in the reference projection image is RpiAnd the pixel point in the second actual projection image is RpjThen, the following formula can be used to find the corresponding pixel point RpiThe closest point, i.e. pixel point RpiCorresponding matching pixel points:
min(||Rpi-Ppj||)
under most angles, the condition of steel ball coincidence can appear in the actual projected image of steel ball, leads to two coincident steel balls in the image to be discerned into a steel ball, can appear at this moment and consult the condition that two pixel points in the projected image all correspond the same pixel point in the actual projected image of second, the condition of many-to-one corresponding relation promptly. In this embodiment, the pixel points in the actual projection image related to the many-to-one correspondence condition are removed, and the pixel points having one-to-one correspondence are retained to obtain the matching image.
In one exemplary implementation, extracting the marker in the calibration phantom from the first binarized image to obtain a first actual projection image may include:
taking a pixel where a marker is located in the first binarized image as a foreground pixel, and taking a pixel except the foreground pixel in the first binarized image as a background pixel;
initializing a mark matrix, a mark queue and a mark index, wherein the size of the mark matrix is the same as that of the first binarized image;
scanning the first binarized image in a left-to-right and top-to-bottom order, and when the unmarked target foreground pixel is scanned, performing the following operations:
increasing the tag index value by 1; setting the pixel value of a pixel point corresponding to the target foreground pixel in the marking matrix as a current marking index value; scanning eight neighborhood pixel points of the target foreground pixel, putting the eight neighborhood pixel points which are not marked into the marking queue, and marking as seed points;
when the marking queue is not empty, scanning eight neighborhood pixel points of each seed point in sequence, and putting the eight neighborhood pixel points of the seed points which are not marked into the marking queue as the seed points; and scanning the next pixel point of the target foreground pixel points in the first binarized image according to the sequence until the marking queue is empty. According to the geometric correction method of the X-ray imaging equipment provided by the embodiment of the invention, the X-ray imaging equipment is used for acquiring a first X-ray image of a correction phantom at a basic angle and acquiring a second X-ray image of the correction phantom at a current angle, a basic mapping parameter value corresponding to the basic angle is acquired according to the first X-ray image, a reference mapping parameter value corresponding to the current angle is determined according to the basic mapping parameter value and the current angle, and a target mapping relation between three-dimensional volume data acquired by the X-ray imaging equipment and a two-dimensional projection image at the current angle is acquired based on the reference mapping parameter value and the second X-ray image, so that the geometric correction of the mapping relation between the three-dimensional volume data and the two-dimensional projection image at any angle in space can be realized.
Fig. 6 is a diagram illustrating another flowchart of a geometric correction method of an X-ray imaging apparatus according to an embodiment of the present invention. As shown in fig. 6, in the present embodiment, the geometric correction method of the X-ray imaging apparatus may include:
s601, acquiring a first X-ray image of the calibration phantom at a basic angle by using an X-ray imaging device, and determining the current angle of the X-ray imaging device for acquiring three-dimensional volume data.
S602, acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image.
S603, determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle.
S604, if the difference value between the current angle and the basic angle is smaller than a preset value, obtaining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the reference mapping parameter value.
In this embodiment, when the difference between the current angle and the basic angle is smaller than the preset value, the target mapping relationship at the current angle is directly calculated through the basic mapping parameter and the current angle value of the X-ray imaging device, so that the calculation amount can be reduced, and the processing speed can be increased.
The preset value can be set according to experience or actual requirements.
The method of the embodiment can be used for roughly estimating the mapping relationship under the current angle, if the angle interval between the current angle and the basic angle is large in difference, the error is correspondingly increased, and the calculated mapping relationship deviates from the actual mapping relationship.
In an exemplary implementation process, in step S604, obtaining a target mapping relationship between three-dimensional volume data acquired by the X-ray imaging device and a two-dimensional projection image at a current angle according to the reference mapping parameter value may include:
and determining a reference mapping matrix according to the reference mapping parameter value, and taking the reference mapping matrix as a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle.
For example, assume that the expression of the mapping matrix is P, and the reference mapping matrix corresponding to the current angle is P2. Knowing the values of alpha2, beta2, gamma2, Ox2, Oy2 and Oz2 in P2, the values of alpha2, beta2, gamma2, Ox2, Oy2 and Oz2 are substituted into the mapping matrix P to obtain the reference mapping matrix P2.
The geometric correction method of the X-ray imaging equipment provided by the embodiment of the invention acquires the first X-ray image of the correction phantom under the basic angle by utilizing the X-ray imaging equipment and determines the current angle of the X-ray imaging equipment for acquiring the three-dimensional volume data, obtaining a basic mapping parameter value corresponding to the basic angle according to the first X-ray image, determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle, if the difference value between the current angle and the basic angle is smaller than a preset value, and obtaining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the reference mapping parameter value, and realizing geometric correction of the mapping relation between the three-dimensional volume data and the two-dimensional projection image at an angle with a smaller angle interval difference with a basic angle in space.
Based on the above method embodiment, the embodiment of the present invention further provides corresponding apparatus, device, and storage medium embodiments.
Fig. 7 is a functional block diagram of a geometry correction device of an X-ray imaging apparatus according to an embodiment of the present invention. As shown in fig. 7, in the present embodiment, the geometry correcting device of the X-ray imaging apparatus may include:
an acquisition module 710, configured to acquire, by using an X-ray imaging device, a first X-ray image of a calibration phantom at a basic angle and acquire a second X-ray image of the calibration phantom at a current angle;
a parameter value obtaining module 720, configured to obtain a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
a determining module 730, configured to determine a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
a relation obtaining module 740, configured to obtain a target mapping relation between the three-dimensional volume data and the two-dimensional projection image acquired by the X-ray imaging device at the current angle based on the reference mapping parameter value and the second X-ray image.
In an exemplary implementation, the parameter value obtaining module 720 may specifically be configured to:
performing bottom-cap conversion on the first X-ray image to obtain a first conversion image;
carrying out binarization processing on the first transformed image to obtain a first binarized image;
extracting markers in the correction phantom from the first binarized image to obtain a first actual projection image;
and determining a basic mapping parameter value corresponding to the basic angle according to the first spatial position of the marker in the correction phantom at the basic angle and the projection position of the marker in the first actual projection image corresponding to the first spatial position.
In an exemplary implementation, the determining module 730 may be specifically configured to:
determining a rotation angle value around the X axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the X axis in the current angle and a first angle difference corresponding to the X axis;
determining a rotation angle value around the Y axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the Y axis in the current angle and a second angle difference corresponding to the Y axis;
determining a rotation angle value around the Z axis in the basic angle as a rotation angle value around the Z axis in the reference mapping parameter value corresponding to the current angle;
determining the offset of the basic mapping parameter value relative to the X axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the X axis;
determining the offset of the basic mapping parameter value relative to the Y axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Y axis;
and determining the offset of the basic mapping parameter value relative to the Z axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Z axis.
In an exemplary implementation, the relationship obtaining module 740 may be specifically configured to:
acquiring a reference projection image corresponding to the current angle according to the reference mapping parameter value;
acquiring a second actual projection image corresponding to the current angle according to the second X-ray image;
matching the reference projection image with the second actual projection image to obtain a matched image;
and determining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the second spatial position of the marker in the correction phantom at the current angle and the projection position of the marker in the matched image.
In an exemplary implementation process, acquiring a reference projection image corresponding to a current angle according to the reference mapping parameter value includes:
determining a reference mapping matrix according to the reference mapping parameter value;
and projecting the second spatial position of the marker in the correction phantom at the current angle by using the reference mapping matrix to obtain a reference projection image corresponding to the current angle.
In an exemplary implementation process, acquiring a second actual projection image corresponding to a current angle according to the second X-ray image includes:
performing bottom-cap conversion on the second X-ray image to obtain a second converted image;
carrying out binarization processing on the second transformed image to obtain a second binarized image;
and extracting the marker in the correction phantom from the second binarized image to obtain a second actual projection image.
In an exemplary implementation process, matching the reference projection image with the second actual projection image to obtain a matching image includes:
for each pixel point in the reference projection image, respectively finding a point closest to the pixel point from the second actual projection image, and using the point as a matching pixel point corresponding to the pixel point;
extracting target pixel points from the reference projection image, wherein the target pixel points are pixel points which have one-to-one correspondence with the matched pixel points;
and extracting target matching pixel points corresponding to the target pixel points from the second actual projection image to form a target matching point set, wherein the image corresponding to the target matching point set is a matching image.
In one exemplary implementation, extracting the markers in the calibration phantom from the first binarized image to obtain a first actual projection image, including:
taking a pixel where a marker is located in the first binarized image as a foreground pixel, and taking a pixel except the foreground pixel in the first binarized image as a background pixel;
initializing a mark matrix, a mark queue and a mark index, wherein the size of the mark matrix is the same as that of the first binarized image;
scanning the first binarized image in a left-to-right and top-to-bottom order, and when the unmarked target foreground pixel is scanned, performing the following operations:
increasing the tag index value by 1; setting the pixel value of a pixel point corresponding to the target foreground pixel in the marking matrix as a current marking index value; scanning eight neighborhood pixel points of the target foreground pixel, putting the eight neighborhood pixel points which are not marked into the marking queue, and marking as seed points;
when the marking queue is not empty, scanning eight neighborhood pixel points of each seed point in sequence, and putting the eight neighborhood pixel points of the seed points which are not marked into the marking queue as the seed points; and scanning the next pixel point of the target foreground pixel points in the first binarized image according to the sequence until the marking queue is empty.
Fig. 8 is another functional block diagram of a geometry correction device of an X-ray imaging apparatus according to an embodiment of the present invention. As shown in fig. 8, in the present embodiment, the geometry correcting device of the X-ray imaging apparatus may include:
the acquisition and determination module 810 is configured to acquire a first X-ray image of the calibration phantom at a basic angle by using an X-ray imaging device, and determine a current angle at which the X-ray imaging device acquires three-dimensional volume data;
a parameter value obtaining module 820, configured to obtain a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
a parameter value determining module 830, configured to determine, according to the basic mapping parameter value and the current angle, a reference mapping parameter value corresponding to the current angle;
a relation obtaining module 840, configured to, if a difference between the current angle and the basic angle is smaller than a preset value, obtain a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging device and the two-dimensional projection image at the current angle according to the reference mapping parameter value.
In an exemplary implementation process, the relationship obtaining module 840 may be specifically configured to:
and determining a reference mapping matrix according to the reference mapping parameter value, and taking the reference mapping matrix as a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle.
The embodiment of the invention also provides X-ray imaging equipment. Fig. 9 is a hardware configuration diagram of an X-ray imaging apparatus according to an embodiment of the present invention. As shown in fig. 9, the X-ray imaging apparatus includes: an internal bus 901, and a memory 902, a processor 903, and an external interface 904 connected by the internal bus, wherein:
the memory 902 is used for storing machine readable instructions corresponding to the geometric correction logic of the X-ray imaging device;
the processor 903 is configured to read the machine-readable instructions in the memory 902 and execute the instructions to implement the following operations:
acquiring a first X-ray image of a correction phantom at a basic angle and acquiring a second X-ray image of the correction phantom at a current angle by using an X-ray imaging device;
acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and acquiring a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle based on the reference mapping parameter value and the second X-ray image.
In an exemplary implementation process, obtaining a basic mapping parameter value corresponding to the basic angle according to the first X-ray image includes:
performing bottom-cap conversion on the first X-ray image to obtain a first conversion image;
carrying out binarization processing on the first transformed image to obtain a first binarized image;
extracting markers in the correction phantom from the first binarized image to obtain a first actual projection image;
and determining a basic mapping parameter value corresponding to the basic angle according to the first spatial position of the marker in the correction phantom at the basic angle and the projection position of the marker in the first actual projection image corresponding to the first spatial position.
In an exemplary implementation process, determining a reference mapping parameter value corresponding to a current angle according to the basic mapping parameter value and the current angle includes:
determining a rotation angle value around the X axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the X axis in the current angle and a first angle difference corresponding to the X axis;
determining a rotation angle value around the Y axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the Y axis in the current angle and a second angle difference corresponding to the Y axis;
determining a rotation angle value around the Z axis in the basic angle as a rotation angle value around the Z axis in the reference mapping parameter value corresponding to the current angle;
determining the offset of the basic mapping parameter value relative to the X axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the X axis;
determining the offset of the basic mapping parameter value relative to the Y axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Y axis;
and determining the offset of the basic mapping parameter value relative to the Z axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Z axis.
In one exemplary implementation, obtaining a target mapping relationship between three-dimensional volume data acquired by the X-ray imaging device and a two-dimensional projection image at a current angle based on the reference mapping parameter value and the second X-ray image includes:
acquiring a reference projection image corresponding to the current angle according to the reference mapping parameter value;
acquiring a second actual projection image corresponding to the current angle according to the second X-ray image;
matching the reference projection image with the second actual projection image to obtain a matched image;
and determining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the second spatial position of the marker in the correction phantom at the current angle and the projection position of the marker in the matched image.
In an exemplary implementation process, acquiring a reference projection image corresponding to a current angle according to the reference mapping parameter value includes:
determining a reference mapping matrix according to the reference mapping parameter value;
and projecting the second spatial position of the marker in the correction phantom at the current angle by using the reference mapping matrix to obtain a reference projection image corresponding to the current angle.
In an exemplary implementation process, acquiring a second actual projection image corresponding to a current angle according to the second X-ray image includes:
performing bottom-cap conversion on the second X-ray image to obtain a second converted image;
carrying out binarization processing on the second transformed image to obtain a second binarized image;
and extracting the marker in the correction phantom from the second binarized image to obtain a second actual projection image.
In an exemplary implementation process, matching the reference projection image with the second actual projection image to obtain a matching image includes:
for each pixel point in the reference projection image, respectively finding a point closest to the pixel point from the second actual projection image, and using the point as a matching pixel point corresponding to the pixel point;
extracting target pixel points from the reference projection image, wherein the target pixel points are pixel points which have one-to-one correspondence with the matched pixel points;
and extracting target matching pixel points corresponding to the target pixel points from the second actual projection image to form a target matching point set, wherein the image corresponding to the target matching point set is a matching image.
In one exemplary implementation, extracting the markers in the calibration phantom from the first binarized image to obtain a first actual projection image, including:
taking a pixel where a marker is located in the first binarized image as a foreground pixel, and taking a pixel except the foreground pixel in the first binarized image as a background pixel;
initializing a mark matrix, a mark queue and a mark index, wherein the size of the mark matrix is the same as that of the first binarized image;
scanning the first binarized image in a left-to-right and top-to-bottom order, and when the unmarked target foreground pixel is scanned, performing the following operations:
increasing the tag index value by 1; setting the pixel value of a pixel point corresponding to the target foreground pixel in the marking matrix as a current marking index value; scanning eight neighborhood pixel points of the target foreground pixel, putting the eight neighborhood pixel points which are not marked into the marking queue, and marking as seed points;
when the marking queue is not empty, scanning eight neighborhood pixel points of each seed point in sequence, and putting the eight neighborhood pixel points of the seed points which are not marked into the marking queue as the seed points; and scanning the next pixel point of the target foreground pixel points in the first binarized image according to the sequence until the marking queue is empty.
The processor 903 is further configured to read the machine-readable instructions in the memory 902 and execute the instructions to implement the following operations:
acquiring a first X-ray image of a correction phantom at a basic angle by using an X-ray imaging device, and determining the current angle of the X-ray imaging device for acquiring three-dimensional volume data;
acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and if the difference value between the current angle and the basic angle is smaller than a preset value, obtaining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the reference mapping parameter value.
In an exemplary implementation process, obtaining a target mapping relationship between three-dimensional volume data acquired by the X-ray imaging device and a two-dimensional projection image at a current angle according to the reference mapping parameter value includes:
and determining a reference mapping matrix according to the reference mapping parameter value, and taking the reference mapping matrix as a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the program, when executed by a processor, implements the following operations:
acquiring a first X-ray image of a correction phantom at a basic angle and acquiring a second X-ray image of the correction phantom at a current angle by using an X-ray imaging device;
acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and acquiring a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle based on the reference mapping parameter value and the second X-ray image.
In an exemplary implementation process, obtaining a basic mapping parameter value corresponding to the basic angle according to the first X-ray image includes:
performing bottom-cap conversion on the first X-ray image to obtain a first conversion image;
carrying out binarization processing on the first transformed image to obtain a first binarized image;
extracting markers in the correction phantom from the first binarized image to obtain a first actual projection image;
and determining a basic mapping parameter value corresponding to the basic angle according to the first spatial position of the marker in the correction phantom at the basic angle and the projection position of the marker in the first actual projection image corresponding to the first spatial position.
In an exemplary implementation process, determining a reference mapping parameter value corresponding to a current angle according to the basic mapping parameter value and the current angle includes:
determining a rotation angle value around the X axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the X axis in the current angle and a first angle difference corresponding to the X axis;
determining a rotation angle value around the Y axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the Y axis in the current angle and a second angle difference corresponding to the Y axis;
determining a rotation angle value around the Z axis in the basic angle as a rotation angle value around the Z axis in the reference mapping parameter value corresponding to the current angle;
determining the offset of the basic mapping parameter value relative to the X axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the X axis;
determining the offset of the basic mapping parameter value relative to the Y axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Y axis;
and determining the offset of the basic mapping parameter value relative to the Z axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Z axis.
In one exemplary implementation, obtaining a target mapping relationship between three-dimensional volume data acquired by the X-ray imaging device and a two-dimensional projection image at a current angle based on the reference mapping parameter value and the second X-ray image includes:
acquiring a reference projection image corresponding to the current angle according to the reference mapping parameter value;
acquiring a second actual projection image corresponding to the current angle according to the second X-ray image;
matching the reference projection image with the second actual projection image to obtain a matched image;
and determining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the second spatial position of the marker in the correction phantom at the current angle and the projection position of the marker in the matched image.
In an exemplary implementation process, acquiring a reference projection image corresponding to a current angle according to the reference mapping parameter value includes:
determining a reference mapping matrix according to the reference mapping parameter value;
and projecting the second spatial position of the marker in the correction phantom at the current angle by using the reference mapping matrix to obtain a reference projection image corresponding to the current angle.
In an exemplary implementation process, acquiring a second actual projection image corresponding to a current angle according to the second X-ray image includes:
performing bottom-cap conversion on the second X-ray image to obtain a second converted image;
carrying out binarization processing on the second transformed image to obtain a second binarized image;
and extracting the marker in the correction phantom from the second binarized image to obtain a second actual projection image.
In an exemplary implementation process, matching the reference projection image with the second actual projection image to obtain a matching image includes:
for each pixel point in the reference projection image, respectively finding a point closest to the pixel point from the second actual projection image, and using the point as a matching pixel point corresponding to the pixel point;
extracting target pixel points from the reference projection image, wherein the target pixel points are pixel points which have one-to-one correspondence with the matched pixel points;
and extracting target matching pixel points corresponding to the target pixel points from the second actual projection image to form a target matching point set, wherein the image corresponding to the target matching point set is a matching image.
In one exemplary implementation, extracting the markers in the calibration phantom from the first binarized image to obtain a first actual projection image, including:
taking a pixel where a marker is located in the first binarized image as a foreground pixel, and taking a pixel except the foreground pixel in the first binarized image as a background pixel;
initializing a mark matrix, a mark queue and a mark index, wherein the size of the mark matrix is the same as that of the first binarized image;
scanning the first binarized image in a left-to-right and top-to-bottom order, and when the unmarked target foreground pixel is scanned, performing the following operations:
increasing the tag index value by 1; setting the pixel value of a pixel point corresponding to the target foreground pixel in the marking matrix as a current marking index value; scanning eight neighborhood pixel points of the target foreground pixel, putting the eight neighborhood pixel points which are not marked into the marking queue, and marking as seed points;
when the marking queue is not empty, scanning eight neighborhood pixel points of each seed point in sequence, and putting the eight neighborhood pixel points of the seed points which are not marked into the marking queue as the seed points; and scanning the next pixel point of the target foreground pixel points in the first binarized image according to the sequence until the marking queue is empty.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the program, when executed by a processor, implements the following operations:
acquiring a first X-ray image of a correction phantom at a basic angle by using an X-ray imaging device, and determining the current angle of the X-ray imaging device for acquiring three-dimensional volume data;
acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and if the difference value between the current angle and the basic angle is smaller than a preset value, obtaining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the reference mapping parameter value.
In an exemplary implementation process, obtaining a target mapping relationship between three-dimensional volume data acquired by the X-ray imaging device and a two-dimensional projection image at a current angle according to the reference mapping parameter value includes:
and determining a reference mapping matrix according to the reference mapping parameter value, and taking the reference mapping matrix as a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle.
For the device and apparatus embodiments, as they correspond substantially to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (12)

1. A method of geometry correction for an X-ray imaging apparatus, comprising:
acquiring a first X-ray image of a correction phantom at a basic angle and acquiring a second X-ray image of the correction phantom at a current angle by using an X-ray imaging device;
acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and acquiring a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle based on the reference mapping parameter value and the second X-ray image.
2. The method of claim 1, wherein obtaining a base mapping parameter value corresponding to the base angle from the first X-ray image comprises:
performing bottom-cap conversion on the first X-ray image to obtain a first conversion image;
carrying out binarization processing on the first transformed image to obtain a first binarized image;
extracting markers in the correction phantom from the first binarized image to obtain a first actual projection image;
and determining a basic mapping parameter value corresponding to the basic angle according to the first spatial position of the marker in the correction phantom at the basic angle and the projection position of the marker in the first actual projection image corresponding to the first spatial position.
3. The method of claim 1, wherein determining a reference mapping parameter value corresponding to the current angle according to the base mapping parameter value and the current angle comprises:
determining a rotation angle value around the X axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the X axis in the current angle and a first angle difference corresponding to the X axis;
determining a rotation angle value around the Y axis in the reference mapping parameter value corresponding to the current angle according to the rotation angle value around the Y axis in the current angle and a second angle difference corresponding to the Y axis;
determining a rotation angle value around the Z axis in the basic angle as a rotation angle value around the Z axis in the reference mapping parameter value corresponding to the current angle;
determining the offset of the basic mapping parameter value relative to the X axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the X axis;
determining the offset of the basic mapping parameter value relative to the Y axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Y axis;
and determining the offset of the basic mapping parameter value relative to the Z axis as the offset of the reference mapping parameter value corresponding to the current angle relative to the Z axis.
4. The method of claim 1, wherein obtaining a target mapping relationship of three-dimensional volume data and two-dimensional projection images acquired by the X-ray imaging device at a current angle based on the reference mapping parameter value and the second X-ray image comprises:
acquiring a reference projection image corresponding to the current angle according to the reference mapping parameter value;
acquiring a second actual projection image corresponding to the current angle according to the second X-ray image;
matching the reference projection image with the second actual projection image to obtain a matched image;
and determining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the second spatial position of the marker in the correction phantom at the current angle and the projection position of the marker in the matched image.
5. The method of claim 4, wherein obtaining the reference projection image corresponding to the current angle according to the reference mapping parameter value comprises:
determining a reference mapping matrix according to the reference mapping parameter value;
and projecting the second spatial position of the marker in the correction phantom at the current angle by using the reference mapping matrix to obtain a reference projection image corresponding to the current angle.
6. The method of claim 4, wherein obtaining a second actual projection image corresponding to the current angle from the second X-ray image comprises:
performing bottom-cap conversion on the second X-ray image to obtain a second converted image;
carrying out binarization processing on the second transformed image to obtain a second binarized image;
and extracting the marker in the correction phantom from the second binarized image to obtain a second actual projection image.
7. The method of claim 4, wherein matching the reference projection image with the second actual projection image to obtain a matched image comprises:
for each pixel point in the reference projection image, respectively finding a point closest to the pixel point from the second actual projection image, and using the point as a matching pixel point corresponding to the pixel point;
extracting target pixel points from the reference projection image, wherein the target pixel points are pixel points which have one-to-one correspondence with the matched pixel points;
and extracting target matching pixel points corresponding to the target pixel points from the second actual projection image to form a target matching point set, wherein the image corresponding to the target matching point set is a matching image.
8. The method of claim 2, wherein extracting markers in the calibration phantom from the first binarized image, resulting in a first actual projection image, comprises:
taking a pixel where a marker is located in the first binarized image as a foreground pixel, and taking a pixel except the foreground pixel in the first binarized image as a background pixel;
initializing a mark matrix, a mark queue and a mark index, wherein the size of the mark matrix is the same as that of the first binarized image;
scanning the first binarized image in a left-to-right and top-to-bottom order, and when the unmarked target foreground pixel is scanned, performing the following operations:
increasing the tag index value by 1; setting the pixel value of a pixel point corresponding to the target foreground pixel in the marking matrix as a current marking index value; scanning eight neighborhood pixel points of the target foreground pixel, putting the eight neighborhood pixel points which are not marked into the marking queue, and marking as seed points;
when the marking queue is not empty, scanning eight neighborhood pixel points of each seed point in sequence, and putting the eight neighborhood pixel points of the seed points which are not marked into the marking queue as the seed points; and scanning the next pixel point of the target foreground pixel points in the first binarized image according to the sequence until the marking queue is empty.
9. A method of geometry correction for an X-ray imaging apparatus, comprising:
acquiring a first X-ray image of a correction phantom at a basic angle by using an X-ray imaging device, and determining the current angle of the X-ray imaging device for acquiring three-dimensional volume data;
acquiring a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and if the difference value between the current angle and the basic angle is smaller than a preset value, obtaining a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the reference mapping parameter value.
10. The method of claim 9, wherein obtaining the target mapping relationship between the three-dimensional volume data acquired by the X-ray imaging device and the two-dimensional projection image at the current angle according to the reference mapping parameter value comprises:
and determining a reference mapping matrix according to the reference mapping parameter value, and taking the reference mapping matrix as a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle.
11. A geometry correction device for an X-ray imaging apparatus, comprising:
the acquisition module is used for acquiring a first X-ray image of the correction phantom at a basic angle and acquiring a second X-ray image of the correction phantom at a current angle by utilizing an X-ray imaging device;
a parameter value obtaining module, configured to obtain a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
the determining module is used for determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and the relation acquisition module is used for acquiring a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle based on the reference mapping parameter value and the second X-ray image.
12. A geometry correction device for an X-ray imaging apparatus, comprising:
the acquisition and determination module is used for acquiring a first X-ray image of the calibration phantom at a basic angle by using an X-ray imaging device and determining the current angle of the X-ray imaging device for acquiring three-dimensional volume data;
a parameter value obtaining module, configured to obtain a basic mapping parameter value corresponding to the basic angle according to the first X-ray image; the mapping parameters are parameters in the mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image;
the parameter value determining module is used for determining a reference mapping parameter value corresponding to the current angle according to the basic mapping parameter value and the current angle;
and the relation acquisition module is used for acquiring a target mapping relation between the three-dimensional volume data acquired by the X-ray imaging equipment and the two-dimensional projection image at the current angle according to the reference mapping parameter value if the difference value between the current angle and the basic angle is smaller than a preset value.
CN202010307209.8A 2020-04-17 2020-04-17 Geometric correction method and device for X-ray imaging equipment Active CN111544020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010307209.8A CN111544020B (en) 2020-04-17 2020-04-17 Geometric correction method and device for X-ray imaging equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010307209.8A CN111544020B (en) 2020-04-17 2020-04-17 Geometric correction method and device for X-ray imaging equipment

Publications (2)

Publication Number Publication Date
CN111544020A true CN111544020A (en) 2020-08-18
CN111544020B CN111544020B (en) 2023-08-01

Family

ID=72003831

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010307209.8A Active CN111544020B (en) 2020-04-17 2020-04-17 Geometric correction method and device for X-ray imaging equipment

Country Status (1)

Country Link
CN (1) CN111544020B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102879782A (en) * 2012-09-25 2013-01-16 北京理工大学 Compressed sensing synthetic aperture radar (SAR) imaging method based on fractional order fourier transformation
CN102982582A (en) * 2011-05-05 2013-03-20 西门子公司 Method for obtaining three-dimensional X-ray image data set for periodically moving object
CN103519833A (en) * 2013-06-05 2014-01-22 东南大学 Three-dimensional correction reconstruction method of rotary C-arm X-ray generator
CN104240287A (en) * 2013-06-08 2014-12-24 北京思创贯宇科技开发有限公司 Method and system for generating coronary panorama through CT images
CN105916444A (en) * 2013-11-04 2016-08-31 苏尔吉维索公司 Method for reconstructing a 3d image from 2d x-ray images
US20160271425A1 (en) * 2012-10-12 2016-09-22 Varian Medical Systems International Ag Systems, devices, and methods for quality assurance of radiation therapy
CN106667512A (en) * 2016-12-29 2017-05-17 上海联影医疗科技有限公司 Geometric correction method of X-ray imaging equipment and breast tomography equipment
CN108074219A (en) * 2016-11-11 2018-05-25 上海东软医疗科技有限公司 A kind of method for correcting image, device and Medical Devices
WO2018137759A1 (en) * 2017-01-24 2018-08-02 Brainlab Ag Determining rotational orientation of a deep brain stimulation electrode in a three-dimensional image
US20180296176A1 (en) * 2017-04-13 2018-10-18 Apn Health, Llc Rapid 3d cardiac parameter mapping
CN108876730A (en) * 2018-05-24 2018-11-23 沈阳东软医疗系统有限公司 The method, device and equipment and storage medium of correction of movement artifact
CN110533597A (en) * 2019-03-26 2019-12-03 北京东软医疗设备有限公司 Artifact processing and rotation center determine method, apparatus and equipment, storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102982582A (en) * 2011-05-05 2013-03-20 西门子公司 Method for obtaining three-dimensional X-ray image data set for periodically moving object
CN102879782A (en) * 2012-09-25 2013-01-16 北京理工大学 Compressed sensing synthetic aperture radar (SAR) imaging method based on fractional order fourier transformation
US20160271425A1 (en) * 2012-10-12 2016-09-22 Varian Medical Systems International Ag Systems, devices, and methods for quality assurance of radiation therapy
CN103519833A (en) * 2013-06-05 2014-01-22 东南大学 Three-dimensional correction reconstruction method of rotary C-arm X-ray generator
CN104240287A (en) * 2013-06-08 2014-12-24 北京思创贯宇科技开发有限公司 Method and system for generating coronary panorama through CT images
CN105916444A (en) * 2013-11-04 2016-08-31 苏尔吉维索公司 Method for reconstructing a 3d image from 2d x-ray images
CN108074219A (en) * 2016-11-11 2018-05-25 上海东软医疗科技有限公司 A kind of method for correcting image, device and Medical Devices
CN106667512A (en) * 2016-12-29 2017-05-17 上海联影医疗科技有限公司 Geometric correction method of X-ray imaging equipment and breast tomography equipment
WO2018137759A1 (en) * 2017-01-24 2018-08-02 Brainlab Ag Determining rotational orientation of a deep brain stimulation electrode in a three-dimensional image
US20180296176A1 (en) * 2017-04-13 2018-10-18 Apn Health, Llc Rapid 3d cardiac parameter mapping
CN108876730A (en) * 2018-05-24 2018-11-23 沈阳东软医疗系统有限公司 The method, device and equipment and storage medium of correction of movement artifact
CN110533597A (en) * 2019-03-26 2019-12-03 北京东软医疗设备有限公司 Artifact processing and rotation center determine method, apparatus and equipment, storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MIN YANG: "A practical method to calibrate the slant angle of central X-ray for laminography scanning system", 《NDT & E INTERNATIONAL》, vol. 64, pages 13 - 20 *
王梦蛟: "基于相机模型的锥束CT重建误差校正", 《清华大学学报》, vol. 55, no. 1, pages 122 - 127 *

Also Published As

Publication number Publication date
CN111544020B (en) 2023-08-01

Similar Documents

Publication Publication Date Title
US10172574B2 (en) Interventional X-ray system with automatic iso-centering
RU2568635C2 (en) Feature-based recording of two-/three-dimensional images
US7408149B2 (en) Detector head position correction for hybrid SPECT/CT imaging apparatus
US8220994B2 (en) Method for calibrating the position of a laser fan beam relative to the projection geometry of an X-ray device and X-ray device
US9549710B2 (en) Methods for updating 2D/3D registration on movement and computing device
US8983161B2 (en) Automatic correction method of couch-bending in sequence CBCT reconstruction
CN110533597B (en) Artifact processing method, artifact processing device, rotation center determining device, artifact processing equipment and storage medium
US8463013B2 (en) X-ray diagnosis apparatus and image reconstruction processing apparatus
JP4828920B2 (en) 3D image processing device
WO1997049065A9 (en) Method and apparatus for three-dimensional reconstruction of coronary vessels from angiographic images
US8705832B2 (en) Registration of emission tomography and computed tomography
US20070064001A1 (en) Method and apparatus for reconstructing a three-dimensional image volume from two-dimensional projection images
US20100232645A1 (en) Model-based spect heart orientation estimation
CN112401919A (en) Auxiliary positioning method and system based on positioning model
CN104771189A (en) Three-dimensional head image alignment method and device
GB2358752A (en) Surface or volumetric data processing method and apparatus
CN116744875A (en) Navigation support
CN112617877B (en) Autonomous scanning method of mobile CT system, storage medium and CT scanning device
CN108420531A (en) Operation tool method of adjustment, electronic equipment and chucking device
CN111544020B (en) Geometric correction method and device for X-ray imaging equipment
CN111612867B (en) Motion artifact correction method, motion artifact correction device, computer equipment and readable storage medium
CN114511597A (en) Registration method of X-ray image and CT image
CN113963056B (en) CT image reconstruction method, device, electronic equipment and storage medium
CN112568918B (en) Method for determining a tomographic image, image generation unit, program product and medium
US11468607B2 (en) Systems and methods for motion estimation in PET imaging using AI image reconstructions

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