A method for automatically calculating line contrast of imaging flat panel detector using line pair card
The linear contrast of the flat panel detector is automatically calculated through image processing technology, which solves the problem of long manual judgment time and large error in the prior art, and realizes accurate measurement and efficient inspection of the linear contrast of the imaging flat panel detector.
Patent Information
- Application Number
- CN202110332233.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-29
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2041-03-29
AI Technical Summary
The method of testing the linear contrast of flat panel detectors in the prior art relies on manual judgment, which is long and is easily affected by personal subjective assumptions, and cannot accurately obtain the linear contrast of the imaging flat panel detector.
The image of the card is collected by collecting the line, and image processing is performed to obtain the modulation transfer function curve, calculate the line contrast value, and use the difference between the rotation angle and the grayscale value in the rectangular area of interest to automatically calculate the line contrast of the imaging panel detector, and set the Modify the threshold to determine the final line contrast value.
Accurate calculation of line contrast of flat panel detectors is achieved, inspection efficiency is improved, errors of manual judgment are reduced, and quantitative QA data is provided.
Smart Images

Figure CN112950663B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more specifically, to a method for automatically calculating line contrast of an imaging flat panel detector by using a line pair card. Background Art
[0002] The usual method for testing the line contrast of a flat-panel detector is to stick a line pair card on the flat-panel detector, then use an X-ray tube to expose it, read the image collected by the flat-panel detector, and then manually check the imaging quality of each line pair. When the three lines cannot be clearly distinguished, take the previous line pair value as the final line contrast value.
[0003] In the above manner, the determination time is relatively long and may be affected by personal subjective assumptions, and the line contrast of the imaging flat panel detector cannot be accurately obtained. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card, which can more accurately calculate the line contrast of the flat panel detector and improve the inspection efficiency of the line contrast of the imaging flat panel detector.
[0005] As a first aspect of the present invention, a method for automatically calculating line contrast of an imaging flat panel detector using a line pair card is provided, comprising:
[0006] The image of the line pair card is acquired by an imaging flat panel detector;
[0007] Processing the image of the line pair card to obtain a modulation transfer function curve of the line pair card;
[0008] According to the modulation transfer function curve of the line pair card, the line contrast value of the imaging flat panel detector is obtained.
[0009] Furthermore, the processing of the image of the line pair card to obtain the modulation transfer function curve of the line pair card further includes:
[0010] Reading the original grayscale image of the line pair card;
[0011] Performing image binarization processing on the original grayscale image of the line pair card, and removing the black border with a grayscale value of 0 at the edge of the original grayscale image, to obtain a binary image of the line pair card;
[0012] Performing edge detection on the binary image of the line pair card to obtain an edge image of the line pair card, wherein the grayscale value of black pixels in the edge image is 0, and the grayscale value of white pixels is 255;
[0013] Filling holes in the edge image of the line pair card to obtain a hole image of the line pair card;
[0014] Performing edge detection on the hole image of the line pair card to obtain a contour image of the line pair card;
[0015] Performing straight line detection on the contour image of the line pair card to obtain a set of straight lines where four sides of the line pair card are located;
[0016] Calculating the intersection points of the straight lines in the straight line set to obtain a set of intersection points of four straight lines;
[0017] In the set of intersection points of the four straight lines, the leftmost intersection point and the bottommost intersection point on the contour image of the line pair card are selected, and the rotation angle of the line pair card is obtained by calculating the vector directions of the two intersection points;
[0018] On the edge image of the line pair card, a modulation transfer function curve of the line pair card is obtained by utilizing the obtained rotation angle.
[0019] Furthermore, the obtaining of the modulation transfer function curve of the line pair card by using the obtained rotation angle on the edge image of the line pair card further includes:
[0020] On the edge image of the line pair card, using the obtained rotation angle, calculate the position of the rectangular region of interest of each line pair area on the line pair card, wherein there are 20 line pair areas on the line pair card, and the position of each line pair area relative to the line pair card is unchanged;
[0021] In the rectangular region of interest of each line pair area, scan by columns in turn, and calculate the minimum row value point and the maximum row value point with a gray value of 255 in the corresponding column of the edge image of the line pair card;
[0022] According to the calculated minimum row value point and maximum row value point of each column, in the original grayscale image of the line pair card, all pixel grayscale values between the minimum row value point and the maximum row value point of each column in the rectangular region of interest of each line pair area are counted;
[0023] Calculate the maximum and minimum grayscale values of all pixels in the rectangular region of interest of the 20 line pair areas respectively;
[0024] Select the maximum pixel grayscale value MaxValue and the minimum pixel grayscale value MinValue within the rectangular region of interest of the line pair area with a line pair value of 0.6LP / mm, and set the difference between the maximum pixel grayscale value MaxValue and the minimum pixel grayscale value MinValue as the actual contrast Δμ;
[0025] According to the actual contrast, calculate the modulation transfer function MTF value of each other line pair area relative to the 0.6LP / mm line pair area;
[0026] The modulation transfer function curve of the line pair card is obtained according to the calculated modulation transfer function MTF value of each other line pair area and the corresponding line pair value.
[0027] Furthermore, the calculation formula of the actual contrast Δμ is as follows:
[0028] Δμ=MaxValue–MinValue
[0029] Among them, MaxValue represents the maximum pixel grayscale value, and MinValue represents the minimum pixel grayscale value.
[0030] Furthermore, the calculation formula of the modulation transfer function MTF value is as follows:
[0031] MTF=(MaxValue(n)–MinValue(n)) / Δμ=Δμ n / Δμ
[0032] Wherein, n is 2, 3, ... 20, and the 0.6LP / mm line pair area is set as the first line pair area;
[0033] When n is 2, the modulation transfer function MTF value of the second line pair area relative to the 0.6LP / mm line pair area is calculated, that is, the difference between the maximum pixel grayscale value MaxValue(2) and the minimum pixel grayscale value MinValue(2) in the rectangular area of interest of the second line pair area is divided by the actual contrast Δμ to obtain the MTF value of the second line pair area; and so on, until the modulation transfer function MTF value of the 20th line pair area relative to the 0.6LP / mm line pair area is calculated.
[0034] Furthermore, the obtaining of the line contrast value of the imaging flat panel detector according to the modulation transfer function curve of the line pair card further includes:
[0035] A modulation threshold is set, and a line contrast value of the imaging flat panel detector that meets the modulation threshold is obtained according to the modulation transfer function curve of the line pair card.
[0036] Furthermore, the modulation degree threshold is 0.4.
[0037] Furthermore, the image collected on the line pair card by the imaging flat panel detector also includes:
[0038] placing and fixing the line pair card on the imaging flat panel detector;
[0039] The imaging flat panel detector is exposed by an X-ray tube, and the imaging flat panel detector collects the original grayscale image of the line pair card.
[0040] The method for automatically calculating the line contrast of an imaging flat panel detector by using a line pair card provided by the present invention has the following advantages: an image processing technology is used to calculate a modulation transfer function (MTF) value to obtain an MTF curve, and a threshold value of the MTF is set to 0.4, and a maximum line contrast value not less than the MTF threshold is taken as the final line contrast value of the imaging flat panel detector; the present invention can more accurately calculate the line contrast of the flat panel detector, and improve the inspection efficiency of the line contrast of the imaging flat panel detector. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present invention, but do not constitute a limitation of the present invention.
[0042] Figure 1 The present invention provides a flow chart of a method for automatically calculating line contrast of an imaging flat panel detector using a line pair card.
[0043] Figure 2 A flowchart of a specific implementation of the method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card provided by the present invention.
[0044] Figure 3 This is a structural schematic diagram of the line pair card provided by the present invention.
[0045] Figure 4 This is a schematic diagram of an original grayscale image of the line pair card provided by the present invention.
[0046] Figure 5 This is a schematic diagram of a binary image of the line pair card provided by the present invention.
[0047] Figure 6 This is a schematic diagram of the original edge image of the line pair card provided by the present invention.
[0048] Figure 7 This is a schematic diagram of a partial enlargement of the edge image of the line pair card provided by the present invention.
[0049] Figure 8 A schematic diagram of a hole image of a line pair card provided by the present invention.
[0050] Fig. 9 This is a straight line detection diagram of the contour image of the line pair card provided by the present invention.
[0051] Fig.10 This is a partial enlarged view of the straight line detection of the contour image of the line pair card provided by the present invention.
[0052] Fig.11 A schematic diagram of a set of intersection points of four straight lines of a line pair card provided by the present invention.
[0053] Fig.12 A schematic diagram of the location of an area of interest for each line pair area on the line pair card provided by the present invention.
[0054] Fig.13 This is a schematic diagram of the minimum row value point and the maximum row value point with a grayscale value of 255 in the corresponding column of the edge image of the line pair card provided by the present invention.
[0055] Fig.14 This is a schematic diagram of the MTF curve of the line pair card provided by the present invention.
[0056] Fig.15 This is a structural diagram of the device for collecting line pair card images provided by the present invention. DETAILED DESCRIPTION
[0057] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation method, structure, characteristics and effects of the method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0058] In this embodiment, a method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card is provided. Figure 1 As shown, the method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card includes:
[0059] The image of the line pair card is acquired by an imaging flat panel detector;
[0060] Processing the image of the line pair card to obtain a modulation transfer function curve of the line pair card;
[0061] According to the modulation transfer function curve of the line pair card, the line contrast value of the imaging flat panel detector is obtained.
[0062] It should be noted that if Figure 3As shown, three line grooves are evenly spaced in each line pair area, and the width of each line groove can be calculated from the numbers marked on the side. For example, 1 millimeter represented by 0.6LP / mm is equivalent to 0.6 times the width of the line groove. In addition, the line pair card includes 20 line contrast test areas, ranging from 0.6LP / mm to 5.0LP / mm. The line pair card needs to be rotated at a certain angle during the test, and can be placed 45 degrees counterclockwise.
[0063] Preferably, if Figure 2 As shown, the processing of the image of the line pair card to obtain the modulation transfer function curve of the line pair card also includes:
[0064] like Figure 4 As shown, the original grayscale image of the line pair card is read;
[0065] like Figure 5 As shown, the original grayscale image of the line pair card is subjected to image binarization processing, and the black border with a grayscale value of 0 at the edge of the original grayscale image is removed to obtain a binary image of the line pair card;
[0066] like Figure 6-7 As shown, edge detection is performed on the binary image of the line pair card to obtain an edge image of the line pair card, wherein the grayscale value of black pixels in the edge image is 0, and the grayscale value of white pixels is 255;
[0067] like Figure 8 As shown, the edge image of the line pair card is hole filled to obtain the hole image of the line pair card;
[0068] like Figure 9-10 As shown, edge detection is performed on the hole image of the line pair card to obtain a contour image of the line pair card;
[0069] like Figure 9-10 As shown, straight line detection is performed on the contour image of the line pair card to obtain a set of straight lines where the four sides of the line pair card are located;
[0070] like Fig.11 As shown, the intersection points of the straight lines in the straight line set are calculated to obtain a set of intersection points of four straight lines;
[0071] like Fig.11 As shown, in the intersection point set of the four straight lines, the leftmost intersection point Point1 and the bottommost intersection point Point4 on the contour image of the line pair card are selected, and the rotation angle of the line pair card is obtained by calculating the vector direction of the two intersection points;
[0072] On the edge image of the line pair card, a modulation transfer function curve of the line pair card is obtained by utilizing the obtained rotation angle.
[0073] Preferably, if Figure 2 As shown, the modulation transfer function curve of the line pair card is obtained by using the obtained rotation angle on the edge image of the line pair card, and further includes:
[0074] like Fig.12 As shown, on the edge image of the line pair card, the obtained rotation angle is used to calculate the rectangular region of interest ROI position of each line pair area on the line pair card, wherein there are 20 line pair areas on the line pair card, and the position of each line pair area relative to the line pair card is unchanged;
[0075] like Fig.13 As shown, in the rectangular region of interest of each line pair area, scanning is performed column by column in sequence, and the minimum row value point and the maximum row value point with a gray value of 255 in the corresponding column of the edge image of the line pair card are calculated;
[0076] According to the calculated minimum row value point and maximum row value point of each column, in the original grayscale image of the line pair card, all pixel grayscale values between the minimum row value point and the maximum row value point of each column in the rectangular region of interest of each line pair area are counted;
[0077] Calculate the maximum and minimum grayscale values of all pixels in the rectangular region of interest of the 20 line pair areas respectively;
[0078] Select the maximum pixel grayscale value MaxValue and the minimum pixel grayscale value MinValue in the rectangular region of interest of the line pair area with a line pair value of 0.6LP / mm, and set the difference between the maximum pixel grayscale value MaxValue and the minimum pixel grayscale value MinValue as the actual contrast Δμ;
[0079] According to the actual contrast, calculate the modulation transfer function MTF value of each other line pair area relative to the 0.6LP / mm line pair area;
[0080] like Fig.14 As shown, according to the calculated modulation transfer function MTF value of each other line pair area and the corresponding line pair value, the modulation transfer function curve of the line pair card is obtained, wherein in the MTF curve, the horizontal axis represents the line pair value of the spatial resolution of each line pair area (in lp / mm), and the vertical axis represents the modulation degree (modulation transfer function MTF value) Δμ n / Δμ.
[0081] Preferably, the calculation formula of the actual contrast Δμ is as follows:
[0082] Δμ=MaxValue–MinValue
[0083] Among them, MaxValue represents the maximum pixel grayscale value, and MinValue represents the minimum pixel grayscale value.
[0084] Preferably, the calculation formula of the modulation transfer function MTF value is as follows:
[0085] MTF=(MaxValue(n)–MinValue(n)) / Δμ=Δμ n / Δμ
[0086] Wherein, n is 2, 3, ... 20, and the 0.6LP / mm line pair area is set as the first line pair area;
[0087] When n is 2, the modulation transfer function MTF value of the second line pair area relative to the 0.6LP / mm line pair area is calculated, that is, the difference between the maximum pixel grayscale value MaxValue(2) and the minimum pixel grayscale value MinValue(2) in the rectangular area of interest of the second line pair area is divided by the actual contrast Δμ to obtain the MTF value of the second line pair area; and so on, until the modulation transfer function MTF value of the 20th line pair area relative to the 0.6LP / mm line pair area is calculated.
[0088] It should be noted that the calculation method of the modulation transfer function MTF value refers to the standard of GJB 5312-2004, and the MTF is calculated by calculating the maximum and minimum values.
[0089] Preferably, the step of obtaining the line contrast value of the imaging flat panel detector according to the modulation transfer function curve of the line pair card further comprises:
[0090] A modulation threshold is set, and a line contrast value of the imaging flat panel detector that meets the modulation threshold is obtained according to the modulation transfer function curve of the line pair card.
[0091] Preferably, the modulation degree threshold is 0.4.
[0092] Specifically, Fig.14 As shown, the modulation threshold (minimum value) is artificially set to 0.4, and the maximum line contrast value is 3.2, indicating that the line contrast value of the flat panel detector is 3.2.
[0093] Preferably, if Fig.15 As shown, the image collected on the line pair card by the imaging flat panel detector also includes:
[0094] placing and fixing the line pair card on the imaging flat panel detector;
[0095] The imaging flat panel detector is exposed by an X-ray tube, and the imaging flat panel detector collects the original grayscale image of the line pair card.
[0096] Specifically, Fig.15 As shown, the device for collecting line pair card images includes an X-ray tube, a flat panel detector and a standard line pair card. The line pair card is attached to the surface of the flat panel detector, and the X-ray tube is used to expose it to collect a grayscale image containing the line pair card.
[0097] The method for automatically calculating the line contrast of an imaging flat panel detector by using a line pair card provided by the present invention can accurately calculate the line contrast of the imaging flat panel detector and provide quantitative data for daily QA.
[0098] The method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card provided by the present invention adopts image processing technology to automatically calculate the MTF value of the line pair card to obtain a line contrast value that meets the MTF threshold; it replaces the original manual judgment method and greatly reduces the impact of human errors.
[0099] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card, characterized in that: include: The image of the line pair card is acquired by an imaging flat panel detector; Processing the image of the line pair card to obtain a modulation transfer function curve of the line pair card; Obtaining a line contrast value of the imaging flat panel detector according to a modulation transfer function curve of the line pair card; Wherein, the step of processing the image of the line pair card to obtain a modulation transfer function curve of the line pair card further includes: Reading the original grayscale image of the line pair card; Performing image binarization processing on the original grayscale image of the line pair card, and removing the black border with a grayscale value of 0 at the edge of the original grayscale image, to obtain a binary image of the line pair card; Performing edge detection on the binary image of the line pair card to obtain an edge image of the line pair card, wherein the grayscale value of black pixels in the edge image is 0, and the grayscale value of white pixels is 255; Filling holes in the edge image of the line pair card to obtain a hole image of the line pair card; Performing edge detection on the hole image of the line pair card to obtain a contour image of the line pair card; Performing straight line detection on the contour image of the line pair card to obtain a set of straight lines where four sides of the line pair card are located; Calculating the intersection points of the straight lines in the straight line set to obtain a set of intersection points of four straight lines; In the set of intersection points of the four straight lines, the leftmost intersection point and the bottommost intersection point on the contour image of the line pair card are selected, and the rotation angle of the line pair card is obtained by calculating the vector directions of the two intersection points; On the edge image of the line pair card, a modulation transfer function curve of the line pair card is obtained by utilizing the obtained rotation angle.
2. The method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card according to claim 1, characterized in that: The step of obtaining a modulation transfer function curve of the line pair card by using the obtained rotation angle on the edge image of the line pair card further includes: On the edge image of the line pair card, using the obtained rotation angle, calculate the position of the rectangular region of interest of each line pair area on the line pair card, wherein there are 20 line pair areas on the line pair card, and the position of each line pair area relative to the line pair card is unchanged; In the rectangular region of interest of each line pair area, scan by columns in turn, and calculate the minimum row value point and the maximum row value point with a gray value of 255 in the corresponding column of the edge image of the line pair card; According to the calculated minimum row value point and maximum row value point of each column, in the original grayscale image of the line pair card, all pixel grayscale values between the minimum row value point and the maximum row value point of each column in the rectangular region of interest of each line pair area are counted; Calculate the maximum and minimum grayscale values of all pixels in the rectangular region of interest of the 20 line pair areas respectively; Select the maximum pixel grayscale value MaxValue and the minimum pixel grayscale value MinValue within the rectangular region of interest of the line pair area with a line pair value of 0.6LP / mm, and set the difference between the maximum pixel grayscale value MaxValue and the minimum pixel grayscale value MinValue as the actual contrast Δµ; According to the actual contrast, calculate the modulation transfer function MTF value of each other line pair area relative to the 0.6LP / mm line pair area; The modulation transfer function curve of the line pair card is obtained according to the calculated modulation transfer function MTF value of each other line pair area and the corresponding line pair value.
3. The method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card according to claim 2, characterized in that: The calculation formula of the actual contrast Δµ is as follows: Δµ = MaxValue – MinValue Among them, MaxValue represents the maximum pixel grayscale value, and MinValue represents the minimum pixel grayscale value.
4. The method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card according to claim 3, characterized in that: The calculation formula of the modulation transfer function MTF value is as follows: MTF =(MaxValue(n) – MinValue(n)) / Δµ=Δµ n / Dm Wherein, n is 2, 3, ... 20, and the 0.6LP / mm line pair area is set as the first line pair area; When n is 2, the modulation transfer function MTF value of the second line pair area relative to the 0.6LP / mm line pair area is calculated, that is, the difference between the maximum pixel gray value MaxValue(2) and the minimum pixel gray value MinValue(2) in the rectangular area of interest of the second line pair area is divided by the actual contrast ∆µ to obtain the MTF value of the second line pair area; and so on, until the modulation transfer function MTF value of the 20th line pair area relative to the 0.6LP / mm line pair area is calculated.
5. The method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card according to claim 1, characterized in that: The step of obtaining the line contrast value of the imaging flat panel detector according to the modulation transfer function curve of the line pair card further includes: A modulation threshold is set, and a line contrast value of the imaging flat panel detector that meets the modulation threshold is obtained according to the modulation transfer function curve of the line pair card.
6. The method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card according to claim 5, characterized in that: The modulation degree threshold is 0.
4.
7. The method for automatically calculating the line contrast of an imaging flat panel detector using a line pair card according to claim 1, characterized in that: The image collected on the line pair card by the imaging flat panel detector also includes: placing and fixing the line pair card on the imaging flat panel detector; The imaging flat panel detector is exposed by an X-ray tube, and the imaging flat panel detector collects the original grayscale image of the line pair card.
