A method for intelligent processing of infusion monitoring data

By performing edge detection and water level probability analysis on the grayscale image of the infusion bag, the edge group matching the water level line characteristics of the infusion bag was screened out, which solved the problem that labels and crease textures affect water level line monitoring, and achieved more accurate infusion monitoring Data processing.

CN118865267BActive Publication Date: 2024-11-22LIAONING AIKESEN INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411336450.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-11-22
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

In the prior art, the identification label and crease texture of the infusion bag will divide the water level line, affecting the display effect of the water level line, resulting in low accuracy of infusion monitoring data processing.

Method used

By obtaining the grayscale image of the infusion bag, performing edge detection and removing interference edges, determining the water level probability of the edge segment, filtering out the water level edge to be measured, combining the distribution of pixel points and grayscale values, determining the connection necessity of the initial edge group. The target edge group that matches the infusion bag water level line characteristics are selected to obtain a more accurate water level line.

Benefits of technology

Effectively eliminate the impact of labels and crease textures on water level monitoring, improve the accuracy and consistency of water level lines, and achieve more accurate infusion monitoring data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118865267B_ABST
    Figure CN118865267B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing technology, and specifically to a method for intelligent processing of infusion monitoring data. The method includes: obtaining a grayscale image of an infusion bag, removing interference edges through edge detection to obtain an edge image; determining the water level probability based on the distribution of pixel points in the edge segment, and screening the water level edge to be measured based on the water level probability; determining an initial edge group, determining the necessity of connection based on the characteristics of the water level edge to be measured in the initial edge group, and determining a target edge group based on the necessity of connection; obtaining a suspected water level line, and screening the target water level line based on the angle between each suspected water level line and the horizontal line, and taking the preset local area where the target water level line is located as the water level area to complete the intelligent processing of infusion monitoring data. The embodiment of the present application analyzes each edge segment on the infusion bag, thereby eliminating the influence of the label on water level monitoring and obtaining a more accurate and effective water level line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an intelligent processing method for infusion monitoring data. Background Art

[0002] In the smart ward scenario, due to different requirements for infusion speeds for different patients and different specifications of infusion bags, setting a fixed reminder time for infusion reminders will make the monitoring process cumbersome and less timely, and the data processing efficiency of infusion monitoring is too low. Therefore, it is necessary to effectively process the infusion monitoring data to facilitate the subsequent supervision of the infusion process.

[0003] At present, infusion monitoring can be divided into two categories: data monitoring and visual monitoring. Among them, data monitoring is completed by monitoring according to the infusion droplet speed or the remaining amount in the drip pot through counting sensors, weight sensors, etc., but the data acquisition results of the sensor will be affected by factors such as the shaking of the infusion equipment, and the accuracy of sensor data processing is relatively low; while visual monitoring is to collect images of the infusion process of the infusion equipment through visual analysis, and to monitor the infusion process by performing image processing on the monitoring images. In this way, since the infusion bag itself has an identification label and a crease texture, the identification label will divide the water level line and affect the display effect of the water level line, making the obtained water level line easily affected by the crease texture of the infusion bag itself. Summary of the invention

[0004] In order to solve the technical problem in the related art that the infusion bag itself has an identification label and a crease texture, the identification label will divide the water level line, affecting the display effect of the water level line, making the obtained water level line easily affected by the crease texture of the infusion bag itself, the present application provides an intelligent processing method for infusion monitoring data, and the technical solution adopted is as follows:

[0005] The present application proposes an intelligent processing method for infusion monitoring data, the method comprising:

[0006] Acquire a grayscale image of the infusion bag, perform edge detection on the grayscale image and remove interference edges to obtain an edge image; determine edge segments in the edge image, wherein the interference edges are fixed edges of the label on the infusion bag;

[0007] Determine the water level probability of the edge segment according to the spatial distribution of pixels in the edge segment, the distance between the pixel and the edge of the infusion bag, and the gray value distribution of the pixel, and select at least two water level edges to be measured from the edge segment according to the water level probability;

[0008] Any two edges of the water level to be measured are used to form an initial edge group, the average tangent direction of all pixel points of the edge of the water level to be measured is used as the edge tangent direction, and two pixel points with the closest distance are respectively selected from different edges of the water level to be measured in the initial edge group, and the direction of the straight line formed by them is the connecting tangent direction; the angle between the edge tangent directions is recorded as the first angle value, and the sum of the angles between the connecting tangent direction and the edge tangent direction is recorded as the second angle value, and the connection necessity of the initial edge group is determined according to the difference between the first angle value and the second angle value and the water level probability difference, and the target edge group matching the water level line characteristics of the infusion bag is determined according to the comparison between the connection necessity and the preset necessity threshold;

[0009] The two nearest pixel points of the two water level edges to be measured in the target edge group are connected to obtain the suspected water level line corresponding to each target edge group. The target water level line is screened according to the angle between each suspected water level line and the horizontal line. The preset local area where the target water level line is located is used as the water level area to obtain the intelligent processing result of the infusion monitoring data.

[0010] Furthermore, the method for obtaining the water level probability of the edge segment includes:

[0011] Determining a pixel distribution index of the edge segment according to the chain code distribution of the pixel points on the edge segment;

[0012] Determine the minimum distance between all pixel points on the edge line segment and each pixel point on the edge of the infusion bag as a distance influence index;

[0013] Determining a grayscale discrete index of the edge segment according to the grayscale value variance of all pixels on the edge segment;

[0014] The water level probability of the edge segment is determined according to the pixel distribution index, the distance influence index and the grayscale discrete index, wherein the pixel distribution index, the distance influence index and the grayscale discrete index are all positively correlated with the water level probability of the edge segment, and the value of the water level probability of the edge segment is a normalized value.

[0015] Furthermore, the method for obtaining the edge of the infusion bag comprises:

[0016] The infusion bag image is preprocessed to obtain an infusion bag grayscale image corresponding to the infusion bag, and the outermost edge in the edge detection result of the infusion bag grayscale image is used as the infusion bag edge.

[0017] Furthermore, determining the pixel distribution index of the edge segment according to the chain code distribution of the pixel points on the edge segment includes:

[0018] Based on the eight-chain code algorithm, the chain code value of each pixel on the edge segment is determined, the absolute value of the difference between the chain code values ​​of two adjacent pixels on the edge segment is calculated to obtain the chain code difference, and the mean of all chain code differences is used as the pixel distribution index of the edge segment.

[0019] Furthermore, the method for obtaining the edge of the water level to be measured comprises:

[0020] The edge line segment whose water level probability is greater than a preset probability threshold is used as the water level edge to be measured.

[0021] Furthermore, the method for obtaining the connection necessity of the initial edge group includes:

[0022] The average tangent direction of all pixels in each water level edge to be measured in the initial edge group is used as the edge tangent direction of the corresponding water level edge to be measured;

[0023] Select a pixel point in each water level edge to be measured in the initial edge group, and use the two closest pixel points as the first pixel point and the second pixel point, wherein the first pixel point and the second pixel point respectively belong to different water level edges to be measured in the initial edge group; connect the first pixel point and the second pixel point with a straight line to obtain a connecting line segment, and determine the tangent direction of the connecting line segment as the connecting tangent direction;

[0024] The necessity of connection of the initial edge group is determined according to the edge tangent direction, the connection tangent direction and the water level probability of the two edges to be measured.

[0025] Further, the determining the connection necessity of the initial edge group according to the edge tangent direction, the connection tangent direction and the water level probability of the two water level edges to be measured includes:

[0026] The value of the angle between the edge tangent directions of the two water level edges to be measured is taken as the first angle value;

[0027] The sum of the angles between the connecting tangent direction and the edge tangent directions of the two water level edges to be measured is taken as the second angle value;

[0028] A normalized value of the sum of the first angle value and the second angle value after negative correlation mapping is used as a target angle feature index;

[0029] Based on the difference in water level probabilities between the two water level edges to be measured, a probability difference characteristic index is determined, wherein the probability difference characteristic index is negatively correlated with the difference in corresponding water level probabilities;

[0030] The connection necessity of the initial edge group is obtained by combining the target angle characteristic index and the probability difference characteristic index.

[0031] Furthermore, the method for determining the target edge group matching the water level line characteristics of the infusion bag includes:

[0032] The initial edge group whose connection necessity is greater than a preset necessity threshold is used as the target edge group.

[0033] Furthermore, the method of screening and obtaining the target water level line according to the angle between each suspected water level line and the horizontal line includes:

[0034] Determine the minimum value of the angle between the extension line of the suspected water level line and the horizontal line to obtain a target angle, calculate the absolute value of the difference between the target angle and the right angle, and obtain the edge angle difference;

[0035] The water level line with the smallest edge angle difference is taken as the target water level line.

[0036] Furthermore, the preset local area where the target water level line is located is used as the water level area to obtain the intelligent processing result of the infusion monitoring data, including:

[0037] Performing morphological expansion processing on the pixel points corresponding to the target water level line based on a preset expansion coefficient, segmenting to obtain a water level area, and taking the distance between the water level area and the bottom of the infusion bag as the liquid height;

[0038] The segmented water level area and the determined liquid height are used as the intelligent processing results of the infusion monitoring data.

[0039] This application has the following beneficial effects:

[0040] The present application analyzes the edge line segments in the edge image of the infusion bag, and combines the texture features of the edge line segments and the texture of the actual water level line to effectively analyze the edge line segments. Since the infusion bag itself has label interference, the label will affect the monitoring of the water level line, and at the same time, it will block the complete water level line in the middle, which will cause errors in the determination of the water level line in the grayscale image of the infusion bag. The embodiment of the present application determines the edge of the water level to be measured based on the water level probability of the edge line segment, and then determines the necessity of connecting the two water level edges to be measured according to the directional characteristics of the water level edge itself, and screens out the water level edges that are out of the water level according to the edge line change characteristics. The target edge group with more consistent potential can be analyzed to combine the actual water level characteristics to determine a more accurate suspected water level. According to the angle between each suspected water level and the horizontal line, the target water level is screened. The target water level is the water level whose overall distribution trend and pixel grayscale distribution are consistent with the actual water level characteristic distribution. Therefore, the present application uses the preset local area where the target water level is located as the water level area. By analyzing the target edge group to determine the target water level, the influence of the label on the water level of the infusion bag can be eliminated, thereby realizing more accurate and effective intelligent processing of the infusion monitoring data. In summary, the embodiment of the present application analyzes each edge line segment on the infusion bag to eliminate the influence of the label and crease texture on water level monitoring and obtain a more accurate and effective water level. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0042] Figure 1 A flowchart of an intelligent processing method for infusion monitoring data provided by one embodiment of the present application;

[0043] Figure 2 An example diagram of edge detection provided by an embodiment of the present application;

[0044] Figure 3 A schematic flow chart of a method for obtaining the water level probability of an edge segment provided by an embodiment of the present application;

[0045] Figure 4 A flow chart of a method for obtaining connection necessity provided in one embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of the intelligent processing method of infusion monitoring data proposed in the present application, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0047] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0048] The specific scheme of the intelligent processing method of infusion monitoring data provided by the present application is described in detail below with reference to the accompanying drawings.

[0049] See also Figure 1 , which shows a flow chart of an intelligent processing method for infusion monitoring data provided by an embodiment of the present application, the method comprising:

[0050] S101: Obtain a grayscale image of the infusion bag, perform edge detection on the grayscale image and remove interference edges to obtain an edge image; and determine edge segments in the edge image.

[0051] One implementation scenario of the present application may specifically include, in the field of smart wards, using visual monitoring equipment, such as surveillance cameras, to collect images of infusion bags, obtain image data, and obtain the results of water level changes on the infusion bags by processing the image data. It should be noted that since the infusion bag itself is made of a soft and transparent material, irregular deformations will occur on the surface, thereby forming corresponding textures, which will affect the analysis of the water level. At the same time, since the infusion bag itself also has corresponding labels, the overall water level line will be divided from the middle, thereby reducing the characteristic performance of the water level line, making the monitoring effect of the water level line insufficient. Therefore, the present application analyzes and screens the acquired textures to determine the texture that best matches the water level line, thereby realizing intelligent processing of infusion monitoring data. The specific process is described in the subsequent embodiments.

[0052] In an embodiment of the present application, an image acquisition device may be arranged directly in front of the infusion bag to acquire an original image of the infusion bag itself during infusion, and then perform image preprocessing to obtain a grayscale image of the infusion bag.

[0053] The image preprocessing in the embodiments of the present application may specifically include, for example, image denoising, image grayscale processing, and semantic segmentation and other preprocessing methods, wherein the image denoising may specifically include, for example, mean denoising, and the image grayscale processing may specifically include, for example, mean grayscale processing. Through semantic segmentation, it is possible to segment and extract an image containing only the infusion bag, that is, the grayscale image of the infusion bag is a grayscale image containing only the infusion bag, thereby avoiding interference of the background area with subsequent intelligent processing. Of course, in other embodiments of the present application, the technical means used for preprocessing may also be adjusted as needed to meet the actual usage scenarios, and no further elaboration or limitation will be given for this.

[0054] Among them, edge detection is an image processing technology well known in the art, and the Canny edge detection operator can be used to implement the edge detection process of the grayscale image.

[0055] Among them, the identification of interference edges is mainly the identification of the label of the infusion bag itself, that is, the interference edge is the fixed edge of the label on the infusion bag, and the label includes but is not limited to the product name, specification, and configuration date. It can be understood that each infusion bag surface has a label with a fixed position and a crease texture with an unfixed position, and the existence of the label and the crease texture will affect the determination of the water level line in the grayscale image of the infusion bag. Therefore, the embodiment of the present application eliminates the influence of this part by identifying the label at a fixed position and deleting it as an interference edge. Figure 2 , Figure 2 An example diagram of edge detection provided by an embodiment of the present application is Figure 2 It can be seen that the label on the infusion bag is in a fixed position, and the area corresponding to the fixed label can be determined by morphological recognition, and it can be eliminated as an interference edge to obtain an edge image.

[0056] It should be noted that, since the interference edge is at a fixed position, the interference edge can be identified by using existing image recognition technology, and there is no limitation on this.

[0057] Among them, the edge line segment is a line segment composed of continuous edge pixel points. Through edge detection, the edge pixel points in the edge image can be detected, and the line segment composed of continuous edge pixel points can be used as the edge line segment. The edge line segment not only includes the line segment corresponding to the water level line, but also includes the selected segment corresponding to the crease texture of the infusion bag itself, which will affect the analysis of the water level line in the grayscale image of the infusion bag. Therefore, the embodiment of the present application conducts a specific analysis of the edge line segment in the subsequent steps.

[0058] S102: Determine the water level probability of the edge segment according to the spatial distribution of pixels in the edge segment, the distance between the pixel and the edge of the infusion bag, and the gray value distribution of the pixel, and select at least two water level edges to be measured from the edge segment according to the water level probability.

[0059] In the embodiment of the present application, since the edge segments include not only the edge segments corresponding to the water level line, but also the segments of the highlight area corresponding to the grayscale image of the infusion bag due to lighting reasons, the present application needs to perform a specific analysis based on the spatial distribution characteristics, position characteristics and grayscale characteristics of the pixel points on each edge segment to determine the probability of each edge segment being the edge segment corresponding to the water level line, and to screen out the most likely water level edge.

[0060] Further, in some embodiments of the present application, in combination Figure 3 , Figure 3 A schematic flow chart of a method for obtaining the water level probability of an edge segment provided in one embodiment of the present application includes:

[0061] S301: Determine a pixel distribution index of an edge segment according to the chain code distribution of the pixel points on the edge segment.

[0062] In the embodiments of the present application, the analysis of pixel distribution can be realized based on the chain code technology. Further, in some embodiments of the present application, according to the chain code distribution of the pixels on the edge segment, the pixel distribution index of the edge segment is determined, including: determining the chain code value of each pixel on the edge segment based on the eight-chain code algorithm, calculating the absolute value of the difference between the chain code values ​​of two adjacent pixels on the edge segment, obtaining the chain code difference, and taking the average of all chain code differences as the pixel distribution index of the edge segment.

[0063] Among them, the eight-chain code algorithm is a chain code algorithm well known to relevant technical personnel in the field. The eight-chain code is used to determine the characteristics of the pixel distribution on the edge segment, thereby obtaining the chain code value of each pixel. The chain code value of each pixel not only represents the position distribution of the pixel on the corresponding edge segment, but also can reflect the direction information of the pixel and its adjacent points.

[0064] Of course, in other embodiments of the present application, it can also be based on a variety of different chain code forms such as four-chain code, 10-chain code, etc., and there is no limitation to this.

[0065] It can be understood that when the edge segment presents a straight line feature, the difference in chain code values ​​between adjacent pixels is 0. Therefore, the absolute value of the difference in chain code values ​​between two adjacent pixels on the edge segment can be calculated to obtain the chain code difference, and the mean of all chain code differences is used as the pixel distribution index of the edge segment. The smaller the value of the pixel distribution index, the smaller the chain code difference between adjacent pixels, that is, the more it presents a straight line feature. This feature is similar to the feature of the water level line presented as a straight line due to the influence of gravity. The edge segments generated due to the creases of the infusion bag itself and the influence of light are correspondingly expressed as curve features. Therefore, the smaller the pixel distribution index, the more the corresponding edge segment conforms to the water level line.

[0066] S302: Calculate the minimum distance between all pixels on the edge segment and each pixel on the edge of the infusion bag as a distance influence index; determine the grayscale discrete index of the edge segment according to the grayscale value variance of all pixels on the edge segment.

[0067] Among them, the edge of the infusion bag is the outermost edge of the grayscale image of the infusion bag detected by edge detection, which represents the boundary of the infusion bag itself. Since the creases and lighting effects of the infusion bag itself are usually inside the infusion bag, and the water level is closer to the edge of the infusion bag or even intersects with the edge, the distance between the nearest pixel points between the two is used as the distance influence index. The distance influence index can screen out some creases and lighting effects inside the infusion bag.

[0068] Since the infusion bag is usually fixed on the infusion equipment and will not move randomly during the infusion process, the angle of illumination is relatively fixed. Therefore, a large grayscale change will occur on the curved crease, while the grayscale change of the water level is relatively low. Therefore, the grayscale change degree of each edge line can be characterized by the grayscale value change degree of each edge line. Specifically, the grayscale value variance of all pixels on the edge line segment is used as the grayscale discrete index of the edge line segment.

[0069] S303: Determine the water level probability of the edge segment according to the pixel distribution index, the distance influence index and the grayscale discrete index, wherein the pixel distribution index, the distance influence index and the grayscale discrete index are all positively correlated with the water level probability of the edge segment, and the value of the water level probability of the edge segment is a normalized value.

[0070] In one embodiment of the present application, the normalization processing can be specifically, for example, maximum and minimum value normalization processing, and the normalization in subsequent steps can all adopt maximum and minimum value normalization processing. In other embodiments of the present application, other normalization methods can be selected according to the specific range of numerical values, which will not be repeated here.

[0071] In an embodiment of the present application, the water level probability of the edge segment is determined based on the pixel distribution index, the distance influence index and the grayscale discrete index, wherein the pixel distribution index, the distance influence index and the grayscale discrete index are all negatively correlated with the water level probability of the edge segment, and the value of the water level probability of the edge segment is a normalized value.

[0072] Among them, a positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. The specific relationship can be a multiplication relationship, an addition relationship, or the power of an exponential function, which is determined by actual application; a negative correlation means that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtraction relationship, a division relationship, etc., which is determined by actual application.

[0073] In the embodiment of the present application, the product of the pixel distribution index, the distance influence index and the grayscale discrete index can be calculated, and the negative correlation mapping and normalization can be performed to obtain the water level probability of the edge segment. For example, the product of the pixel distribution index, the distance influence index and the grayscale discrete index can be calculated, the negative number can be taken and the maximum and minimum values ​​can be normalized to obtain the water level probability of the edge segment. There is no restriction on this.

[0074] The embodiment of the present application realizes multi-dimensional water level probability analysis by combining pixel distribution indicators, distance influence indicators and grayscale discrete indicators. According to the characteristics of the water level line itself being affected by gravity, it can accurately determine the probability value of each edge line segment being the line segment corresponding to the water level line, which facilitates subsequent further water level line analysis.

[0075] Furthermore, in some embodiments of the present application, a method for acquiring a water level edge to be measured includes: taking an edge line segment whose water level probability is greater than a preset probability threshold as the water level edge to be measured.

[0076] Among them, the preset probability threshold is the threshold value of the water level probability. In the embodiment of the present application, the preset probability threshold can be set to 0.5. That is to say, when the water level probability is greater than 0.5, the corresponding edge segment is used as the water level edge to be measured in the grayscale image of the infusion bag. Of course, in other embodiments of the present application, the preset probability threshold can also be adjusted according to actual monitoring needs, and there is no restriction on this.

[0077] It should be noted that when there is one water level edge to be measured in the grayscale image of the infusion bag, the water level edge to be measured can be directly used as the target water level line, while when there are multiple water level edges to be measured, further analysis is required.

[0078] S103: Any two water level edges to be measured are combined into an initial edge group, and the necessity of connecting the initial edge group is determined according to the water level probability of the water level edges to be measured in the initial edge group, the direction distribution of the pixel points, and the direction of the line segment formed by the two closest pixel points in different water level edges to be measured. Based on the necessity of connection, a target edge group matching the water level line characteristics of the infusion bag is determined.

[0079] In the embodiment of the present application, since the label on the infusion bag itself is too large, the water level line may be blocked by the label and produce two sections. Therefore, the present application needs to conduct a specific analysis of the water level line divided into two sections. In the embodiment of the present application, any two water level edges to be measured form an initial edge group.

[0080] like Figure 4 As shown, Figure 4 A flow chart of a method for obtaining connection necessity provided by an embodiment of the present application, the method for obtaining the connection necessity of the initial edge group includes the following steps:

[0081] S401: taking the average tangent direction of all pixels in each water level edge to be measured in the initial edge group as the edge tangent direction of the corresponding water level edge to be measured.

[0082] The tangent direction of each pixel point may be calculated respectively, and then the tangent directions of all the pixel points may be averaged to obtain the edge tangent direction of the edge of the water level to be measured.

[0083] S402: Select any pixel point in each water level edge to be measured in the initial edge group, and use the two nearest pixel points as the first pixel point and the second pixel point, wherein the first pixel point and the second pixel point respectively belong to different water level edges to be measured in the initial edge group; connect the first pixel point and the second pixel point with a straight line to obtain a connecting line segment, and determine the tangent direction of the connecting line segment as the connecting tangent direction.

[0084] In an embodiment of the present application, it is necessary to connect two water level edges to be measured in order to estimate the water level line blocked by the label. Therefore, the two closest pixel points are used as the first pixel point and the second pixel point, and the first pixel point and the second pixel point are connected in a straight line to obtain a connecting line segment. Since the connecting line segment is a straight line, its tangent direction can be directly determined as the connecting tangent direction.

[0085] S403: Determine the connection necessity of the initial edge group according to the edge tangent direction, the connection tangent direction and the water level probability of the two water level edges to be measured.

[0086] Furthermore, in some embodiments of the present application, the necessity of connection of the initial edge group is determined according to the edge tangent direction, the connecting tangent direction and the water level probability of the two water level edges to be measured, including: taking the numerical value of the angle between the edge tangent directions of the two water level edges to be measured as the first angle value; taking the sum of the numerical values ​​of the angles between the connecting tangent direction and the edge tangent directions of the two water level edges to be measured as the second angle value; taking the normalized value of the sum of the first angle value and the second angle value after negative correlation mapping as the target angle feature index; determining the probability difference feature index based on the difference in water level probabilities of the two water level edges to be measured, wherein the probability difference feature index is negatively correlated with the difference in corresponding water level probabilities; and obtaining the necessity of connection of the initial edge group by combining the target angle feature index and the probability difference feature index.

[0087] In the embodiment of the present application, by determining the first angle value and the second angle value, a specific analysis can be performed based on the first angle value and the second angle value. It should be noted that, for the convenience of analysis, the first angle value and the second angle value are both less than 180 degrees.

[0088] In an embodiment of the present application, the normalized value of the sum of the first angle value and the second angle value after negative correlation mapping is used as the target angle characteristic index. The larger the value of the target angle characteristic index, the smaller the corresponding values ​​of the first angle value and the second angle value. In other words, the smaller the difference in the tangent direction, the greater the possibility that the two water level edges to be measured and the connecting tangents are one line.

[0089] Among them, the absolute value of the difference in water level probabilities of the two water level edges to be measured is calculated, and the probability difference characteristic index is obtained by negative correlation mapping and normalization. Then, the two water level edges to be measured are further analyzed by the water level probability. The larger the value of the probability difference characteristic index, the smaller the difference in water level probabilities of the two water level edges to be measured, and the more similar the two water level edges to be measured are.

[0090] Therefore, the embodiment of the present application combines the target angle characteristic index and the probability difference characteristic index to obtain the connection necessity of the initial edge group. Specifically, from the above analysis, it can be seen that the target angle characteristic index and the probability difference characteristic index are both positively correlated with the connection necessity. Then, the present application can calculate the normalized value of the product of the target angle characteristic index and the probability difference characteristic index to obtain the connection necessity of the initial edge group, or, it can also calculate the sum of the target angle characteristic index and the probability difference characteristic index, and normalize it as the connection necessity of the initial edge group. The greater the connection necessity, the more likely it is that the two water level edges to be measured are the same edge.

[0091] Furthermore, in some embodiments of the present application, a method for determining a target edge group that matches the water level line characteristics of an infusion bag includes: taking an initial edge group whose connection necessity is greater than a preset necessity threshold as a target edge group.

[0092] Among them, the preset necessity threshold is the threshold value of connection necessity. In the embodiment of the present application, the specific value of the preset necessity threshold can be, for example, 0.8, that is, the initial edge group with connection necessity greater than 0.8 is used as the target edge group.

[0093] S104: Connect the two nearest pixel points in the two water level edges to be measured in the target edge group to obtain the suspected water level line corresponding to each target edge group, and filter out the target water level line according to the angle between each suspected water level line and the horizontal line. The preset local area where the target water level line is located is used as the water level area in the grayscale image of the infusion bag to complete the intelligent processing of the infusion monitoring data.

[0094] In the embodiment of the present application, the two closest pixel points in the two water level edges to be measured of the target edge group can be connected to obtain the suspected water level line corresponding to each target edge group. It should be noted that when there is one target edge group, the suspected water level line corresponding to it is used as the target water level line. If more target edge groups are still screened out, it is necessary to further analyze multiple target edge groups.

[0095] Furthermore, in some embodiments of the present application, a target water level line is screened based on the angle between each suspected water level line and the horizontal line, including: determining the minimum value of the angle between the extension line of the suspected water level line and the horizontal line to obtain the target angle, calculating the absolute value of the difference between the target angle and the right angle to obtain the edge angle difference; and taking the water level line with the smallest edge angle difference as the target water level line.

[0096] Due to the influence of gravity, the water level line is usually a horizontal line. Therefore, this application determines the minimum value of the angle between the extension line of the suspected water level line and the horizontal line, obtains the target angle, calculates the absolute value of the difference between the target angle and the right angle, and obtains the edge angle difference. The smaller the edge angle difference, the more it conforms to the characteristics of the water level line itself.

[0097] Furthermore, in some embodiments of the present application, a preset local area where the target water level line is located is used as a water level area, and the water level area is intelligently monitored, including: performing morphological expansion processing on the pixel points corresponding to the target water level line based on a preset expansion coefficient, segmenting the water level area, and taking the distance between the water level area and the bottom of the infusion bag as the liquid height; and taking the segmented water level area and the determined liquid height as the specific processing results of the infusion monitoring data.

[0098] Among them, the preset expansion coefficient is the coefficient corresponding to the morphological expansion processing. The preset expansion coefficient can be specifically 5, for example, that is, 5 pixels are expanded outward. In the embodiment of the present application, the target water level line can be analyzed by morphological expansion to obtain the characteristics within the local range of the target water level line, so as to facilitate more effective and reliable infusion monitoring.

[0099] The water level area is the local area where the water level line is located. By determining the water level area, the water level area can be segmented and marked, which is convenient for accurate identification of the water level line and also convenient for subsequent segmentation of water level areas in different infusion images.

[0100] In the embodiment of the present application, the liquid height is determined by the distance between the water level area and the bottom of the infusion bag. Of course, the straight-line distance between the target water level line and the bottom edge of the infusion bag can also be directly used as the liquid height, and there is no limitation on this.

[0101] In other embodiments of the present application, the target water level line can also be directly used as the water level line corresponding to the liquid height, so as to analyze the changes in the target water level line at different times. As the intelligent processing result of infusion monitoring data, the present application aims to analyze the target water level line in each image, so as to provide more accurate processing results for the infusion monitoring data.

[0102] The present application analyzes the edge line segments in the edge image of the infusion bag, and combines the texture features of the edge line segments with the texture of the actual water level line to effectively analyze the edge line segments. Since the infusion bag itself has label interference, the label will affect the determination of the water level line, and at the same time, the complete water level line will be blocked in the middle, so that there is an error in the water level line determination result in the grayscale image of the infusion bag. The embodiment of the present application determines the water level edge to be measured based on the water level probability of the edge line segment, and then determines the necessity of connecting the two water level edges to be measured according to the directional characteristics of the water level edge itself, and screens out the water level edges through the edge line change characteristics. A target edge group with a more consistent trend can be determined by analyzing the target edge group in combination with the actual water level characteristics to determine a more accurate suspected water level. The target water level is screened based on the angle between each suspected water level and the horizontal line. The target water level is the water level whose overall distribution trend and pixel grayscale distribution are consistent with the actual water level characteristic distribution. Therefore, this application uses the preset local area where the target water level is located as the water level area, and determines the target water level by analyzing the target edge group. The influence of the label on the water level line of the infusion bag can be eliminated, thereby achieving more accurate and effective intelligent processing of infusion monitoring data. In summary, the embodiment of the present application analyzes each edge line segment on the infusion bag to eliminate the influence of the label on water level monitoring, obtain a more accurate and effective water level line, and complete the intelligent processing of infusion monitoring data.

[0103] It should be noted that the sequence of the above embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0104] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for intelligent processing of infusion monitoring data, characterized in that: The method comprises: Acquire a grayscale image of the infusion bag, perform edge detection on the grayscale image and remove interference edges to obtain an edge image; determine edge segments in the edge image, wherein the interference edges are fixed edges of the label on the infusion bag; Determine the water level probability of the edge segment according to the spatial distribution of pixels in the edge segment, the distance between the pixel and the edge of the infusion bag, and the gray value distribution of the pixel, and select at least two water level edges to be measured from the edge segment according to the water level probability; Any two edges of the water level to be measured are used to form an initial edge group, the average tangent direction of all pixel points of the edge of the water level to be measured is used as the edge tangent direction, and two pixel points with the closest distance are respectively selected from different edges of the water level to be measured in the initial edge group, and the direction of the straight line formed by them is the connecting tangent direction; the angle between the edge tangent directions is recorded as the first angle value, and the sum of the angles between the connecting tangent direction and the edge tangent direction is recorded as the second angle value, and the connection necessity of the initial edge group is determined according to the difference between the first angle value and the second angle value and the water level probability difference, and the target edge group matching the water level line characteristics of the infusion bag is determined according to the comparison between the connection necessity and the preset necessity threshold; The two nearest pixel points of the two water level edges to be measured in the target edge group are connected to obtain the suspected water level line corresponding to each target edge group. The target water level line is screened according to the angle between each suspected water level line and the horizontal line. The preset local area where the target water level line is located is used as the water level area to obtain the intelligent processing result of the infusion monitoring data.

2. The intelligent processing method for infusion monitoring data according to claim 1, characterized in that: The method for obtaining the water level probability of the edge segment includes: Determining a pixel distribution index of the edge segment according to the chain code distribution of the pixel points on the edge segment; Determine the minimum distance between all pixel points on the edge line segment and each pixel point on the edge of the infusion bag as a distance influence index; Determining a grayscale discrete index of the edge segment according to the grayscale value variance of all pixels on the edge segment; The water level probability of the edge segment is determined according to the pixel distribution index, the distance influence index and the grayscale discrete index, wherein the pixel distribution index, the distance influence index and the grayscale discrete index are all positively correlated with the water level probability of the edge segment, and the value of the water level probability of the edge segment is a normalized value.

3. The intelligent processing method for infusion monitoring data according to claim 2, characterized in that: The method for obtaining the edge of the infusion bag comprises: The infusion bag image is preprocessed to obtain an infusion bag grayscale image corresponding to the infusion bag, and the outermost edge in the edge detection result of the infusion bag grayscale image is used as the infusion bag edge.

4. The intelligent processing method for infusion monitoring data according to claim 2, characterized in that: The step of determining the pixel distribution index of the edge segment according to the chain code distribution of the pixel points on the edge segment includes: Based on the eight-chain code algorithm, the chain code value of each pixel on the edge segment is determined, the absolute value of the difference between the chain code values ​​of two adjacent pixels on the edge segment is calculated to obtain the chain code difference, and the mean of all chain code differences is used as the pixel distribution index of the edge segment.

5. The intelligent processing method for infusion monitoring data according to claim 1, characterized in that: The method for obtaining the edge of the water level to be measured comprises: The edge line segment whose water level probability is greater than a preset probability threshold is used as the water level edge to be measured.

6. The intelligent processing method for infusion monitoring data according to claim 1, characterized in that: The method for obtaining the connection necessity of the initial edge group includes: The average tangent direction of all pixels in each water level edge to be measured in the initial edge group is used as the edge tangent direction of the corresponding water level edge to be measured; Select a pixel point in each water level edge to be measured in the initial edge group, and use the two closest pixel points as the first pixel point and the second pixel point, wherein the first pixel point and the second pixel point respectively belong to different water level edges to be measured in the initial edge group; connect the first pixel point and the second pixel point with a straight line to obtain a connecting line segment, and determine the tangent direction of the connecting line segment as the connecting tangent direction; The necessity of connection of the initial edge group is determined according to the edge tangent direction, the connection tangent direction and the water level probability of the two edges to be measured.

7. The intelligent processing method for infusion monitoring data according to claim 6, characterized in that: The determining the connection necessity of the initial edge group according to the edge tangent direction, the connection tangent direction and the water level probability of the two water level edges to be measured includes: The value of the angle between the edge tangent directions of the two water level edges to be measured is taken as the first angle value; The sum of the angles between the connecting tangent direction and the edge tangent directions of the two water level edges to be measured is taken as the second angle value; A normalized value of the sum of the first angle value and the second angle value after negative correlation mapping is used as a target angle feature index; Based on the difference in water level probabilities between the two water level edges to be measured, a probability difference characteristic index is determined, wherein the probability difference characteristic index is negatively correlated with the difference in corresponding water level probabilities; The connection necessity of the initial edge group is obtained by combining the target angle characteristic index and the probability difference characteristic index.

8. The intelligent processing method for infusion monitoring data according to claim 1, characterized in that: The method for determining the target edge group matching the water level line characteristics of the infusion bag comprises: The initial edge group whose connection necessity is greater than a preset necessity threshold is used as the target edge group.

9. The intelligent processing method for infusion monitoring data according to claim 1, characterized in that: The method of screening and obtaining the target water level line according to the angle between each suspected water level line and the horizontal line includes: Determine the minimum value of the angle between the extension line of the suspected water level line and the horizontal line to obtain a target angle, calculate the absolute value of the difference between the target angle and the right angle, and obtain the edge angle difference; The water level line with the smallest edge angle difference is taken as the target water level line.

10. The intelligent processing method for infusion monitoring data according to claim 1, characterized in that: The method of using the preset local area where the target water level line is located as the water level area to obtain the intelligent processing result of the infusion monitoring data includes: Performing morphological expansion processing on the pixel points corresponding to the target water level line based on a preset expansion coefficient, segmenting to obtain a water level area, and taking the distance between the water level area and the bottom of the infusion bag as the liquid height; The segmented water level area and the determined liquid height are used as the intelligent processing results of the infusion monitoring data.

Citation Information

Patent Citations

  • Automatic Ship Draft Detection Method Based on Image Processing

    CN102295061A

  • Infusion monitoring system capable of performing wireless transmission

    CN103520801A

  • Visual defect detection method for automobile connector

    CN118587187A

  • Deep learning-based ellipse recognition method

    WO2021027070A1