Image processing method and system of dual-energy X-ray bone mineral density instrument
Through the image processing methods of dual-energy X-ray bone density meter, including light and dark field correction, data fitting and Gaussian smoothing filtering, the problem of image noise and artifact interference is solved, the accuracy and reliability of bone density measurement are achieved, and the accuracy of osteoporosis diagnosis is improved.
Patent Information
- Application Number
- CN202510854480.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-25
AI Technical Summary
The existing dual-energy X-ray bone density meter has projection area measurement errors, tissue background deduction errors, image noise and artifact interference in image processing, resulting in insufficient bone density measurement accuracy, affecting the accuracy of osteoporosis diagnosis and fracture risk assessment.
Light and dark field correction, aluminum sheets and glass were used to simulate bones and tissues, data fitting was performed, combined with Gaussian smoothing filtering, thresholding and corrosion operations, image segmentation and edge detection were used using the region growth algorithm and the Canny operator, the region of interest (ROI) was extracted, and the bone density value and bone mineral salt content were calculated.
Effectively correct detector inhomogeneity and noise, improve image quality, achieve accurate ROI segmentation and bone density measurement, provide reliable bone evaluation indicators, and provide a more accurate basis for the diagnosis and treatment of osteoporosis.
Smart Images

Figure CN120374465A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical imaging technology, and particularly to an image processing method and system for a dual-energy X-ray bone densitometer. Background Art
[0002] Dual-energy X-ray absorptiometry (DXA) is an important device widely used in the diagnosis of osteoporosis and the assessment of fracture risk. It measures the mineral content of bones by emitting X-ray beams of two different energies, and then calculates the bone mineral density (BMD). However, in the prior art, there are still some problems in the image processing of dual-energy X-ray bone densitometers, such as projection area measurement errors, tissue background subtraction errors, image noise, and artifact interference, which affect the accuracy and reliability of bone density measurement.
[0003] In the prior art, although there are some methods for correcting the non-uniformity of detectors and the intensity variation of X-ray tubes, these methods are often not precise enough to completely eliminate the influence of noise and artifacts. In addition, there are certain limitations in the prior art when extracting the region of interest (ROI) and calculating the bone density value. For example, the boundary extraction of the ROI is not accurate enough, resulting in inaccurate bone density values and bone mineral content calculations. These problems limit the application effect of dual-energy X-ray bone densitometers in clinical diagnosis.
[0004] In the prior art, although some methods attempt to improve image quality through image preprocessing, segmentation, and edge detection, these methods often lack systematicness and integrity. For example, existing image preprocessing methods may not be able to effectively remove noise, and existing image segmentation and edge detection methods may not be able to accurately extract the boundary of the ROI. In addition, there is a lack of precise correction and optimization methods in the prior art when calculating bone density values and bone mineral content, resulting in insufficient reliability of the measurement results.
[0005] Therefore, the present invention proposes an image processing method and system for a dual-energy X-ray bone densitometer, which solves the problems existing in the prior art by optimizing the image processing flow and improves the accuracy and reliability of bone density measurement. Summary of the Invention
[0006] The purpose of the present invention is to propose an image processing method and system for a dual-energy X-ray bone densitometer to solve the problems of projection area measurement errors, tissue background subtraction errors, image noise and artifact interference, and insufficient bone density measurement accuracy in the prior art.
[0007] To achieve the above purpose, the present invention adopts the following technical solutions: An image processing method for a dual-energy X-ray bone densitometer, comprising the following steps: Step S1, collect dual-energy X-ray images, including bright-field data and dark-field data, and perform bright-dark field correction on the original projection data; Step S2, based on the corrected projection data, use aluminum sheets to simulate bones and glass to simulate tissues, perform data fitting to obtain bone density values, and fit out the bone-aluminum conversion coefficient; Step S3, preprocess the image, including Gaussian smoothing filtering, threshold processing, and erosion operations; Step S4, segment the image using the region growing algorithm and perform edge detection using the Canny operator; Step S5, extract the region of interest ROI, and determine the boundary of the ROI by finding the coordinates that meet the preset threshold conditions within a preset proportional range in the vertical direction of the image; Step S6, calculate the area, bone density value BMD, and bone mineral salt content of the ROI.
[0008] Furthermore, in step S1, the following sub-steps are also included: S1-1, do not place any substance on the stage, expose the X-ray tube, and collect an empty data as the bright-field data, which is used to correct the non-uniformity of the detector and the intensity change of the X-ray tube; S1-2, do not place any substance on the stage, turn off the X-ray tube, and collect an empty data as the dark-field data, which is used to correct the electronic noise and environmental noise of the detector; S1-3, perform bright-dark field correction on the collected original projection data to obtain the corrected projection data. The correction formula is: ; Wherein, is the corrected projection data, is the original projection data, is the dark-field data, is the bright-field data.
[0009] Furthermore, in step S2, the following sub-steps are also included: S2-1, use aluminum sheets to simulate bones and glass to simulate tissues, based on the corrected projection data, collect images of aluminum sheets and glass with different thicknesses to obtain bone density values. The thickness range of the aluminum sheets is from 0.1 mm to 10 mm, with a step size of 0.1 mm, and the thickness range of the glass is from 0.1 mm to 5 mm, with a step size of 0.1 mm; S2-2, according to the relationship between the aluminum sheet thickness and the bone density value, use the least squares method to fit out the bone-aluminum conversion coefficient; S2-3. Select a rectangular area of a fixed size in the acquired image, calculate the average value of all pixel values within the rectangular area, use it as the mean value of the ROI of the corrected projection data, and record the mean value of the ROI and the aluminum sheet thickness. The rectangular area covers the central part of the aluminum sheet or the glass. S2-4. Multiply the aluminum sheet thickness by the bone-aluminum conversion coefficient to obtain the corresponding bone density value, and perform polynomial fitting on the relationship between the density value and the high-low energy values to obtain the fitting parameters. The polynomial fitting formula is: ; where y is the bone density value, x is the high-low energy value, , , ,..., are the fitting parameters, and n is the fitting order.
[0010] Further, in step S3, the following sub-steps are also included: S3-1. Perform Gaussian smoothing filtering on the high-energy image, generate a Gaussian kernel of size 3x3, set the sigma value of the Gaussian kernel to 1.0, traverse each pixel point in the image, perform convolution operation using the Gaussian kernel, and calculate the weighted average value within the pixel point and its neighborhood to smooth the image. S3-2. Perform threshold processing on the image, calculate the maximum value of all pixel values in the image, set the threshold to 4% of the image maximum value, traverse each pixel point in the image. If the pixel value of the pixel point is less than the threshold, set the pixel value of the pixel point to 0; otherwise, the pixel value of the pixel point remains unchanged. S3-3. Perform erosion operation on the image, set a 3x3 all-1 matrix as the structuring element, traverse each pixel point in the image, calculate the minimum value within its neighborhood for each pixel point. If the pixel point is less than the minimum value, set the pixel point to 0; otherwise, the pixel point remains unchanged.
[0011] Further, in step S4, the following sub-steps are also included: S4-1. In the 40% to 50% area in the vertical direction of the image, find the second peak-valley of each row, and take the average value as the seed point. S4-2. Set the initial threshold to 40, starting from the seed point, check the gray value difference of adjacent pixels. If the difference is less than or equal to the initial threshold, add the pixel to the area where the seed point is located and mark it as visited. S4-3. Take the newly added pixel as the new seed point, continue to check its adjacent pixels, and recursively perform region merging until no new pixels meet the conditions. S4-4. Perform dilation operation on the segmented image to fill the small holes in the image and eliminate the gaps between the targets. S4-5. Use the Canny operator to perform edge detection on the processed image. Take 8% of the maximum value of each row as the threshold, and find the leftmost and rightmost points greater than the threshold as the outermost contour. S4-6. Use the gradient operator to calculate the gradient magnitude and direction of the image, and apply non-maximum suppression to retain the edge points of local maxima and remove other non-edge points. The gradient operator includes the Sobel operator, Prewitt operator, and Roberts operator. S4-7. Use double-threshold detection. Set a high threshold and a low threshold. Starting from the strong edge points, trace and connect the edges along the edge direction to form the internal edge contour. The high threshold is used to determine the strong edge points, and the low threshold is used to connect the edges. S4-8. Merge the outermost contour and the internal edge contour to obtain the final contour.
[0012] Furthermore, in step S5, the following sub-steps are also included: S5-1. In the range of 5% - 20% of the vertical direction of the image, find the coordinates greater than 5% of the maximum value of each row and store them in order. S5-2. For the coordinates stored in order for each row, calculate the difference between adjacent coordinates. If the difference is greater than 5, record the current row as the upper boundary of the ROI. S5-3. In the range of 2% - 40% of the vertical direction of the image, find the coordinates greater than 10% of the maximum value of each row and store them in order. S5-4. For the coordinates stored in order for each row, calculate the difference between adjacent coordinates, record the length of consecutive differences of 1, save the length greater than 5% of the horizontal size of the image, and record the leftmost value of the first length and the rightmost value of the second length. S5-5. For each row, calculate the difference between the rightmost value and the leftmost value, find the row with the narrowest difference among all rows, and record the current row as the lower boundary of the ROI. S5-6. Calculate the middle position between the upper boundary and the lower boundary, determine the middle horizontal line, and determine the horizontal lines at a fixed distance upward and downward from the middle horizontal line as the upper and lower auxiliary boundaries of the ROI. S5-7. When calculating the lower boundary, record the row with the smallest difference between the left and right values among all rows, take the average of the left and right values as the vertical position, and determine the vertical boundary from the lower boundary to the bottom of the image. S5-8. Take the positions 5% from the left and right of the image respectively as the left and right boundaries of the ROI.
[0013] Furthermore, in step S6, the following sub-steps are also included: S6-1. Combine the physical length of the image with the number of pixels to calculate the unit pixel size. Multiply the number of pixels in the ROI by the unit pixel size to obtain the area of the ROI. S6-2. Calculate the average value of the pixel values within the ROI area. Take a small square area around the ROI as the background area and calculate the average value of the background area. Subtract the average value of the background area from the average value of the ROI to obtain the bone mineral density value BMD of the corresponding area. S6-3. Multiply the area of the obtained ROI by the bone mineral density value BMD of the corresponding area, which is the bone mineral content value.
[0014] Furthermore, an image processing system for a dual-energy X-ray bone densitometer includes: An image acquisition module for acquiring dual-energy X-ray images, including bright-field data and dark-field data. A data correction module for performing bright and dark field correction on the original projection data. A data fitting module for fitting the relationship between the bone mineral density value and the high and low energy values. By acquiring images of aluminum sheets and glass with different thicknesses, obtain the bone mineral density value and fit out the bone-aluminum conversion coefficient. An image preprocessing module for preprocessing the image, including Gaussian smoothing filtering, threshold processing, and erosion operations. An image segmentation module for performing image segmentation using the region growing algorithm to extract the target area. An edge detection module for performing edge detection using the Canny operator to obtain the contour of the target area. An ROI extraction module for extracting the region of interest ROI. Determine the boundary of the ROI by searching for coordinates that meet the preset threshold conditions within a preset proportional range in the vertical direction of the image. An index calculation module for calculating the area of the ROI, the bone mineral density value BMD, and the bone mineral salt content.
[0015] The beneficial effects brought by the technical solution provided by the present invention at least include: The present invention provides an image acquisition module and a data correction module. By acquiring dual-energy X-ray images and performing bright and dark field correction, it can effectively correct the non-uniformity of the detector, the intensity change of the X-ray tube, as well as the electronic noise and environmental noise of the detector, and improve the quality of the image.
[0016] The present invention provides a data fitting module and an image preprocessing module. By performing data fitting to obtain the bone mineral density value and fitting out the bone-aluminum conversion coefficient, and preprocessing the image, it can effectively reduce the noise and artifacts in the image and improve the quality of the image.
[0017] The present invention is provided with an image segmentation module and an edge detection module. By using the region growing algorithm to segment the image and the Canny operator for edge detection, high-quality image segmentation and edge detection can be achieved, accurately extracting the contour of the target region and providing accurate boundary information.
[0018] The present invention is provided with an ROI extraction module and an index calculation module. By searching for coordinates that meet the preset threshold conditions within a preset proportional range in the vertical direction of the image, the boundaries of the ROI are determined, and the area, bone mineral density value (BMD), and bone mineral content of the ROI are calculated, which can provide accurate bone quality evaluation indicators and provide a more accurate basis for the diagnosis and treatment of osteoporosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 is the flowchart of the method provided by the embodiment of the present invention; Figure 2 is the system architecture diagram provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in combination with the drawings and preferred embodiments, details the specific implementation manner, structure, features, and effects of an image processing method and system for a dual-energy X-ray bone densitometer proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0023] The following embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention.
[0024] The following specifically describes the specific solutions of an image processing method and system for a dual-energy X-ray bone densitometer provided by the present invention in combination with the drawings.
[0025] Please refer to Figure 1, which shows a method flow chart of an image processing method for a dual-energy X-ray bone densitometer provided by an embodiment of the present invention. The method includes the following steps: Step S1, collect dual-energy X-ray images, including bright-field data and dark-field data, and perform bright-dark field correction on the original projection data; Among them, in step S1, the following sub-steps are further included: S1-1, without placing any substance on the stage, the X-ray tube is exposed, and an empty data is collected as the bright-field data, which is used to correct the non-uniformity of the detector and the intensity change of the X-ray tube; S1-2, without placing any substance on the stage, the X-ray tube is turned off, and an empty data is collected as the dark-field data, which is used to correct the electronic noise and environmental noise of the detector; S1-3, perform bright-dark field correction on the collected original projection data to obtain the corrected projection data. The correction formula is: ; Among them, is the corrected projection data, is the original projection data, is the dark-field data, is the bright-field data.
[0026] It should be noted that the bright-field data refers to the data collected when the X-ray tube is normally exposed without placing any object to be detected, which reflects the response characteristics of the detector in the normal working state, including the non-uniformity of the detector and the intensity change of the X-ray tube.
[0027] The non-uniformity of the detector means that the responses of the detector at different positions are inconsistent, which will cause image non-uniformity and affect the accuracy of measurement results. By collecting bright-field data, the non-uniformity of the detector can be quantified and corrected.
[0028] The intensity of the X-ray tube may change over time, resulting in image non-uniformity. The bright-field data can reflect the intensity change of the X-ray tube, and this effect can be eliminated through correction.
[0029] The dark-field data refers to the data collected when no object to be detected is placed and the X-ray tube is turned off, which reflects the background noise level of the detector when there is no X-ray irradiation.
[0030] The electronic noise of the detector refers to the internal electronic noise of the detector when there is no X-ray irradiation. The noise will interfere with the background of the image and affect the image quality. By collecting dark-field data, the electronic noise of the detector can be quantified and corrected.
[0031] Environmental noise includes background radiation and electromagnetic interference, which can interfere with the background of the image and affect the image quality. By collecting dark field data, the environmental noise can be quantified and then corrected.
[0032] Bright and dark field correction refers to correcting the collected original projection data to eliminate the influence of detector non-uniformity, tube intensity variation, electronic noise, and environmental noise, making the image more uniform, reducing the interference of noise and artifacts, improving the image quality, and thus enhancing the accuracy and reliability of bone density measurement.
[0033] Step S2: Based on the corrected projection data, use aluminum sheets to simulate bones and glass to simulate tissues, perform data fitting to obtain bone density values, and fit out the bone-aluminum conversion coefficient. Among them, in step S2, the following sub-steps are also included: S2-1: Use aluminum sheets to simulate bones and glass to simulate tissues. Based on the corrected projection data, collect images of aluminum sheets and glass with different thicknesses to obtain bone density values. The thickness range of the aluminum sheets is from 0.1 mm to 10 mm with a step of 0.1 mm, and the thickness range of the glass is from 0.1 mm to 5 mm with a step of 0.1 mm. S2-2: According to the relationship between the aluminum sheet thickness and the bone density value, use the least squares method to fit out the bone-aluminum conversion coefficient. S2-3: Select a rectangular area with a fixed size in the collected image, calculate the average value of all pixel values within the rectangular area as the mean of the ROI of the corrected projection data, and record the mean of the ROI and the aluminum sheet thickness. The rectangular area covers the central part of the aluminum sheet or glass. S2-4: Multiply the aluminum sheet thickness by the bone-aluminum conversion coefficient to obtain the corresponding bone density value, and perform polynomial fitting on the relationship between the density value and the high and low energy values to obtain the fitting parameters. The polynomial fitting formula is: ; where y is the bone density value, x is the high and low energy value, , , ,..., are the fitting parameters, and n is the fitting order.
[0034] It should be noted that using aluminum sheets to simulate bones and glass to simulate tissues: In a dual-energy X-ray bone densitometer, bones and soft tissues have different X-ray absorption characteristics. The X-ray absorption characteristics of aluminum sheets are similar to those of bones, while the X-ray absorption characteristics of glass are similar to those of soft tissues. By using aluminum sheets and glass, the X-ray absorption characteristics of bones and soft tissues can be simulated, thus establishing the relationship between image data and bone density values.
[0035] Collect images of aluminum sheets and glass with different thicknesses: By collecting images of aluminum sheets and glass with different thicknesses, bone density values at different thicknesses can be obtained. These data are used to establish the relationship between thickness and bone density value, so that the bone density value of the actual bone can be predicted through the image data.
[0036] The thickness range of the aluminum sheet is selected from 0.1 mm to 10 mm, and the thickness range of the glass is selected from 0.1 mm to 5 mm to cover the thickness ranges of the actual bone and soft tissue, and these ranges can ensure the applicability of the model.
[0037] The least squares method is a mathematical optimization technique used to find the best function match for a set of data. By minimizing the sum of the squares of the errors, the best fit between the data and the function is found. In the present invention, the least squares method is used to fit the linear relationship between the thickness of the aluminum sheet and the bone density value. Through the least squares fitting, the linear relationship between the thickness of the aluminum sheet and the bone density value can be established, so that the bone density value can be predicted through the thickness of the aluminum sheet.
[0038] The bone-aluminum conversion coefficient is a proportionality factor used to convert the thickness of the aluminum sheet into the bone density value. Through the linear relationship obtained by the least squares fitting, the bone-aluminum conversion coefficient can be calculated.
[0039] Calculate the mean value of the ROI: Provide a representative image feature value for subsequent bone density value calculation. This mean value reflects the average response of the image data at the preset proportional thickness and can be used as an important reference for the corrected projection data.
[0040] Select a rectangular area: In the collected image, select a rectangular area with a fixed size. This area should cover the central part of the aluminum sheet or glass to ensure that the collected data is representative. The size of the rectangular area can be adjusted according to actual needs, but it should be large enough to contain enough pixel points to reduce the influence of random noise.
[0041] Record the calculated mean value of the ROI and the corresponding thickness of the aluminum sheet. These data will be used for subsequent bone density value calculation and fitting process.
[0042] Polynomial fitting: Through polynomial fitting, establish the non-linear relationship between the bone density value and the high and low energy values, so that the bone density value can be predicted through the high and low energy values. This fitting method can improve the accuracy and reliability of bone density measurement.
[0043] Step S3, preprocess the image, including Gaussian smoothing filtering, threshold processing and erosion operation; Among them, in step S3, the following sub-steps are also included: S3-1. Perform Gaussian smoothing filtering on the high-energy image. Generate a Gaussian kernel of size 3x3, set the sigma value of the Gaussian kernel to 1.0, traverse each pixel point in the image, perform convolution operation using the Gaussian kernel, and calculate the weighted average value within the pixel point and its neighborhood to smooth the image. S3-2. Perform threshold processing on the image. Calculate the maximum value of all pixel values in the image, set the threshold to 4% of the image maximum value. Traverse each pixel point in the image. If the pixel value of the pixel point is less than the threshold, set the pixel value of this pixel point to 0; otherwise, the pixel value of this pixel point remains unchanged. S3-3. Perform erosion operation on the image. Set a 3x3 all-ones matrix as the structuring element. Traverse each pixel point in the image. For each pixel point, calculate the minimum value within its neighborhood. If the pixel point is less than the minimum value, set this pixel point to 0; otherwise, this pixel point remains unchanged.
[0044] It should be noted that Gaussian smoothing filtering is an image smoothing technique based on the Gaussian function, used to reduce noise in the image. The Gaussian function is widely used in image processing for smoothing operations because it can effectively reduce noise while retaining the important features of the image.
[0045] The Gaussian kernel is the discretized form of the Gaussian function, used to achieve smoothing operations in image processing. The shape of the Gaussian kernel is a two-dimensional Gaussian distribution.
[0046] Generate a Gaussian kernel of size 3x3: The 3x3 Gaussian kernel is computationally efficient. It can reduce the computational amount while maintaining the smoothing effect. The 3x3 Gaussian kernel can smooth the local area of the image and is suitable for processing small-scale noise.
[0047] The sigma value of the Gaussian kernel is the standard deviation of the Gaussian kernel, which determines the width and smoothness of the Gaussian kernel. A larger sigma value will result in a more extensive smoothing effect, while a smaller sigma value only slightly smooths the local area. In the present invention, sigma = 1.0 is set to achieve a moderate smoothing effect, reducing noise while retaining the important features of the image.
[0048] Threshold processing is an image segmentation technique. By setting a threshold, the pixels in the image are divided into foreground and background parts. The purpose of threshold processing is to reduce the interference of the background area and highlight the target area.
[0049] Setting the threshold to 4% of the image maximum value can effectively suppress the noise in the background area and highlight the target area. This threshold setting method can adapt to the brightness distribution of different images and ensure the robustness of threshold processing.
[0050] The erosion operation is a morphological image processing technique used to remove small noise in an image and refine the target area. The erosion operation scans the image with a structuring element, reducing the boundaries of the target area, thereby removing small connected parts and isolated noise points.
[0051] Set a 3x3 all-ones matrix as the structuring element: The 3x3 all-ones matrix structuring element is simple and computationally efficient, suitable for dealing with small-scale noise. This structuring element can operate on local areas of the image, suitable for refining the boundaries of the target area, removing small connected parts and isolated noise points.
[0052] Step S4, segment the image using the region growing algorithm and perform edge detection using the Canny operator; Among them, in step S4, the following sub-steps are also included: S4-1, within the 40% to 50% area in the vertical direction of the image, find the second peak-valley of each row and take the average as the seed point; S4-2, set the initial threshold to 40, starting from the seed point, check the gray value difference of adjacent pixels. If the difference is less than or equal to the initial threshold, add the pixel to the area where the seed point is located and mark it as visited; S4-3, take the newly added pixel as a new seed point, continue to check its adjacent pixels, and recursively perform region merging until no new pixels meet the conditions; S4-4, perform a dilation operation on the segmented image to fill small holes in the image and eliminate gaps between targets; S4-5, perform edge detection on the processed image using the Canny operator, take 8% of the maximum value of each row as the threshold, and find the leftmost and rightmost points greater than the threshold as the outermost contour; S4-6, calculate the gradient magnitude and direction of the image using the gradient operator and apply non-maximum suppression to retain edge points of local maxima and remove other non-edge points. The gradient operators include the Sobel operator, Prewitt operator, and Roberts operator; S4-7, use double-threshold detection, set a high threshold and a low threshold, start from strong edge points, trace and connect edges along the edge direction to form an internal edge contour. The high threshold is used to determine strong edge points, and the low threshold is used to connect edges; S4-8, merge the outermost contour and the internal edge contour to obtain the final contour.
[0053] It should be noted that the region growing algorithm is an image segmentation method based on seed points. Starting from one or more seed points, pixels in the neighborhood that meet the conditions are gradually added to the current region until no new pixels meet the conditions.
[0054] Select the position of the seed point: In the 40% to 50% area in the vertical direction of the image, it usually contains the central part of the target area. The features of these areas are more obvious and are suitable as the starting positions of the seed points.
[0055] The second peak valley: The peak valley represents the local minimum or maximum of the image grayscale value, which is located at the boundary or inside of the target area and is suitable as a seed point.
[0056] Average value: Taking the average value of multiple peak valleys can reduce the influence of random noise and ensure that the position of the seed point is representative.
[0057] The initial threshold is the threshold used in the region growing algorithm to determine whether neighboring pixels belong to the same region. If the grayscale value difference between the neighboring pixels and the seed point is less than or equal to the initial threshold, then the neighboring pixels are added to the current region. An initial threshold of 40 is a commonly used threshold, which can effectively control the range of region growth, avoid overgrowth or undergrowth, and a threshold of 40 can adapt to the grayscale distribution of most images, ensuring the accuracy and reliability of region growth.
[0058] The grayscale value difference refers to the difference between the grayscale values of two pixel points. In the region growing algorithm, the grayscale value difference is used to determine whether neighboring pixels belong to the same region.
[0059] Recursively performing region merging is a key step in the region growing algorithm, which is used to gradually expand the target area until it covers the entire target area. Recursive region merging realizes the gradual expansion of the region by continuously checking the neighboring pixels of the newly added pixels and adding the neighboring pixels that meet the conditions to the current region.
[0060] The dilation operation is a morphological image processing technique used to expand the target area in the image, fill small holes, and eliminate the gaps between targets.
[0061] The code for segmenting an image using the region growing algorithm is as follows: import numpy as np import cv2 def region_growing_segmentation(image, seed_point, threshold): """ Implement image segmentation using the region growing algorithm :param image: Input image :param seed_point: Coordinates of the seed point (x, y) :param threshold: Initial threshold :return: Binary image after segmentation """ # Get the size of the image rows, cols = image.shape # Create a binary image with the same size as the input image, initialized to 0 segmented_image = np.zeros((rows, cols), dtype=np.uint8) # Create an access flag matrix, initialized to False visited = np.zeros((rows, cols), dtype=np.bool_) # Define the seed point queue queue = [seed_point] while queue: # Take a point from the queue x, y = queue.pop(0) # If the point has been visited, skip if visited[y, x]: continue # Mark the point as visited visited[y, x] = True # Get the grayscale value of the current point current_value = image[y, x] # Check the 8 neighbors of the current point for dx, dy in [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1),(1, -1), (1, 0), (1, 1)]: nx, ny = x + dx, y + dy # Check if the neighbor point is within the image range if 0<= nx<cols and 0<= ny<rows: # Get the grayscale value of the neighbor point neighbor_value = image[ny, nx] # Calculate the grayscale value difference diff = abs(int(neighbor_value) - int(current_value)) # If the difference is less than or equal to the threshold, add the neighboring point to the current region if diff<= threshold: segmented_image[ny, nx] = 255 # Add the neighboring point to the queue queue.append((nx, ny)) return segmented_image # Example usage # Read the image image = cv2.imread('your_image_path.jpg', cv2.IMREAD_GRAYSCALE) # Select the seed point seed_point = (100, 100) # Example seed point # Set the initial threshold threshold = 40 # Perform region growing segmentation segmented_image = region_growing_segmentation(image, seed_point,threshold) # Display the result cv2.imshow('Segmented Image', segmented_image) cv2.waitKey(0) cv2.destroyAllWindows() Canny edge detection is a classic edge detection algorithm that extracts edge information in an image by calculating the gradient magnitude and direction of the image and applying non-maximum suppression and double-threshold detection.
[0062] 8% of the maximum value of each row is used as the threshold: It can adapt to the brightness distribution of different images, ensuring the robustness of threshold processing. A lower threshold can effectively suppress noise in the background area, highlight the target area, and improve the contrast of the image; 8% is a threshold verified through experiments that can better balance background suppression and target retention.
[0063] The gradient operator is an operator used to calculate the gradient magnitude and direction of an image and is commonly used in edge detection.
[0064] The Sobel operator is a commonly used method for calculating gradients and is used to calculate the horizontal and vertical gradients of an image.
[0065] The Prewitt operator is a simple method for calculating gradients and is used to calculate the horizontal and vertical gradients of an image.
[0066] The Roberts operator is a simple method for calculating gradients and is used to calculate the diagonal gradients of an image.
[0067] Non-maximum suppression is an edge detection technique used to remove non-edge points and retain edge points with local maxima. By non-maximum suppression, noise around the edges can be removed, making the edges clearer.
[0068] Double-threshold detection is an edge detection technique that distinguishes strong edge points from weak edge points by setting a high threshold and a low threshold.
[0069] The high threshold is used to determine strong edge points, which are usually significant parts of the edges. The high threshold can ensure that the significant parts of the edges are correctly detected, improving the reliability of edge detection.
[0070] The low threshold is used to connect edges, which are usually the weaker parts of the edges. By connecting weak edge points, the continuity of the edges can be ensured, improving the integrity of edge detection.
[0071] The code for edge detection using the Canny operator is as follows: import cv2 import numpy as np def canny_edge_detection(image, low_threshold, high_threshold): """ Edge detection using the Canny operator :param image: Input image :param low_threshold: Low threshold :param high_threshold: High threshold :return: Image after edge detection """ # Edge detection using the Canny operator edges = cv2.Canny(image, low_threshold, high_threshold) return edges # Example usage # Read the image image = cv2.imread('your_image_path.jpg', cv2.IMREAD_GRAYSCALE) # Set the low and high thresholds low_threshold = 50 high_threshold = 150 # Perform Canny edge detection edges = canny_edge_detection(image, low_threshold, high_threshold) # Display the result cv2.imshow('Edges', edges) cv2.waitKey(0) cv2.destroyAllWindows() Step S5, extract the region of interest ROI. By finding the coordinates that meet the preset threshold conditions within a preset proportional range in the vertical direction of the image, determine the boundaries of the ROI; Among them, in step S5, the following sub-steps are also included: S5-1, within the range of 5% - 20% in the vertical direction of the image, find the coordinates in each row that are greater than 5% of the maximum value of that row, and store them in order; S5-2, for the coordinates stored in order in each row, calculate the difference between adjacent coordinates. If the difference is greater than 5, record the current row as the upper boundary of the ROI; S5-3, within the range of 2% - 40% in the vertical direction of the image, find the coordinates in each row that are greater than 10% of the maximum value of that row, and store them in order; S5-4, for the coordinates stored in order in each row, calculate the difference between adjacent coordinates, record the length of consecutive differences of 1, save the length greater than 5% of the horizontal size of the image, and record the leftmost value of the first length and the rightmost value of the second length; S5-5, for each row, calculate the difference between the rightmost value and the leftmost value, find the row with the narrowest difference among all rows, and record the current row as the lower boundary of the ROI; S5-6. Calculate the intermediate position between the upper boundary and the lower boundary, determine the intermediate horizontal line, and determine the horizontal lines at a fixed distance upward and downward from the intermediate horizontal line as the upper and lower auxiliary boundaries of the ROI. S5-7. When calculating the lower boundary, record the row with the smallest difference between the left and right values among all rows, take the average of the left and right values as the vertical position, and determine the vertical boundary from the lower boundary to the bottom of the image. S5-8. Take the positions 5% away from the left and right sides of the image respectively as the left and right boundaries of the ROI.
[0072] It should be noted that to determine the upper boundary of the ROI: By searching for the coordinates that meet the threshold conditions within the preset proportional vertical range of the image, the upper boundary of the ROI can be determined. This range usually contains the top features of the target area and is suitable as a reference for the upper boundary.
[0073] The range within 5% - 20% of the vertical direction of the image usually contains the top features of the target area and is suitable as a reference for the upper boundary. By selecting a relatively wide range, it can ensure that the upper boundary can be accurately found even when there is noise in the image or the position of the target area is deviated.
[0074] The difference between adjacent coordinates: By calculating the difference between adjacent coordinates, the change of coordinates can be detected, thereby determining the position of the boundary.
[0075] A difference greater than 5 indicates a significant coordinate change in this row, which is a feature of the boundary. The current row can be recorded as the upper boundary of the ROI to ensure the accuracy of the boundary position.
[0076] To determine the lower boundary of the ROI: By searching for the coordinates that meet the threshold conditions within the preset proportional vertical range of the image, the lower boundary of the ROI can be determined. This range usually contains the bottom features of the target area and is suitable as a reference for the lower boundary.
[0077] The range within 2% - 40% of the vertical direction of the image usually contains the bottom features of the target area and is suitable as a reference for the lower boundary. By selecting a relatively wide range, it can ensure that the lower boundary can be accurately found even when there is noise in the image or the position of the target area is deviated.
[0078] By recording the length of consecutive differences of 1, continuous coordinate regions can be detected. These regions are usually part of the target area. Saving the length greater than 5% of the horizontal size of the image can filter out significant continuous regions and exclude small noise regions.
[0079] By recording the leftmost value of the first length and the rightmost value of the second length, the left and right boundaries of the target area can be determined, ensuring the integrity of the boundaries of the target area and improving the accuracy of ROI extraction.
[0080] By finding the row with the narrowest difference among all rows, the narrowest part of the target region can be determined, which is a feature of the lower boundary. The narrowest difference usually represents the bottom feature of the target region and is suitable as a reference for the lower boundary. By selecting the narrowest difference, the accuracy of the lower boundary can be ensured.
[0081] By determining the middle horizontal line and the upper and lower auxiliary boundaries, the boundary definition of the ROI can be optimized and the accuracy of segmentation can be improved.
[0082] The middle horizontal line is the middle position between the upper and lower boundaries and is used to determine the central position of the ROI.
[0083] Taking the positions at 5% from the left and right of the image as the left and right boundaries can adapt to the widths of different images and ensure the accuracy of the boundary positions. By taking fixed proportion positions, the boundaries of the target region can be ensured to be complete and the accuracy of ROI extraction can be improved.
[0084] The Python code for extracting the region of interest (ROI) is as follows: import numpy as np import cv2 def extract_roi(image): """ Extract the region of interest (ROI) :param image: Input image :return: Extracted ROI boundaries """ rows, cols = image.shape roi_boundaries = {} # S5-1: Determine the upper boundary of the ROI upper_coords = [] for row in range(int(rows * 0.05), int(rows * 0.20)): row_max = np.max(image[row, :]) threshold = 0.05 * row_max coords = np.where(image[row, :]>threshold)[0] if len(coords)>0: upper_coords.append(coords) if upper_coords: upper_diffs = np.diff(upper_coords[0]) if np.any(upper_diffs>5): roi_boundaries['upper'] = row # S5-2: Record the upper boundary if 'upper' not in roi_boundaries: roi_boundaries['upper'] = int(rows * 0.05) # S5-3: Determine the lower boundary of the ROI lower_coords = [] for row in range(int(rows * 0.02), int(rows * 0.40)): row_max = np.max(image[row, :]) threshold = 0.10 * row_max coords = np.where(image[row, :]>threshold)[0] if len(coords)>0: lower_coords.append(coords) if lower_coords: lower_diffs = np.diff(lower_coords[0]) lengths = np.where(lower_diffs == 1)[0] if len(lengths)>0: length = lengths[-1] - lengths[0]+ 1 if length>0.05 * cols: roi_boundaries['lower'] = row # S5-4: Record the lower boundary if 'lower' not in roi_boundaries: roi_boundaries['lower'] = int(rows * 0.40) # S5-5: Determine the lower boundary of the ROI min_width = float('inf') for row in range(int(rows * 0.02), int(rows * 0.40)): row_max = np.max(image[row, :]) threshold = 0.10 * row_max coords = np.where(image[row, :]>threshold)[0] if len(coords)>0: width = np.max(coords) - np.min(coords) if width<min_width: min_width = width roi_boundaries['lower'] = row # S5-6: Determine the upper and lower auxiliary boundaries of the ROI mid_row = (roi_boundaries['upper'] + roi_boundaries['lower']) / / 2 roi_boundaries['upper_aux'] = max(roi_boundaries['upper']- 10, 0) roi_boundaries['lower_aux'] = min(roi_boundaries['lower']+ 10,rows - 1) # S5-7: Determine the vertical boundaries of the ROI min_diff = float('inf') for row in range(roi_boundaries['lower'], rows): row_max = np.max(image[row, :]) threshold = 0.10 * row_max coords = np.where(image[row, :]>threshold)[0] if len(coords)>0: diff = np.max(coords) - np.min(coords) if diff<min_diff: min_diff = diff roi_boundaries['vertical'] = (np.min(coords) + np.max(coords)) / / 2 # S5-8: Determine the left and right boundaries of the ROI roi_boundaries['left'] = int(cols * 0.05) roi_boundaries['right'] = int(cols * 0.95) return roi_boundaries # Example usage # Read the image image = cv2.imread('your_image_path.jpg', cv2.IMREAD_GRAYSCALE) # Extract the ROI roi_boundaries = extract_roi(image) print("ROI Boundaries:", roi_boundaries) Step S6, calculate the area of the ROI, the bone mineral density value BMD, and the bone mineral content; Among them, in step S6, the following sub-steps are also included: S6-1, Combine the physical length of the image with the number of pixels to calculate the size of a single pixel. Multiply the number of pixels in the ROI by the size of a single pixel to obtain the area of the ROI; S6-2, Calculate the average value of the pixel values within the ROI area, and take a small square area around the ROI as the background area. Calculate the average value of the background area. Subtract the average value of the background area from the average value of the ROI to obtain the bone mineral density value BMD of the corresponding area; S6-3, Multiply the area of the obtained ROI by the bone mineral density value BMD of the corresponding area, which is the bone mineral content value.
[0085] It should be noted that in a dual-energy X-ray bone densitometer (DXA), calculating the area of the region of interest (ROI), the bone mineral density value (BMD), and the bone mineral content are key steps. These indicators provide important quantitative information for the diagnosis and treatment of osteoporosis. By accurately calculating these indicators, the health status of the bones can be evaluated, providing support for clinical decision-making.
[0086] Calculating the area of the ROI: By calculating the size of a single pixel, the number of pixels is converted into an actual physical area, thereby obtaining the area of the ROI.
[0087] Calculating the bone mineral density value BMD: By calculating the average pixel value within the ROI region and subtracting the average value of the background region, the corrected bone mineral density value BMD is obtained.
[0088] Calculating the bone mineral content: By multiplying the area of the ROI by the bone mineral density value BMD, the bone mineral content is obtained, providing a quantitative index for bone mass assessment.
[0089] Please refer to Figure 2 , which shows the system architecture diagram of an image processing system for a dual-energy X-ray bone densitometer provided by an embodiment of the present invention, including: An image acquisition module, used to acquire dual-energy X-ray images, including bright-field data and dark-field data; A data correction module, used to perform bright and dark field corrections on the original projection data; A data fitting module, used to fit the relationship between the bone mineral density value and the high and low energy values. By acquiring images of aluminum sheets and glass with different thicknesses, the bone mineral density values are obtained, and the bone-aluminum conversion coefficient is fitted; An image preprocessing module, used to preprocess the image, including Gaussian smoothing filtering, threshold processing, and erosion operations; An image segmentation module, which uses a region growing algorithm for image segmentation to extract the target region; An edge detection module, which uses the Canny operator for edge detection to obtain the contour of the target region; An ROI extraction module, used to extract the region of interest ROI. By searching for coordinates that meet the preset threshold conditions within a preset proportional range in the vertical direction of the image, the boundary of the ROI is determined; An index calculation module, used to calculate the area of the ROI, the bone mineral density value BMD, and the bone mineral content.
[0090] It should be noted that the image acquisition module provides comprehensive data support for subsequent image correction by simultaneously acquiring bright-field and dark-field data. This dual-data acquisition method can more accurately correct the non-uniformity of the detector, the intensity change of the X-ray tube, as well as the electronic noise and environmental noise of the detector, thereby significantly improving the image quality.
[0091] The bright and dark field correction formula adopted by the data correction module can effectively correct various errors in the image, ensuring the uniformity and accuracy of the image. This correction method performs excellently when processing dual-energy X-ray images, especially in reducing noise and artifacts.
[0092] The data fitting module collects images of aluminum sheets and glass with different thicknesses and fits the relationship between bone density values and high and low energy values. This method can more accurately simulate the characteristics of bones and tissues, thereby improving the accuracy of bone density measurement. The use of polynomial fitting further improves the accuracy and reliability of the fitting.
[0093] The image preprocessing module combines Gaussian smoothing filtering, threshold processing, and erosion operations, which can effectively reduce noise and artifacts in the image while retaining important image features. This comprehensive preprocessing method performs excellently in improving image quality and provides a solid foundation for subsequent image segmentation and edge detection.
[0094] The image segmentation module uses the region growing algorithm for image segmentation. This method can dynamically adjust the segmentation process according to the local features of the image, thereby more accurately extracting the target region. Compared with the traditional fixed threshold segmentation method, the region growing algorithm has higher adaptability and accuracy when processing complex images.
[0095] The edge detection module uses the Canny operator for edge detection. This method can accurately depict the boundary of the target region and effectively distinguish strong edge points and weak edge points through double threshold detection. This edge detection method performs excellently when dealing with noise and complex backgrounds and can provide clear and accurate edge information.
[0096] The ROI extraction module can accurately determine the boundary of the ROI by finding coordinates that meet the preset threshold conditions within a preset proportional range in the vertical direction of the image. This method not only considers the local features of the image but also ensures the accuracy and reliability of ROI extraction through a multi-step boundary determination process.
[0097] The index calculation module provides comprehensive bone quality assessment indicators by calculating the area of the ROI, bone density value BMD, and bone mineral salt content. These indicators can not only quantify the health status of bones but also provide important diagnostic information for clinicians.
[0098] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An image processing method for a dual-energy X-ray bone densitometer, characterized in that, The method includes: Step S1, acquiring dual-energy X-ray images, including bright-field data and dark-field data, and performing bright and dark field correction on the original projection data; Step S2, based on the corrected projection data, using aluminum sheets to simulate bones and glass to simulate tissues, performing data fitting to obtain bone density values, and fitting out the bone-aluminum conversion coefficient; Step S3, preprocessing the image, including Gaussian smoothing filtering, threshold processing, and erosion operation; Step S4, segmenting the image using the region growing algorithm and performing edge detection using the Canny operator; Step S5, extracting the region of interest ROI, and determining the boundary of the ROI by finding coordinates that meet the preset threshold conditions within a preset proportional range in the vertical direction of the image; Step S6, calculating the area, bone density value BMD, and bone mineral content of the ROI.
2. The image processing method of a dual-energy X-ray bone densitometer according to claim 1, characterized in that: Wherein in step S1, the following sub-steps are further included: S1-1, without placing any substance on the stage, the tube is exposed, and an empty data is acquired as the bright-field data, and the bright-field data is used to correct the non-uniformity of the detector and the intensity change of the tube; S1-2, without placing any substance on the stage, the tube is turned off, and an empty data is acquired as the dark-field data, and the dark-field data is used to correct the electronic noise and environmental noise of the detector; S1-3, performing bright and dark field correction on the acquired original projection data to obtain the corrected projection data, and the correction formula is: ; Among them, is the corrected projection data, is the original projection data, is the dark field data, is the bright field data.
3. The image processing method of a dual-energy X-ray bone densitometer according to claim 1, characterized in that: Wherein in step S2, the following sub-steps are further included: S2-1, using aluminum sheets to simulate bones and glass to simulate tissues, based on the corrected projection data, acquiring images of aluminum sheets and glass with different thicknesses to obtain bone density values, the thickness range of the aluminum sheets is from 0.1 mm to 10 mm, the step size is 0.1 mm, and the thickness range of the glass is from 0.1 mm to 5 mm, the step size is 0.1 mm; S2-2, according to the relationship between the aluminum sheet thickness and the bone density value, using the least squares method to fit out the bone-aluminum conversion coefficient; S2-3, selecting a rectangular area with a fixed size in the acquired image, calculating the average value of all pixel values within the rectangular area as the average value of the ROI of the corrected projection data, and recording the average value of the ROI and the aluminum sheet thickness, and the rectangular area covers the central part of the aluminum sheet or glass; S2-4, multiplying the aluminum sheet thickness by the bone-aluminum conversion coefficient to obtain the corresponding bone density value, and performing polynomial fitting on the relationship between the density value and the high and low energy values to obtain the fitting parameters, and the polynomial fitting formula is: ; where y is the bone mineral density value and x is the high-low energy value, , , ,..., are fitting parameters and n is the fitting order.
4. The image processing method of a dual-energy X-ray bone densitometer according to claim 1, characterized in that: Wherein in step S3, the following sub-steps are further included: S3-1. Perform Gaussian smoothing filtering on the high-energy image, generate a Gaussian kernel of size 3x3, set the sigma value of the Gaussian kernel to 1.0, traverse each pixel point in the image, perform convolution operation using the Gaussian kernel, and calculate the weighted average value within the pixel point and its neighborhood to smooth the image; S3-2. Perform threshold processing on the image, calculate the maximum value of all pixel values in the image, set the threshold to 4% of the image maximum value, traverse each pixel point in the image, if the pixel value of the pixel point is less than the threshold, set the pixel value of the pixel point to 0, otherwise, the pixel value of the pixel point remains unchanged; S3-3. Perform erosion operation on the image, set a 3x3 all-ones matrix as the structuring element, traverse each pixel point in the image, calculate the minimum value within the neighborhood of each pixel point, if the pixel point is less than the minimum value, set the pixel point to 0, otherwise, the pixel point remains unchanged.
5. The image processing method of a dual-energy X-ray bone densitometer according to claim 1, characterized in that: Wherein in step S4, the following sub-steps are further included: S4-1. In the 40% to 50% area in the vertical direction of the image, find the second peak valley of each row, and take the average value as the seed point; S4-2. Set the initial threshold to 40, starting from the seed point, check the gray value difference of adjacent pixels, if the difference is less than or equal to the initial threshold, add the pixel to the area where the seed point is located and mark it as visited; S4-3. Take the newly added pixel as the new seed point, continue to check its adjacent pixels, and recursively perform region merging until no new pixels meet the conditions; S4-4. Perform dilation operation on the segmented image to fill the small holes in the image and eliminate the gaps between the targets; S4-5. Use the Canny operator to perform edge detection on the processed image, take 8% of the maximum value of each row as the threshold, and find the leftmost and rightmost points greater than the threshold as the outermost contour; S4-6. Use the gradient operator to calculate the gradient magnitude and direction of the image, and apply non-maximum suppression to retain the edge points of local maxima and remove other non-edge points. The gradient operator includes the Sobel operator, Prewitt operator, and Roberts operator; S4-7. Use double-threshold detection, set the high threshold and low threshold, start from the strong edge points, trace and connect the edges along the edge direction to form the internal edge contour. The high threshold is used to determine the strong edge points, and the low threshold is used to connect the edges; S4-8. Merge the outermost contour and the internal edge contour to obtain the final contour.
6. The image processing method of a dual-energy X-ray bone densitometer according to claim 1, characterized in that: Wherein in step S5, the following sub-steps are further included: S5-1. In the range of 5% - 20% in the vertical direction of the image, find the coordinates greater than 5% of the maximum value of each row and store them in order; S5-2. For the coordinates stored in order for each row, calculate the difference between adjacent coordinates. If the difference is greater than 5, record the current row as the upper boundary of the ROI. S5-3. Within the range of 2% - 40% in the vertical direction of the image, find the coordinates in each row that are greater than 10% of the maximum value of that row, and store them in order. S5-4. For the coordinates stored in order in each row, calculate the difference between adjacent coordinates, record the length of consecutive differences of 1, save the length greater than 5% of the horizontal size of the image, and record the leftmost value of the first length and the rightmost value of the second length. S5-5. For each row, calculate the difference between the rightmost value and the leftmost value, find the row with the narrowest difference among all rows, and record the current row as the lower boundary of the ROI. S5-6. Calculate the middle position between the upper boundary and the lower boundary, determine the middle horizontal line, and determine horizontal lines at a fixed distance above and below the middle horizontal line as the upper and lower auxiliary boundaries of the ROI. S5-7. When calculating the lower boundary, record the row with the smallest difference between the left and right values among all rows, take the average of the left and right values as the vertical position, and determine the vertical boundary from the lower boundary to the bottom of the image. S5-8. Take the positions 5% from the left and right of the image as the left and right boundaries of the ROI respectively.
7. A method for processing images of a dual-energy X-ray bone densitometer according to claim 1, characterized in that: In step S6, the following sub-steps are further included: S6-1. Combine the physical length and the number of pixels of the image to calculate the unit pixel size, and multiply the number of pixels of the ROI by the unit pixel size to obtain the area of the ROI. S6-2. Calculate the average value of the pixel values within the ROI area, take a small square area around the ROI as the background area, calculate the average value of the background area, and subtract the average value of the background area from the average value of the ROI to obtain the bone mineral density value BMD of the corresponding area. S6-3. Multiply the area of the obtained ROI by the bone mineral density value BMD of the corresponding area to obtain the bone mineral content value.
8. An image processing system for a dual-energy X-ray bone densitometer, characterized in that , including: An image acquisition module for acquiring dual-energy X-ray images, including bright field data and dark field data; A data correction module for performing bright and dark field correction on the original projection data; A data fitting module for fitting the relationship between the bone mineral density value and the high and low energy values, obtaining the bone mineral density value by acquiring images of aluminum sheets and glass with different thicknesses, and fitting the bone-aluminum conversion coefficient; An image preprocessing module for preprocessing the image, including Gaussian smoothing filtering, threshold processing, and erosion operations; An image segmentation module for performing image segmentation using the region growing algorithm to extract the target area; An edge detection module for performing edge detection using the Canny operator to obtain the contour of the target area; An ROI extraction module for extracting the region of interest ROI, determining the boundary of the ROI by finding coordinates that meet the preset threshold conditions within a preset proportional range in the vertical direction of the image; An index calculation module for calculating the area of the ROI, the bone mineral density value BMD, and the bone mineral salt content.
Citation Information
Patent Citations
Bone density instrument diagnosis system based on deep learning algorithm
CN112089429A
Dual-energy X-ray bone mineral density instrument projection area calibration method and die body
CN113017657A
Bone mineral density detection method
CN119700169A
Cited By
Intelligent detection method for bone mineral density change of tooth root absorption area caused by impacted wisdom teeth
CN121304678A
Intelligent detection method for bone density change in root resorption area caused by impacted wisdom tooth
CN121304678B