[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN117252762B - Full-automatic human body full-length X-ray image fusion splicing method and device - Google Patents

Full-automatic human body full-length X-ray image fusion splicing method and device Download PDF

Info

Publication number
CN117252762B
CN117252762B CN202311201490.7A CN202311201490A CN117252762B CN 117252762 B CN117252762 B CN 117252762B CN 202311201490 A CN202311201490 A CN 202311201490A CN 117252762 B CN117252762 B CN 117252762B
Authority
CN
China
Prior art keywords
image
images
splicing
ray
lower limb
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
Application number
CN202311201490.7A
Other languages
Chinese (zh)
Other versions
CN117252762A (en
Inventor
朱哲敏
王聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Taoying Medical Technology Co ltd
Original Assignee
Shanghai Taoying Medical Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Taoying Medical Technology Co ltd filed Critical Shanghai Taoying Medical Technology Co ltd
Priority to CN202311201490.7A priority Critical patent/CN117252762B/en
Publication of CN117252762A publication Critical patent/CN117252762A/en
Application granted granted Critical
Publication of CN117252762B publication Critical patent/CN117252762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10116X-ray image

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Apparatus For Radiation Diagnosis (AREA)

Abstract

The invention discloses a full-automatic human body full-length X-ray image fusion splicing method and device, comprising the following steps: acquiring full-length X-ray images of a human body to be spliced; determining an overlapping area to be spliced between adjacent target X-ray images; calculating the maximum two-dimensional correlation coefficient value of the gray value of the pixel point corresponding to the overlapping area between the adjacent trunk images; establishing a splicing reference line for a gap for separating the double lower limbs based on a feature extraction algorithm, dividing the double lower limb images into left and right lower limb images according to the splicing reference line, and respectively calculating the optimal splicing positions of the left and right lower limb images; and automatically fusing and splicing the target X-ray images according to the corresponding human body structure according to the optimal splicing position, balancing gray values of overlapping areas between adjacent target X-ray images based on a fusion transition algorithm, respectively acquiring full-length images of the human body at the right position and the side position from top to bottom through linear flat scanning shooting of a digital X-ray imaging system, and completing full-automatic splicing of the images by using an original algorithm.

Description

Full-automatic human body full-length X-ray image fusion splicing method and device
Technical Field
The invention relates to the technical field of medical imaging, in particular to a full-automatic human body full-length X-ray image fusion splicing method and device.
Background
At present, an X-ray perspective imaging system commonly used for orthopedic clinical diagnosis has limited shooting visual field, and in orthopedic diagnosis and operation treatment of human vertebration, long bones and the like, a complete anatomical structure image needs to be acquired, so that accurate positioning and anatomical parameter measurement of an osteoarthropathy part are facilitated, for example, the length, the angle and the force line (connecting lines among midpoints of hip joints, knee joints and ankle joints) of two lower limbs are facilitated. In terms of diagnosis and treatment of clinical diseases such as teenager scoliosis correction, spinal artificial lumbar disc replacement, total hip replacement, artificial femoral head replacement, artificial knee joint replacement, lower limb deformity correction, artificial limb installation and the like, the full-length image provided by the full-length X-ray splicing technology of the human body can provide reliable data basis for clinical orthopaedics diagnosis, preoperative planning scheme formulation, postoperative efficacy evaluation and the like.
Currently, X-ray Scanning methods for acquiring full-length images of human bodies are diversified, and there are linear flat Scanning (LINEAR SCANNING), rotational Scanning (Rotational Scanning), wide-angle Scanning (WIDE SCANNING), slit Scanning (slit Scanning), and the like. According to different X-ray scanning modes, different image preprocessing and splicing modes are corresponding.
The most widely used clinical application today is standard digital radiography systems, which are in a linear flat scan mode. Based on the automatic tracking motion of the x-ray tube and the detector, the system can automatically shoot a plurality of independent digital x-ray image sequences in one acquisition process, and then a radiation technician needs to carry out post-processing work, namely semi-automatic splicing of full-length images is completed.
The image stitching technology is always a focus of attention and research of a plurality of students at home and abroad, and the existing image stitching method has the following problems:
1. Phase correlation methods are proposed based on signal transform domain theory. In this method, images are transformed into a frequency domain as two-dimensional signals, and then a spatial positional relationship between the images is obtained using a cross power spectrum. The method does not depend on the specific content of the images, has better registration accuracy on the images which are only subjected to translation transformation, but the X-ray images have distortion caused by depth information, so that the method is not suitable for full-length X-ray splicing of human bodies.
2. An X-ray image splicing method based on a scale. The method requires that a scale is added and spliced according to the scale graduation and numerical value in the image during radiography. The splicing mode does not realize automation, is time-consuming and labor-consuming, is difficult to ensure the image quality and has low clinical operability.
3. Equidistant matching based on the gray values of the pixels of the image. The method needs to perform a large amount of calculation on the pixel gray data, and is relatively sensitive to brightness change and geometric distortion.
In summary, it is necessary to provide a full-automatic human body full-length X-ray image fusion and splicing method, which solves the defect that the prior art is not suitable for human body full-length X-ray fusion and splicing.
Disclosure of Invention
The invention aims to provide a full-automatic human body full-length X-ray image fusion splicing method and device so as to improve the splicing efficiency and accuracy of human body full-length X-ray images.
The invention provides a full-automatic human body full-length X-ray image fusion splicing method, which comprises the following steps:
acquiring full-length X-ray images of a human body to be spliced, wherein the full-length X-ray images to be spliced are a plurality of target X-ray images under the same imaging visual angle;
determining an overlapping area to be spliced between the adjacent target X-ray images;
Identifying a trunk image in the target X-ray image, calculating a maximum two-dimensional correlation coefficient value of pixel gray values corresponding to overlapping areas between adjacent trunk images, and determining an optimal splicing position of the trunk image;
Identifying double lower limb images in the target X-ray image, establishing a splicing reference line for a gap of the separated double lower limbs based on a feature extraction algorithm, dividing the double lower limb images into left and right lower limb images according to the splicing reference line, and respectively calculating the optimal splicing positions of the left and right lower limb images;
And automatically fusing and splicing the target X-ray images according to the optimal splicing position and corresponding human body structures, and balancing gray values of overlapping areas between the adjacent target X-ray images based on a fusion transition algorithm to obtain the full-length X-ray images of the human body after the fusion.
Preferably, the identifying the trunk image in the target X-ray image, calculating a maximum two-dimensional correlation coefficient value of pixel gray values corresponding to overlapping areas between adjacent trunk images, and determining an optimal stitching position of the trunk image includes:
Estimating the number of pixels of an overlapping area adjacent to the longitudinal axis direction of the target X-ray image according to preset shooting conditions, and setting the number as an initial splicing position;
Searching a horizontal pixel coordinate and a vertical pixel coordinate which enable the correlation coefficient of a two-dimensional matrix of an overlapping area between adjacent target X-ray images to reach the maximum value in an offset range formed by a preset pixel threshold range in the vertical axis direction and the horizontal axis direction, and taking the horizontal pixel coordinate and the vertical pixel coordinate as the optimal splicing position;
Calculating a two-dimensional correlation coefficient r of an overlapping area between adjacent target X-ray images by using the following formula:
Wherein, Is the gray level average value of the upper image A in the adjacent target X-ray image,/>And A mn、Bmn is the gray level value of the upper image and the lower image at the coordinates (m, n) respectively, which is the gray level average value of the lower image B in the adjacent target X-ray images.
Preferably, the balancing gray values of overlapping areas between adjacent target X-ray images based on the fusion transition algorithm, to obtain the full-length X-ray images of the human body after the fusion comprises:
According to the ordinate position of any target X-ray image, giving a gray value weight at the same position of the overlapping area of the adjacent target X-ray images, and summing to generate the gray value of the target X-ray image under the ordinate after splicing:
Wherein w i is the gray value of the ith row of pixels in the overlapping area of the adjacent target X-ray images obtained by final synthesis, h is the height of the overlapping area, namely the number of vertical axis pixels, and a i、Bi is the gray value of the ith row of pixels in the overlapping area of the adjacent target X-ray images.
Preferably, the identifying the dual lower limb image in the target X-ray image establishes a stitching reference line for a gap between the dual lower limbs based on a feature extraction algorithm, and dividing the dual lower limb image into left and right lower limb images according to the stitching reference line, and calculating the optimal stitching positions of the left and right lower limb images respectively includes:
dividing the adjacent target X-ray images according to thighs and calves according to the splicing joint between the splicing reference line and the adjacent double lower limb images;
comparing the pixel width of the left lower limb image and the pixel width of the right lower limb image in the double lower limb images, and selecting one side lower limb image with a large width;
According to the selected lower limb image, identifying a thigh image and a shank image corresponding to the lower limb image, and calculating a maximum two-dimensional correlation coefficient value of a pixel gray value corresponding to an overlapping area between the thigh image and the shank image to determine an optimal splicing position and a first translation distance;
Respectively calculating the maximum two-dimensional correlation coefficient value of the gray value of the pixel point corresponding to the overlapping area between the thigh image and the shank image on the left and right lower limb images to determine a corresponding second translation distance;
And splicing the left and right side images of the double lower limbs according to the optimal splicing position, the first translation distance and the second translation distance corresponding to the left and right side lower limb images.
Preferably, the establishing the stitching reference line for the gap between the two lower limbs based on the feature extraction algorithm includes:
Identifying a corresponding calf image in the target X-ray image, and summing and averaging gray values of the calf image in the longitudinal axis direction to obtain a preset gray curve l:
Wherein n is the dimension of the vertical axis direction of the image, namely the number of pixels, and w i represents the gray value of the ith pixel under the corresponding abscissa;
Carrying out one-dimensional smoothing filtering on the gray curve l by adopting a moving average filter to obtain a smooth filtered gray curve l s, and averaging the nth value l s (n) of the smooth filtered gray curve l s from the nth value-wi ndowSi ze +1 to the nth value of the preset gray curve l, wherein the following formula is shown in the specification:
Wherein wi ndowSi ze is a preset empirical value;
establishing a dividing line h on a preset gray level curve l:
Under the condition that the boundary line h is intersected with the gray level curve l s after smooth filtering, 4 intersection points are obtained, and the abscissa with the highest gray level value between the 2 nd intersection point and the 3 rd intersection point is calculated, namely the abscissa where the gap between the two lower limbs is located.
Preferably, the calculating the optimal stitching positions of the left and right lower limb images includes:
Estimating the number of pixels of the thigh and calf image overlapping area in the lower limb image according to preset shooting conditions, and setting the number as an initial splicing position;
Searching a horizontal pixel coordinate and a vertical pixel coordinate which enable the correlation coefficient of a two-dimensional matrix of an overlapping area between thigh and calf images in the lower limb images to reach the maximum value in an offset range formed by a preset pixel threshold range in the vertical axis and horizontal axis directions, and taking the horizontal pixel coordinate and the vertical pixel coordinate as the optimal splicing position;
calculating a two-dimensional correlation coefficient r of the overlapping area between the thigh and the calf images in the lower limb images after selection by using the following formula:
Wherein, For the gray average value of thigh image A in the lower limb image after selection,/>In order to select the gray average value of the lower leg image B in the lower limb image, a mn、Bmn is the gray value of the thigh and lower leg images at the coordinates (m, n), respectively.
Preferably, calculating the maximum two-dimensional correlation coefficient value includes:
setting the pixel interval of the target X-ray image;
In the automatic image splicing process, carrying out two-dimensional correlation coefficient calculation according to the preset pixel spacing to obtain an initial splicing position interval;
and calculating two-dimensional correlation coefficients pixel by pixel in the initial splicing position interval to obtain a plurality of target splicing positions, comparing the two-dimensional correlation coefficients of the target splicing positions, and outputting the maximum two-dimensional correlation coefficient to determine the optimal splicing position.
The invention also provides a full-automatic human body full-length X-ray image fusion splicing device, which comprises:
The acquisition module is used for acquiring full-length X-ray images of a human body to be spliced, wherein the full-length X-ray images to be spliced are a plurality of target X-ray images under the same imaging visual angle;
The determining module is used for determining an overlapping area to be spliced between the adjacent target X-ray images;
The first calculation module is used for identifying the trunk images in the target X-ray images, calculating the maximum two-dimensional correlation coefficient value of the pixel gray value corresponding to the overlapping area between the adjacent trunk images, and determining the optimal splicing position of the trunk images;
The second calculation module is used for identifying double lower limb images in the target X-ray image, establishing a splicing reference line for a gap for separating the double lower limbs, dividing the double lower limb images into left and right lower limb images according to the splicing reference line, and respectively calculating the optimal splicing positions of the left and right lower limb images;
And the fusion splicing module is used for automatically fusing and splicing the target X-ray images according to the optimal splicing position and corresponding human body structures, and balancing gray values of overlapping areas between the adjacent target X-ray images based on a fusion transition algorithm to obtain the full-length X-ray images of the human body after the fusion splicing.
The present invention also provides a computer device comprising:
A memory for storing a processing program;
And the processor is used for realizing the full-automatic human body full-length X-ray image fusion splicing method according to the embodiment of the invention when executing the processing program.
The invention also provides a readable storage medium, which is characterized in that the readable storage medium is stored with a processing program, and the processing program realizes the full-automatic human body full-length X-ray image fusion splicing method according to the embodiment of the invention when being executed by a processor.
The full-automatic human body full-length X-ray image fusion splicing method provided by the invention can obtain the following technical effects:
1) The splicing effect is good. The imaging is clear, the joint gap part is natural in transition, the bone alignment rate is high, the image distortion rate is small, and the problem of joint dislocation caused by different side bit depths is solved.
2) And the splicing efficiency is high. The time for splicing a full-length X-ray image of a human body is less than 5 seconds.
3) Full automation and low economic cost. The manual participation is not needed, errors caused by manual splicing are avoided, the splicing efficiency is improved, and the labor cost is saved.
Drawings
FIG. 1 is a schematic diagram showing steps of a full-automatic human body full-length X-ray image fusion splicing method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a method for matching two lower limbs respectively according to an embodiment of the present invention;
FIG. 3 is a graph showing the comparison of the effects of matching (A) the whole lower limbs and matching (B) the lower limbs respectively in an embodiment of the present invention;
FIG. 4 is a first exemplary diagram of a stitching reference line established for a gap separating two lower limbs based on a feature extraction algorithm in accordance with one embodiment of the present invention;
FIG. 5 is a diagram showing a second example of a stitching reference line established for a gap between two lower limbs based on a feature extraction algorithm according to an embodiment of the present invention, where l (solid line) is an original preset gray curve, l s (dotted line) is a smooth filtered gray curve, and h (dotted line) is a boundary;
FIG. 6 is a schematic diagram showing the contrast between the image of the human body part after the stitching and the direct stitching effect according to an embodiment of the present invention;
FIG. 7 is a flowchart of an algorithm for computing speed optimization based on the clamping theorem according to an embodiment of the present invention;
FIG. 8 is a diagram showing a comparison between a human body normal full-length X-ray image to be stitched and a human body full-length X-ray image after stitching according to an embodiment of the present invention;
fig. 9 is a diagram showing a comparison example of a full-length X-ray image of a human body side to be stitched and a full-length X-ray image of a human body after stitching according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
As shown in FIG. 1, the invention provides a full-automatic human body full-length X-ray image fusion splicing method, which comprises the following steps:
S1: acquiring full-length X-ray images of a human body to be spliced, wherein the full-length X-ray images to be spliced are a plurality of target X-ray images which are arranged according to the human body posture sequence under the same imaging view angle; in this embodiment, the plurality of target X-ray images may be the subject's natural loading position standing, and the digital X-ray imaging system is used to acquire the full-length images of the human body in the normal position and the lateral position from the top to the bottom by linear panning. According to the height and shape differences of different subjects, the total number of images in a single visual angle is different. The algorithm in this embodiment is used to automatically stitch all X-ray images at the same imaging view angle.
S2: determining an overlapping area to be spliced between the adjacent target X-ray images; in one embodiment of the invention, the adjacent target X-ray images are upper and lower images under the condition of standing and shooting at the weight bearing position of the human body, and an overlapping part exists between the adjacent upper and lower images so as to facilitate subsequent splicing.
S3: identifying a trunk image in the target X-ray image, calculating a maximum two-dimensional correlation coefficient value of pixel gray values corresponding to overlapping areas between adjacent trunk images, and determining an optimal splicing position of the trunk image; and calculating the correlation coefficient of the gray value of the corresponding pixel point of the overlapped area, wherein the higher the correlation coefficient is, the higher the matching degree of the two images is.
Specifically, the target X-ray image is a gray value matrix with a preset number of bits, and the target X-ray image is a torso image. In one embodiment, the gray value matrix for the preset number of bits is a 16b bits gray value matrix. And estimating the pixel number of the overlapping area adjacent to the longitudinal axis direction of the target X-ray image according to a preset shooting condition, and setting the pixel number as an initial splicing position. And searching the horizontal and vertical pixel coordinates which enable the correlation coefficient of the two-dimensional matrix of the overlapping area between the adjacent target X-ray images to reach the maximum value in the offset range formed by the preset pixel threshold value range in the vertical axis and horizontal axis directions, and taking the horizontal and vertical pixel coordinates as the optimal splicing position. In one embodiment, the preset pixel threshold range is 300 pixels in the vertical axis direction and 200 pixels in the horizontal axis direction.
Calculating a two-dimensional correlation coefficient r of an overlapping area between adjacent target X-ray images by using the following formula:
Wherein, Is the gray level average value of an upper image A in the X-ray images of adjacent targets,/>The gray average value of the lower image B in the adjacent target X-ray image is A mn、Bmn, which is the gray value of the upper and lower images at the coordinates (m, n). The embodiment is based on a splicing position calculation method for searching the maximum two-dimensional correlation coefficient value, and the matching efficiency and the splicing efficiency are improved.
S4: and identifying double lower limb images in the target X-ray image, establishing a splicing reference line for a gap of the separated double lower limbs based on a feature extraction algorithm, dividing the double lower limb images into left and right lower limb images according to the splicing reference line, and respectively calculating the optimal splicing positions of the left and right lower limb images.
Because the full-length x-ray image of the human body is obtained by cone Shu Xianxing sweeping, the photographed image has cone beam distortion, namely the overlapped parts of the upper image and the lower image are not completely consistent. The method has a great influence on the splicing of the calf parts of the righting or lateral images of the standing front and rear feet, can lead to the splicing dislocation of the tibia and the fibula, and influences the measurement of the lower limb dissection parameters. In order to accurately align the tibia and the fibula of the double legs, the invention adopts a separate splicing alignment method aiming at the side position images of the lower limbs.
Specifically, dividing the double lower limb images according to thighs and shanks according to the stitching joint between the stitching reference line and the adjacent double lower limb images, such as left thigh X-ray image, left shank X-ray image, right thigh X-ray image and right shank X-ray image, comparing pixel widths of the left lower limb image and the right lower limb image in the double lower limb images, and selecting one side lower limb image with a large width;
And calculating the maximum two-dimensional correlation coefficient value of the gray value of the pixel point corresponding to the overlapping area between the thigh image and the shank image according to the selected lower limb image and identifying the thigh image and the shank image corresponding to the lower limb image so as to determine the optimal splicing position and the first translation distance. The first translation distance refers to the distance that the adjacent images move up and down during stitching, namely the pixel width of the overlapping region. In this embodiment, the distance of the vertical translation needs to be considered for the lower limb image on the wider side.
In one embodiment, if the left lower limb image is a side image with larger pixel width, calculating a maximum two-dimensional correlation coefficient value of a pixel point gray value corresponding to an overlapping region between the left thigh X-ray image and the left calf X-ray image to determine an optimal splicing position; it will be appreciated that the optimal splice location herein is the splice found between the left thigh X-ray image and the left shank X-ray image.
The maximum two-dimensional correlation coefficient value of the gray value of the corresponding pixel point of the overlapping area between the thigh X-ray image and the shank X-ray image on the left and right lower limb images is calculated respectively to determine the corresponding second translation distance. The second translation distance refers to a distance that the lower limb images move left and right when adjacent images are spliced, namely, a pixel width of a superposition area, and the left and right translation distance is required to be considered no matter whether the lower limb images are wider or narrower.
And matching the left and right X-ray images of the double lower limbs to the same horizontal height according to the optimal splicing position, the first translation distance and the second translation distance position corresponding to the left and right lower limb images.
As will be appreciated by those skilled in the art, referring to fig. 2, a gap between two separated legs is first found to serve as a stitching reference line, i.e. a split seam, and the upper and lower images to be stitched are split left and right according to the split seam, so that the two leg images to be stitched are split into A, B, C, D four parts. Firstly splicing A and B according to the splicing position calculation method based on searching the maximum two-dimensional correlation coefficient value in the step S3, calculating the second translation distance of C and D by using the two-dimensional correlation coefficient method after using the calculated optimal splicing position and the first translation distance, and thus ensuring that the left and right images of the two legs are at the same horizontal height. Referring to fig. 3, the fibula of both legs of the whole matching (a) appears a "false fracture" phenomenon at the joint, and the fibula of both legs of the matching (B) is smooth and burr-free at the joint.
In this embodiment, the optimal stitching position, the first translation distance, and the second translation distance are also obtained by calculating the stitching position of the maximum two-dimensional correlation coefficient value, and the calculating the optimal stitching position of the left and right lower limb X-ray images in step S4 includes:
Estimating the number of pixels of the thigh and calf image overlapping area in the lower limb image according to preset shooting conditions, and setting the number as an initial splicing position;
s416: searching a horizontal pixel coordinate and a vertical pixel coordinate which can enable the correlation coefficient of a two-dimensional matrix of an overlapping area between thigh and calf images in the selected lower limb images to reach the maximum value in the offset range formed by a preset pixel threshold range on the vertical axis and the horizontal axis, and taking the horizontal pixel coordinate and the vertical pixel coordinate as the optimal splicing position;
s417: calculating a two-dimensional correlation coefficient r of the overlapping area between the thigh and the calf images in the lower limb images after selection by using the following formula:
Wherein, For the gray average value of thigh image A in the lower limb image after selection,/>In order to select the gray average value of the lower leg image B in the lower limb image, a mn、Bmn is the gray value of the thigh image and the lower leg image at the coordinates (m, n), respectively.
In this embodiment, a feature extraction algorithm for searching for gaps between lower limbs is adopted, so that the positions of different subjects when shooting the lateral position pieces are different, and the gaps between the two legs need to be automatically identified. Specifically, identifying a shank image in the target X-ray image, and summing and averaging gray values of the shank image in the longitudinal axis direction to obtain a preset gray curve l:
Wherein n is the dimension of the vertical axis direction of the image, namely the number of pixels, and w i represents the gray value of the ith pixel under the corresponding abscissa; in this embodiment, the gray values of the last image of each group, i.e., the lower leg image, are summed and averaged along the vertical axis. In the cross-standing calf X-ray film, the longitudinal component gray value where the calf is located is lower, so that the preset gray curve l is shown in a form of two valleys sandwiching one peak, as shown in fig. 4. In order to remove high-frequency noise in the gray curve, namely presetting 'burr' in the gray curve l, a moving average filter is used for carrying out one-dimensional smoothing filtering on the l to obtain l s.
Carrying out one-dimensional smoothing filtering on the gray curve l by adopting a moving average filter to obtain a smooth filtered gray curve l s, and averaging the nth value l s (n) of the smooth filtered gray curve l s from the nth value-wi ndowSi ze +1 to the nth value of the preset gray curve l, wherein the following formula is shown in the specification:
Wherein wi ndowSi ze is a preset empirical value; in this application scenario, the length l enth (l) of l is 0.03 times as large as that of the embodiment: wi ndowSi zwe = 0.03 x l enth (l); the resulting smoothed gray-scale curve l s is shown in fig. 5.
To obtain the coordinates of the leg gaps, a demarcation line h is established on a preset gray scale curve l:
Under the condition that the boundary line h is intersected with the gray level curve l s after smooth filtering, 4 intersection points are obtained, and the abscissa with the highest gray level value between the 2 nd intersection point and the 3 rd intersection point is calculated, namely the abscissa where the double lower limb gap, namely the splicing reference line, is located.
S5: and automatically fusing and splicing the target X-ray images according to the optimal splicing position and corresponding human body structures, and balancing gray values of overlapping areas between the adjacent target X-ray images based on a fusion transition algorithm to obtain the full-length X-ray images of the human body after the fusion. The image fusion is to eliminate the discontinuity of the image light intensity or color, and make the light intensity of the image at the splicing position smoothly transition to eliminate the abrupt change of the light intensity.
Because of the difference of the light source positions, the average gray value of the overlapped part of the upper image and the lower image is different. In order to make the splicing effect more natural, avoid obvious splicing gaps, a fusion algorithm is used for balancing the gray values of the overlapped part, so that the gray values of the images of the overlapped part have a soft effect of continuous transition. The specific algorithm is to give a gray value weight to the same position of the overlapping part of the upper and lower images according to the ordinate position of the images and sum the gray values to generate the gray value of the images under the ordinate after splicing.
According to the ordinate position of any target X-ray image, giving a gray value weight at the same position of the overlapping area of the adjacent target X-ray images, and summing to generate the gray value of the target X-ray image under the ordinate after splicing:
Wherein w i is the gray value of the ith row of pixels in the overlapping area of the adjacent target X-ray images obtained by final synthesis, h is the height of the overlapping area, namely the number of vertical axis pixels, and a i、Bi is the gray value of the ith row of pixels in the overlapping area of the adjacent target X-ray images. Referring to the result diagram shown in fig. 6, the spliced image (a) obtained by using the fusion transition algorithm has soft transition, so that the two images are fused together, and the image (B) obtained by directly splicing can observe obvious gray value difference at the spliced part, thus the spliced image (B) looks quite abrupt.
Because the image resolution is high, the original matrix is too huge, and the operation efficiency of calculating the two-dimensional correlation coefficient pixel by pixel is low. In order to improve the calculation efficiency, in one embodiment of the present invention, the calculation speed is optimized based on the clamping theorem. Specifically, presetting a pixel pitch of the target X-ray image; in the automatic image splicing process, carrying out two-dimensional correlation coefficient calculation according to a preset pixel interval to obtain an initial splicing position interval; and calculating two-dimensional correlation coefficients pixel by pixel in the initial splicing position interval to obtain a plurality of target splicing positions, comparing the two-dimensional correlation coefficients of the target splicing positions, and outputting the maximum two-dimensional correlation coefficient to determine the optimal splicing position.
As can be appreciated by those skilled in the art, the stitching process is optimized to be one step at each interval, a pixel interval such as 20 pixels in the vertical axis direction and 10 pixels in the horizontal axis direction are set, two-dimensional correlation coefficient calculation is performed to obtain a rough position interval of the stitching seam, then the two-dimensional correlation coefficients are calculated pixel by pixel in the interval to obtain an accurate position of the final stitching seam, in this way, the calculated amount can be greatly reduced, the stitching time can be shortened, the time required for stitching is shortened, the time required for stitching a full-length X-ray image of a human body is shortened to be less than 5 seconds, a speed optimized algorithm flow chart is shown in fig. 7, i represents the circulation times, overlap represents the total matching range, a and b represent two stitching positions, corr represents the two-dimensional correlation coefficients of the two images at the stitching positions, round is a rounding function, and indh is the finally determined optimal stitching position.
In this embodiment, the final display of the stitching results is shown in fig. 8-9, and the stitched image is turned over by gray values to conform to the medical image reading habit.
Example two
The invention also provides a full-automatic human body full-length X-ray image fusion splicing device, which comprises:
The acquisition module is used for acquiring full-length X-ray images of a human body to be spliced, wherein the full-length X-ray images to be spliced are a plurality of target X-ray images under the same imaging visual angle;
The determining module is used for determining an overlapping area to be spliced between the adjacent target X-ray images;
The first calculation module is used for identifying the trunk images in the target X-ray images, calculating the maximum two-dimensional correlation coefficient value of the pixel gray value corresponding to the overlapping area between the adjacent trunk images, and determining the optimal splicing position of the trunk images;
The second calculation module is used for identifying double lower limb images in the target X-ray image, establishing a splicing reference line for a gap for separating the double lower limbs, dividing the double lower limb images into left and right lower limb images according to the splicing reference line, and respectively calculating the optimal splicing positions of the left and right lower limb images;
And the fusion splicing module is used for automatically fusing and splicing the target X-ray images according to the optimal splicing position and corresponding human body structures, and balancing gray values of overlapping areas between the adjacent target X-ray images based on a fusion transition algorithm to obtain the full-length X-ray images of the human body after the fusion splicing.
According to the full-automatic human body full-length X-ray image fusion splicing device provided by the invention, the full-length images of the human body at the right position and the side position are respectively obtained through linear flat scanning shooting from top to bottom by the digital X-ray imaging system, and the full-automatic splicing of the images is completed by using an original algorithm.
The specific contents and implementation methods of the acquisition module, the determination module, the first calculation module, the second calculation module, and the fusion splicing module are as described in the first embodiment, and are not described herein again.
Finally, in order to apply the above-mentioned full-automatic human body full-length X-ray image fusion splicing method to an image acquisition generating system or device or equipment with related hardware conditions, the application also provides a computer readable storage medium, and the computer readable storage medium is loaded with a computer program, and the computer program realizes the functions of the corresponding method embodiments when being executed by a computer.
Similarly, the application also provides a computer readable storage medium loaded with a computer program for implementing the full-automatic human body full-length X-ray image fusion splicing method.
In the above embodiments, the implementation may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program. The computer program comprises one or more computer programs. When the computer program is loaded and executed on a computer, the flow or functions described in accordance with the embodiments of the present disclosure are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer program may be stored in or transmitted from one computer readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, DDL (DigitalDubDDriberLine, digital subscriber line)) or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a high-density DVD (DigitalVideoDiDD, digital video disc)), or a semiconductor medium (e.g., DDD (DolidDtateDiDk, solid state disk)), or the like.
It should be noted that in the above-described embodiments, the terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," and "having" are inclusive and therefore specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. The method steps, processes, and operations described herein should not be construed as necessarily requiring their performance in the particular order discussed or illustrated, unless specifically indicated to be performed in the order of the steps set forth. It should also be appreciated that additional or alternative steps may be employed.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A full-automatic human body full-length X-ray image fusion splicing method is characterized by comprising the following steps:
acquiring full-length X-ray images of a human body to be spliced, wherein the full-length X-ray images to be spliced are a plurality of target X-ray images under the same imaging visual angle;
determining an overlapping area to be spliced between the adjacent target X-ray images;
Identifying a trunk image in the target X-ray image, calculating a maximum two-dimensional correlation coefficient value of pixel gray values corresponding to overlapping areas between adjacent trunk images, and determining an optimal splicing position of the trunk image;
Identifying double lower limb images in the target X-ray image, establishing a splicing reference line for a gap of the separated double lower limbs based on a feature extraction algorithm, dividing the double lower limb images into left and right lower limb images according to the splicing reference line, and respectively calculating the optimal splicing positions of the left and right lower limb images;
According to the optimal splicing position, automatically fusing and splicing the target X-ray images according to the corresponding human body structure, and balancing gray values of overlapping areas between the adjacent target X-ray images based on a fusion transition algorithm to obtain a full-length X-ray image of the human body after the fusion;
Dividing the double lower limb images into left and right lower limb images according to the stitching reference line, and respectively calculating the optimal stitching positions of the left and right lower limb images comprises the following steps:
dividing the adjacent target X-ray images according to thighs and calves according to the splicing joint between the splicing reference line and the adjacent double lower limb images;
comparing the pixel width of the left lower limb image and the pixel width of the right lower limb image in the double lower limb images, and selecting one side lower limb image with a large width;
According to the selected lower limb image, identifying a thigh image and a shank image corresponding to the lower limb image, and calculating a maximum two-dimensional correlation coefficient value of a pixel gray value corresponding to an overlapping area between the thigh image and the shank image to determine an optimal splicing position and a first translation distance;
Respectively calculating the maximum two-dimensional correlation coefficient value of the gray value of the pixel point corresponding to the overlapping area between the thigh image and the shank image on the left and right lower limb images to determine a corresponding second translation distance;
And splicing the left and right side images of the double lower limbs according to the optimal splicing position, the first translation distance and the second translation distance corresponding to the left and right side lower limb images.
2. The method of claim 1, wherein the identifying the trunk image in the target X-ray image, calculating the maximum two-dimensional correlation coefficient value of the gray value of the pixel corresponding to the overlapping area between adjacent trunk images, and determining the optimal stitching position of the trunk image comprises:
Estimating the number of pixels of an overlapping area adjacent to the longitudinal axis direction of the target X-ray image according to preset shooting conditions, and setting the number as an initial splicing position;
Searching a horizontal pixel coordinate and a vertical pixel coordinate which enable the correlation coefficient of a two-dimensional matrix of an overlapping area between adjacent target X-ray images to reach the maximum value in an offset range formed by a preset pixel threshold range in the vertical axis direction and the horizontal axis direction, and taking the horizontal pixel coordinate and the vertical pixel coordinate as the optimal splicing position;
Calculating a two-dimensional correlation coefficient r of an overlapping area between adjacent target X-ray images by using the following formula:
Wherein, Is the gray level average value of the upper image A in the adjacent target X-ray image,/>And A mn、Bmn is the gray level value of the upper image and the lower image at the coordinates (m, n) respectively, which is the gray level average value of the lower image B in the adjacent target X-ray images.
3. The method for fusing and stitching full-length X-ray images of a human body according to claim 1, wherein the balancing gray values of overlapping areas between adjacent target X-ray images based on a fusion transition algorithm to obtain the fused full-length X-ray images of the human body comprises:
According to the ordinate position of any target X-ray image, giving a gray value weight at the same position of the overlapping area of the adjacent target X-ray images, and summing to generate the gray value of the target X-ray image under the ordinate after splicing:
Wherein w i is the gray value of the ith row of pixels in the overlapping area of the adjacent target X-ray images obtained by final synthesis, h is the height of the overlapping area, namely the number of vertical axis pixels, and a i、Bi is the gray value of the ith row of pixels in the overlapping area of the adjacent target X-ray images.
4. The method for fusing and stitching full-length X-ray images of a human body according to claim 1, wherein the step of establishing stitching reference lines for gaps separated by two lower limbs based on the feature extraction algorithm comprises the steps of:
Identifying a corresponding calf image in the target X-ray image, and summing and averaging gray values of the calf image in the longitudinal axis direction to obtain a preset gray curve l:
Wherein n is the dimension of the vertical axis direction of the image, namely the number of pixels, and w i represents the gray value of the ith pixel under the corresponding abscissa;
Carrying out one-dimensional smoothing filtering on the gray curve l by adopting a moving average filter to obtain a smooth filtered gray curve ls, and averaging the nth value ls (n) of the smooth filtered gray curve ls from the nth value to the windowSize +1 of the preset gray curve l to obtain the following formula:
wherein windowSize is a preset empirical value;
establishing a dividing line h on a preset gray level curve l:
under the condition that the boundary line h is intersected with the gray level curve ls after smooth filtering, 4 intersection points are obtained, and the abscissa with the highest gray level value between the 2 nd intersection point and the 3 rd intersection point is calculated, namely the abscissa where the double lower limb gap is located.
5. The method of claim 1, wherein calculating the optimal stitching positions of the left and right lower limb images respectively comprises:
Estimating the number of pixels of the thigh and calf image overlapping area in the lower limb image according to preset shooting conditions, and setting the number as an initial splicing position;
Searching a horizontal pixel coordinate and a vertical pixel coordinate which enable the correlation coefficient of a two-dimensional matrix of an overlapping area between thigh and calf images in the lower limb images to reach the maximum value in an offset range formed by a preset pixel threshold range in the vertical axis and horizontal axis directions, and taking the horizontal pixel coordinate and the vertical pixel coordinate as the optimal splicing position;
calculating a two-dimensional correlation coefficient r of the overlapping area between the thigh and the calf images in the lower limb images after selection by using the following formula:
Wherein, For the gray average value of thigh image A in the lower limb image after selection,/>In order to select the gray average value of the lower leg image B in the lower limb image, a mn、Bmn is the gray value of the thigh and lower leg images at the coordinates (m, n), respectively.
6. The fully automatic human body full length X-ray image fusion splicing method of claim 1, wherein calculating the maximum two-dimensional correlation coefficient value comprises:
setting the pixel interval of the target X-ray image;
In the automatic image splicing process, carrying out two-dimensional correlation coefficient calculation according to the preset pixel spacing to obtain an initial splicing position interval;
and calculating two-dimensional correlation coefficients pixel by pixel in the initial splicing position interval to obtain a plurality of target splicing positions, comparing the two-dimensional correlation coefficients of the target splicing positions, and outputting the maximum two-dimensional correlation coefficient to determine the optimal splicing position.
7. Full-automatic human full-length X-ray image fuses splicing apparatus, its characterized in that includes:
The acquisition module is used for acquiring full-length X-ray images of a human body to be spliced, wherein the full-length X-ray images to be spliced are a plurality of target X-ray images under the same imaging visual angle;
The determining module is used for determining an overlapping area to be spliced between the adjacent target X-ray images;
The first calculation module is used for identifying the trunk images in the target X-ray images, calculating the maximum two-dimensional correlation coefficient value of the pixel gray value corresponding to the overlapping area between the adjacent trunk images, and determining the optimal splicing position of the trunk images;
the second calculation module is configured to identify a dual-lower-limb image in the target X-ray image, establish a stitching reference line for a gap between the dual-lower-limb image and divide the dual-lower-limb image into left and right lower-limb images according to the stitching reference line, and calculate optimal stitching positions of the left and right lower-limb images, respectively, and further includes:
dividing the adjacent target X-ray images according to thighs and calves according to the splicing joint between the splicing reference line and the adjacent double lower limb images;
comparing the pixel width of the left lower limb image and the pixel width of the right lower limb image in the double lower limb images, and selecting one side lower limb image with a large width;
According to the selected lower limb image, identifying a thigh image and a shank image corresponding to the lower limb image, and calculating a maximum two-dimensional correlation coefficient value of a pixel gray value corresponding to an overlapping area between the thigh image and the shank image to determine an optimal splicing position and a first translation distance;
Respectively calculating the maximum two-dimensional correlation coefficient value of the gray value of the pixel point corresponding to the overlapping area between the thigh image and the shank image on the left and right lower limb images to determine a corresponding second translation distance;
Splicing the left and right side images of the double lower limbs according to the optimal splicing position, the first translation distance and the second translation distance corresponding to the left and right side lower limb images;
And the fusion splicing module is used for automatically fusing and splicing the target X-ray images according to the optimal splicing position and corresponding human body structures, and balancing gray values of overlapping areas between the adjacent target X-ray images based on a fusion transition algorithm to obtain the full-length X-ray images of the human body after the fusion splicing.
8. A computer device, comprising:
A memory for storing a processing program;
the processor, when executing the processing program, realizes the full-automatic human body full-length X-ray image fusion splicing method according to any one of claims 1 to 6.
9. A readable storage medium, wherein a processing program is stored on the readable storage medium, and when the processing program is executed by a processor, the full-automatic human body full-length X-ray image fusion splicing method according to any one of claims 1 to 6 is realized.
CN202311201490.7A 2023-09-18 2023-09-18 Full-automatic human body full-length X-ray image fusion splicing method and device Active CN117252762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311201490.7A CN117252762B (en) 2023-09-18 2023-09-18 Full-automatic human body full-length X-ray image fusion splicing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311201490.7A CN117252762B (en) 2023-09-18 2023-09-18 Full-automatic human body full-length X-ray image fusion splicing method and device

Publications (2)

Publication Number Publication Date
CN117252762A CN117252762A (en) 2023-12-19
CN117252762B true CN117252762B (en) 2024-06-11

Family

ID=89132406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311201490.7A Active CN117252762B (en) 2023-09-18 2023-09-18 Full-automatic human body full-length X-ray image fusion splicing method and device

Country Status (1)

Country Link
CN (1) CN117252762B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118229522A (en) * 2024-02-29 2024-06-21 北京长远佳信息科技有限公司 Panoramic X-ray film generation method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101112315A (en) * 2007-08-24 2008-01-30 珠海友通科技有限公司 X-ray human body clairvoyance image automatic anastomosing and splicing method
CN107665486A (en) * 2017-09-30 2018-02-06 深圳绰曦互动科技有限公司 A kind of method for automatically split-jointing, device and terminal device applied to radioscopic image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6841147B2 (en) * 2017-04-25 2021-03-10 株式会社島津製作所 X-ray imaging device and X-ray image display method
CN111918001A (en) * 2019-05-10 2020-11-10 上海西门子医疗器械有限公司 X-ray imaging control method, X-ray imaging control apparatus, and storage medium
US20230169666A1 (en) * 2021-12-01 2023-06-01 GE Precision Healthcare LLC Methods and systems for image registration
CN114897703B (en) * 2022-06-08 2024-08-20 西安交通大学 Automatic splicing system and method for full-length X-ray film of orthopedics department, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101112315A (en) * 2007-08-24 2008-01-30 珠海友通科技有限公司 X-ray human body clairvoyance image automatic anastomosing and splicing method
CN107665486A (en) * 2017-09-30 2018-02-06 深圳绰曦互动科技有限公司 A kind of method for automatically split-jointing, device and terminal device applied to radioscopic image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
X光图像拼接方法的研究;加冯刚;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;20180131;正文第5-17页 *

Also Published As

Publication number Publication date
CN117252762A (en) 2023-12-19

Similar Documents

Publication Publication Date Title
US11972585B2 (en) Dense body marker estimation from camera data for patient positioning in medical imaging
DE60032475T2 (en) NAVIGATION GUIDANCE ON COMPUTER-BASED FLUOROSCOPIC IMAGING
JP6876065B2 (en) 3D visualization during surgery with reduced radiation
US7522701B2 (en) System and method for image composition using position sensors
US11257241B2 (en) System and method for component positioning by registering a 3D patient model to an intra-operative image
US8036441B2 (en) Method and apparatus for performing 2D to 3D registration
US9109998B2 (en) Method and system for stitching multiple images into a panoramic image
US20230301633A1 (en) Ultrasound Bone Registration With Learning-Based Segmentation And Sound Speed Calibration
US10748319B1 (en) Composite radiographic image that corrects effects of parallax distortion
JP5290501B2 (en) X-ray CT system
CN117252762B (en) Full-automatic human body full-length X-ray image fusion splicing method and device
Haque et al. Hierarchical model-based tracking of cervical vertebrae from dynamic biplane radiographs
CN114897703A (en) Automatic splicing system and method for orthopedic full-length X-ray films, computer equipment and storage medium
US20190117183A1 (en) Device for imaging an object
Ikeda et al. Novel 3-dimensional analysis to evaluate temporomandibular joint space and shape
Zhang et al. An automatic ICP-based 2D-3D registration method for a high-speed biplanar videoradiography imaging system
CN105678738A (en) Positioning method and device for datum point in medical image
Saadat et al. An efficient image registration method for 3D post-operative analysis of total knee arthroplasty
CN115880469B (en) Registration method of surface point cloud data and three-dimensional image
EP4120917B1 (en) Patient preparation for medical imaging
US20180342315A1 (en) Method for 3d imaging of mechanical assemblies transplanted into mammalian subjects
CN114066947B (en) Image registration method and image registration device
Al Durgham Photogrammetric Modelling for 3D Reconstruction from a Dual Fluoroscopic Imaging System
Pascal et al. Evaluation of Knee Implant Alignment using Radon Transformation.
JP2023122538A (en) X-ray imaging apparatus and imaging position correction method

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