Patent Description:
An X-ray imaging system generally includes an X-ray generation assembly, a Bucky-wall-stand (BWS) assembly, an examination table assembly, a film cassette assembly including a flat panel detector, a remote control host, etc. The X-ray generation assembly uses high voltage provided by a high voltage generator to emit X-rays that transmit through and radiate an imaging target, and forms medical image information of the imaging target on the flat panel detector. The flat panel detector transmits the medical image information to the control host. The imaging target can stand near the BWS assembly or lie on the examination table assembly, so as to undergo X-ray photography on different parts such as head, chest, abdomen, and joints, separately. <CIT> realtes to a method and a system for automatically aligning a positionable X-ray source of an X-ray system in alignment with a mobile X-ray detector where the X-ray system detects the position of the mobile X-ray detector using a 3D camera and then driving the positionable X-ray source to a position in alignment with the mobile X-ray detector. <CIT> relates to a method and apparatus for X-ray tube scanner automation using a 3D camera. An RGBD image of a patient on a patient table is received from a 3D camera mounted on an X-ray tube. A transformation between a coordinate system of the 3D camera and a coordinate system of the patient table is calculated. A patient model is estimated from the RGBD image of the patient. The X-ray tube is automatically controlled to acquire an X-ray image of a region of interest of the patient based on the patient model. <CIT> relates to a method for calibrating a 3D camera that assists in applications in computed or digital radiography, wherein an accurate measurement of distances is required. The method is based on the measurement of the size of a reference object in the field-of-view of the visual part of the depth camera which is then matched to the distance measurements to said reference object by the depth measuring part of the depth camera. The method may be applied for the determination of the distance between an X-ray source and an image detector. <NPL> discloses that surgical registration that maps surgical space onto image space plays an important role in surgical navigation.

3D cameras are widely applied in X-ray imaging systems to implement various measurement-related functions (e.g., virtual collimation). Positioning information in a 3D photo taken by a 3D camera is usually based on a 3D camera coordinate system, while many parameters in an X-ray imaging application are based on an X-ray tube coordinate system, such that if the positioning information determined on the basis of the 3D photo is directly applied to the X-ray imaging application, a system error may be caused.

Embodiments of the present disclosure provide a method and apparatus for calibrating a 3D camera in X-ray imaging, and a storage medium.

A method for calibrating a 3D camera in X-ray imaging, the method including:.

Hence, in the embodiments of the present disclosure, the transformation matrix is determined on the basis of a transformation relationship between 3D coordinates of the positioning marker in the calibration plate in the X-ray tube coordinate system and 3D coordinates of the positioning marker in the 3D camera coordinate system, so as to implement calibration of the 3D camera and eliminate the system error caused by the coordinate system difference.

In one embodiment, the center of the calibration plate does not coincide with the radiation field center of the X-ray tube; the calibration plate is disposed in an XY plane including an X axis and a Y axis; and
the method further includes:
moving the calibration plate within the XY plane until the center of the calibration plate coincides with the radiation field center of the X-ray tube.

Therefore, in a case that the center of the calibration plate does not coincide with the radiation field center of the X-ray tube, the calibration plate is moved to make the center of the calibration plate coincide with the radiation field center of the X-ray tube. As a result, 3D coordinates of the center of the calibration plate in the X-ray tube coordinate system can be simplified, and thus a computation process of the transformation matrix is simplified.

In one embodiment, the determining second 3D coordinates of the positioning marker in an X-ray tube coordinate system on the basis of the distance includes:.

Hence, 3D coordinates of the center of the calibration plate in the X-ray tube coordinate system are simplified, and the second 3D coordinates are computed quickly.

In one embodiment, the center of the calibration plate does not coincide with the radiation field center of the X-ray tube; the calibration plate is disposed in an XY plane including an X axis and a Y axis; and
the determining second 3D coordinates of the positioning marker in an X-ray tube coordinate system on the basis of the distance includes:
determining 3D coordinates (Δx, Δy, h) of the center of the calibration plate in the X-ray tube coordinate system, where h represents the distance,Δx represents a component of a distance vector between the radiation field center and the center of the calibration plate on the X axis, and Δy represents a component of the distance vector between the radiation field center and the center of the calibration plate on the Y axis; determining a distance vector T between the positioning marker and the center of the calibration plate; determining a component x of the distance vector T on the X axis and a component y of the distance vector T on the Y axis; and determining the second 3D coordinates (Δx+x, Δy+y, h) of the positioning marker.

Therefore, the process of moving the calibration plate to make the center of the calibration plate coincide with the radiation field center of the X-ray tube can be omitted, and thus operation steps are simplified.

In one embodiment, the method further includes:
determining a set radiation field range and an actual radiation field range on the calibration plate corresponding to the set radiation field range; and determining a radiation field width calibration parameter γw and a radiation field height calibration parameter γh, where <MAT> and <MAT>, where H<NUM> represents the distance, SID represents a preset source to image distance, ws represents the width in the set radiation field range, hs represents the height in the set radiation field range, wc represents the width in the actual radiation field range, and hc represents the height in the actual radiation field range.

Hence, the width and height of a radiation field can also be calibrated to eliminate the system error caused by the radiation field difference.

In one embodiment, the determining a set radiation field range and an actual radiation field range on the calibration plate corresponding to the set radiation field range includes:.

Therefore, the set radiation field range and the actual radiation field range can be determined in many ways to adapt to various implementation environments.

In one embodiment, the method further includes:.

Therefore, the transformation matrix is determined using multiple distance adjustments, such that the accuracy is improved.

An apparatus for calibrating a 3D camera in X-ray imaging, the apparatus including:.

In one embodiment, the center of the calibration plate does not coincide with the radiation field center of the X-ray tube; the calibration plate is disposed in an XY plane including an X axis and a Y axis; and
the acquiring module is further configured to move the calibration plate within the XY plane until the center of the calibration plate coincides with the radiation field center of the X-ray tube.

In one embodiment, the second determining module is configured to: determine 3D coordinates (<NUM>, <NUM>, h) of the center of the calibration plate in the X-ray tube coordinate system, where h represents the distance; determine a distance vector T between the positioning marker and the center of the calibration plate; determine a component x of the distance vector T on the X axis and a component y of the distance vector T on the Y axis; and determine the second 3D coordinates (x, y, h).

In one embodiment, the center of the calibration plate does not coincide with the radiation field center of the X-ray tube; the calibration plate is disposed in an XY plane including an X axis and a Y axis; and
the second determining module is configured to: determine 3D coordinates (Δx, Δy, h) of the center of the calibration plate in the X-ray tube coordinate system, where h represents the distance, Δx represents a component of a distance vector between the radiation field center and the center of the calibration plate on the X axis, and Δy represents a component of the distance vector between the radiation field center and the center of the calibration plate on the Y axis; determine a distance vector T between the positioning marker and the center of the calibration plate; determine a component x of the distance vector T on the X axis and a component y of the distance vector T on the Y axis; and determine the second 3D coordinates (Δx+x, Δy+y, h) of the positioning marker.

In one embodiment, the apparatus further includes:
a fourth determining module, configured to determine a set radiation field range and an actual radiation field range on the calibration plate corresponding to the set radiation field range; and determine a radiation field width calibration parameter γw and a radiation field height calibration parameter γh, where <MAT> and <MAT>, where H<NUM> represents the distance, SID represents a preset source to image distance, ws represents the width in the set radiation field range, hs represents the height in the set radiation field range, wc represents the width in the actual radiation field range, and hc represents the height in the actual radiation field range.

In one embodiment, the fourth determining module is configured to: determine the actual radiation field range on the basis of a user input; and make an adjustment to obtain the set radiation field range corresponding to the actual radiation field range; or, determine the set radiation field range on the basis of a user input; and measure the actual radiation field range corresponding to the set radiation field range on the calibration plate.

In one embodiment, the third determining module is further configured to: adjust the distance m times, and determine the first 3D coordinates and the second 3D coordinates after each distance adjustment, where m is a positive integer greater than or equal to <NUM>; and determine a translation vector T and a rotation matrix R, where T = q - R p and <MAT>, where <MAT>, N is the number of positioning markers, i is the serial number of distance adjustment, det is a determinant function, U and V are singular value decomposition of M - (P - q)(Q - q)T, qi is the second 3D coordinates determined in an i-th distance adjustment, pi is the first 3D coordinates determined in the i-th distance adjustment, and the value range of i is [<NUM>, m].

An apparatus for calibrating a 3D camera in X-ray imaging, the apparatus including a processor and a memory, where
the memory stores an application executable by the processor and configured to enable the processor to execute the method for calibrating a 3D camera in X-ray imaging according to any one of the foregoing embodiments.

Hence, the embodiments of the present disclosure provide the 3D camera calibration apparatus having a processor-memory architecture. The transformation matrix is determined on the basis of a transformation relationship between 3D coordinates of the positioning marker in the calibration plate in the X-ray tube coordinate system and 3D coordinates of the positioning marker in the 3D camera coordinate system, so as to implement calibration of the 3D camera and eliminate the system error caused by the coordinate system difference.

A computer-readable storage medium, having computer-readable instructions stored thereon, where the computer-readable instructions are used for implementing the method for calibrating a 3D camera in X-ray imaging according to any one of the foregoing embodiments.

Therefore, the embodiments of the present disclosure provide the computer-readable storage medium including the computer-readable instructions. The transformation matrix is determined on the basis of a transformation relationship between 3D coordinates of the positioning marker in the calibration plate in the X-ray tube coordinate system and 3D coordinates of the positioning marker in the 3D camera coordinate system, so as to implement calibration of the 3D camera and eliminate the system error caused by the coordinate system difference.

To enable a person of ordinary skill in the art to understand the foregoing and other features and advantages of the present disclosure more clearly, exemplary embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. In the drawings,.

To make the objective, technical solutions, and advantages of the present disclosure clearer, the present disclosure is further described in detail below by using embodiments.

For the sake of conciseness and intuitiveness in description, the solutions of the present disclosure are explained below by describing several representative embodiments. A lot of details in the embodiments are provided only to aid in understanding the solutions of the present disclosure. However, it is obvious that the implementation of the technical solutions of the present disclosure may not be limited to these details. To avoid making the solutions of the present disclosure unclear unnecessarily, some embodiments are not described in detail, but merely outlined. In the following text, "including" means "including but not limited to", and "according to. " means "at least according to. , but not limited to, only according to. In conformity with Chinese language habits, in the following text, in a case that the quantity of a component is not specified, it means that there may be one or more components, or it may be understood as that there is at least one component.

The applicant finds that: positioning information in a 3D photo taken by a 3D camera is usually based on a 3D camera coordinate system, while many parameters in an X-ray imaging application are based on an X-ray tube coordinate system, such that if the positioning information in the 3D photo is directly applied to the X-ray imaging application, a system error may be caused by the coordinate system difference. In embodiments of the present disclosure, the 3D camera is calibrated on the basis of the transformation matrix, so as to eliminate the system error caused by the coordinate system difference.

<FIG> is a flowchart of a method for calibrating a 3D camera in X-ray imaging according to embodiments of the present disclosure. Preferably, the method shown in <FIG> can be executed by a controller. The controller can be implemented as or integrated to a control host of an X-ray imaging system, and can also be implemented as a control unit independent of the control host.

As shown in <FIG>, the method <NUM> includes the following steps:
Step <NUM>: Acquire a 3D image of a calibration plate captured by a 3D camera, where the calibration plate includes a positioning marker, and the calibration plate has a predetermined distance from an X-ray tube.

The 3D camera is usually fixed onto a tube casing of the X-ray tube in an X-ray generation assembly, or fixed onto a collimator shell in the X-ray generation assembly. For example, a recess for accommodating the 3D camera is formed on the tube casing or the collimator shell, and the 3D camera is fixed into the recess through bolt connection, snap-fit connection, a steel wire loop, etc..

The calibration plate is configured to calibrate the 3D camera. The positioning marker for assisting positioning is disposed on the calibration plate, and one or more positioning markers, preferably more than one positioning markers, may be provided. For example, the positioning markers may be a plurality of circles, where the distance between every two adjacent circles is the same. In another example, the positioning markers may be a plurality of concentric circles, where the radius difference between adjacent concentric circles is the same.

In one embodiment, the calibration plate is disposed on the ground, the X-ray tube (not rotated) is aligned with the calibration plate on the ground, and the ray direction of the X-ray tube is perpendicular to the ground. In this case, the distance between the calibration plate and the X-ray tube is the vertical height from an X-ray source in the X-ray tube to the calibration plate.

In one embodiment, the calibration plate is disposed on the wall, an opening of the X-ray tube (not rotated) is aligned with the calibration plate on the wall, and then the ray direction of the X-ray tube is perpendicular to the wall. In this case, the distance between the calibration plate and the X-ray tube is the horizontal distance from an X-ray source in the X-ray tube to the calibration plate.

Typical examples of the calibration plate and the positioning marker are described exemplarily above, and a person skilled in the art can realize that such descriptions are only exemplary, and are not intended to limit the scope of protection of the embodiments of the present disclosure.

Step <NUM>: Determine first 3D coordinates of the positioning marker in a 3D camera coordinate system on the basis of the 3D image.

The 3D camera coordinate system is a 3D rectangular coordinate system established with the focus center of the 3D camera as the origin and the optical axis as a Z axis. In the 3D camera coordinate system: (<NUM>) the origin is the focus center (i.e., the optical center) of the 3D camera; (<NUM>) an X axis in the 3D camera coordinate system is parallel to an X axis in an image plane; (<NUM>) a Y axis in the 3D camera coordinate system is parallel to a Y axis in the image plane; and (<NUM>) A Z axis in the 3D camera coordinate system is a camera optical axis, where the Z axis is perpendicular to the image plane. The image plane is a two-dimensional rectangular coordinate system.

In one embodiment, step <NUM> specifically includes: transforming the 3D image acquired in step <NUM> to a two-dimensional image, determining, from the two-dimensional image, two-dimensional coordinates of the positioning marker in an image coordinate system by using an image recognition algorithm, and then transforming the two-dimensional coordinates of the positioning marker in the image coordinate system to 3D coordinates (i.e., the first 3D coordinates) of the positioning marker in the 3D camera coordinate system on the basis of depth of field parameters of the 3D camera.

In one embodiment, step <NUM> specifically includes: determining 3D coordinates (i.e., the first 3D coordinates) of the positioning marker in the 3D image in the 3D camera coordinate system on the basis of a 3D positioning algorithm.

Step <NUM>: Determine second 3D coordinates of the positioning marker in an X-ray tube coordinate system on the basis of the distance.

The X-ray tube coordinate system is a 3D rectangular coordinate system established with the X-ray source as the origin and the X-ray axis as a Z axis. In the X-ray tube coordinate system: (<NUM>) the origin is the X-ray source; (<NUM>) an X axis in the X-ray tube coordinate system is parallel to the X axis in the image plane; (<NUM>) a Y axis in the X-ray tube coordinate system is parallel to the Y axis in the image plane; and (<NUM>) a Z axis in the 3D camera coordinate system is the X-ray axis, where the Z axis is usually perpendicular to the calibration plate.

In one exemplary embodiment, the center of the calibration plate does not coincide with the radiation field center of the X-ray tube; the calibration plate is disposed in an XY plane including an X axis and a Y axis; and the method further includes: moving the calibration plate within the XY plane until the center of the calibration plate coincides with the radiation field center of the X-ray tube.

The radiation field center of the X-ray tube usually forms an imaging marker (e.g., a laser crosshair) on an imaging target.

In one case, it is found by manual observation that the center of the calibration plate does not coincide with the imaging marker, that is, it is manually determined that the center of the calibration plate does not coincide with the radiation field center of the X-ray tube. Then, the calibration plate is moved manually or automatically within the XY plane where the calibration plate is disposed, until the center of the calibration plate coincides with the radiation field center of the X-ray tube.

In one case, it is determined on the basis of an automatic optical recognition method that the center of the calibration plate does not coincide with the imaging marker, that is, it is automatically determined that the center of the calibration plate does not coincide with the radiation field center of the X-ray tube. Then, the calibration plate is moved manually or automatically within the XY plane where the calibration plate is disposed, until the center of the calibration plate coincides with the radiation field center of the X-ray tube.

After the center of the calibration plate coincides with the radiation field center of the X-ray tube, the 3D coordinates of the center of the calibration plate in the X-ray tube coordinate system can be simplified, and thus the subsequent computation process is simplified.

In one exemplary embodiment, the determining second 3D coordinates of the positioning marker in the X-ray tube coordinate system on the basis of the distance in step <NUM> includes: (<NUM>) determining 3D coordinates (<NUM>, <NUM>, h) of the center of the calibration plate in the X-ray tube coordinate system, where h represents the distance; (<NUM>) determining a distance vector T between the positioning marker and the center of the calibration plate; (<NUM>) determining a component x of the distance vector T on the X axis and a component y of the distance vector T on the Y axis; and (<NUM>) determining the second 3D coordinates (x, y, h).

Hence, after the center of the calibration plate coincides with the radiation field center of the X-ray tube by moving the calibration plate, the 3D coordinates of the center of the calibration plate in the X-ray tube coordinate system are simplified.

In one exemplary embodiment, the center of the calibration plate does not coincide with the radiation field center of the X-ray tube; the calibration plate is disposed in an XY plane including an X axis and a Y axis; and the determining second 3D coordinates of the positioning marker in an X-ray tube coordinate system on the basis of the distance in step <NUM> includes:.

Step <NUM>: Determine, on the basis of the first 3D coordinates and the second 3D coordinates, a transformation matrix adapted to calibrate the 3D camera.

On the basis of the first 3D coordinates determined in step <NUM> and the second 3D coordinates determined in step <NUM>, the transformation matrix for calibrating the 3D camera can be computed on the basis of a matrix method. To facilitate the computation of the transformation matrix, the number of the first 3D coordinates is preferably greater than <NUM>; correspondingly, the number of the second 3D coordinates is preferably greater than <NUM>.

The distance between the calibration plate and the X-ray tube can be adjusted multiples times, and the first 3D coordinates and the second 3D coordinates after each distance adjustment are determined, accordingly. Then, the transformation matrix is computed more accurately by using the first 3D coordinates and the second 3D coordinates determined after multiple distance adjustments. The number of the first 3D coordinates determined after multiple distance adjustments is preferably greater than <NUM>; correspondingly, the number of the second 3D coordinates determined after multiple adjustments is preferably greater than <NUM>.

In one exemplary embodiment, the method further includes: adjusting the distance m times, and determining the first 3D coordinates and the second 3D coordinates after each distance adjustment, where m is a positive integer greater than or equal to <NUM>; and the determining, on the basis of the first 3D coordinates and the second 3D coordinates, a transformation matrix adapted to calibrate the 3D camera (<NUM>) includes: determining a translation vector T and a rotation matrix R, where T - q - R p and <MAT>, where <MAT>, N is the number of positioning markers, i is the serial number of distance adjustment, det is a determinant function, U and V are singular value decomposition of M - (P - q)(Q - q)T, qi is the second 3D coordinates determined in an i-th distance adjustment, pi is the first 3D coordinates determined in the i-th distance adjustment, and the value range of i is [<NUM>, m]; and determining the transformation matrix on the basis of the translation vector T and the rotation matrix R.

For example, assuming that the number of positioning markers in the calibration plate is k (k is greater than <NUM>), the distance is adjusted m times, and the first 3D coordinates and the second 3D coordinates after distance adjustment are determined.

Method (<NUM>): three corresponding 3D coordinate pairs are selected from first 3D coordinates before the distance adjustments and second 3D coordinates before the distance adjustments, then three corresponding 3D coordinate pairs are selected from first 3D coordinates after the first distance adjustment and second 3D coordinates after the first distance adjustment, and the transformation matrix is computed by using the six 3D coordinate pairs.

Method (<NUM>): three corresponding 3D coordinate pairs are selected from first 3D coordinates after the first distance adjustment and second 3D coordinates after the first distance adjustment, then three corresponding 3D coordinate pairs are selected from first 3D coordinates after the second distance adjustment and second 3D coordinates after the second distance adjustment, and the transformation matrix is computed by using the six 3D coordinate pairs.

Specific embodiments of computing the transformation matrix are described exemplarily above, and a person skilled in the art can realize that such descriptions are only exemplary, and are not intended to limit the embodiments of the present disclosure.

In one exemplary embodiment, the method further includes: determining a set radiation field range and an actual radiation field range on the calibration plate corresponding to the set radiation field range; and determining a radiation field width calibration parameter γw and a radiation field height calibration parameter γh, where <MAT> and <MAT>, where H<NUM> represents the distance between the calibration plate and the X-ray tube, SID represents the distance between the X-ray source and an imaging surface, referred to as a source to image distance, ws represents the width in the set radiation field range, hs represents the height in the set radiation field range, wc represents the width in the actual radiation field range, and hc represents the height in the actual radiation field range.

The radiation field width calibration parameter γw and the radiation field height calibration parameter γh reflect the difference between actual and set collimator radiation fields, can be used for calibrating the system error, and can also be used for calibrating the radiation field of a virtual collimator to make the radiation field of the virtual collimator consistent with the radiation field of a real collimator. Hence, the width and height of a radiation field can also be calibrated to make the actual radiation field range consistent with the set radiation field range.

In one exemplary embodiment, the determining a set radiation field range and an actual radiation field range on the calibration plate corresponding to the set radiation field range includes the following methods:
Method (<NUM>): determining the actual radiation field range on the basis of a user input; and making an adjustment to obtain the set radiation field range corresponding to the actual radiation field range.

For example, the actual radiation field range inputted by a user is <NUM>×<NUM><NUM>. Then, a set radiation field range in an X-ray imaging system is adjusted until it is found by manually observing the calibration plate or performing image recognition on a 3D picture of the calibration plate that the actual radiation field range on the calibration plate is <NUM>×<NUM><NUM>, and at that time, the set radiation field range, assumed as <NUM>×<NUM><NUM>, in the X-ray imaging system is recorded and then considered as the set radiation field range. In this case, the actual radiation field range is <NUM>×<NUM><NUM>, and the set radiation field range corresponding to the <NUM>×<NUM><NUM> actual radiation field range is <NUM>×<NUM><NUM>.

Method (<NUM>): determining the set radiation field range on the basis of a user input; and measuring the actual radiation field range corresponding to the set radiation field range. Therefore, the set radiation field range and the actual radiation field range can be determined in many ways to adapt to various implementation environments.

For example, the set radiation field range in the X-ray imaging system inputted by the user is <NUM>×<NUM><NUM>; then, it is found by manually observing the calibration plate or performing image recognition on the 3D picture of the calibration plate that the actual radiation field range on the calibration plate is <NUM>×<NUM><NUM> Therefore, it is determined that the actual radiation field range is <NUM>×<NUM><NUM>, and the set radiation field range corresponding to the <NUM>×<NUM><NUM> actual radiation field range is <NUM>×<NUM><NUM>.

<FIG> is a schematic diagram of 3D camera calibration in X-ray imaging according to embodiments of the present disclosure.

In <FIG>, an X-ray generation assembly including an X-ray tube <NUM> and a collimator <NUM> is connected to a telescopic sleeve <NUM> using a support, and the telescopic sleeve <NUM> is connected to a ceiling <NUM>. A 3D camera <NUM> is disposed on a shell of the collimator <NUM>. A control host <NUM> may be a control host disposed in a local control room, and may also be a remote control host, such as a control host at the cloud.

A calibration plate <NUM> for calibrating the 3D camera <NUM> is disposed on the ground <NUM>. A positioning marker for assisting positioning is disposed on the calibration plate <NUM>, and one or more positioning markers may be provided. The X-ray tube <NUM> is aligned with the calibration plate <NUM> on the ground, and the ray direction of the X-ray tube <NUM> is perpendicular to the calibration plate <NUM>. The distance between the calibration plate <NUM> and the X-ray tube <NUM> is the vertical height from an X-ray source <NUM> in the X-ray tube <NUM> to the calibration plate <NUM>.

<FIG> is the first schematic diagram of determining 3D coordinates of the center of a calibration plate in an X-ray tube coordinate system according to embodiments of the present disclosure.

In <FIG>, a calibration plate <NUM> has a plurality of circles serving as positioning markers, which is exemplified with <NUM> circles in the embodiment shown in <FIG>. The <NUM> circles cover <NUM> rows, and each row cover <NUM> circles. The circles in each row are equidistantly spaced and the spacing is a known fixed value D; moreover, the spacing between adjacent circles in different rows is also D. For example, the first circle from the left of the first row and the second circle from the left of the first row are adjacent to each other within the same row, and the spacing is D; the second circle from the left of the first row and the third circle from the left of the first row are adjacent to each other within the same row, and the spacing is D; the first circle from the left of the first row and the first circle from the left of the second row are adjacent to each other in different rows, and the spacing is D; the first circle from the left of the first row and the second circle from the left of the second row are adjacent to each other in different rows, and the spacing is D. In <FIG>, the distance between any two adjacent circles is the known fixed value D.

The center of the calibration plate <NUM> is taken as point O. The radiation field center of an X-ray tube presented on the calibration plate <NUM> is point M.

3D coordinates of each circle in a 3D camera coordinate system can be obtained through a 3D picture of the calibration plate <NUM>. 3D coordinates of each circle in an X-ray tube coordinate system can be determined, accordingly, so as to facilitate computing a transformation matrix of a 3D camera.

The method for determining the 3D coordinates of each circle in the X-ray tube coordinate system includes:
case (<NUM>): in a case that it is observed that point M and point O on the calibration plate coincide, it can be determined that the 3D coordinates of the center of the plate in the X-ray tube coordinate system are (<NUM>, <NUM>, h), and then the 3D coordinates of each circle in the X-ray tube coordinate system can be conveniently determined.

For example, assuming that it is known that the distance between the calibration plate <NUM> and an X-ray source of the X-ray tube is <NUM> and the distance between every two adjacent circles is <NUM>, the coordinates of the center point O of the calibration plate in the X-ray tube coordinate system can be calibrated as (<NUM>, <NUM>, <NUM>). Correspondingly, the coordinates of the first circle <NUM> on the left of the center point O in the X-ray tube coordinate system are (<NUM>, <NUM>, <NUM>); the coordinates of the first circle <NUM> on the right of the center point O in the X-ray tube coordinate system are (-<NUM>, <NUM>, <NUM>); the coordinates of the first circle <NUM> above the center point O in the X-ray tube coordinate system are (<NUM>, <NUM>, <NUM>), and the coordinates of the first circle <NUM> below the center point O in the X-ray tube coordinate system are (<NUM>, -<NUM>, <NUM>). Similarly, the coordinates of all the circles in the X-ray tube coordinate system can be determined.

Case (<NUM>): in a case that point M and point O on the calibration plate <NUM> do not coincide as shown in <FIG>, a distance vector between the radiation field center (i.e., point M) and the center of the calibration plate (i.e., point O) is S. A component of the distance vector S on an X axis is Δx, and a component of the distance vector S on a Y axis is Δy. Hence, the modulus of Δx is D, and the modulus of Δy is D. Therefore, in combination with a predetermined coordinate system direction, the 3D coordinates (Δx, Δy, h) of the center of the calibration plate in the X-ray tube coordinate system can be determined, where h represents the distance between the calibration plate <NUM> and the X-ray source of the X-ray tube. Then, a distance vector T between each circle and the center of the calibration plate can be determined, a component x of the distance vector T on the X axis and a component y of the distance vector T on the Y axis are determined, and thus the 3D coordinates (Δx+x, Δy+y, h) of each circle in the X-ray tube coordinate system are determined.

<FIG> is the second schematic diagram of determining 3D coordinates of the center of a calibration plate in an X-ray tube coordinate system according to embodiments of the present disclosure.

In <FIG>, a calibration plate <NUM> includes positioning markers implemented as a concentric circle <NUM>, a concentric circle <NUM>, a concentric circle <NUM>, a concentric circle <NUM>, and a concentric circle <NUM>. The radius of the concentric circle <NUM> is r; the radius difference between adjacent concentric circles is the same, and it is assumed that the radius difference is d. The center of the calibration plate <NUM> is taken as point O. The radiation field center of an X-ray tube presented on the calibration plate <NUM> is point M.

3D coordinates of a quadrant point (e.g., an upper quadrant point, a lower quadrant point, a left quadrant point, and a right quadrant point) of each concentric circle in a 3D camera coordinate system can be obtained through a D picture of the calibration plate <NUM>. 3D coordinates of a quadrant point of each concentric circle in an X-ray tube coordinate system can be determined, accordingly, so as to facilitate computing a transformation matrix of a 3D camera.

The method for determining the 3D coordinates of the quadrant point of each concentric circle in the X-ray tube coordinate system includes:.

<FIG> is a structural diagram of an apparatus for calibrating a 3D camera in X-ray imaging according to embodiments of the present disclosure.

As shown in <FIG>, an apparatus <NUM> for calibrating a 3D camera in X-ray imaging includes:.

In one embodiment, the second determining module <NUM> is configured to: determine 3D coordinates (<NUM>, <NUM>, h) of the center of the calibration plate in the X-ray tube coordinate system, where h represents the distance; determine a distance vector T between the positioning marker and the center of the calibration plate; determine a component x of the distance vector T on the X axis and a component y of the distance vector T on the Y axis; and determine the second 3D coordinates (x, y, h).

In one embodiment, the center of the calibration plate does not coincide with the radiation field center of the X-ray tube; the calibration plate is disposed in an XY plane including an X axis and a Y axis; and the second determining module <NUM> is configured to: determine 3D coordinates (Δx, Δy, h) of the center of the calibration plate in the X-ray tube coordinate system, where h represents the distance, Δx represents a component of a distance vector between the radiation field center and the center of the calibration plate on the X axis, and Δy represents a component of the distance vector between the radiation field center and the center of the calibration plate on the Y axis; determine a distance vector T between the positioning marker and the center of the calibration plate; determine a component x of the distance vector T on the X axis and a component y of the distance vector T on the Y axis; and determine the second 3D coordinates (Δx+x, Δy+y, h) of the positioning marker.

In one embodiment, the apparatus further includes: a fourth determining module <NUM>, configured to determine a set radiation field range and an actual radiation field range on the calibration plate corresponding to the set radiation field range; and determine a radiation field width calibration parameter γw and a radiation field height calibration parameter γh, where <MAT> and <MAT>, where H<NUM> represents the distance, SID represents a preset source to image distance, ws represents the width in the set radiation field range, hs represents the height in the set radiation field range, wc represents the width in the actual radiation field range, and hc represents the height in the actual radiation field range.

In one embodiment, the fourth determining module <NUM> is configured to: determine the actual radiation field range on the basis of a user input; and make an adjustment to obtain the set radiation field range corresponding to the actual radiation field range; or, determine the set radiation field range on the basis of a user input; and measure the actual radiation field range corresponding to the set radiation field range on the calibration plate.

In one embodiment, the third determining module <NUM> is further configured to: adjust the distance m times, and determine the first 3D coordinates and the second 3D coordinates after each distance adjustment, where m is a positive integer greater than or equal to <NUM>; and determine a translation vector T and a rota-tion matrix R, where T - q - R p and <MAT>, where <MAT>, <MAT>, N is the number of positioning markers, i is the serial number of distance adjustment, det is a determinant function, U and V are singular value decomposition of M - (P - q)(Q - q)T, qi is the second 3D coordinates determined in an i-th distance adjustment, pi is the first 3D coordinates determined in the i-th distance adjustment, and the value range of i is [<NUM>, m].

Embodiments of the present disclosure further provide an apparatus for calibrating a 3D camera in X-ray imaging having a processor-memory architecture. <FIG> is a structural diagram of an apparatus for calibrating a 3D camera in X-ray imaging having a processor-memory architecture according to embodiments of the present disclosure.

As shown in <FIG>, an apparatus <NUM> in which an industrial edge application is deployed includes a processor <NUM>, a memory <NUM>, and a computer program stored on the memory <NUM> and capable of running on the processor <NUM>, where when executed by the processor <NUM>, the computer program implements the method for calibrating a 3D camera in X-ray imaging according to any one of the foregoing embodiments. The memory <NUM> may be specifically implemented as various storage media such as an electrically-erasable programmable read-only memory (EEPROM), a flash memory, and a programmable read-only memory (PROM). The processor <NUM> may be implemented to include one or more central processing units (CPUs) or one or more field-programmable gate arrays, where the field-programmable gate arrays integrate one or more CPU cores. Specifically, the CPU or the CPU core may be implemented as a CPU or an MCU or a DSP or the like.

Not all steps in the foregoing flowchart and not all modules in the foregoing structural diagrams are necessary, and some steps or modules can be omitted according to actual requirements. An execution order of the steps is not fixed and may be adjusted according to requirements. Division of modules is only for the convenience of describing division of functions used. In practical implementation, one module can be implemented by a plurality of modules, and functions of a plurality of modules can also be implemented by a same module. The modules can be located in a same device, and can also be located in different devices.

Hardware modules in the embodiments can be implemented mechanically or electronically. For example, a hardware module may include a dedicated permanent circuit or logic device (e.g., a dedicated processor, an FPGA or an ASIC) to complete a corresponding operation. A hardware module may also include a programmable logic device or circuit temporarily configured by software (e.g., including a general-purpose processor or other programmable processors) to execute a corresponding operation. For the specific mechanical form, a dedicated permanent circuit or a temporarily configured circuit (configured by software) may be used to implement a hardware module, which can be determined based on costs and time considerations.

Claim 1:
A method (<NUM>) for calibrating a three-dimensional camera in X-ray imaging, the method comprising:
acquiring a three-dimensional image of a calibration plate captured by a three-dimensional camera, wherein the calibration plate comprises a positioning marker, and the calibration plate has a predetermined distance from an X-ray tube (<NUM>);
determining first three-dimensional coordinates of the positioning marker in a three-dimensional camera coordinate system on the basis of the three-dimensional image (<NUM>);
determining second three-dimensional coordinates of the positioning marker in an X-ray tube coordinate system on the basis of the distance (<NUM>); and
determining, on the basis of the first three-dimensional coordinates and the second three-dimensional coordinates, a transformation matrix adapted to calibrate the three-dimensional camera (<NUM>).