Disclosure of Invention
In order to solve the problems in the prior art, the invention provides an imaging system calibration method and an imaging correction method based on the response characteristic of a detector. In order to achieve the purpose of the invention, the invention adopts three steps: 1) carrying out more comprehensive bias calibration and gain calibration on the detector in advance, and extracting self response of the detector, including bias, gain response and a bad pixel set of the detector; 2) before a detector user uses the X-ray detector, one or more exposure images are shot, and the X-ray distribution coefficient of the current imaging system is extracted according to the obtained self response parameters of the detector; 3) and correcting the normally exposed image according to the acquired self response of the detector and the X-ray distribution curve of the current system. The technical scheme is as follows:
in one aspect, the present invention provides a method for calibrating an imaging system based on response characteristics of a detector, including: the imaging system comprises a ray source and a detector, and the calibration method is applied to the imaging system with a new ray source replaced or the imaging system with a changed geometric layout, and comprises the following steps:
loading detector response parameters according to pre-acquired self response characteristics of the detector, wherein the detector response parameters comprise bias response parameters and gain response parameters;
setting ray quality for the current system, selecting exposure parameters, and collecting one or more exposure images to obtain an average exposure image;
carrying out bias correction on the average exposure image according to the bias response parameters;
carrying out gray value normalization operation on the image after the offset correction;
correcting the gain response of the detector for the image according to the gain response parameter;
and performing surface fitting on the corrected image to obtain a normalized ray distribution coefficient of the current system, and completing the calibration of the actual imaging system.
Further, the bias response parameter is obtained by the following method:
selecting a plurality of temperature points according to the working temperature range of the detector to generate a temperature list;
selecting a plurality of integration time points according to the integration time range used by the detector to generate an integration time list;
acquiring detector images at each temperature point according to each integration time point on the integration time list to obtain a plurality of images of each temperature point at the integration time point to obtain an average dark field image;
fitting the gray value of each pixel of the image by taking the temperature as a variable according to the average dark field image to obtain a gray value fitting equation of each pixel of the image at the integration time point, wherein the gray value fitting equation is used as a bias response parameter;
and traversing the integration time list to obtain bias response parameters under different integration time points.
Further, the bias response parameter is obtained by the following method:
selecting a plurality of temperature points according to the working temperature range of the detector to generate a temperature list;
selecting a plurality of integration time points according to the integration time range used by the detector to generate an integration time list;
acquiring detector images according to the temperature list and the integration time list to obtain a plurality of images of each integration time point at each temperature point to obtain an average dark field image;
and fitting the gray value of each pixel of the image by taking the temperature and the integration time as variables according to the average dark field image to obtain a gray value fitting equation of each pixel of the image, wherein the gray value fitting equation is used as a bias response parameter.
Further, the gain response parameter is obtained by the following method:
setting a geometric layout of an imaging system for extracting a detector gain response;
generating a ray quality list according to the ray energy range applied by the detector;
selecting exposure parameters under each ray quality, acquiring a plurality of exposure images under the exposure parameters to obtain average exposure images, and performing the following operations on each average exposure image:
carrying out bias correction on the average exposure image, and carrying out gray value normalization operation to obtain a gain map, wherein the gain map comprises a ray distribution coefficient and self gain response of a detector;
extracting a gain coefficient of a single device or a combined gain coefficient of a plurality of devices from the gain map according to the gain response characteristics of each device of the detector to obtain a residual gain map;
fitting to obtain a ray distribution coefficient of rays on the surface of the detector according to the residual gain map and the ray distribution model;
acquiring self gain response of the detector from the gain map according to the ray distribution coefficient;
and traversing the ray quality list to obtain the self gain response parameters of the detector of each pixel of the image under each ray quality.
Further, the selecting the exposure parameters includes:
under the condition of determining the radiation quality, selecting exposure parameters so that the gray level mean value of a plurality of exposure images acquired under the exposure parameters is 1/4-3/4 of the maximum linear gray level value of the detector.
Further, the detector response parameters further include a bad pixel set, and the obtaining method includes: and extracting points different from surrounding pixels from the dark field image generated in the bias response process and/or the exposure image generated in the gain response process to serve as bad pixel points and form a bad pixel set.
Furthermore, each device of the detector comprises a scintillator, a thin film transistor array and an electronic system of the detector.
Further, the extracting the gain of the single device or the combined gain of the multiple devices from the gain map comprises:
listing gain response data of each device of the detector, and comparing the extracted characteristic strength of each device and a ray distribution coefficient;
gain coefficients of one or more devices having extracted features stronger than the ray distribution coefficients are extracted from the gain map.
Further, the performing offset correction on the average exposure image and performing gray value normalization operation includes:
obtaining the average gray value or the median gray value of each pixel of the image after bias correction;
and dividing the image subjected to the offset correction by the average gray value or the gray median value to obtain the gain map.
In another aspect, the present invention provides an imaging correction method, including:
acquiring an exposure image of an imaging system on an imaging object, wherein the imaging system completes system calibration by using the calibration method;
loading detector offset response parameters, and carrying out offset correction on the exposure image according to the working temperature and the integration time of the detector;
and loading a detector gain response parameter, and carrying out gain correction on the image subjected to bias correction together with the normalized ray coefficient of the imaging system.
Further, the imaging correction method further includes:
performing bad pixel correction on the image subjected to the gain correction, wherein the bad pixel correction comprises the following steps: and loading the detector bad pixel set, acquiring the position of the bad pixel point in the bad pixel set, and correcting the pixel at the corresponding position on the image to be corrected.
The imaging system calibration method and the imaging correction method based on the response characteristic of the detector provided by the invention can have the following beneficial effects: by extracting the self response parameters of the detector in advance, a flat panel user does not need to carry out comprehensive calibration before use, only one or more exposure images are needed to be shot, the distribution coefficient of the X rays of the current imaging system is extracted, and the correction of the normal exposure image can be completed by combining the self response coefficients of the detector.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
Taking an X-ray imaging system as an example, referring to fig. 1, the X-ray imaging system includes a flat panel detector 14 and an X-ray source, and preferably further includes an additional filter (not shown) disposed between the flat panel detector 14 and the X-ray source, since the X-ray source itself has irradiation nonuniformity, and the difference of pixel responses of the flat panel detector 14 and the characteristics of components of the flat panel detector 14 are affected by temperature, integration time, X-ray energy spectrum, and the like, it is necessary to calibrate each influencing factor. According to the invention, the self response characteristic of the detector is extracted firstly, and when an imaging system is changed greatly (the system composition is changed or the geometric layout is changed), only the distribution characteristic of the X-ray is calibrated, so that the rapid calibration and correction method is realized.
A first object of the invention is to obtain the intrinsic self-response of the probe;
a second object of the invention is to provide a fast calibration method of an X-ray imaging system for flat panel users and to obtain a good image quality by a simple correction method. It should be noted that, for other radiation source-detector imaging systems except for the X-ray source, the calibration principle provided by the present invention can also be used to perform the fast calibration of the system and the image correction during actual imaging, and the calibration method for the imaging systems of other radiation sources is not described herein again.
In one embodiment of the present invention, a method for extracting response characteristics of a detector in advance is provided, and referring to fig. 2, the method includes the following procedures:
and S1, calibrating the bias response of the detector and acquiring a bias response parameter.
Specifically, there are two ways to obtain the offset response parameter, one way is as follows, see fig. 3:
and S111, selecting a plurality of temperature points according to the working temperature range of the detector, and generating a temperature list.
Firstly, according to the common working temperature range of the detector, selecting a temperature point at regular intervals (the temperature interval point is not more than 3 ℃ at most) to generate a temperature list.
And S112, selecting a plurality of integration time points according to the integration time range used by the detector to generate an integration time list.
And according to the commonly used integration time points of the detector, selecting one integration time point at regular intervals to generate an integration time list.
After a temperature list and an integral time list are generated, a detector is turned on, the detector is preheated, the environment temperature of the detector is adjusted according to the temperature list, and the detector is made to work for a period of time until the indicated value of a temperature sensor of the detector reaches the specified temperature, so that the detector reaches a stable state; and setting the integration time of the detector according to the integration time list, enabling the detector to work for a period of time to a stable state under one integration time in the integration time list (the stable state of the detector is represented by continuously taking a group of dark field images, and the deviation of the mean value of the dark field images is within +/-3%), acquiring the dark field images of a plurality of periods, and calculating the average dark field image.
S113, collecting the detector images according to the temperature points corresponding to each integration time point on the integration time list, obtaining a plurality of images of the temperature points under the integration time point, and obtaining an average dark field image.
And S114, fitting the gray value of each pixel of the image by taking the temperature as a variable according to the average dark field image to obtain a gray value fitting equation of each pixel of the image at the integration time point, wherein the gray value fitting equation is used as a bias response parameter.
That is, the bias response parameter in the first mode is an equation about the gray value of the image pixel obtained by fitting with temperature as a variable on the premise that the integration time is a certain fixed value, the fitting model may use a one-element polynomial, which is exemplified by a quadratic polynomial, and the bias response parameter is:
the integration time is t1, and z is a1 x2+ b1 × x + c1, where x is temperature, z is pixel gray value, and a1, b1, and c1 are parameters obtained by fitting in the current state;
and S115, traversing the integration time list to obtain bias response parameters at different integration time points.
For example, if there are N integration times in the integration time table, N offset response parameters are obtained correspondingly, see table 1 below:
TABLE 1
Based on the method, the integration time of the detector is adjusted in a stepping mode, each gear corresponds to an integration time point in an integration time list, and when the flat panel detector is used, a corresponding fitting equation, namely a bias response parameter, is matched according to the adjusted current integration time and is stored.
Mode two is as follows, see fig. 4:
and S121, selecting a plurality of temperature points according to the working temperature range of the detector, and generating a temperature list.
And S122, selecting a plurality of integration time points according to the integration time range used by the detector to generate an integration time list.
S121 and S122 are the same as the first method, and are not described herein again.
S123, acquiring the detector image according to the temperature list and the integration time list to obtain a plurality of images of each integration time point under each temperature point, and obtaining an average dark field image.
And repeating the step S112 for a plurality of times to obtain an average dark field image of each integration time at the temperature point, and repeating the step S111 until the temperature list is traversed to obtain the average dark field image of each integration time at each temperature point, thereby obtaining the average dark field image of each integration time point at each temperature point.
And S124, fitting the gray value of each pixel of the image by taking the temperature and the integration time as variables according to the average dark field image to obtain a fitting equation, storing the fitting equation as an offset response parameter, and obtaining the gray value fitting equation of each pixel of the image as the offset response parameter.
Unlike the first method in which temperature is used as a variable alone, in the second method, the equation about the gray value of the image pixel is obtained by fitting with temperature and integration time as variables, the fitting model may use a binary polynomial of multiple degrees, as an example, the binary polynomial of multiple degrees, and the bias response parameter is:
z=ax2+by2the method is different from the first method in that the integration time of the detector does not need to be set in a grading mode based on the second method, stepless adjustment can be achieved, and the second method has the advantage of higher fitting accuracy.
It should be noted that the univariate polynomial/binary polynomial illustrated in the first and second modes is only one fitting model illustrated, and the invention is directed to extracting the self-response parameters of the detector and using the parameters for system calibration and image correction, and is not limited to a fixed fitting mode.
And S2, calibrating the gain response of the detector and acquiring a gain response parameter.
Specifically, according to a common tube voltage value of an X-ray imaging system, selecting corresponding tube current time (mAs) or tube current (mA) and exposure time (ms) under each tube voltage to generate a tube voltage-tube current time or tube voltage-tube current-exposure time exposure parameter, and preferentially, under a certain tube voltage, enabling a gray value of an exposure image corresponding to the selected tube current time (mAs) or tube current (mA) and the exposure time (ms) to reach 1/4-3/4 of a maximum linear output value;
by adjusting the geometric layout of the imaging system, the center of the detector and the center of the X-ray are aligned as far as possible, and the target point of the X-ray source, namely the target center of the bulb tube, is far from the surface of the detector as far as possible. Preferably, the included angle between the vertical line of the center of the bulb and the connecting line from the center of the bulb to the farthest point on the surface of the detector is less than half or more than half of the target angle of the bulb;
starting a detector, and enabling the detector to work in a stable state;
generating a ray quality list according to the ray energy range applied by the detector;
selecting exposure parameters under each ray quality (under the condition of determining the radiation quality, selecting the exposure parameters so that the gray mean value of a plurality of exposure images acquired under the exposure parameters is 1/4-3/4 of the maximum linear gray value of a detector), acquiring a plurality of exposure images under the exposure parameters to obtain average exposure images, and performing the following operations on each average exposure image, wherein the operations are shown in the following figure 5:
s21, carrying out offset correction on the average exposure image, and carrying out gray value normalization operation to obtain a gain map, wherein the gain map comprises a ray distribution coefficient and self gain response of the detector, and the gain map is the product of the normalized X-ray distribution coefficient and the normalized detector gain response coefficient.
The bias correction is carried out in two modes, namely, the bias correction is carried out on the average exposure image by using the fitting equation of the bias response parameters, the average dark field image is obtained by continuously taking the dark field images of a plurality of periods, and the bias correction is carried out by subtracting the average dark field image from the average exposure image.
Obtaining the average gray value or the median gray value of each pixel of the image after bias correction;
and dividing the image subjected to the offset correction by the average gray value or the gray median value to obtain the gain map.
Assume that the average exposure image is IexpAverage dark field image is IdarkNormalized distribution coefficient of X-ray is GxThe detector gain response under the current exposure parameters is Gdet,GdetIs the gain G of each devicedevThe gain map G, which consists of the detector's own gain response and the X-ray distribution, is represented as follows:
and S22, extracting the gain coefficient of a single device or the combined gain coefficient of a plurality of devices from the gain map according to the gain response characteristics of each device of the detector to obtain a residual gain map.
The gain response parameter of the detector itself is the product of the response parameters of the constituent devices that cause the response non-uniformity of the detector pixels. Specifically, the detector devices include a scintillator, a thin film transistor array, and an electronic system of the detector, such as an electronic system of a scanning circuit and a readout circuit, such as an amplification circuit and an analog-to-digital conversion circuit in the readout circuit.
Specifically, the method for extracting the gain of a single device or the combined gain of multiple devices from the gain map is shown in fig. 6, and includes the following steps:
s221, listing gain response data of each device of the detector, and comparing the extracted feature strength of each device and a ray distribution coefficient;
s222, extracting the gain coefficients of one or more devices with the extracted features stronger than the ray distribution coefficients from the gain map.
Response parameters of devices with obvious characteristics can be separated from the average exposure image, and then the distribution of X rays is fitted through a curve fitting method, so that the separation of the distribution of the X rays and the self gain response parameters of the detector is realized.
According to the response characteristic of the detector, the gain graph G is extracted and divided by the gain of a single device or the combined gain of a plurality of devices in the detector as much as possible to obtain a residual gain graph. As shown in fig. 7, a schematic diagram of the distribution of the gains of the X-ray and the detector device along a certain cross-sectional direction is shown, and it can be seen from the diagram that the gain distribution characteristic of the detector device a is strongest, the distribution characteristic of the X-ray is second strongest, and the gain distribution characteristic of the detector device B is weaker than that of the X-ray, respectively.
And S23, fitting according to the residual gain map and the ray distribution model to obtain the ray distribution coefficient of the ray on the surface of the detector.
And extracting the gain coefficient of the detector device A from the gain map based on the S222 to obtain a residual gain map, and preferentially performing quadratic polynomial fitting on the residual gain map by using the abscissa and the ordinate of the image as variables in combination with the ray distribution model to obtain the X-ray distribution coefficient. For example, the X-ray distribution fitting equation is as follows:
z=ax2+by2and the + cxy + dx + ey + f, wherein x and y are respectively the abscissa and the ordinate of each pixel, z is the gray value of the pixel, and the coefficients a, b, c, d, e and f are obtained by fitting and serve as the ray distribution coefficients of rays on the surface of the detector.
And S24, acquiring self gain response of the detector from the gain map according to the ray distribution coefficient.
Fitting the distribution coefficient G of the X-rays on the surface of the detector from the residual gain map according to the X-ray distribution modelxDividing the gain map G by the X-ray distribution coefficient GxNamely, the more accurate gain response coefficient G of each pixel of the detector under the current ray quality can be obtaineddet。
The device gain coefficient with stronger characteristics extracted in the step S22 is to better fit a ray distribution coefficient of rays on the surface of the detector, and the ray distribution coefficient is to finally obtain a self gain response parameter of the detector, which is specifically as follows: and extracting X-ray distribution from the gain map to obtain the self gain response characteristic parameters of the detector.
Traversing the ray quality list, and repeatedly executing S21-S24 to obtain the self gain response parameters of the detector of each pixel of the image under each ray quality. And after the gain response coefficient of the detector is extracted, storing the gain response coefficient into the detector.
And S3, extracting a bad pixel set of the detector.
In addition to extracting the characteristic parameters of the self bias response and the gain response of the detector, in a preferred embodiment, the method further comprises extracting a bad pixel set of the detector, wherein the extraction process of the bad pixel set is as follows: detection S1 extracts the average dark field image generated by the bias response process and S2 extracts the points in the average exposure image of the gain response process that are significantly different in response from the surrounding pixels as a bad pixel set.
And finishing the extraction process of the self response characteristics of the detector.
In one embodiment of the present invention, a method for calibrating an imaging system based on the response characteristic of a detector is provided, and fig. 1 is a schematic diagram of an imaging system composed of a flat panel detector 14 and an X-ray source, wherein the X-ray source is composed of a high voltage generator 12 and a bulb 13. The high voltage generator 12 supplies a bias high voltage and a filament current to the bulb 13, thereby generating X-rays. When the detector 14 receives the X-rays, converts them into electrical signals and forms a two-dimensional gray scale image, the detector 14 is in two-way communication with the workstation 11. The calibration method is applied to fast calibration of an imaging system when the detector and a new X-ray source form the imaging system or when the geometric layout of the detector and the X-ray source is changed greatly, firstly, the detector is in a stable working state, and the detector is set to enter a fast calibration mode, and the system calibration method is shown in FIG. 8 and comprises the following processes:
m1, loading detector response parameters according to the pre-acquired self-response characteristics of the detector, wherein the detector response parameters comprise a bias response parameter and a gain response parameter.
The method for obtaining the self-bias response parameters of the detector is referred to as S1, and the method for obtaining the self-gain response parameters of the detector is referred to as S2.
M2, setting ray quality for the current system, selecting exposure parameters, setting the exposure parameters for a set X-ray source, exposing the detector, and collecting one or more exposure images to obtain an average exposure image.
The method for selecting the exposure parameters is as follows: under the condition of determining the radiation quality, selecting exposure parameters so that the gray level mean value of a plurality of exposure images acquired under the exposure parameters is 1/4-3/4 of the maximum linear gray level value of the detector.
M3, according to the bias response parameter, carrying out bias correction on the average exposure image according to the working temperature and the integration time of the detector.
The offset correction method is to use the equation obtained by fitting in the process of extracting the offset response parameters of the detector and combine the current working temperature and the integration time condition of the detector to calculate the gray value of each pixel of the average exposure image.
Assuming that Iavg (x, y) is an average exposure image after offset correction, the average gray scale value is:
sum(I(x,y))/(width*height);
that is, the gray values of all pixels of the image are summed and divided by the length and the width to obtain the average value of the whole image.
And M4, performing gray value normalization operation on the image after the offset correction.
The grey value normalization operation comprises the following steps:
obtaining the average gray value or the median gray value of each pixel of the image after bias correction;
and dividing the image subjected to the offset correction by the average gray value or the gray median value to obtain the gain map G.
M5, according to the gain response parameter, the gain response of the detector is corrected for the image.
That is, previously executing S2, the obtained detector gain response parameterNumber GdetThe product of the gain parameters of the detector components is related to the performance of the detector, so that the gain response parameters of the detector are not changed even if a new corresponding ray source is replaced or the geometric layout of the imaging system is changed greatly.
And M6, performing surface fitting on the corrected image to obtain a normalized ray distribution coefficient of the current system, and completing the calibration of the actual imaging system.
According to G and GdetIn combination with formula G ═ Gdet*GxTo obtain GxThat is, the X-ray distribution coefficient, the normalized X-ray distribution coefficient of the current system is further obtained according to the X-ray distribution model (as above, it is not described again), and the calibration of the actual imaging system is completed at this time.
The geometric layout of the detector and the X-ray source refers to the relative distance between the position of the X-ray center projected on the surface of the detector and the center of the detector and the distance between the bulb and the surface of the detector.
In an embodiment of the present invention, there is provided a method for imaging calibration and correction of an imaging system using the system calibration completed in the above embodiment, as shown in fig. 9, including the following steps:
j1, acquiring a normal exposure image of an imaging system to an imaging object, wherein the imaging system completes system calibration by using the calibration method;
j2, loading a detector bias response parameter, and carrying out bias correction on the exposure image according to the working temperature and the integration time of the detector;
j3, loading detector gain response parameters, combining the current radiation quality, and carrying out gain correction on the image after bias correction together with the normalized ray coefficient of the imaging system.
Preferably, the X-ray distribution coefficients closest to the geometrical layout of the detector and the X-ray source are employed in J3 for gain correction in J3.
In a preferred embodiment of the present invention, the image correction method preferably further includes:
j4, performing bad pixel correction on the image with the gain correction completed.
The detector response parameters extracted in advance also comprise a bad pixel set, and the acquisition method comprises the following steps: and extracting points different from surrounding pixels from the dark field image generated in the bias response process and/or the exposure image generated in the gain response process to serve as bad pixel points and form a bad pixel set.
When bad pixel correction is carried out, a detector bad pixel set is loaded, the position of a bad pixel point in the bad pixel set is obtained, the pixel of the corresponding position on the image to be corrected is corrected, and the purpose of bad pixel correction is to reduce the obvious difference between the bad pixel point and the surrounding pixels.
According to the invention, by extracting the self response parameters of the detector in advance, a flat panel user does not need to carry out comprehensive calibration before use, only one or more exposure images are shot, and the distribution coefficient of the X-ray of the current imaging system is extracted, so that the correction of the normal exposure image can be completed by combining the self response coefficients of the detector.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.