Skin burn severity medical report generation method and system
Through edge detection and area segmentation technology, the problem of high complexity of the iteration time of the mean drift algorithm is solved, and a rapid and accurate assessment of the severity of skin burns is achieved, and detailed medical reports are generated to support doctors' diagnosis and treatment.
Patent Information
- Application Number
- CN202510607670.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-05-13
AI Technical Summary
In the prior art, the mean drift algorithm causes time complexity problems caused by multiple iterations for each pixel point, which affects the rapid generation of medical reports on the severity of skin burns.
Edge detection technology is used to obtain the obvious edge texture of the burn area, and the overall edge of the burn area is determined through outline fitting. Combined with downsampling and area segmentation technology, the mean drift algorithm and the otsu algorithm are used to perform image segmentation to obtain local areas of different burn degrees and generate medical reports.
Through edge detection and area segmentation technology, the data processing process is simplified, the precise definition of the burn range and the clear distinction between different burn degrees is achieved, objective and accurate assessment of burn severity, and a scientific basis for doctors to diagnose and treat.
Smart Images

Figure CN120236704A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and relates to a method and system for generating a medical report on the severity of skin burns. Background Art
[0002] As a global public health problem, the assessment and treatment of the severity of skin burns face many challenges. Burns not only have a relatively high fatality and disability rate, but also their prognosis and treatment plans highly depend on the accurate assessment of the burn area and depth. However, traditional methods for assessing the burn degree mainly rely on clinicians' observation of the appearance and area size of the patient's burn wound. This method has strong subjectivity and low accuracy, especially prone to errors in estimating the area of patients with large-area burns.
[0003] To more accurately assess the burn area and depth, computer-aided methods have been introduced into the precise measurement in the field of burns. These technologies can provide more objective and standardized judgment methods through means such as image processing, which helps to generate a more scientific medical report on the severity of burns. In image processing technology, the mean shift algorithm is an effective tool, which can effectively capture burn areas with complex shapes and uneven gray distributions by iteratively updating the cluster centers. However, the mean shift algorithm performs multiple iterations for each pixel point, which may bring obvious time complexity problems in clinical scenarios where medical reports need to be generated quickly.
[0004] Therefore, making an innovative improvement to the medical report generation process and using image processing technology to make a more accurate and objective judgment on the severity of burn wounds have become urgent problems to be solved in the current field of burn treatment. Summary of the Invention
[0005] The purpose of the present invention is to solve the problem that the mean shift algorithm may bring time complexity by performing multiple iterations for each pixel point in the prior art, and to provide a method and system for generating a medical report on the severity of skin burns.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for generating a medical report on the severity of skin burns, comprising:
[0008] Collecting an image of the patient's burn area and preprocessing the image of the patient's burn area;
[0009] Performing edge detection on the preprocessed image of the burn area to obtain obvious edge textures of the burn area;
[0010] Determine whether the pixel points included in the obvious edge texture of the burned area are the pixel points of the overall edge of the burned area. If so, perform contour fitting on the obtained overall edge pixel points to obtain the overall edge of the burned area;
[0011] Downsample the burned area, and segment the downsampled burned area to obtain the areas where different burn degrees are located;
[0012] Statistically analyze the burn data based on the local areas of different burn degrees to obtain a medical report on the severity of skin burns.
[0013] A further improvement of the present invention lies in:
[0014] Further, perform edge detection on the preprocessed burned area image to obtain the obvious edge texture of the burned area. Specifically: perform edge detection on the preprocessed burned area image based on the canny operator to obtain the obvious edge texture in the image. The edge texture includes the limb edge and the edge texture of the burned area, and the edge texture of the burned area includes the internal edge and the peripheral edge. The appearance of the internal edge indicates that there are burned areas with different severity levels locally in the entire burned area; the limb edge is directly detected through edge detection.
[0015] Further, before determining whether the pixel points included in the obvious edge texture of the burned area are the pixel points of the overall edge of the burned area, it also includes: making a minimum bounding rectangle for the edge texture of the burned area, and obtaining the overall edge coefficient of the pixel points in the edge texture within the bounding rectangle based on the positional relationship between the coordinate position of the edge texture pixel points and the coordinate position of the rectangle center point, and the gradient value of the edge texture pixel points. Specifically:
[0016]
[0017] Among them, A i represents the overall edge coefficient of the pixel point i in the internal edge texture within the rectangle; (x, y) represents the coordinate of the rectangle center point; (x i , y i ) represents the coordinate of the i-th edge texture pixel point; L i represents the shortest distance between the i-th edge texture pixel point and the bounding rectangle; T i represents the gradient value of the i-th edge texture pixel point;
[0018] Determining whether the pixel points included in the obvious edge texture of the burn area are the pixel points of the overall edge of the burn area, specifically: based on the relationship between the overall edge coefficient and the set threshold, determining whether the pixel points in the edge texture within the circumscribed rectangle belong to the pixel points of the overall edge. If so, contour fitting is performed on all the obtained overall edge pixel points to obtain the overall edge of the burn area.
[0019] Further, the downsampled burn area is segmented to obtain the areas with different burn degrees, specifically:
[0020] Iterating on the pixel points in the downsampled image based on the mean shift algorithm to construct the density coefficient;
[0021] Analyzing the density coefficient histogram based on the otsu algorithm idea to obtain the local areas suspected to have density centers;
[0022] Regarding the obtained local areas as positioning areas, for the total number of pixel points in different positioning areas and the density coefficients in the positioning areas, obtaining the bandwidth change coefficient of the positioning areas;
[0023] Based on the bandwidth change coefficient of the positioning area, obtaining the bandwidth size of the positioning area; setting the initial bandwidth parameter size of the non-positioning area, performing the mean shift algorithm on the non-positioning area to obtain the bandwidth size of the non-positioning area;
[0024] Based on the bandwidth parameters when performing the mean shift algorithm on different areas, completing the positioning of the local areas with different burn degrees.
[0025] Further, iterating on the pixel points in the downsampled image based on the mean shift algorithm to construct the density coefficient, specifically:
[0026] Performing the first iteration on all the pixel points in the downsampled image based on the mean shift algorithm. After the iteration, the pixel points will move from the original position to the pending density center after the first iteration, and the moving distance in the middle is the first iteration distance, G j Represents the iteration distance of the jth movement. Using J to represent the maximum number of iterations, the area where the density center is located is positioned through the change of the pixel point iteration distance;
[0027]
[0028] Among them, B represents the density coefficient of the pixel points in the downsampled image, and each pixel point corresponds to such a coefficient; G init Represents the distance that the pixel point itself moves from the initial position to the stop position during the first iteration, that is, the first iteration distance; J represents the maximum number of iterations; G j Represents the iteration distance obtained from the jth iteration of the pixel point; G init,kDenote the first iteration distance of the k-th pixel in the 8-neighborhood around a pixel point;
[0029] Analyze the density coefficient histogram based on the Otsu algorithm idea to obtain the local area suspected to have a density center. Specifically: convert the gray histogram of the preprocessed gray image into a density coefficient histogram, analyze the density coefficient histogram based on Otsu threshold segmentation, traverse all possible thresholds, and calculate the between-class variance under each threshold. Finally, select the threshold that maximizes the between-class variance as the segmentation threshold, and segment the image into foreground and background parts through the segmentation threshold. The foreground part is the area suspected to have a density center.
[0030] Further, for the total number of pixel points and the density coefficient in the positioning area in different positioning areas, obtain the bandwidth change coefficient of the positioning area. Specifically:
[0031]
[0032] Among them, C represents the bandwidth change coefficient of the positioning area, and each bandwidth area corresponds to such a coefficient; P represents the number of positioning areas; Q p represents the total number of pixel points in the p-th positioning area; B p,q represents the density coefficient of the q-th pixel point in the p-th positioning area; Max{} represents taking the maximum value of the content in the list.
[0033] Further, based on the bandwidth change coefficient of the positioning area, obtain the bandwidth size of the positioning area. Specifically:
[0034] Set R init as the initial bandwidth parameter size, and use the initial bandwidth parameter R init to perform the mean shift algorithm in the non-positioning area to obtain the bandwidth size of the non-positioning area; while in the positioning area, the bandwidth size of the p-th positioning area is R p and where represents the ceiling symbol.
[0035] Further, based on the bandwidth parameters in the mean shift algorithm for different regions, the positioning of local regions with different burn degrees is completed. Specifically: restore the corresponding positions of the positioning regions in the downsampled image in the original image to obtain the original positioning regions in the original image. For the pixel points in the original positioning regions, based on the neighborhood range defined by the bandwidth parameters, calculate the weighted mean of all points within the neighborhood of each pixel point, where the weights are determined by the Gaussian kernel; move the pixel point to a new position and repeat the above drift process until the point converges to a density center; this density center is a clustering center, and all pixel points that converge to the same density center are divided into the same segmentation region; finally, all pixels in the image are divided into different segmentation regions, thus completing the image segmentation task.
[0036] Further, based on the local regions with different burn degrees, burn data is statistically analyzed to obtain a medical report on the severity of skin burns. Specifically:
[0037] Based on the proportion of the total burn area in the burn site and the proportion of local regions with different burn degrees in the total burn area, data on the proportion of the overall and local burn areas is obtained;
[0038] Taking the mean gray value of the pixel points in the normal region of the burn area as the skin color of the normal region, through the difference between the gray value of the regional skin color of different local burn regions and the gray value of the skin color of the normal region, the greater the difference, the more severe the burn degree. The burn severity of the local regions constitutes the burn severity of the overall burn area, and data on the burn severity of the overall burn and local burn regions is obtained;
[0039] Judge whether the part with a burn area crosses a joint. If not, no additional annotation is required in the picture; if so, an additional note is required in the medical report;
[0040] Unify the patient's personal information, the image data of the burn site, the marked local segmented burn areas in the burn site image, as well as the severity data and the additional note information on whether it crosses multiple joints, obtain the content of the medical report on the severity of the patient's skin burns, and generate the corresponding report.
[0041] A medical report generation system for the severity of skin burns, including:
[0042] A preprocessing module, which collects the patient's burn site image and preprocesses the patient's burn site image;
[0043] An edge detection module, which performs edge detection on the preprocessed burn site image to obtain obvious edge textures of the burn area;
[0044] A judgment module, which judges whether the pixel points included in the obvious edge texture of the burn area are the pixel points of the overall edge of the burn area. If so, the obtained overall edge pixel points are subjected to contour fitting to obtain the overall edge of the burn area;
[0045] A segmentation module, which downsamples the burn area and segments the downsampled burn area to obtain the areas where different burn degrees are located;
[0046] An acquisition module, which statistically analyzes burn data based on the local areas of different burn degrees to obtain a medical report on the severity of skin burns.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] The present invention accurately obtains the obvious edge texture of the burn area through edge detection technology, which helps to accurately define the burn range. By judging the pixel points in the edge texture and performing contour fitting, the overall edge of the burn area is obtained, enabling doctors to more intuitively understand the burn situation. The application of downsampling and region segmentation technologies not only simplifies the data processing process but also realizes a clear distinction of areas with different burn degrees. By calculating the proportion of each burn degree area, an objective and accurate basis for evaluating the severity of burns is provided for doctors. In addition, data statistics on the local areas of different burn degrees generate a detailed medical report, which provides strong support for doctors' diagnosis and treatment and also provides a scientific basis for patients' rehabilitation and treatment plan formulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0050] Figure 1 It is a schematic flow chart of the method for generating a medical report on the severity of skin burns of the present invention;
[0051] Figure 2 It is a schematic structural diagram of the system for generating a medical report on the severity of skin burns of the present invention;
[0052] Figure 3 It is a schematic diagram of iterative movement. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0053] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in 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. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Components of the embodiments of the present invention usually described and illustrated in the drawings here can be arranged and designed in various different configurations.
[0054] Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0055] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0056] In the description of the embodiments of the present invention, it should be noted that if terms such as "upper", "lower", "horizontal", "inner", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the inventive product is habitually placed during use, it is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. In addition, terms such as "first", "second", etc. are only used for descriptive distinction and cannot be understood as indicating or implying relative importance.
[0057] In addition, if the term "horizontal" appears, it does not mean that the component is required to be absolutely horizontal, but it can be slightly inclined. For example, "horizontal" only means that its direction is more horizontal relative to "vertical", and does not mean that the structure must be completely horizontal, but it can be slightly inclined.
[0058] In the description of the embodiments of the present invention, it should also be noted that unless otherwise clearly specified and limited, if terms such as "set", "installed", "connected", "connected" are understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0059] The following further describes the present invention in detail with reference to the drawings:
[0060] SeeFigure 1 , the present invention discloses a method for generating a medical report on the severity of skin burns, including:
[0061] S101, collecting an image of the patient's burned area and preprocessing the image of the patient's burned area;
[0062] Preprocessing the image of the patient's burned area specifically includes: converting the collected image of the burned area into a grayscale image, and obtaining the corresponding grayscale value for each pixel point of the color image through the weighted average method to generate a grayscale image;
[0063] Assume that the original color image collected is I(x, y, c), where x and y respectively represent the pixel coordinates of the image, and c represents the color channel, then the grayscale image G(x, y) is:
[0064] G(x, y) = 0.299 * I(x, y, 1) + 0.587 * I(x, y, 2) + 0.114 * I(x, y, 3)
[0065] where c = 1, 2, 3 respectively correspond to the red, green, and blue channels.
[0066] S102, performing edge detection on the preprocessed image of the burned area to obtain obvious edge textures of the burned area;
[0067] Performing edge detection on the preprocessed image of the burned area based on the canny operator to obtain obvious edge textures in the image. The edge textures include limb edges and edge textures of the burned area. The edge textures of the burned area include internal edges and peripheral edges. The appearance of the internal edges indicates that there are burned areas with different severity levels locally in the whole burned area; the limb edges are directly detected through edge detection.
[0068] S103, determining whether the pixel points included in the obvious edge textures of the burned area are pixel points of the overall edge of the burned area. If so, fitting the obtained overall edge pixel points to obtain the overall edge of the burned area;
[0069] Before determining whether the pixel points included in the obvious edge textures of the burned area are pixel points of the overall edge of the burned area, it also includes: making a maximum circumscribed rectangle for the edge textures of the burned area, and obtaining the overall edge coefficient of the pixel points in the edge textures within the circumscribed rectangle based on the positional relationship between the coordinate positions of the edge texture pixel points and the coordinate position of the center point of the rectangle, and the gradient value of the edge texture pixel points. Specifically:
[0070]
[0071] where A iDenote the overall edge coefficient of pixel point i in the inner edge texture of the rectangle; (x, y) represents the coordinates of the center point of the rectangle; (x i ,y i ) represents the coordinates of the i-th edge texture pixel point; L i represents the shortest distance from the i-th edge texture pixel point to the circumscribed rectangle; T i represents the gradient value of the i-th edge texture pixel point;
[0072] To determine whether the pixel points included in the obvious edge texture of the burn area are the pixel points of the overall edge of the burn area, specifically: based on the relationship between the overall edge coefficient and the set threshold, determine whether the pixel points in the edge texture within the circumscribed rectangle belong to the pixel points of the overall edge. If so, perform contour fitting on all the obtained overall edge pixel points to obtain the overall edge of the burn area.
[0073] S104, Downsample the burn area and segment the downsampled burn area to obtain the areas where different burn degrees are located;
[0074] S104.1, Iterate the pixel points in the downsampled image based on the mean shift algorithm to construct the density coefficient;
[0075] Based on the mean shift algorithm, perform the first iteration on all pixel points in the downsampled image. After the iteration, the pixel points will move from the original position to the pending density center after the first iteration, and the distance moved in the middle is the first iteration distance, G j represents the iteration distance of the j-th movement. Use J to represent the maximum number of iterations. Locate the area where the density center is located through the change of the pixel point iteration distance;
[0076]
[0077] Among them, B represents the density coefficient of the pixel points in the downsampled image, and each pixel point corresponds to such a coefficient; G init represents the distance that the pixel point itself moves from the initial position to the stop position during the first iteration, that is, the first iteration distance; J represents the maximum number of iterations; G j represents the iteration distance obtained from the j-th iteration of the pixel point; G init,k represents the first iteration distance of the k-th pixel point in the 8-neighborhood around the pixel point;
[0078] S104.2, Analyze the density coefficient histogram based on the otsu algorithm idea to obtain the local area suspected of having a density center;
[0079] Convert the grayscale histogram of the preprocessed grayscale image into a density coefficient histogram, analyze the density coefficient histogram based on Otsu threshold segmentation, traverse all possible thresholds, calculate the between-class variance under each threshold, and finally select the threshold that maximizes the between-class variance as the segmentation threshold. Segment the image into two parts, foreground and background, where the foreground part is the area suspected to have a density center.
[0080] S104.3. Regard the obtained local area as a positioning area, and for the total number of pixel points in different positioning areas and the density coefficients in the positioning area, obtain the bandwidth change coefficient of the positioning area.
[0081]
[0082] Among them, C represents the bandwidth change coefficient of the positioning area, and each bandwidth area corresponds to such a coefficient; P represents the number of positioning areas; Q p represents the total number of pixel points in the p-th positioning area; B p,q represents the density coefficient of the q-th pixel point in the p-th positioning area; Max{} represents taking the maximum value of the content in the list.
[0083] S104.4. Based on the bandwidth change coefficient of the positioning area, obtain the bandwidth size of the positioning area; set the initial bandwidth parameter size of the non-positioning area, perform the mean shift algorithm on the non-positioning area, and obtain the bandwidth size of the non-positioning area.
[0084] Set R init as the initial bandwidth parameter size, and perform the mean shift algorithm in the non-positioning area using the initial bandwidth parameter R init to obtain the bandwidth size of the non-positioning area; while in the positioning area, the bandwidth size of the p-th positioning area is R p , and where represents the ceiling symbol.
[0085] S104.5. Based on the bandwidth parameters when performing the mean shift algorithm in different areas, complete the positioning of local areas with different burn degrees.
[0086] Restore the corresponding position of the positioning area in the downsampled image in the original image to obtain the original positioning area in the original image. For the pixel points in the original positioning area, based on the neighborhood range defined by the bandwidth parameter, calculate the weighted mean of all points in the neighborhood of each pixel point, and the weight is determined by the Gaussian kernel; move the pixel point to a new position and repeat the above drift process until the point converges to a density center; this density center is a clustering center, and all pixel points converging to the same density center are divided into the same segmentation area; finally, all pixels in the image are divided into different segmentation areas, thus completing the image segmentation task.
[0087] S105. Statistically analyze the burn data based on the local areas of different burn degrees to obtain a medical report on the severity of skin burns.
[0088] Based on the proportion of the total burn area in the burn site and the proportion of the local areas of different burn degrees in the total burn area, obtain the proportion data of the overall and local burn areas.
[0089] Use the average gray value of the pixel points in the normal area of the burn area as the skin color of the normal area. The greater the difference between the gray value of the area skin color of different local burn areas and the gray value of the skin color of the normal area, the more severe the burn degree. The burn severity of the local area constitutes the burn severity of the overall burn area, and obtain the burn severity data of the overall burn and local burn areas.
[0090] Judge whether the part with a burn area straddles a joint. If not, no additional annotation is required in the picture; if so, an additional note is required in the medical report.
[0091] Unify the patient's personal information, the image data of the burn site, the marked local segmented burn areas in the burn site image, the severity data, and the additional note information on whether it straddles multiple joints to obtain the content of the medical report on the severity of the patient's skin burns, and generate the corresponding report.
[0092] See Figure 2 , the present invention discloses a medical report generation system for the severity of skin burns, including:
[0093] A preprocessing module, which collects the image of the patient's burn site and preprocesses the image of the patient's burn site.
[0094] An edge detection module, which performs edge detection on the preprocessed burn site image to obtain the obvious edge texture of the burn area.
[0095] A judgment module, which judges whether the pixel points included in the obvious edge texture of the burn area are the pixel points of the overall edge of the burn area. If so, the obtained overall edge pixel points are subjected to contour fitting to obtain the overall edge of the burn area.
[0096] A segmentation module, which downsamples the burn area and segments the downsampled burn area to obtain the areas where different burn degrees are located.
[0097] An acquisition module, which statistically analyzes burn data based on the local areas of different burn degrees to obtain a medical report on the severity of skin burns.
[0098] Embodiment:
[0099] The present invention discloses a method for generating a medical report on the severity of skin burns, including:
[0100] Step 1, acquiring an image of the patient's burn area.
[0101] During the process of acquiring an image of the patient's burn area, it is first necessary to ensure that the shooting environment has sufficient and uniform light to avoid the influence of shadows and overexposure on the image quality. Use a high-resolution medical imaging device or a multispectral camera to take pictures of the burn area to ensure that the image is clear and the color is true. When taking pictures, keep the camera perpendicular to the burn area to obtain an accurate two-dimensional image. At the same time, record the shooting date, time, and the patient's basic information for subsequent preprocessing and analysis of the image and record it as part of the medical report. The acquired image should cover the entire picture of the burn area, including the center and edge parts, to ensure the comprehensiveness and accuracy of subsequent analysis.
[0102] Step 2, preprocessing the acquired image of the burn area.
[0103] The preprocessing process is to convert the image of the burn area into a grayscale image. The RGB values of each pixel point of the color image are calculated by the weighted average method to obtain the corresponding grayscale value and replaced with the grayscale value, thereby generating a grayscale image.
[0104] Step 3: Perform edge detection on the preprocessed image to detect obvious edge textures, define the overall edge coefficient of the pixel points in the edge textures, locate the overall edge of the burn area through the overall edge coefficient, then perform a normalization operation on the image to change and unify the image resolution, downsample the image to obtain a downsampled image, define the density coefficient for the pixel points in the downsampled image, use the otsu algorithm idea through the density coefficient histogram to locate the local area suspected of having a density center, and call the located local area the localization area. Define the bandwidth change coefficient of the localization area to complete the definition of the bandwidth parameter when performing the mean shift algorithm on different areas, so as to complete the localization of local areas with different burn degrees.
[0105] Select the canny operator to perform edge detection on the preprocessed burn site image. Edge detection will detect the obvious edge textures in the image. The detected edge textures include the limb edges and the edge textures of the burn area. The edge textures of the burn area have internal edges and peripheral edges. The appearance of the internal edges indicates that there are local burn areas with different severity levels in the whole burn area.
[0106] Since the preprocessed burn site image has separated the limb part, the limb edges can be directly detected through edge detection. The remaining edge textures belong to the burn area. A maximum circumscribed rectangle can be made for the remaining edge textures, and the pixel points belonging to the overall edge of the burn in it can be located through the positional relationship of the edge textures in the maximum circumscribed rectangle.
[0107] Define the overall edge coefficient of the pixel points in the inner edge texture of the rectangle. The specific formula is:
[0108]
[0109] where A i represents the overall edge coefficient of the pixel points in the inner edge texture of the rectangle; (x, y) represents the coordinates of the center point of the rectangle; (x i , y i ) represents the coordinates of the i-th edge texture pixel point; L i represents the shortest distance from the i-th edge texture pixel point to the circumscribed rectangle; T i represents the gradient value of the i-th edge texture pixel point.
[0110] The farther the coordinate position of the edge texture pixel is from the coordinate position of the center point of the rectangle and the shorter the shortest distance from the circumscribed rectangle, the more inclined the pixel is to belong to the overall edge pixel of the burn, so the corresponding overall edge coefficient is larger. In addition, since the overall edge is the dividing line between the burn area and the non-burn area, and the non-burn area is normal skin, there is an obvious difference in the gray value distribution between the burn area and the non-burn area. Then, the overall edge pixel can obtain a larger gradient value. Therefore, the larger the gradient value of the pixel, the larger the corresponding overall edge coefficient.
[0111] After obtaining the overall edge coefficient A of the pixel, locate the overall edge of the burn area. Set a threshold T for the overall edge coefficient A A , when the value of A is greater than the threshold, it is considered that the pixel corresponding to the value of A belongs to the pixel of the overall edge. Here, the threshold T A = 0.8, that is, when A > 0.8, it is considered that the pixel belongs to the pixel of the overall edge. Fit the obtained overall edge pixels to obtain the overall edge of the burn area.
[0112] After obtaining the overall edge, the range delimited by the overall edge is the burn area on the current limb surface of the patient. Then, when dividing different burn severity areas by mean shift, the beneficial effects obtained are:
[0113] Only perform the mean shift algorithm on the pixels within the burn area, reducing the number of pixels participating in the iteration. When the pixels within the burn area iterate to the overall edge, the iteration can be stopped because the range of the burn area is already known, so there is no need to perform the iteration process in the non-burn area, accelerating the iteration speed of the pixels in the algorithm process.
[0114] After locating the overall edge of the burn area, the internal area surrounded by the edge is the burn area. Since the severity of the burn is different in the burn area, different colors will appear in different local areas, which corresponds to different gray value distributions in the gray-scale image for areas with different burn severities. The mean shift algorithm can be used to segment different areas.
[0115] The specific process is as follows:
[0116] Perform a normalization operation on the image that has completed the foregoing operations, that is, normalize the image to a 1080P image, and use the cv2.resize function to change the image resolution to 1920×1080 to complete the normalization operation.
[0117] Perform downsampling on the normalized image. The specific process is as follows:
[0118] A pixel block of size 2×2 is established at the position of pixel coordinates (1,1), and so on. Non-overlapping pixel blocks of size 2×2 are established for the global image in an S shape. Finally, the number of pixel blocks obtained is 960×540. The gray value of the pixel block is obtained by average pooling, that is, the average value of the gray values of the corresponding 2×2 pixel points is used as the gray value of the corresponding pixel block.
[0119] The image obtained after downsampling is hereinafter collectively referred to as the downsampled image.
[0120] The beneficial effect of using the downsampled image is that the number of pixel points in the downsampled image is less than that in the original image. Therefore, when the pixel points perform iterative operations in the algorithm process, the density center can be found faster.
[0121] The operation object of the mean shift algorithm is pixel points. When performing the iteration required by the mean shift algorithm process on the pixel points in the downsampled image, the result of one iteration is that the pixel points will move once. As Figure 3 shown, and the position where this movement stops is the tentative density center obtained by this movement. The movement distance is related to the distance between the pixel point and the density center. The farther the distance from the density center, the more iterations are required, and the farther the movement distance may be. Therefore, the distance relationship between the pixel point and the density center can be reflected by the movement distance of the iteration. In all iterative processes, the data points are usually located far from the density center at the first iteration because when the pixel points are at the initial position, the points in the surrounding neighborhood are relatively scattered, and the weighted average calculated in the algorithm is quite different from the position of the current point. Therefore, the movement distance is also large. However, relatively speaking, if the pixel point itself is very close to the density center, the movement distance of the first iteration is relatively small.
[0122] Perform the first iteration on all pixel points. After the iteration, the pixel points will move from the original position to the tentative density center after the first iteration. The movement distance in between is called the first iteration distance in the present invention. The present invention uses G j to represent the iteration distance of the jth movement, and uses J to represent the maximum number of iterations. By the change of the iteration distance of the pixel points, the area where the density center is located can be located.
[0123] The density coefficient of the pixel point is:
[0124]
[0125] where B represents the density coefficient of the pixel points in the downsampled image, and each pixel point corresponds to such a coefficient; G initrepresents the distance that the pixel itself moves from the initial position to the stop position during the first iteration, which is also the first iteration distance described above; J represents the maximum number of iterations, which is a variable custom parameter, and here J = 5 is defined; G j represents the iteration distance obtained by the j-th iteration of the pixel; G init,k represents the first iteration distance of the k-th pixel in the 8-neighborhood around the pixel.
[0126] The density coefficient of the pixel is reflected by the iteration movement of the current pixel itself and the iteration movement of the 8-neighborhood pixels around it.
[0127] Formula The part represents the sum of the first iteration distance of the pixel itself and the average distance of subsequent several iterations. The larger the result value of this part, it indicates that the pixel itself needs to undergo obvious iterative movement to possibly reach the density center. Especially the influence of the first iteration distance is more obvious. Therefore, the smaller the tendency of the pixel itself to be the density center, the smaller the corresponding final B value should be.
[0128] Formula The result of the part represents the sum value of the first iteration distances of the pixels in the 8-neighborhood around the pixel. The smaller this value, the greater the possibility that there is a density center near the neighborhood points. Combining with the previous part of the formula, if the pixel itself needs to move a large distance to reach the density center, but the distances of the pixels in its surrounding neighborhood to the density center tend to be shorter, it indicates that the current pixel will definitely not exist as the density center. The distance relationship between the pixels in its surrounding neighborhood and the density center has little to do with the current pixel either, because the density center to which the current pixel should belong and the density center to which the surrounding neighborhood pixels should belong are not the same density center. Therefore, the density coefficient of the current pixel should be relatively small, that is, the result value of the formula The smaller the result value of the part, the smaller the B value.
[0129] Corresponding to the actual situation, the pixel is very likely to be near the edge of local areas with different burn severities. Therefore, there will be a trend that the iteration distance of the pixel itself is long while the iteration distance of the surrounding neighborhood is short. The farther away from this trend, the greater the possible B value, and the density center is usually located in the direction away from the area edge, which conforms to the previous logical relationship. Therefore, it is reasonable that the density coefficient of the pixel gets a relatively small value due to the previous logic. Thus, the density coefficient of the pixel is obtained.
[0130] The greater the density coefficient of a pixel, the greater the likelihood that the pixel is the density center. Then, when the density coefficients of the pixels in a local area are generally large, it is very likely that there is a density center in this local area. Therefore, the present invention uses the idea of Otsu threshold segmentation and replaces the gray value of the pixel with the density coefficient of the pixel obtained above to segment the area suspected of having a density center. The process is described as follows:
[0131] Convert the gray histogram of the preprocessed gray image into a density coefficient histogram. By analyzing the density coefficient histogram, traverse all possible thresholds and calculate the between-class variance under each threshold. Finally, select the threshold that maximizes the between-class variance as the segmentation threshold, and segment the image into two parts, foreground and background, through the segmentation threshold. The foreground part is the area suspected of having a density center. Thus, the positioning of the local area suspected of having a density center is completed.
[0132] The area located is called the positioning area. The number of pixels and the distribution of pixel density coefficients in the positioning area are different. According to the number of pixels and the pixel density coefficients in the positioning area, the bandwidth change coefficient of the positioning area is obtained;
[0133]
[0134] Among them, C represents the bandwidth change coefficient of the positioning area, and each bandwidth area corresponds to such a coefficient; P represents the number of positioning areas; Q p represents the total number of pixels in the p-th positioning area; B p,q represents the density coefficient of the q-th pixel in the p-th positioning area; Max{} represents taking the maximum value of the content in the list.
[0135] In the mean shift algorithm, the bandwidth is a key parameter used to control the search range of the kernel function, which determines the neighborhood size considered by each data point when calculating the kernel density estimate. If the bandwidth is 5×5, it means that the kernel function is searched and calculated within the area of 5×5 around each pixel. The positioning area and the density coefficients of the pixels in the positioning area are obtained above. The smaller the coverage range of the positioning area, the relatively more accurate the positioning of the density center. At this time, if the distribution of the pixel density coefficients is also relatively large, then when determining the density center in the area, a smaller bandwidth parameter should be used. On the contrary, the larger the area of the positioning area and the smaller the distribution of the pixel density coefficients therein, the more inclined to use a larger bandwidth. Therefore, the larger, Q p the smaller, the larger the value of the bandwidth change coefficient c of the corresponding positioning area.
[0136] After obtaining the bandwidth change coefficient C value, determine the bandwidth size of the positioning area according to the bandwidth change coefficient for different positioning areas. The larger the bandwidth change coefficient C value, the smaller the obtained bandwidth parameter size, and vice versa. The specific process is defined as follows:
[0137] Use R init to represent the initial bandwidth parameter size, and use the initial bandwidth parameter R in the non-positioning area init to perform the mean shift algorithm. In the positioning area, the bandwidth size of the p-th positioning area is R p , and where represents the ceiling symbol, aiming to keep the bandwidth size as an integer. Thus, the size of the bandwidth parameter is obtained when performing the mean shift algorithm in different areas.
[0138] Restore the corresponding positions of the positioning areas in the downsampled image in the original image to obtain the original positioning areas in the original image. For the pixel points in the original positioning areas, based on the neighborhood range defined by the bandwidth parameter, calculate the weighted mean of all points in its neighborhood for each pixel point, and the weight is determined by the Gaussian kernel; move the pixel point to a new position and repeat the above drift process until the point converges to a density center; this density center is a clustering center, and all pixel points that converge to the same density center are divided into the same segmentation area; finally, all pixels in the image are divided into different segmentation areas, thus completing the image segmentation task.
[0139] Step 4, after positioning the local areas with different burn degrees, count the burn-related data to complete the generation of a medical report on the severity of skin burns.
[0140] After completing the positioning of the local areas with different burn degrees, based on the proportion of the total burn area in the burn site and the proportion of the local areas with different burn degrees in the total burn area, the overall and local burn area proportion data can be obtained.
[0141] Since the skin color of the patient itself will affect the judgment of the burn severity, and the skin colors of different regions of the human body are also different. The more severe the burn, the greater the difference in color between the burn area and the original skin color. Therefore, use the mean gray value of the pixel points in the normal area of the burn area as the skin color of the normal area. The greater the difference between the gray value of the regional skin color of different local burn areas and the gray value of the normal area skin color, the more severe the burn degree. The burn severity of the local area constitutes the burn severity of the overall burn area, and the burn severity data of the overall burn local burn area is obtained.
[0142] For the part with a burn area, if it does not cross multiple joints, no additional annotation is required. However, if there are burn areas crossing at least two joints and there is a connection between the burn areas, additional annotation is required in the medical report. Because when the burn area crosses multiple joints, it may involve dysfunction of multiple joints, and scar hyperplasia, contracture after burns, as well as skin and tissue damage around the joints will lead to limited joint movement and even joint deformity. Moreover, burns crossing multiple joints require more complex treatment strategies.
[0143] Unify the patient information, burn site image data, the marked local segmented burn area in the burn site image, as well as the severity data and the additional annotation information on whether it crosses multiple joints, to obtain the medical report content on the severity of the patient's skin burn, and then generate the corresponding report.
[0144] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for generating a medical report on the severity of skin burns, characterized in that: include: Collecting images of the patient's burnt area and preprocessing the images of the patient's burnt area; Perform edge detection on the preprocessed burn area image to obtain the obvious edge texture of the burn area; Determine whether the pixel points included in the obvious edge texture of the burn area are the pixel points of the overall edge of the burn area. If so, perform contour fitting on the obtained overall edge pixel points to obtain the overall edge of the burn area. Downsampling the burn area, and segmenting the downsampled burn area to obtain areas with different burn degrees; Burn data is collected based on local areas with different burn degrees to obtain a medical report on the severity of skin burns.
2. The method for generating a medical report of skin burn severity according to claim 1, characterized in that: The method of performing edge detection on the preprocessed burn area image to obtain obvious edge texture of the burn area is specifically as follows: edge detection is performed on the preprocessed burn area image based on the Canny operator to obtain obvious edge texture in the image, wherein the edge texture includes edge texture of limbs and edge texture of the burn area, and the edge texture of the burn area includes internal edge and external edge, and the appearance of the internal edge indicates that burn areas of different severity appear locally in the entire burn area; the limb edge is directly detected by edge detection.
3. The method for generating a medical report of skin burn severity according to claim 2, characterized in that: Before determining whether the pixel points included in the obvious edge texture of the burn area are the pixel points of the overall edge of the burn area, the method further includes: making a maximum circumscribed rectangle for the edge texture of the burn area, and obtaining the overall edge coefficient of the pixel points in the edge texture within the circumscribed rectangle based on the positional relationship between the coordinate position of the edge texture pixel points and the coordinate position of the center point of the rectangle, and the gradient value of the edge texture pixel points, specifically: Among them, A i represents the overall edge coefficient of pixel i in the edge texture inside the rectangle; (x, y) represents the coordinates of the center point of the rectangle; (x i ,y i ) represents the coordinates of the i-th edge texture pixel; L i represents the shortest distance between the i-th edge texture pixel and the circumscribed rectangle; T i Represents the gradient value of the i-th edge texture pixel; The method of judging whether the pixel points contained in the obvious edge texture of the burn area are the pixel points of the overall edge of the burn area is specifically as follows: based on the relationship between the overall edge coefficient and the set threshold, judging whether the pixel points in the edge texture within the circumscribed rectangle belong to the pixel points of the overall edge; if so, performing contour fitting on all the obtained overall edge pixel points to obtain the overall edge of the burn area.
4. The method for generating a medical report of skin burn severity according to claim 3, characterized in that: The burn area after downsampling is segmented to obtain areas with different burn degrees, specifically: Iterate the pixels in the downsampled image based on the mean shift algorithm to construct the density coefficient; Based on the idea of otsu algorithm, the density coefficient histogram is analyzed to obtain the local area where the density center is suspected to exist; The obtained local area is regarded as the positioning area, and the bandwidth variation coefficient of the positioning area is obtained based on the total number of pixels in different positioning areas and the density coefficient in the positioning area; Based on the bandwidth variation coefficient of the positioning area, the bandwidth size of the positioning area is obtained; the initial bandwidth parameter size of the non-positioning area is set, and the mean shift algorithm is performed on the non-positioning area to obtain the bandwidth size of the non-positioning area; Based on the bandwidth parameters of the mean shift algorithm in different areas, the local areas with different degrees of burns are located.
5. The method for generating a medical report of skin burn severity according to claim 4, characterized in that: The pixel points in the downsampled image are iterated based on the mean shift algorithm to construct the density coefficient, which is specifically: Based on the mean shift algorithm, the first iteration is performed on all pixels in the downsampled image. After the iteration, the pixel will move from the original position to the center of the undetermined density after the first iteration. The distance moved in the middle is the first iteration distance. j It represents the iterative distance of the jth move, and J represents the maximum number of iterations. The area where the density center is located is located by the change of the iterative distance of the pixel point; Among them, B represents the density coefficient of the pixel points in the downsampled image, and each pixel point has a corresponding coefficient; G init It represents the distance that the pixel moves from the initial position to the stop position during the first iteration, i.e., the first iteration distance; J represents the maximum number of iterations; G represents the distance that the pixel moves from the initial position to the stop position during the first iteration, i.e., the first iteration distance; j G represents the iterative distance obtained by the jth iteration of the pixel point; init,k Indicates the first iteration distance of the kth pixel in the 8-neighborhood around the pixel; The density coefficient histogram is analyzed based on the idea of the Otsu algorithm to obtain the local area where the density center is suspected to exist. Specifically, the grayscale histogram of the preprocessed grayscale image is converted into a density coefficient histogram, the density coefficient histogram is analyzed based on the Otsu threshold segmentation, all possible thresholds are traversed, and the inter-class variance under each threshold is calculated, and finally the threshold that maximizes the inter-class variance is selected as the segmentation threshold, and the image is segmented into two parts, the foreground and the background, by the segmentation threshold, wherein the foreground part is the area where the density center is suspected to exist.
6. A method for generating a medical report of skin burn severity according to claim 5, characterized in that: The bandwidth variation coefficient of the positioning area is obtained based on the total number of pixels in different positioning areas and the density coefficient in the positioning area, specifically: Where C represents the bandwidth variation coefficient of the positioning area, and each bandwidth area corresponds to one such coefficient; P represents the number of positioning areas; Q p represents the total number of pixels in the pth positioning area; B p,q Represents the density coefficient of the qth pixel in the pth positioning area; Max{} means taking the maximum value of the content in the list.
7. The method for generating a medical report of skin burn severity according to claim 6, characterized in that: The bandwidth variation coefficient based on the positioning area is used to obtain the bandwidth size of the positioning area, specifically: Setting R init is the initial bandwidth parameter size. The initial bandwidth parameter R is used in the non-positioning area. init Perform the mean shift algorithm to obtain the bandwidth size of the non-positioning area; in the positioning area, the bandwidth size of the pth positioning area is R p ,and in Indicates the round-up symbol.
8. The method for generating a medical report of skin burn severity according to claim 7, characterized in that: The bandwidth parameter when the mean shift algorithm is performed based on different regions is used to complete the positioning of local regions with different degrees of burns. Specifically, the corresponding position of the positioning region in the downsampled image in the original image is restored to obtain the original positioning region in the original image, and for the pixel points in the original positioning region, the weighted mean of all points in its neighborhood is calculated for each pixel point based on the neighborhood range defined by the bandwidth parameter, and the weight is determined by the Gaussian kernel; the pixel point is moved to a new position, and the above drift process is repeated until the point converges to a density center; the density center is a clustering center, and all pixel points that converge to the same density center are divided into the same segmentation area; finally, all pixels in the image are divided into different segmentation areas, thereby completing the image segmentation task.
9. The method for generating a medical report of skin burn severity according to claim 8, characterized in that: The method of collecting burn data based on local areas with different burn degrees and obtaining a medical report on the severity of skin burns is specifically as follows: Based on the proportion of the total burn area in the burn site and the proportion of local areas with different burn degrees in the total burn area, the data on the proportion of the overall and local burn area were obtained; The average grayscale value of the pixels in the normal area of the burned area is taken as the skin color of the normal area. The difference between the grayscale values of the skin color of the local burned areas and the grayscale values of the skin color of the normal area is calculated. The larger the difference, the more serious the burn. The burn severity of the local area constitutes the burn severity of the overall burned area, and the burn severity data of the overall burned local burned area is obtained. Determine whether the burn area crosses the joint. If not, no additional annotation is required in the image. If yes, additional annotation is required in the medical report. The patient's personal information, burn site image data, and locally segmented burn areas are marked in the burn site image, as well as the severity data and additional information indicating whether it spans multiple joints, to obtain the medical report content corresponding to the severity of the patient's skin burns and generate the corresponding report.
10. A medical report generation system for skin burn severity, characterized in that: include: A preprocessing module, wherein the preprocessing module collects images of the patient's burn parts and preprocesses the images of the patient's burn parts; An edge detection module, which performs edge detection on the preprocessed burn area image to obtain obvious edge texture of the burn area; A judgment module, wherein the judgment module judges whether the pixel points included in the obvious edge texture of the burn area are the pixel points of the overall edge of the burn area. If so, the obtained overall edge pixel points are subjected to contour fitting to obtain the overall edge of the burn area; A segmentation module, wherein the segmentation module downsamples the burn area and segments the downsampled burn area to obtain areas with different burn degrees; An acquisition module collects burn data based on local areas with different burn degrees to obtain a medical report on the severity of skin burns.
Citation Information
Patent Citations
Overlapping cervical cell image segmentation method
CN108596932A
Burn region area measurement method and system, electronic equipment and storage medium
CN119131120A
Pressure damage image detection and evaluation method
CN119399192A
Image segmentation method for burn wound area
CN119399469A
System and method for segmentation and automated measurement of chronic wound images
US20160284084A1