CN114419017B - A method and terminal for identifying a beam limiter region in an X-ray image - Google Patents
A method and terminal for identifying a beam limiter region in an X-ray image Download PDFInfo
- Publication number
- CN114419017B CN114419017B CN202210087375.0A CN202210087375A CN114419017B CN 114419017 B CN114419017 B CN 114419017B CN 202210087375 A CN202210087375 A CN 202210087375A CN 114419017 B CN114419017 B CN 114419017B
- Authority
- CN
- China
- Prior art keywords
- edge
- image
- curve
- beam limiter
- region
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10116—X-ray image
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
- Apparatus For Radiation Diagnosis (AREA)
Abstract
The invention discloses a method and a terminal for identifying a beam limiter region in an X-ray image, wherein after preprocessing the X-ray image, the preprocessed image is processed based on a second derivative, so that the edge region in the preprocessed image can be effectively extracted, a corresponding edge region image is obtained, further, the morphological analysis is carried out on the edge region image, the complicated image processing can be converted into the processing of a curve, the edge region is divided into a plurality of groups of different edge curves, and finally, the curve characteristics of the plurality of groups of different edge curves are analyzed, so that the curve conforming to the characteristics of the beam limiter in the edge curve can be extracted and output as the beam limiter region, and the positioning precision of the system on the beam limiter region in the X-ray image is improved.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a method for identifying a beam limiter area in an X-ray image.
Background
In an X-ray photography system, a beam limiter is often used to limit the projection range of X-rays, and an operating physician can adjust the window size of the beam limiter, so that the X-rays only irradiate a region of interest considered by the physician, thereby effectively reducing the dose absorbed by the patient body. In the X-ray photographing system, after the image photographing is completed, an algorithm is required to perform post-processing such as enhancement on an original image so as to meet the diagnosis requirement of a doctor. However, in an X-ray image containing a beam limiter imaging region, the presence of a beam limiter shadow may have an influence on the enhancement effect of the region of interest, etc. In addition, the operator needs to cut the shadow area of the beam limiter and then provide the cut shadow area to other doctors for diagnosis. Therefore, the beam limiter area is accurately identified from the X-ray image, the image post-processing quality can be improved by providing the post-processing algorithm, the effective area cutting boundary can be automatically provided for an operating doctor, the workload of the operating doctor is reduced, and the X-ray photographing efficiency is improved.
Although in some radiography systems the beam limiter may feed back the window size in real time, and the host computer may locate the beam limiter area in the X-ray image by combining other system parameters such as the X-ray Source-to-detector distance (Source-IMAGE DISTANCE, SID). However, in other systems, particularly in mobile radiography systems, the beam limiter does not have a feedback function, nor can the system accurately provide parameters such as SID, resulting in that the beam limiter area in the image cannot be simply located.
At present, most of the existing schemes adopt a method for directly extracting edges of an original image. And if the extracted edge is the boundary of the beam limiter, carrying out Radon transformation (or Hough transformation) on the edge image, and taking the peak point in the generated sinogram as the transformation coordinate corresponding to the edge of the beam limiter. However, because the gray scale characteristics of the boundary of the beam limiter are complex, the straight line of the original image is directly extracted, and the probability of false detection and omission is high. In addition, because some anatomical structures of a human body form very complex and numerous textures in the X-ray image, false peaks can be generated in a Radon transformation sinogram of the edge image, and false detection such as lung textures in chest righting can be easily caused.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method for identifying a beam limiter region in an X-ray image, and improving the positioning accuracy of a system on the beam limiter region in the X-ray image.
In order to solve the technical problems, the invention adopts the following technical scheme:
A method for identifying a beam limiter area in an X-ray image comprises the following steps:
acquiring an X-ray image and preprocessing to obtain a preprocessed image;
extracting an edge region of the second derivative of the preprocessed image to obtain an edge region image;
Carrying out morphological analysis on the edge area image to obtain a plurality of groups of edge curves;
Extracting the characteristics of the edge curves, and screening a plurality of groups of the edge curves according to the characteristics to obtain characteristic curves;
and outputting the image area determined by the characteristic curve as a beam limiter area.
In order to solve the technical problems, the invention adopts another technical scheme that:
The identification terminal of the beam limiter area in the X-ray image comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes the steps in the identification method of the beam limiter area in the X-ray image when executing the computer program, namely, the X-ray image is acquired and preprocessed to obtain a preprocessed image; extracting edge areas of second derivatives of the preprocessed images to obtain edge area images, carrying out morphological analysis on the edge area images to obtain multiple groups of edge curves, extracting characteristics of the edge curves, screening the multiple groups of edge curves according to the characteristics to obtain characteristic curves, and outputting image areas determined by the characteristic curves as beam limiter areas.
The method has the advantages that after the X-ray image is preprocessed, the preprocessed image is processed based on the second derivative, the edge area in the preprocessed image can be effectively extracted, the corresponding edge area image is obtained, the complicated image processing can be converted into curve processing through morphological analysis on the edge area image, meanwhile, the edge area is divided into a plurality of groups of different edge curves, finally, the curve characteristics of the plurality of groups of different edge curves are analyzed, so that the curve conforming to the characteristics of the beam limiter in the edge curve can be extracted, the area formed by the curve is output as the beam limiter area, and the positioning precision of the system on the beam limiter area in the X-ray image is improved.
Drawings
FIG. 1 is a flow chart of steps of a method for identifying a beam limiter region in an X-ray image according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an identification terminal of a beam limiter region in an X-ray image according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an exemplary preprocessed X-ray image according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of comparing a Laplace image with a peak image of an enhanced image according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating an example of an edge region in an extracted X-ray image in accordance with an embodiment of the present invention;
FIG. 6 is a schematic view of three corrosion templates for a method of identifying a beam limiter region in an X-ray image in accordance with an embodiment of the present invention;
FIG. 7 is a schematic illustration of an edge image without erosion in an embodiment of the invention;
FIG. 8 is a schematic view of an edge image of a completed etch in an embodiment of the invention;
FIG. 9 is a schematic diagram of a linear-fit positional relationship in an embodiment of the present invention;
FIG. 10 is a flowchart illustrating another step of a method for identifying a beam limiter area in an X-ray image according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of candidate curves according to an embodiment of the present invention;
FIG. 12 is a schematic view of a first target curve in an embodiment of the invention;
FIG. 13 is a schematic view of a peak transition band image in an embodiment of the invention;
FIG. 14 is a second objective graph of an embodiment of the present invention;
Fig. 15 is a flowchart illustrating another step of a method for identifying a beam limiter area in an X-ray image according to an embodiment of the present invention.
Detailed Description
In order to describe the technical contents, the achieved objects and effects of the present invention in detail, the following description will be made with reference to the embodiments in conjunction with the accompanying drawings.
Referring to fig. 1, a method for identifying a beam limiter region in an X-ray image includes the steps of:
acquiring an X-ray image and preprocessing to obtain a preprocessed image;
extracting an edge region of the second derivative of the preprocessed image to obtain an edge region image;
Carrying out morphological analysis on the edge area image to obtain a plurality of groups of edge curves;
Extracting the characteristics of the edge curves, and screening a plurality of groups of the edge curves according to the characteristics to obtain characteristic curves;
And outputting the image area defined by the characteristic curve as a beam limiter area.
The method has the advantages that after the X-ray image is preprocessed, the preprocessed image is processed based on the second derivative, the edge area in the preprocessed image can be effectively extracted, the corresponding edge area image is obtained, the edge area image is further subjected to morphological analysis, complex image processing can be converted into curve processing, the edge area is divided into a plurality of groups of different edge curves, and finally the curve characteristics of the plurality of groups of different edge curves are analyzed, so that the curve conforming to the characteristics of the beam limiter in the edge curve can be extracted, and the image area limited by the curve is output as the beam limiter area, so that the positioning precision of the system on the beam limiter area in the X-ray image is improved.
Further, the extracting the edge area of the second derivative of the preprocessed image to obtain an edge area image includes:
filtering the preprocessed image through a Laplace operator to obtain a Laplace image, wherein the Laplace image comprises a trough section, a flat section and a crest section;
enhancing the Laplace image to obtain an enhanced image;
and counting the histogram of the enhanced image to divide the peak interval so as to obtain the edge region image.
As is apparent from the above description, in the X-ray image, the gray level change between the beam limiter and the air region, between the beam limiter and the human anatomy is not a strong step, but a relatively slow gray level transition region due to the interference of scattered rays, etc., so that compared with the conventional first-order differential operator, the edge region image of the preprocessed image is extracted by the second-order differential laplace operator, different gray level transition regions such as peaks and valleys and gray level flat regions can be extracted from the preprocessed image, so as to obtain the valley regions, flat regions and peak regions, and further enhance the laplace image, so that the peak regions are enhanced, the valley regions are weakened, and most of the anatomical texture tissues and flat regions are weakened, so that the peak regions can be conveniently separated in the subsequent segmentation process, and the acquisition accuracy of the edge region image is improved.
Further, the performing morphological analysis on the edge region image to obtain a plurality of groups of edge curves includes:
acquiring all connected domains in the edge area image;
Deleting the connected domain which does not meet the preset condition to obtain an effective edge region image;
performing morphological refinement on the effective edge area image to obtain an edge image;
And carrying out morphological corrosion on the edge image to obtain a plurality of groups of edge curves.
According to the description, all connected domains in the edge area image are obtained, the connected domains are screened according to preset conditions, invalid areas in the edge area image are reduced, the effective edge area image is further refined and extracted to obtain an edge image, and then morphological corrosion is carried out on the edge image, so that the edges of the texture detail area, the edges of the beam limiter, the edges of the skin line and other interconnecting curves in the image can be separated, a plurality of edge curves without interconnection are obtained, and the extraction precision of the edge curves is improved.
Further, the performing morphological erosion on the edge image to obtain a plurality of sets of edge curves includes:
corroding the edge image through a preset corrosion template;
Performing least square straight line fitting on a preset neighborhood of each edge pixel in the corroded edge image;
and separating different curves according to a preset fitting mean square error to obtain a plurality of groups of edge curves.
From the above description, it can be known that by corroding the edge image and performing least square straight line fitting, different curves can be separated through a preset fitting mean square error, that is, whether the curves can be fitted into straight lines is judged, if not, the curves are separated, for example, the connecting areas of the two vertical beam limiter edges are separated, so that the purpose of separating the edge curves from each other is achieved.
Further, extracting the characteristics of the edge curves and screening a plurality of groups of the edge curves according to the characteristics, and obtaining the characteristic curves includes:
carrying out external ellipse on each edge curve to obtain a major axis value and a minor axis value of the external ellipse;
screening the edge curve according to the ratio of the major axis value to the minor axis value, wherein k=a/b 2;
wherein a represents a long axis value, b represents a short axis value, and k represents a ratio;
and deleting the edge curves with the ratio lower than a preset value.
According to the above description, each edge curve is screened by adopting a mode that the curve is circumscribed with an ellipse, when the ratio of the major axis value to the minor axis value corresponding to the edge curve does not meet the requirement, the edge curve is deleted, so that the length of the edge curve and whether the edge curve is a straight line or not are judged in a quantifiable numerical mode, an effective edge curve set can be determined, and the extraction precision of the edge curve is further improved.
Further, extracting the characteristics of the edge curves and screening a plurality of groups of the edge curves according to the characteristics, and obtaining the characteristic curves includes:
performing accumulated projection on the enhanced image along a first preset direction to obtain a first target curve;
acquiring a peak interval on the first target curve;
obtaining a boundary crest zone according to the crest interval;
Performing accumulated projection on the boundary wave crest bands along a second preset direction to obtain a second target curve;
and judging whether the second target curve meets the boundary condition, and if so, marking the second target curve as the characteristic curve.
From the above description, the enhanced image is sequentially subjected to accumulated projection along the first preset direction and the second preset direction, and the information corresponding to the edge curve is obtained from different directions, so that the accuracy of judging the edge curve is improved.
Further, the determining whether the second target curve meets a boundary condition, if yes, marking as the characteristic curve includes:
Extracting all trough intervals in the second target curve and lengths corresponding to the trough intervals;
counting the lengths of all the trough sections to obtain the total length of the trough sections and the length of the longest trough section;
judging whether the total length of the trough section is larger than a first trough section length threshold or whether the longest trough section length is larger than a second trough section length, and judging that the beam limiter is not at the edge if one of the conditions is met.
According to the description, whether the edge curve is the edge of the beam limiter is judged by acquiring the corresponding trough section in the second target curve, and when the judging condition is met, the curve is judged to be the edge of the beam limiter, and the edge curve is judged by combining the trough section, so that the judging precision of the edge curve is improved.
Further, the determining whether the second target curve meets a boundary condition, if yes, marking as the characteristic curve further includes:
extracting all flat intervals in the second target curve and positions corresponding to the flat intervals;
Judging whether the number of the flat sections is smaller than a preset number or whether the flat sections are positioned at two ends of the second target curve, and judging that the edge of the beam limiter is not the edge if one of the conditions is met.
From the above description, it can be seen that by acquiring the corresponding flat section in the second target curve to determine whether the edge curve is the beam limiter edge, when the determination condition is satisfied, the curve is determined to be the non-beam limiter edge, and the edge curve is determined in combination with the flat section, so that the accuracy of determining the edge curve is improved.
Further, the determining whether the second target curve meets a boundary condition, if yes, marking as the characteristic curve further includes:
Extracting all wave crest intervals in the second target curve and lengths corresponding to the wave crest intervals;
counting the total length of the peak interval, the total length of the flat interval and the average value of the peak interval;
and sequentially judging whether the total length of the crest interval is larger than the shortest boundary distance, judging whether the sum of the total length of the crest interval and the total length of the flat interval is larger than the second target curve and whether the average value of the crest interval is larger than the preset crest interval average value, and judging that the edge of the beam limiter is the edge if the total length of the crest interval and the total length of the flat interval are simultaneously satisfied.
As can be seen from the above description, since there may be a beam limiter direct projection area at both ends of the extension area of the beam limiter boundary transition peak area in the current edge direction in the whole image, and the enhanced image has a small value in this portion of the area, is relatively flat, and has a large median in the transition peak area, by acquiring the corresponding flat section and peak section in the second target curve to determine whether the edge curve is the edge of the beam limiter, the possibility of erroneous determination can be reduced, and the accuracy of determining the edge curve can be improved.
Referring to fig. 2, a terminal for identifying a beam limiter area in an X-ray image includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements each step in the above-mentioned method for identifying a beam limiter area in an X-ray image when executing the computer program.
The identification method and the terminal of the beam limiter area in the X-ray image can be suitable for processing various X-ray images, such as a fixed X-ray photographing system and a movable X-ray photographing system, and are described in the following specific embodiments:
Example 1
Referring to fig. 1, a method for identifying a beam limiter region in an X-ray image includes the steps of:
S1, acquiring an X-ray image and preprocessing to obtain a preprocessed image, wherein the method comprises the following steps of:
s11, cutting the X-ray image, and removing invalid pixel parts to obtain an original X-ray image I original, wherein cutting parameters are determined by an X-ray detector used by the system;
S12, scaling the original X-ray image to obtain a scaled image I scale;Iscale=resize(Ioriginal), wherein the original X-ray image matrix is generally larger, and the acquisition speed of the beam limiter area can be improved after scaling;
s13, normalizing the gray value of the pixel in the scaled image to be within a range of 0-255;
I gray=(Iscale-min(Iscale))/(max(Iscale)-min(Iscale)) 255, wherein min (I scale)、max(Iscale) respectively refers to a minimum gray value and a maximum gray value in I scale;
S14, processing the scaled image through algorithms such as Gamma change or Log change, improving the contrast of the beam limiter area and the non-beam limiter area, and highlighting the boundary characteristics of the target;
s2, extracting an edge area of a second derivative of the preprocessed image to obtain an edge area image, wherein the method comprises the following steps of:
S21, filtering the preprocessed image through a Laplacian to obtain a Laplacian image I L, wherein the Laplacian can be a second-order differential Laplacian or a LoG (Laplacian of Gaussian) operator and a DoG (Difference of Gaussian) operator are adopted to extract a boundary transition region of an X-ray image, the Laplacian image comprises a trough region, a flat region and a crest region, in the Laplacian image, the boundary of an original gray image and a gray transition region of a texture detail region show a crest and a trough, the crest is positioned on a low gray value side of an edge gray transition region, the trough is positioned on a high gray value side, and the wider the transition region is, the width of the crest and the trough is widened;
S22, enhancing the Laplace image to obtain an enhanced image I L_enhance;
Calculating the gray value of the enhanced image, I L_enhance=IL/I;
In X-ray images of certain parts (body positions), the intensity of the edge of the beam limiter is often weakened by thicker anatomical structures, for example, in cervical vertebra side positions, the edge of the upper and lower side beam limiters of the image is weakened by the skull and the shoulder respectively;
referring to FIG. 4, in the peak region of the beam limiter edge, the fundamental gray level is lower, the edge is enhanced, and for the trough region of the beam limiter edge, the fundamental gray level is higher, the edge strength is relatively weakened;
S23, counting a histogram of the enhanced image to divide the peak interval so as to obtain the edge region image;
The histogram hist_i L_enhance of the enhanced image I L_enhance is statistically computed and the segmentation points ThreEdge are calculated for segmenting the peak mask:
Obtaining an edge peak Mask image I_mask peakregion:
Wherein M and N respectively represent the height and width of I L_enhance, edgeRatio is a division ratio, for example, set to 0.15, max (I L_enhance) represents the maximum gray level value in I L_enhance, the edge peak Mask image I_mask peakregion is the edge region image, please refer to FIG. 5 for the processed edge peak Mask image;
s3, carrying out morphological analysis on the edge area image to obtain a plurality of groups of edge curves, wherein the method comprises the following steps:
S31, acquiring all connected domains in the edge area image;
s32, deleting the connected domain which does not meet the preset condition to obtain an effective edge region image;
because of the existence of a plurality of fine texture areas of anatomical structures in the edge area image, before the edge curve is extracted, such boundary areas are eliminated, so that the recognition speed of an algorithm on the edge curve of the effective beam limiter can be improved;
S33, carrying out morphological refinement on the effective edge area image to obtain an edge image I skel, wherein the edges of the image texture detail area, the edges of the beam limiter, the edges of the skin line and the like in the edge image are connected with each other, and the edges of the beam limiter which are mutually perpendicular can be connected together, so that the edges are required to be effectively separated;
s34, corroding the edge image through a preset corrosion template to obtain a plurality of groups of edge curves, wherein the method comprises the following steps:
S341, corroding the edge image through a preset corrosion template;
referring to fig. 6, the edge image Iskel is eroded by a preset template (T-type, Y-type, and Z-type) and a 90 °, 180 °, 270 ° rotation template thereof;
s342, performing least square straight line fitting on a preset neighborhood of each edge pixel in the corroded edge image, and separating different curves according to preset fitting mean square errors to obtain a plurality of groups of edge curves;
specifically, a least square straight line fitting is performed on a 31×31 neighborhood of each edge pixel in the edge image I skel, and pixels with a fitting mean square error greater than a set threshold THREMINERR (with an empirical value of 6) may be connection areas of the vertical beam limiter edges;
let the fitting mean square error be denoted E I skel = 0, E (x, y) > THREMINERR;
In an optional embodiment, before executing step S342, the size of the edge image I skel may be reduced to a preset ratio, then step S342 is performed, and after obtaining the target pixel point (the pixel point corresponding to the edge curve), the target pixel point is up-sampled and mapped into the edge image I skel, so as to obtain the edge curve, thereby improving the execution speed of the algorithm;
Referring to fig. 7 and 8, in order to compare the edge images I skel before and after the processing, it can be clearly seen that the curves perpendicular to each other or having a large connection angle in the processed edge image I skel are separated, but the image includes not only the edge curve of the beam limiter, but also the edge curve of the skin and the edge curve of the partial exploded structure, so that further extraction of multiple groups of edge curves in the edge image I skel is required, i.e. step S4 is performed;
S4, extracting the characteristics of the edge curves, screening a plurality of groups of the edge curves according to the characteristics, and obtaining characteristic curves comprises the following steps:
s41, carrying out external ellipse on each edge curve to obtain a major axis value and a minor axis value of the external ellipse;
S42, screening the edge curve according to the ratio k of the long axis value to the short axis value, wherein k=a/b 2;
Wherein a represents a long axis value, b represents a short axis value, and k represents a ratio, from analysis of the shape of a curve, the curve is more likely to be the edge of the beam limiter as the curve is closer to a straight line and longer, so that the curve with longer long axis and shorter short axis is more likely to be the edge of the beam limiter, if the k value is set to be 10, the curve with k value smaller than 10 in the edge curve can be obtained, and the characteristic curve is obtained;
S5, outputting the image area limited by the characteristic curve as a beam limiter area.
Example two
The difference between this embodiment and the first embodiment is that the edge curve is further screened after S42 in step S4:
Referring to FIG. 9, a result of straight line fitting is obtained by the least square method, if the obtained straight line has a positive angle θ with the x-axis in the first rectangular coordinate system XOY, θ E (-90, 90), the vertical foot point from the center of the image to the straight line is P (x, y), the second rectangular coordinate system SOT is set to be rotated 90- θ clockwise in the first rectangular coordinate system XOY, and obviously, the straight line is perpendicular to the S-axis, the vertical foot point is P, and the P point is set to be (S, 0) in the SOT coordinate system;
Referring to fig. 10, a candidate curve set C is obtained according to a plurality of sets of the edge curves;
A1, acquiring the edge curves in the candidate curve set C, and acquiring and judging according to the order of the k values from large to small, so that the screening efficiency can be improved;
After the edge curve is obtained, the information near the position of the edge curve in the enhanced edge image needs to be continuously analyzed, so that the edge curve is not analyzed any more, and the edge curve only has the function of roughly positioning the position of the boundary of the beam limiter in the image;
a2, carrying out accumulated projection on the enhanced images along a first preset direction to obtain a first target curve Proj L, wherein the first preset direction is a negative direction along a t axis, as shown in FIG. 11, if the curve Lc is a beam limiter boundary curve, an obvious peak is formed in Proj L in a beam limiter boundary transition peak area, and a foot drop point S is necessarily positioned in a peak area of Proj L;
a3, acquiring a peak interval on the first target curve;
Referring to fig. 12, at Proj L, a foot drop point S is taken as a center, and r peak is taken as a radius to find peak maximum point coordinates S peak:
ProjL(Speak)=max(ProjL(S-rpeak:S+rpeak));
And then, respectively finding out main peak area demarcation points S L、SR on the left side and the right side of S peak by taking S peak as a coordinate center point and taking Proj L(Speak)/6 as a projection value threshold value:
ProjL(SL-1)≤ProjL(Speak)/6;ProjL(SL)>ProjL(Speak)/6
ProjL(SR+1)≤ProjL(Speak)/6;ProjL(SR)>ProjL(Speak)/6, Obtaining a peak main interval Proj L(SL:SR);
a4, obtaining a boundary crest zone according to the crest interval;
Referring to fig. 13, a peak main interval mask is generated according to the peak interval:
Back projecting Proj _mask L_Peak into a Mask image of size I L_Enhence to obtain a Mask i_mask L_Peak of the peak transition zone, and further calculating to obtain a boundary peak zone I L_PeakRegion:
IL_PeakRegion=I_MaskL_Peak*IL_Enhence;
a5, carrying out accumulated projection on the boundary wave crest bands along a second preset direction to obtain a second target curve Proj L_Pend, wherein the second preset direction is along the s-axis direction;
Referring to fig. 14, an image of the second target curve Proj L_Pend is shown;
a6, judging whether the second target curve meets a boundary condition, and if so, marking the second target curve as the characteristic curve;
The boundary conditions include that the first proj L_Pend does not contain a distinct valley region, and if so, the boundary conditions are marked as a beam limiter edge:
a611, extracting all trough intervals in the second target curve and lengths corresponding to the trough intervals;
a612, counting the lengths of all the trough sections to obtain the total length of the trough sections and the length of the longest trough section;
a613, judging whether the total length of the trough section is greater than a first trough section length threshold or whether the longest trough section length is greater than a second trough section length, if one of the conditions is met, judging that the edge of the beam limiter is not the edge, and specifically:
setting the valley threshold THREVALLEY = -0.03, generating a valley region Mask Valley (x):
Statistical Mask Valley consecutive intervals, each consecutive interval length Len Valley (i), i=0, 1, 2. Let the second valley interval length threshold MaxValleyLen be 100, the first valley interval length threshold be MaxValleyLen/2, if present:
Σlen Valley (i) > MaxValleyLen or max (Len valley (i)) > MaxValleyLen/2, then the current region has an obvious trough region, the current region is judged to be an edge of a non-beam limiter, and the next curve is acquired in a return manner;
Whether the flat section of the second section Proj L_Pend meets the preset condition or not, if yes, marking as a beam limiter edge:
a621, extracting all flat sections in the second target curve and positions corresponding to the flat sections;
a622, judging whether the number of the flat sections is smaller than a preset number or whether the flat sections are positioned at two ends of the second target curve, and judging that the edge of the non-beam limiter is specific if one of the conditions is met:
Setting the preset number of 2 and the flat area threshold ThreFlat =0.03, obtaining a flat area Mask Flat (x):
If the conditions are not met, judging that the current curve is the edge of the non-beam limiter, and returning to obtain the next curve;
Thirdly, judging whether the effective boundary wave crest area meets a preset condition, and if so, marking the effective boundary wave crest area as a beam limiter edge:
A631, extracting all peak intervals in the second target curve and lengths corresponding to the peak intervals;
counting the total length of the peak interval, the total length of the flat interval and the average value of the peak interval;
Sequentially judging whether the total length of the peak interval is larger than the shortest boundary distance, judging whether the sum of the total length of the peak interval and the total length of the flat interval is larger than the second target curve and whether the average value of the peak interval is larger than a preset peak area average value, and judging that the edge of the beam limiter is specific if the total length of the peak interval and the total length of the flat interval are simultaneously satisfied:
Normally, the wave crest of the boundary area of the beam limiter has only one continuous interval, but due to the interference of certain anatomical structures, the interval can be disconnected, the number of the wave crest intervals is increased, the length of a single interval is reduced, the threshold value of the wave crest area is ThrePeak =0.05, the part between ThreFlat and ThreFlat is considered to be other texture areas and transition areas, and the peak area Mask Peak is obtained:
counting continuous intervals and lengths of Mask Peak to obtain the length of each continuous interval as Len Peak (i), i=0, 1,2,. The minimum average value of a peak area is MINAVEPEAK =0.08, the starting point of an effective interval on Mask Peak is start, the ending point is end, the shortest boundary distance is MINEDGEDISTANCE, and if the conditions (1), (2) and (3) are simultaneously satisfied:
LenPeak>MinEdgeDistance (1)
LenPeak+LenFlat>0.9*LenProj (3)
Judging the current curve as a boundary of the beam limiter, wherein Len Peak=Sum(LenPeak(i)),LenProj is Proj L_Pend total length;
finally, generating and returning an image beam limiter area projection mask, obtaining the relative position relation between the beam limiter area and a curve L under the current projection angle theta by an S value sign, and if S >0, describing that L is a right side boundary:
If S <0, then it is the left edge:
example III
The embodiment provides a specific method for detecting the edge of the effective beam limiter, which can be executed simultaneously with the step S4;
In the digital X-ray image obtained under the conventional photographing condition, the number of edges of the beam limiter in the image is generally 0, 2 or 4 and is parallel to the edges of the image, and the edges are parallel or perpendicular to each other, but in certain special image positions (parts) (such as calcaneus axis positions) and in the mobile X-ray photographing system, the number of edges of the beam limiter in the image can be 0, 1,2, 3 or 4 under the influence of various factors, and the edges are irregular in direction and have certain deviation in parallel or perpendicular relation with each other;
In the embodiment, the maximum included angle error theta Err_Para between the edges of the two parallel beam limiters in the image is set, and the maximum included angle error theta Err_Pend between the edges of the two parallel beam limiters is mutually perpendicular to each other, wherein the setting is that theta Err_Para=5°、θErr_Pend =8 DEG, and the angles can be adjusted according to the actual use scene of the photographic system;
referring to fig. 15, the effective beam limiter edge detection includes the steps of:
b1, obtaining geometrical characteristics of curves in the set C;
b2, detecting a first beam limiter boundary in the C, and specifically:
The method comprises the steps of detecting according to the method in the second embodiment, if the detection fails, directly returning to the step of ending the detection, if the detection is successful, setting the curve as a first curve, and detecting parallel edges through the characteristics of the first curve such as an angle theta 1 and a vertical foot P 1 from the center of an image to the first curve;
In the curve set C, screening out curves with the angle theta in the range of [ theta-theta Err_Para,θ+θErr_Para ] and the perpendicular foot from the center of the image to the fitting straight line meeting the condition that the value of P 1 -P is equal to or more than MINEDGEDISTANCE, and setting a set formed by the curves as C2;
B3, detecting a boundary of a second beam limiter in the C2;
acquiring one curve in C2, setting the curve as a second curve, and setting the angle of the second curve as theta 2;
B4, generating a candidate curve set C3 according to the boundaries of the first curve and the second curve;
and screening out the conditions in C according to the angles of the first curve and the second curve:
obtaining a curve of an angle theta Pend=θ1 +/-90 degrees or theta Pend=(θ1+θ2)/2+/-90 degrees to obtain a candidate curve set C3;
the curve in C3 satisfies |theta-theta Pend|≤θErr_Pend;
B5, detecting a third beam limiter boundary in the C3;
Acquiring one curve in C3, setting the angle of the second curve as theta 3, and setting the foot drop of a curve fitting straight line from the center of the image to the edge of the third beam limiter as P 3;
b6, generating a candidate curve set C4 according to the third curve;
Screening curves meeting the requirements of P 3 -P not less than MINEDGEDISTANCE from the C3, and generating a candidate curve set C4;
b7, detecting the edge of the fourth beam limiter in C4.
Example IV
Referring to fig. 2, a terminal for identifying a beam limiter area in an X-ray image includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the method for identifying a beam limiter area in an X-ray image according to any one of the first to third embodiments when executing the computer program;
In a conventional X-ray photography system, an operating doctor needs to manually cut out a beam limiter region in an upper computer, and the automatic cutting out can be realized by sending the information of the beam limiter region acquired by the identification method of the beam limiter region in an X-ray image to the upper computer, so that the workload of the operating doctor is reduced, the photography efficiency is improved, namely, the upper computer can remove the beam limiter region and directly provide a region of interest to the operating doctor, and the upper computer can also provide a pre-cutting range on an image observation interface to enable the doctor to confirm cutting, compared with a method for directly acquiring the beam limiter region according to the hardware information (the window size feedback of the beam limiter, the SID, the relative position of the beam limiter and a detector and the like) of the X-ray photography system, the X-ray photography system has the following advantages:
firstly, the method has low economic cost, does not need a hardware platform with a specific function, can be directly used as a set of program algorithm written in an image workstation of an X-ray photographic system;
Secondly, the performance is not affected by the mechanical error of the system;
third, the system is applicable to mobile X-ray photography systems, and does not require strict clinical photography positioning.
In summary, the present invention provides a method and a terminal for identifying a beam limiter region in an X-ray image,
The method comprises the steps of sequentially preprocessing an X-ray image through clipping, scaling and gray value normalization, extracting a boundary transition region of the preprocessed image based on a second-order differential Laplacian operator, and carrying out enhancement processing simultaneously, so that an edge region in the preprocessed image can be effectively extracted, a corresponding edge region image is obtained, and further, complicated image processing can be converted into curve processing through carrying out communication region processing, morphological refinement processing, morphological corrosion and least square straight line fitting on the edge region image, meanwhile, the edge region is divided into a plurality of groups of different edge curves, and finally, the curve characteristics of the plurality of groups of different edge curves are analyzed, so that the curve conforming to the characteristics of a beam limiter in the edge curve can be extracted and output as the beam limiter region, and the positioning accuracy of the system on the beam limiter region in the X-ray image is improved.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent changes made by the specification and drawings of the present invention, or direct or indirect application in the relevant art, are included in the scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210087375.0A CN114419017B (en) | 2022-01-25 | 2022-01-25 | A method and terminal for identifying a beam limiter region in an X-ray image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210087375.0A CN114419017B (en) | 2022-01-25 | 2022-01-25 | A method and terminal for identifying a beam limiter region in an X-ray image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114419017A CN114419017A (en) | 2022-04-29 |
CN114419017B true CN114419017B (en) | 2025-03-28 |
Family
ID=81276647
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210087375.0A Active CN114419017B (en) | 2022-01-25 | 2022-01-25 | A method and terminal for identifying a beam limiter region in an X-ray image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114419017B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119297124B (en) * | 2024-12-10 | 2025-03-11 | 迈为技术(珠海)有限公司 | Edge identification method, edge identification device, computer equipment and wafer laser cutting method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106327511A (en) * | 2015-07-02 | 2017-01-11 | 南京普爱医疗设备股份有限公司 | Beam limiting device detection method based on X-ray image |
CN113378790A (en) * | 2021-07-08 | 2021-09-10 | 中国电信股份有限公司 | Viewpoint positioning method, apparatus, electronic device and computer-readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101436254B (en) * | 2007-11-14 | 2013-07-24 | 佳能株式会社 | Image processing method and image processing equipment |
CN109242840B (en) * | 2018-08-29 | 2021-01-12 | 上海联影医疗科技股份有限公司 | Method for detecting a beam limiter region in a breast image, method for determining a boundary in a breast image and medical device |
-
2022
- 2022-01-25 CN CN202210087375.0A patent/CN114419017B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106327511A (en) * | 2015-07-02 | 2017-01-11 | 南京普爱医疗设备股份有限公司 | Beam limiting device detection method based on X-ray image |
CN113378790A (en) * | 2021-07-08 | 2021-09-10 | 中国电信股份有限公司 | Viewpoint positioning method, apparatus, electronic device and computer-readable storage medium |
Non-Patent Citations (1)
Title |
---|
基于改进的数学形态学的OCT图像快速边缘提取算法;张博闻等;《计算机科学》;20130630;第40卷(第6A期);正文第173-175页 * |
Also Published As
Publication number | Publication date |
---|---|
CN114419017A (en) | 2022-04-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5452367A (en) | Automated method and system for the segmentation of medical images | |
EP0757544B1 (en) | Computerized detection of masses and parenchymal distortions | |
Shen et al. | An automated lung segmentation approach using bidirectional chain codes to improve nodule detection accuracy | |
US8958625B1 (en) | Spiculated malignant mass detection and classification in a radiographic image | |
Jaeger et al. | Automatic screening for tuberculosis in chest radiographs: a survey | |
Wan Ahmad et al. | Lung segmentation on standard and mobile chest radiographs using oriented Gaussian derivatives filter | |
US7623692B2 (en) | Pulmonary nodule detection in a chest radiograph | |
WO1998043201A9 (en) | Method and apparatus for automatic muscle segmentation in digital mammograms | |
WO1998043201A1 (en) | Method and apparatus for automatic muscle segmentation in digital mammograms | |
JP2005296605A (en) | Method of segmenting a radiographic image into diagnostically relevant and diagnostically irrelevant regions | |
Thamilarasi et al. | Lung segmentation in chest X-ray images using Canny with morphology and thresholding techniques | |
US9808217B2 (en) | Breast cancer detection system, breast cancer detection method, breast cancer detection program, and computer-readable recording medium having breast cancer detection program recorded thereon | |
CN111105427A (en) | A method and system for lung image segmentation based on connected region analysis | |
CN118485667B (en) | Auxiliary diagnosis method and system based on intelligent ultrasound imaging | |
CN114022554A (en) | Massage robot acupuncture point detection and positioning method based on YOLO | |
CN114419017B (en) | A method and terminal for identifying a beam limiter region in an X-ray image | |
CN113034522B (en) | A CT Image Segmentation Method Based on Artificial Neural Network | |
EP2178047A2 (en) | Ribcage segmentation | |
Soltaninejad et al. | Robust lung segmentation combining adaptive concave hulls with active contours | |
Sarada et al. | MLO mammogram pectoral masking with ensemble of MSER and slope edge detection and extensive pre-processing | |
Arifin et al. | Detection of overlapping teeth on dental panoramic radiograph | |
CN112529900B (en) | Method, device, terminal and storage medium for matching ROI in mammary gland image | |
Radlak et al. | Automatic detection of bones based on the confidence map for rheumatoid arthritis analysis | |
Mohanty et al. | Fracture detection from X-ray images using different Machine Learning Techniques | |
Zamora et al. | Estimation of orientation and position of cervical vertebrae for segmentation with active shape models |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |