A method and system for assessing risk of blood loss based on image data analysis
By processing images using homography matrix and color correction functions in image data analysis, a wound area mask is generated, and the local entropy yield field is calculated. This solves the problems of image distortion and color error, and enables accurate assessment and stable analysis of blood loss risk.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE FIRST AFFILIATED HOSPITAL OF XIAMEN UNIV
- Filing Date
- 2026-01-15
- Publication Date
- 2026-04-10
AI Technical Summary
Existing image-based blood loss risk assessment methods fail to adequately consider geometric distortion and color errors during image capture, resulting in limited accuracy of analysis results. Furthermore, existing color correction methods neglect the diversity of skin colors in complex environments, making it difficult to accurately extract subtle color differences between healthy skin and wound areas.
By identifying and locating the corner points of the checkerboard in the calibration board image, solving the homography matrix, defining the color correction function, and combining the homography matrix and the color correction function to process the RGB image of healthy skin, geometric and color corrections are performed, a wound area mask is generated, the local entropy production field is calculated, and a thermodynamic risk map is defined to assess the bleeding area.
It improves the precision of wound image analysis and the accuracy of assessment results, enhances the stability of assessment results, can accurately distinguish between healthy skin and wound areas, reduces noise interference, and provides accurate blood loss risk assessment.
Smart Images

Figure CN121544594B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a blood loss risk assessment method and system based on image data analysis. BACKGROUND
[0002] With the rapid development of medical image analysis technology, disease diagnosis and risk assessment based on image data have gradually become an important means of clinical decision support, especially in the fields of wound monitoring and blood loss risk assessment. By using image processing and analysis technology, real-time and accurate disease state assessment can be provided for medical personnel. Computer vision technology combined with advanced algorithms such as deep learning, image segmentation and feature extraction has been widely used in the automatic analysis of medical images.
[0003] The existing image-based blood loss risk assessment method still has deficiencies in actual application. Many methods fail to fully consider the geometric distortion and color error in the image shooting process when processing wound images, which limits the accuracy of the analysis results. Existing color correction methods often ignore the diversity of skin color in complex environments, making it difficult to accurately extract the subtle color difference between healthy skin and wound areas. SUMMARY
[0004] In view of the problems existing in the prior art, the present application arises at the historic moment.
[0005] Therefore, the present application provides a blood loss risk assessment method and system based on image data analysis to solve the problem that many methods fail to fully consider the geometric distortion and color error in the image shooting process when processing wound images, which limits the accuracy of the analysis results. Existing color correction methods often ignore the diversity of skin color in complex environments, making it difficult to accurately extract the subtle color difference between healthy skin and wound areas.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a blood loss risk assessment method based on image data analysis, comprising the following steps:
[0008] Collecting patient images and performing preprocessing;
[0009] The patient images include calibration plate images, 24-color card images, wound monitoring images and healthy skin RGB images;
[0010] Identify and locate the pixel coordinates and corresponding world coordinates of all the inner corner points of the chessboard in the calibration plate image, solve the homography matrix, define the color correction function based on the 24-color card image, and process the healthy skin RGB image using the homography matrix and color correction function to determine the reference range interval of the healthy skin.
[0011] perspective transformation of the wound monitoring image using the homography matrix, color correction of the geometrically corrected image using the color correction function, judgment of the scalar field of each pixel position in the color corrected image based on the healthy skin reference range, generation of an initial wound region binary mask constituting a wound region, calculation of a normalized chroma state field;
[0012] Within the wound region pixel set, based on the normalized chroma state field, the original local entropy production rate is calculated, converted into a non-negative entropy production rate, and the non-negative entropy production rate is taken as the initial state of the smoothing field, the diffusion flux vector field is calculated, and the smoothing field is updated based on the diffusion flux vector field to obtain the final local entropy production rate field.
[0013] As a preferred scheme of the blood loss risk assessment method based on image data analysis, wherein: the pixel coordinates and corresponding world coordinates of all the chessboard inner corner points in the calibration plate image are identified and located, the homography matrix is solved, the color correction function is defined based on the 24-color card image, and the RGB image of healthy skin is processed using the homography matrix and the color correction function to determine the reference range interval of healthy skin, including:
[0014] The Harris corner point detection algorithm is applied to the calibration plate image to identify and locate the pixel coordinates and corresponding world coordinates of all the chessboard inner corner points in the calibration plate image, and the homography matrix is solved based on the pixel coordinates and corresponding world coordinates.
[0015] The 24-color card image is extracted by an image segmentation algorithm, the average value of all RGB values in the color block region is calculated, the camera response vector of the color block is obtained, the corresponding standard color space reference value is provided by the color card manufacturer;
[0016] Based on the camera response vector, a corresponding second-order polynomial feature vector is constructed, the second-order polynomial feature vector is mapped to the standard color space, the polynomial coefficient vector is calculated, and the color correction function is defined;
[0017] The homography matrix is used for geometric correction of the RGB image of healthy skin, the color correction function is used for color correction of the geometrically corrected image, and the RGB value of each pixel is converted to the standard color space to obtain a skin image;
[0018] In the skin image, the healthy skin region is demarcated as a reference region using an artificial interactive ROI demarcation method;
[0019] All pixels in the reference region are extracted in the values on the channels, the values forming a value set, the minimum and maximum values of the value set being filtered, the minimum and maximum values forming a healthy skin reference range a reference range interval for the channel values.
[0020] As a preferred scheme of the blood loss risk assessment method based on image data analysis of the present application, wherein: the perspective transformation of the wound monitoring image using the homography matrix, the color correction of the geometric corrected image using the color correction function, the judgment of the scalar field of each pixel position in the color corrected image based on the healthy skin reference range, the generation of the initial wound area binary mask, the extraction of the pixel coordinates with a value of 1 to form the wound area, and the linear normalization to calculate the normalized colorimetric state field, including:
[0021] perspective transformation of the wound monitoring image using the homography matrix to obtain the geometric corrected image, color correction of the geometric corrected image using the color correction function to obtain a color space image;
[0022] extracting channel components from the color space image to obtain a scalar field, judging the scalar field of each pixel position in the image based on the healthy skin reference range to generate an initial wound area binary mask;
[0023] morphological image processing of the initial wound area binary mask to obtain a final wound area binary mask;
[0024] extracting all pixel coordinates with a value of 1 in the final wound area binary mask to form a wound area;
[0025] linear normalization of the values of all pixels in the wound area to calculate the normalized colorimetric state field.
[0026] As a preferred scheme of the blood loss risk assessment method based on image data analysis of the present application, wherein: in the wound area pixel set, based on the normalized colorimetric state field, the original local entropy production rate is calculated, converted into a non-negative entropy production rate, and the non-negative entropy production rate is taken as the initial state of the smoothing field, the diffusion flux vector field is calculated, and the smoothing field is updated based on the diffusion flux vector field to obtain the final local entropy production rate field, including:
[0027] in the wound area pixel set, the spatial gradient of the normalized colorimetric state field is approximately calculated using the central difference method, and according to the principle of non-equilibrium thermodynamics, the negative spatial gradient of the normalized colorimetric state field is defined as the covariant vector of the generalized thermodynamic force of the current frame;
[0028] An outer product of the spatial gradient of the normalized chroma state field and the transpose of the spatial gradient is obtained to obtain an outer product matrix, the outer product matrix is Gaussian smoothed, and a local structure tensor is calculated;
[0029] The local structure tensor is regularized and inverted to obtain a Riemann metric tensor;
[0030] Based on the normalized chroma state field, a generalized thermodynamic flow inverse vector of the current frame is calculated;
[0031] For each position, a matrix-vector operation is performed to calculate an original local entropy production rate, and a point-by-point maximum function is applied to each element of the original local entropy production rate to convert it into a non-negative entropy production rate;
[0032] The non-negative entropy production rate is used as an initial state of a smoothing field, and a central difference method is used to calculate a spatial gradient of the current iteration field;
[0033] The spatial gradient of the current iteration field and the Riemann metric tensor are combined to calculate a diffusion flux vector field, and the smoothing field is updated based on the diffusion flux vector field according to an explicit Euler format to obtain a field of the next iteration, and a fixed iteration number method is used to set the number of iterations , and the iteration is stopped when the number of iterations is reached to obtain a final local entropy production rate field.
[0034] As a preferred scheme of the blood loss risk assessment method based on image data analysis, wherein: the local entropy production rate field is defined as a thermodynamic risk map, and a bleeding area binary mask is generated, comprising:
[0035] The local entropy production rate field is defined as a thermodynamic risk map, all pixel values located in the wound area in the thermodynamic risk map are extracted, a threshold is set using the Otsu method, and a bleeding area binary mask is generated.
[0036] As a preferred scheme of the blood loss risk assessment method based on image data analysis, wherein: the risk assessment of the patient's bleeding state comprises:
[0037] All pixel coordinates with a value of 1 in the bleeding area binary mask are extracted to form a bleeding area;
[0038] The sum of the local entropy production rates of all pixels in the bleeding area is calculated and defined as a blood loss risk index;
[0039] An alarm threshold is set, patients with a blood loss risk index greater than the alarm threshold are determined to have an abnormal bleeding state and trigger an alarm signal, and patients with a blood loss risk index less than or equal to the alarm threshold are determined to be in a normal state.
[0040] As a preferred scheme of the blood loss risk assessment method based on image data analysis, wherein: the patient image is collected and preprocessed, including:
[0041] The patient image is collected using an RGB camera, and denoising and standardization processing are performed.
[0042] In a second aspect, the present application provides a blood loss risk assessment system based on image data analysis, comprising:
[0043] The collection and preprocessing module is used for collecting patient images and performing denoising and standardization processing.
[0044] The correction reference area module is used for camera calibration using a checkerboard calibration plate, calculating a homography matrix, performing geometric correction on the image, performing color correction through a color card image, converting to a standard Color space, extracting a healthy skin area through an artificial interactive ROI demarcation method, establishing a healthy skin Channel value reference range;
[0045] The state field detection module is used for extracting a wound area through image segmentation and morphological processing according to the healthy skin reference range, performing chroma normalization on the wound area, and calculating a chroma state field.
[0046] The segmentation and local entropy production rate module is used for calculating a generalized thermodynamic force covariant vector, calculating a local entropy production rate through a non-equilibrium thermodynamic model, and performing smoothing processing to obtain a final local entropy production rate field.
[0047] The segmentation evaluation module is used for generating a thermodynamic risk map according to the local entropy production rate field, performing image segmentation using the Otsu method, extracting a bleeding area, calculating a sum of local entropy production rates of the bleeding area, generating a blood loss risk index, and performing risk assessment on the patient bleeding state.
[0048] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program is executed by the processor to implement any step of the blood loss risk assessment method based on image data analysis according to the first aspect of the present application.
[0049] In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement any step of the blood loss risk assessment method based on image data analysis according to the first aspect of the present application.
[0050] The application has the advantages that the application effectively solves the problems of image geometric distortion and color error by combining homographic matrix correction and color correction function, improves the precision of wound image analysis, and enhances the accuracy and stability of the evaluation result by combining local entropy production rate and diffusion flux vector field. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0052] Figure 1 The running flowchart of the blood loss risk assessment method based on image data analysis in embodiment 1.
[0053] Figure 2 The structure schematic diagram of the blood loss risk assessment system based on image data analysis in embodiment 2. DETAILED DESCRIPTION
[0054] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings.
[0055] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0056] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.
[0057] Embodiment 1, reference Figure 1 , as the first embodiment of the present application, the embodiment provides a blood loss risk assessment method based on image data analysis, including the following steps:
[0058] S1, collect patient images and perform preprocessing, identify and locate the pixel coordinates and corresponding world coordinates of all the inner corner points of the checkerboard in the calibration plate image, solve the homographic matrix, define the color correction function based on the 24-color card image, and process the RGB image of healthy skin using the homographic matrix and color correction function, to determine the reference range interval of healthy skin;
[0059] Specifically, the patient image is collected and preprocessed, including:
[0060] The patient image is collected using an RGB camera and is denoised and standardized;
[0061] The patient image includes a calibration board image, a 24-color card image, a wound monitoring image, and an RGB image of healthy skin;
[0062] A standard 24-color card is placed in the camera field of view to collect the 24-color card image;
[0063] A planar checkerboard calibration board with a known physical size (e.g., each black and white square has a length of LrealL centimeters) is placed in the camera field of view, and the checkerboard calibration board is placed on a reference plane approximately parallel to the plane where the wound area is located, ensuring that its surface is flat and completely within the imaging field of view. The calibration board image is collected.
[0064] Not only can high-quality patient images be obtained, but also through standardization and denoising preprocessing, the influence of external interference factors is reduced, ensuring the reliability and accuracy of image information in the subsequent processing process.
[0065] Further, the pixel coordinates and corresponding world coordinates of all the inner corner points of the checkerboard in the calibration board image are identified and located, the homography matrix is solved, the color correction function is defined based on the 24-color card image, and the healthy skin RGB image is processed using the homography matrix and color correction function to determine the reference range interval of the healthy skin, including:
[0066] The Harris corner detection algorithm is applied to the calibration board image to identify and locate the pixel coordinates and corresponding world coordinates of all the inner corner points of the checkerboard in the calibration board image. A world coordinate system is established with a corner of the checkerboard as the origin, and the plane is the calibration board plane. The projection relationship between the pixel coordinates and the world coordinates is described by a 3x3 homography matrix. Based on the pixel coordinates and the corresponding world coordinates, the homography matrix is solved, and the formula is:
[0067] ,
[0068] where s is a non-zero homogeneous coordinate scale factor, and are the image pixel coordinates of the mth corner point, and are the world plane coordinates corresponding to the mth corner point, is the homography matrix, and the Levenberg-Marquardt nonlinear optimization algorithm is used to minimize the sum of the squared reprojection errors of all corner points as the objective function for iterative optimization. The homography matrix is iteratively optimized, and the formula is:
[0069] ,,
[0070] where is the optimization objective function (sum of squared re-projection error) of homography matrix, M is the total number of checkerboard corner points, is the pixel coordinate of the mth detected checkerboard corner point, m is the mth checkerboard corner point, is the world coordinate corresponding to the mth checkerboard corner point, is the re-projection pixel coordinate obtained by projecting the pixel coordinate of the checkerboard corner back to the image plane using the homography matrix;
[0071] 24 color patches in the 24 color card image are extracted by image segmentation algorithm, the average value of all RGB values in the color patch region is calculated to obtain the camera response vector of the color patch, the standard color space reference value corresponding to the color patch is provided by the color card manufacturer The formula is:
[0072] ,
[0073] ,
[0074] where is the camera response vector of the jth color patch, , and are the average values of all pixel red (R), green (G) and blue (B) channel values of the jth color patch region respectively, and T is the transpose operation;
[0075] Based on the camera response vector, the corresponding second-order polynomial feature vector is constructed to establish a nonlinear mapping, and the formula is:
[0076] ,
[0077] where is the second-order polynomial feature vector, 1 is the constant term, R, G and B are the three components of the camera response vector, representing the numerical values of the red, green and blue channels respectively, , and are the square terms of the numerical values of each channel, , and are the two-way cross terms between different channel numerical values;
[0078] Map the second-order polynomial feature vector to the standard color space, calculate the polynomial coefficient vector, and the formula is:
[0079] ,
[0080] ,
[0081] ,
[0082] ,
[0083] ,
[0084] ,
[0085] wherein , and are standard lightness value, standard red-green component value and standard yellow-blue component value respectively, j is the index of color patches on the standard color chart, , and are the regression coefficient vectors of the channel, channel and channel respectively, which are solved by using least square method, is a general symbol, representing the coefficient vector for polynomial regression, is the second order polynomial feature vector of the jth color patch, is the second order polynomial feature mapping function;
[0086] The color correction function is defined as:
[0087] ,
[0088] wherein is the color correction function;
[0089] The RGB image of healthy skin is geometrically corrected using the homography matrix, and the color corrected image is color corrected using the color correction function, and the RGB value of each pixel is converted to the standard color space, to obtain the skin image;
[0090] In the skin image, the healthy skin region is demarcated as a reference region using the artificial interactive ROI demarcation method;
[0091] The values of all pixels in the reference region in the channel are extracted to form a value set, and the minimum value and the maximum value of the value set are screened to form the reference range interval of the healthy skin channel value, which is:
[0092] ,
[0093] wherein healthy skin reference range interval of the channel value, and minimum and maximum values of the channel value of healthy skin respectively;
[0094] The channel is a dimension in the standard color space, which represents the red-green opposite axis of color, and the positive value represents the red direction and the negative value represents the green direction.
[0095] By accurately solving the homography matrix, the image error caused by the shooting angle and the field distortion is solved, and by combining the Harris corner detection and the Levenberg-Marquardt nonlinear optimization algorithm, the accuracy of the corner matching is greatly improved, thereby ensuring the efficiency and accuracy of the geometric correction, and through the threshold setting and morphological processing in image analysis, the accurate extraction of the wound area is ensured, and the interference of noise and artifacts is eliminated, not only can the wound area change be monitored in real time, but also the precise blood loss risk assessment can be provided in a data-based manner to help medical staff discover bleeding abnormalities earlier.
[0096] S2, perspective transformation is performed on the wound monitoring image using the homography matrix, color correction is performed on the geometrically corrected image using a color correction function, the scalar field of each pixel position in the color corrected image is judged based on the healthy skin reference range, an initial wound area binary mask is generated, the pixel coordinates with a value of 1 are extracted to form the wound area, and linear normalization is performed to calculate the normalized chroma state field;
[0097] Specifically, perspective transformation is performed on the wound monitoring image using the homography matrix, color correction is performed on the geometrically corrected image using a color correction function, the scalar field of each pixel position in the color corrected image is judged based on the healthy skin reference range, an initial wound area binary mask is generated, the pixel coordinates with a value of 1 are extracted to form the wound area, and linear normalization is performed to calculate the normalized chroma state field, including:
[0098] The homography matrix is used to perform perspective transformation on the wound monitoring image to eliminate image distortion caused by the camera viewing angle and obtain a geometrically corrected image;
[0099] The color correction function is used to perform color correction on the geometrically corrected image, and the RGB value of each pixel is converted to the standard color space to obtain a color space image;
[0100] The color space image is extracted from the Channel component, get scalar field, judge the scalar field of each pixel position in the image based on the reference range of healthy skin, generate the initial wound area binary mask, the formula is:
[0101] ,
[0102] wherein is the initial wound area binary mask, indicating a binary indicator function (mask) on the image plane, the function value indicates whether the pixel at position at time is preliminarily determined to belong to the wound area, is the acquisition time corresponding to the k-th frame of image, is the scalar field function on the image plane, the function value is the channel value corresponding to the pixel of the image at position at time , is the two-dimensional pixel coordinate vector in the image plane, , x is the column index (horizontal direction) of the pixel, and y is the row index (vertical direction) of the pixel;
[0103] Morphological image processing is performed on the initial wound area binary mask to eliminate noise, fill holes and smooth the region boundary to obtain the final wound area binary mask;
[0104] All pixel coordinates with a value of 1 in the final wound area binary mask are extracted to form a wound area;
[0105] The values of all pixels in the wound area are linearly normalized to map them to the interval , and the normalized chroma state field is calculated, which is the relative intensity of the overall chroma extreme value in the wound area in the current frame, and the formula is:
[0106] ,
[0107] wherein is the normalized chroma state field function on the wound area, the value domain is strictly mapped to the interval , and the value of 0 represents that the point has the most "dark" or least red chroma state in the wound area of the current frame (which may correspond to necrotic tissue or dark blood scab), and the value of 1 represents that the point has the most "red" chroma state in the wound area of the current frame (which may correspond to fresh bleeding), the field eliminates the difference of absolute chroma values under different patients and different lighting conditions, focuses the analysis focus on the relative and dynamic chroma distribution structure in the wound, and provides a dimensionless and standardized state input for subsequent physical modeling based on gradient and diffusion, To prevent the zero constant, to ensure that the denominator is not zero, to avoid numerical calculation error, and are the minimum and maximum values of the wound area, respectively.
[0108] By eliminating image distortion through perspective transformation, the wound area can correspond more accurately to the actual physical space, eliminating errors that may be caused by the viewing angle in wound monitoring. Color correction makes the color information in the image more stable and consistent, especially the color difference between healthy skin and the wound area can be more accurately extracted. Through accurate calibration and processing, not only can healthy skin and wound area be accurately distinguished, but also background noise and artifacts can be removed, ensuring accurate extraction of the wound area. For long-term monitoring and dynamic change assessment, this processing method makes the assessment results more accurate, effectively reflecting the healing process and change trend of the wound, providing more accurate decision support for doctors.
[0109] S3. Within the wound area pixel set, based on the normalized color state field, calculate the original local entropy production rate, convert it to a non-negative entropy production rate, take the non-negative entropy production rate as the initial state of the smoothing field, calculate the diffusion flux vector field, update the smoothing field based on the diffusion flux vector field, and obtain the final local entropy production rate field;
[0110] Specifically, within the wound area pixel set, based on the normalized color state field, calculate the original local entropy production rate, convert it to a non-negative entropy production rate, take the non-negative entropy production rate as the initial state of the smoothing field, calculate the diffusion flux vector field, update the smoothing field based on the diffusion flux vector field, and obtain the final local entropy production rate field, including:
[0111] Within the wound area pixel set, the spatial gradient of the normalized color state field is approximated using the central difference method. According to the principle of non-equilibrium thermodynamics, the negative spatial gradient of the normalized color state field is defined as the covariant vector of the generalized thermodynamic force of the current frame;
[0112] The outer product of the spatial gradient of the normalized color state field and the transpose of the spatial gradient is obtained, and the outer product matrix is obtained. The outer product matrix is Gaussian smoothed (filtered), and the local structure tensor is calculated, with the formula being:
[0113] ,
[0114] where is the local structure tensor (2x2 matrix) at position and time , is a two-dimensional Gaussian kernel function with a standard deviation of , is a fixed parameter, is a convolution operator, The spatial gradient of the normalized chromaticity state field;
[0115] The local structure tensor is regularized and inverted to construct a Riemann metric tensor field describing the local geometry of the state space, resulting in the Riemann metric tensor, which is formulated as follows:
[0116] ,
[0117] in For in position ,time Riemannian metric tensor at the location, Here, is the regularization parameter, a preset minimal positive constant, and I is a 2×2 identity matrix. Let I be the trace of the local structure tensor, which is the sum of its main diagonal elements, and let I be the identity matrix.
[0118] This operation ensures It is always a positive definite and invertible matrix. The physical meaning of the metric g is: in the direction of drastic chromaticity change (active diffusion), A large eigenvalue of g implies a small eigenvalue of its inverse g, which means that the "thermodynamic generalized distance" or "dissipation resistance" in that direction is small.
[0119] According to non-equilibrium thermodynamics, generalized flow is the time rate of change of state variables. Calculate the generalized thermodynamic flow inverse vector field of the current frame.
[0120] Based on the normalized chromaticity state field, the generalized thermodynamic flux inverse vector of the current frame is calculated using the forward temporal difference method, as shown in the formula:
[0121] ,
[0122] in For in position ,time The generalized thermodynamic flow inverse vector at that location. for Partial derivative with respect to time t;
[0123] According to non-equilibrium thermodynamics, on a local Riemannian manifold defined by the metric g, the entropy production rate is given by the inner product of the generalized force X and the generalized flow Q induced by the metric.
[0124] For each position Perform matrix and vector operations to calculate the original local entropy productivity, using the following formula:
[0125] ,
[0126] in For in position ,time the original local entropy production rate at position , , time , the covariant component of the generalized thermodynamic force vector at position ;
[0127] Since the Riemann metric tensor g is a symmetric positive definite matrix, the above tensor operation is numerically equivalent to the multiplication operation of matrix and vector. The formula adopts Einstein summation convention, summing over repeated indices i and j;
[0128] Apply the pointwise maximum function to each element of the original local entropy production rate, convert it to a non-negative entropy production rate;
[0129] Extract the original local entropy production rate value, compare this value with the constant 0, and take the larger value in the comparison result as the final non-negative entropy production rate value at this pixel position, which meets the second law of thermodynamics;
[0130] Take the non-negative entropy production rate as the initial state of the field to be smoothed, and use the central difference method to calculate the spatial gradient of the current iteration field;
[0131] According to the anisotropic diffusion model in the form of Fick's law, the diffusion flux is related to the spatial gradient of the current iteration field through the Riemann metric tensor;
[0132] Combined with the spatial gradient of the current iteration field and the Riemann metric tensor, the diffusion flux vector field is calculated, and the formula is:
[0133] ,
[0134] where is the diffusion flux vector field;
[0135] According to the explicit Euler scheme, update the smoothed field based on the diffusion flux vector field to obtain the field of the next iteration, and the formula is:
[0136] ,
[0137] where is the smoothed field value at position after the n+1th iteration, is the pseudo time step, used to control the amplitude of each iteration update, n is the iteration number, is the divergence (scalar field) of the diffusion flux vector field, which is calculated by the central difference method, is the gradient operator;
[0138] Use the fixed iteration number method to set the iteration number , and use the empirical method to set the iteration number The iteration is stopped, and a final local entropy production rate field is obtained.
[0139] By converting to non-negative entropy production, not only does it comply with the second law of thermodynamics, but it also avoids numerical instability problems. The calculation of the diffusion flux vector field can effectively capture the local thermodynamic changes in the wound area, and the update of the smoothed field can improve the accuracy of the evaluation results. Through multiple iterations and optimization calculations, the final result of the local entropy production rate field will have higher stability and accuracy.
[0140] S4, define the local entropy production rate field as a thermodynamic risk map, generate a binary mask of the bleeding area, and evaluate the bleeding state of the patient;
[0141] Specifically, defining the local entropy production rate field as a thermodynamic risk map to generate a binary mask of the bleeding area includes:
[0142] Defining the local entropy production rate field as a thermodynamic risk map, extracting all pixel values in the thermodynamic risk map located within the wound area, setting a segmentation threshold using the Otsu method, and generating a binary mask of the bleeding area, the formula is:
[0143] ,
[0144] Wherein is the binary mask of the bleeding area at position and time , is the wound area at time , is the thermodynamic risk map at position and time , is the segmentation threshold, and all gray values in the pixel values within the wound area are used as candidate thresholds. All pixel values located within the wound area are divided into foreground and background, the inter-class variance of the two parts of data is calculated, and the candidate threshold that maximizes the inter-class variance is selected as the final threshold.
[0145] Through multiple iterations and optimization calculations, the final result of the local entropy production rate field will have higher stability and accuracy. Image segmentation using the Otsu method has significant advantages because it can automatically determine the optimal threshold without human intervention. The blood loss risk indicator quantifies the thermodynamic changes in the bleeding area, providing a direct basis for evaluating the patient's blood loss state.
[0146] Further, evaluating the bleeding state of the patient includes:
[0147] Extracting all pixel coordinates with a value of 1 in the binary mask of the bleeding area to form the bleeding area;
[0148] The sum of the local entropy production rates of all pixels in the bleeding area is calculated, and is defined as a bleeding risk index;
[0149] The mean value of the historical bleeding risk index (a data buffer is started from the moment of starting monitoring, and is used to store each bleeding risk index received within 10 minutes in chronological order) is calculated using a statistical analysis method, and the alarm threshold is set to 2 times the standard deviation, patients with a bleeding risk index greater than the alarm threshold are determined to be in an abnormal bleeding state, and an alarm signal is triggered, and patients with a bleeding risk index less than or equal to the alarm threshold are determined to be in a normal state.
[0150] By combining the principles of thermodynamics and image analysis, the micro changes in the wound area can be accurately captured, and a more scientific and objective evaluation basis can be provided, the segmentation threshold is automatically set by the Otsu method, and the alarm threshold is dynamically adjusted based on a statistical method, the automation degree of the system is greatly improved, and the need for manual intervention is reduced, the threshold setting method based on the standard deviation has high adaptability, can adjust the alarm standard according to the specific situation of each patient, and improves the flexibility and applicability of the system.
[0151] Embodiment 2, refer to Figure 2 For a second embodiment of the application, a bleeding risk assessment system based on image data analysis comprises:
[0152] The acquisition and preprocessing module is used for acquiring patient images and performing denoising and standardization processing;
[0153] The correction reference area module is used for camera calibration using a checkerboard calibration plate, calculating a homography matrix, performing geometric correction on the image, performing color correction through a color card image, and converting to a standard Color space, extracting a healthy skin area through an artificial interactive ROI demarcation method, and establishing a reference range of healthy skin Channel values;
[0154] The detection state field module is used for extracting a wound area through image segmentation and morphological processing according to the reference range of healthy skin, performing chroma normalization on the wound area, and calculating a chroma state field;
[0155] The segmentation and local entropy production rate module is used for calculating a generalized thermodynamic force covariant vector, calculating a local entropy production rate through a non-equilibrium thermodynamic model, and performing smoothing processing to obtain a final local entropy production rate field;
[0156] The segmentation evaluation module is used for generating a thermodynamic risk map according to the local entropy production rate field, performing image segmentation using the Otsu method, extracting a bleeding area, calculating the sum of the local entropy production rates of the bleeding area, generating a bleeding risk index, and performing risk assessment on the bleeding state of the patient.
[0157] The embodiment also provides a computer device suitable for the blood loss risk assessment method based on image data analysis, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the blood loss risk assessment method based on image data analysis proposed in the above embodiment.
[0158] The computer device can be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, an operator network, NFC (Near Field Communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0159] The embodiment also provides a storage medium having a computer program stored thereon, the program being executed by a processor to realize the blood loss risk assessment method based on image data analysis proposed in the above embodiment. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk.
[0160] It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced, without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A method for assessing blood loss risk based on image data analysis, characterized in that: Includes the following steps: Acquire patient images and preprocess them; The patient images include calibration plate images, 24-color card images, wound monitoring images, and RGB images of healthy skin; Identify and locate the pixel coordinates and corresponding world coordinates of all corner points in the checkerboard image, solve the homography matrix, define a color correction function based on the 24-color card image, and use the homography matrix and color correction function to process the RGB image of healthy skin to determine the reference range of healthy skin. The homography matrix is used to perform perspective transformation on the wound monitoring image. The color correction function is used to perform color correction on the geometrically corrected image. Based on the healthy skin reference range, the scalar field of each pixel position in the color-corrected image is judged to generate an initial binary mask of the wound region. The pixel coordinates with a value of 1 are extracted to form the wound region and are linearly normalized to calculate the normalized chromaticity state field. Within the pixel set of the wound region, the original local entropy yield is calculated based on the normalized chromaticity state field, converted into a non-negative entropy yield, and used as the initial state of the field to be smoothed. The diffusion flux vector field is calculated, and the smoothing field is updated based on the diffusion flux vector field to obtain the final local entropy yield field. The local entropy yield field is defined as a thermodynamic risk map, and a binary mask of the bleeding area is generated to assess the risk of the patient's bleeding status. Within the pixel set of the wound region, based on the normalized chroma state field, the original local entropy yield is calculated, converted into a non-negative entropy yield, and used as the initial state of the field to be smoothed. A diffusion flux vector field is then calculated, and the smoothing field is updated based on the diffusion flux vector field to obtain the final local entropy yield field. This process includes: Within the pixel set of the wound region, the spatial gradient of the normalized chromaticity state field is approximated using the central difference method. Based on the principle of non-equilibrium thermodynamics, the negative spatial gradient of the normalized chromaticity state field is defined as the generalized thermodynamic force covariant vector of the current frame. The outer product of the spatial gradient of the normalized chromaticity state field and the transpose of the spatial gradient is obtained to obtain the outer product matrix. Gaussian smoothing is applied to the outer product matrix to calculate the local structure tensor. Regularize and invert the local structure tensor to obtain the Riemann metric tensor; Based on the normalized chromaticity state field, calculate the generalized thermodynamic flow inverse vector of the current frame; For each position, perform matrix and vector operations to calculate the original local entropy productivity. Apply the pointwise maximum function to each element of the original local entropy productivity to convert it into a non-negative entropy productivity. Using the non-negative entropy yield as the initial state of the field to be smoothed, the spatial gradient of the current iteration field is calculated using the central difference method. By combining the spatial gradient and Riemann metric tensor of the current iteration field, the diffusion flux vector field is calculated. Based on the explicit Euler scheme, the smoothing field is updated using the diffusion flux vector field to obtain the field for the next iteration. The number of iterations is set using a fixed iteration number method. When the number of iterations is reached Then stop iterating to obtain the final local entropy yield field.
2. The blood loss risk assessment method based on image data analysis as described in claim 1, characterized in that: The process involves identifying and locating the pixel coordinates and corresponding world coordinates of all corner points within the checkerboard grid in the calibration board image, solving for the homography matrix, defining a color correction function based on the 24-color chart image, and using the homography matrix and color correction function to process the RGB image of healthy skin to determine the reference range interval for healthy skin, including: The Harris corner detection algorithm is applied to the calibration board image to identify and locate the pixel coordinates and corresponding world coordinates of all corner points in the checkerboard in the calibration board image. Based on the pixel coordinates and corresponding world coordinates, the homography matrix is solved. The image segmentation algorithm extracts 24 color patch regions from the 24-color chart image. The average value of all RGB values within each color patch region is calculated to obtain the camera response vector of the color patch. The color chart manufacturer provides the corresponding standard for each color patch. Color space reference values; Based on the camera response vector, a corresponding second-order polynomial feature vector is constructed, and this second-order polynomial feature vector is mapped to a standard... Color space, calculate polynomial coefficient vector, define color correction function; Geometric correction was performed on the RGB image of healthy skin using a homography matrix, and color correction was then performed on the geometrically corrected image using a color correction function to convert the RGB values of each pixel to a standard value. Color space, to obtain skin image; In skin images, healthy skin areas are delineated using a manually interactive ROI delineation method and used as reference areas. Extract all pixels within the reference area The values on the channel form a set of values. Filtering the set by finding the minimum and maximum values results in healthy skin. Reference range for channel values.
3. The blood loss risk assessment method based on image data analysis as described in claim 2, characterized in that: The process involves using a homography matrix to perform perspective transformation on the wound monitoring image, using a color correction function to perform color correction on the geometrically corrected image, judging the scalar field of each pixel position in the color-corrected image based on a healthy skin reference range, generating an initial binary mask for the wound region, extracting the pixel coordinates with a value of 1 to form the wound region, performing linear normalization, and calculating the normalized chromaticity state field, including: Perspective transformation was performed on the wound monitoring images using a homography matrix to obtain geometrically corrected images. Color correction was then applied to the geometrically corrected images using a color correction function to obtain... Color space image; from Extracting from color space images The channel components are used to obtain the scalar field. Based on the healthy skin reference range, the scalar field at each pixel position in the image is judged to generate an initial binary mask for the wound area. Morphological image processing is performed on the initial binary mask of the wound region to obtain the final binary mask of the wound region; Extract the coordinates of all pixels with a value of 1 from the final binary mask of the wound region to form the wound region; All pixels within the wound area The values are linearly normalized to calculate the normalized chromaticity state field.
4. The blood loss risk assessment method based on image data analysis as described in claim 3, characterized in that: The step of defining the local entropy yield field as a thermodynamic risk map and generating a binary mask for the bleeding region includes: The local entropy yield field is defined as a thermodynamic risk map. All pixel values located within the wound region in the thermodynamic risk map are extracted. The Otsu method is used to set the segmentation threshold to generate a binary mask for the bleeding region.
5. The blood loss risk assessment method based on image data analysis as described in claim 4, characterized in that: The risk assessment of the patient's bleeding status includes: Extract the coordinates of all pixels with a value of 1 from the binary mask of the bleeding region to form the bleeding region; The sum of the local entropy production rates of all pixels within the bleeding area is calculated and defined as the blood loss risk index. Set alarm thresholds. Patients with a blood loss risk index greater than the alarm threshold are identified as having an abnormal bleeding state and an alarm signal is triggered. Patients with a blood loss risk index less than or equal to the alarm threshold are identified as having a normal state.
6. The blood loss risk assessment method based on image data analysis as described in claim 1, characterized in that: The acquisition and preprocessing of patient images includes: Patient images were acquired using an RGB camera and then denoised and standardized.
7. A blood loss risk assessment system based on image data analysis, used to implement the blood loss risk assessment method based on image data analysis as described in any one of claims 1 to 6, characterized in that: include: The acquisition and preprocessing module is used to acquire patient images and perform noise reduction and standardization processing; The calibration reference area module is used for camera calibration using a checkerboard calibration board, calculating the homography matrix, performing geometric correction on the image, color correction using a color chart image, and converting to a standard. Color space, using an interactive ROI delineation method to extract healthy skin areas, and establishing healthy skin Reference range for channel values; The detection state field module is used to extract the wound area based on the healthy skin reference range through image segmentation and morphological processing, normalize the color of the wound area, and calculate the color state field. The segmentation and local entropy yield module is used to calculate the covariant vector of generalized thermodynamic forces, calculate the local entropy yield through a non-equilibrium thermodynamic model, and perform smoothing to obtain the final local entropy yield field. The segmentation assessment module is used to generate a thermodynamic risk map based on the local entropy production field, and to perform image segmentation using the Otsu method to extract the bleeding area, calculate the sum of the local entropy production of the bleeding area, generate a blood loss risk index, and assess the patient's bleeding status.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the blood loss risk assessment method based on image data analysis as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the blood loss risk assessment method based on image data analysis as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Intestinal stoma mucous membrane state evaluation system based on color comparison
CN121242499A
Rotary machinery system performance evaluation and optimization method and system based on system negentropy conversion rate
CN121278881A