Lesion classification device and method based on dialysate image analysis

Through a lesion classification device based on dialysate image analysis, image scoring is used to calculate the transparency of the dialysate bag, which solves the problem of time delay and misidentification during manual identification by doctors, and improves the efficiency and accuracy of dialysis treatment.

CN117830719BActive Publication Date: 2024-09-03GUOYITONG (BEIJING) TECH DEV CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202311856588.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2024-09-03
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

In the existing technology, doctors manually identify the risk of inflammation in dialysate, which causes delays and misidentification problems, resulting in low dialysis treatment efficiency and waste of medical resources.

Method used

A lesion classification device based on dialysate image analysis is used to compare the image to be processed of the dialysate bag with the preset background, calculate the edge shape similarity score and stripe clarity score, determine the transparency of the dialysate bag, and classify whether the patient is Inflammation is present.

Benefits of technology

It reduces the time and medical resource investment in inflammation identification and diagnosis, improves the efficiency of dialysis treatment, and improves the accuracy and objectivity of transparency assessment through multi-faceted evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117830719B
    Figure CN117830719B
Patent Text Reader

Abstract

The present invention relates to a lesion classification device and method based on dialysate image analysis, and relates to the field of computers. The device includes: a to-be-processed image acquisition module, a reference image acquisition module, an edge acquisition module, an edge shape module, an image marking module, a stripe clarity module, a dialysate bag transparency module, and a lesion classification module, which can obtain edge shape similarity scores and stripe clarity scores, and then obtain dialysate bag transparency scores, so as to classify patients based on the dialysate bag transparency scores. According to the present invention, the time for identification and diagnosis and the investment of medical resources can be reduced, and the efficiency of dialysis treatment can be improved. In addition, the edge shape similarity scores and stripe clarity scores of the to-be-processed image and the reference image can be determined, thereby forming a multi-faceted evaluation of transparency and improving the accuracy of transparency evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a lesion classification device and method based on dialysate image analysis Background Art

[0002] Peritoneal dialysis is a type of dialysis that uses the body's own peritoneum as a dialysis membrane. The dialysate injected into the peritoneal cavity exchanges solutes and water with the plasma components in the capillaries on the other side of the peritoneum, removing metabolic products and excess water from the body, while replenishing the body's necessary substances through the dialysate. The dialysate output from the human body may be turbid, and the turbidity of the dialysate may indicate that the patient has inflammation and other diseases. According to relevant technologies, doctors usually identify the patient's dialysate to determine whether there is a risk of inflammation. Manual identification by doctors cannot detect and deal with it in a timely manner, and it also takes up treatment time and medical resources, reducing the efficiency of dialysis treatment. It may also cause misidentification due to factors such as human experience.

[0003] The information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to those skilled in the art. Summary of the invention

[0004] The embodiment of the present invention proposes a lesion classification device based on dialysate image analysis, which can accurately determine the complications of patients caused by dialysis, help doctors adjust the patient's treatment plan, reduce the investment of time and medical resources, and improve the efficiency of dialysis treatment.

[0005] According to a first aspect of an embodiment of the present invention, a lesion classification device based on dialysate image analysis is provided, comprising:

[0006] a module for acquiring an image to be processed, for acquiring an image to be processed of a dialysate bag, wherein the dialysate bag is a transparent bag, the image to be processed is obtained by photographing the dialysate bag in front of a preset background, the preset background comprises a preset graphic with a preset shape, and the preset graphic has a plurality of stripes inside, the stripes comprise mutually parallel transverse stripes, the camera for photographing the image to be processed is located in front of the dialysate bag, and the preset background is located behind the dialysate bag;

[0007] A reference image acquisition module, used to acquire a reference image of the preset background;

[0008] An edge acquisition module, used to acquire a first edge of a preset figure in the image to be processed and a second edge of a preset figure in the reference image;

[0009] an edge shape module, configured to determine an edge shape similarity score based on the first edge and the second edge;

[0010] An image marking module, configured to set a plurality of first image marks parallel to the stripes and a plurality of second image marks perpendicular to the stripes at a plurality of positions on the first edge, and to set a plurality of third image marks parallel to the stripes and a plurality of fourth image marks perpendicular to the stripes at a plurality of positions on the second edge;

[0011] a stripe clarity module, configured to obtain a stripe clarity score according to the first image mark, the second image mark, the third image mark and the fourth image mark;

[0012] A dialysate bag transparency module, used to obtain a dialysate bag transparency score according to the stripe clarity score and the edge shape similarity score;

[0013] The lesion classification module is used to obtain the lesion classification result of the dialysis fluid bag owner according to the transparency score of the dialysis fluid bag.

[0014] According to an embodiment of the present invention, determining an edge shape similarity score according to the first edge and the second edge includes:

[0015] Setting a plurality of first test points on the first edge;

[0016] Determining a normal direction of a first edge at a location where the first test point is located;

[0017] Setting a plurality of second test points on the second edge;

[0018] Determining the normal direction of the second edge at the location of the test point;

[0019] Determine the integrity of the first edge according to the first test point, a first pixel point adjacent to the first test point along the normal direction, the second test point, and a second pixel point adjacent to the second test point along the normal direction;

[0020] Obtaining a first vector between a plurality of first test points and a second vector between a plurality of second test points;

[0021] Determining edge shape similarity according to the first vector and the second vector;

[0022] The edge shape similarity score is determined according to the integrity of the first edge and the edge shape similarity.

[0023] According to an embodiment of the present invention, determining the integrity of the first edge according to the first test point, a first pixel point adjacent to the first test point along the normal direction, the second test point, and a second pixel point adjacent to the second test point along the normal direction includes:

[0024] According to the formula

[0025]

[0026] Determine the integrity of the first edge ,in, is the pixel value of the i-th first test point, is the pixel value of the first pixel point adjacent to the i-th first test point, is the pixel value of the i-th second test point, is the pixel value of the second pixel point adjacent to the i-th second test point, n is the total number of second test points, i≤n, and i and n are both positive integers, is the minimum value of the pixel value difference between the first test point and the first pixel point adjacent to the first test point.

[0027] According to an embodiment of the present invention, determining edge shape similarity according to the first vector and the second vector includes:

[0028] According to the formula

[0029]

[0030] Determine edge shape similarity ,in, is the horizontal coordinate of the first vector between the i-th first test point and the i+1-th first test point, is the ordinate of the first vector between the i-th first test point and the i+1-th first test point, is the horizontal coordinate of the second vector between the i-th second test point and the i+1-th second test point, is the ordinate of the second vector between the i-th second test point and the (i+1)-th second test point, and n is the total number of second test points.

[0031] According to an embodiment of the present invention, the method for obtaining a stripe clarity score according to the first image mark, the second image mark, the third image mark and the fourth image mark includes:

[0032] Obtaining a lateral distortion score of the image to be processed according to the first image mark and the third image mark;

[0033] Obtaining a longitudinal distortion score of the image to be processed according to the second image mark and the fourth image mark;

[0034] The stripe clarity score is obtained based on the lateral distortion score and the longitudinal distortion score.

[0035] According to an embodiment of the present invention, obtaining a lateral distortion score of the image to be processed according to the first image mark and the third image mark includes:

[0036] According to the formula

[0037]

[0038] Get the lateral distortion score of the image to be processed ,in, is the pixel value of the j+1th pixel on the kth first image mark, is the pixel value of the jth pixel on the kth first image marker, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0. is the total number of pixels on the kth first image marker, is the pixel value of the j+1th pixel on the kth third image mark, is the pixel value of the jth pixel on the kth third image mark, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0. is the total number of pixels on the kth third image marker, is the preset threshold, N is the total number of first image tags, j, k, , and N are both positive integers.

[0039] According to an embodiment of the present invention, obtaining a longitudinal distortion score of the image to be processed according to the second image mark and the fourth image mark includes:

[0040] According to the formula

[0041]

[0042] Get the longitudinal distortion score of the image to be processed ,in, is the pixel value of the yth pixel on the xth second image marker, is the pixel value of the y+1th pixel on the xth first image marker, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0. is the total number of pixels on the x-th second image marker, The pixel value of the y+1th pixel on the xth fourth image mark, The pixel value of the yth pixel on the xth fourth image mark, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0. is the total number of pixels on the xth fourth image marker, is the preset threshold, M is the total number of second image tags, x, y, , and M are both positive integers.

[0043] According to an embodiment of the present invention, obtaining the stripe clarity score according to the lateral distortion score and the longitudinal distortion score includes:

[0044] According to the formula

[0045]

[0046] Obtain the stripe clarity score ,in, Score the lateral distortion, is the longitudinal distortion score, N is the total number of first image markers, and M is the total number of second image markers.

[0047] According to a second aspect of an embodiment of the present invention, a method for classifying lesions based on dialysate image analysis is provided, characterized in that it includes:

[0048] Acquire an image to be processed of a dialysate bag, wherein the dialysate bag is a transparent bag, the image to be processed is obtained by photographing the dialysate bag in front of a preset background, the preset background includes a preset graphic with a preset shape, and the preset graphic has a plurality of stripes inside, the stripes include mutually parallel transverse stripes, the camera for photographing the image to be processed is located in front of the dialysate bag, and the preset background is located behind the dialysate bag;

[0049] Acquire a reference image of the preset background;

[0050] Acquire a first edge of a preset figure in the image to be processed and a second edge of a preset figure in the reference image;

[0051] Determining an edge shape similarity score based on the first edge and the second edge;

[0052] A plurality of first image marks parallel to the stripes and a plurality of second image marks perpendicular to the stripes are arranged at a plurality of positions on the first edge, and a plurality of third image marks parallel to the stripes and a plurality of fourth image marks perpendicular to the stripes are arranged at a plurality of positions on the second edge;

[0053] Obtaining a stripe clarity score according to the first image mark, the second image mark, the third image mark, and the fourth image mark;

[0054] Obtaining a dialysate bag transparency score according to the stripe clarity score and the edge shape similarity score;

[0055] According to the dialysate bag transparency score, a lesion classification result of the dialysate bag owner is obtained.

[0056] According to a third aspect of an embodiment of the present invention, a lesion classification device based on dialysate image analysis is provided, characterized in that it includes: a processor; a memory for storing processor executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the lesion classification method based on dialysate image analysis.

[0057] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium, characterized in that computer program instructions are stored thereon, and when the computer program instructions are executed by a processor, the lesion classification method based on dialysate image analysis is implemented.

[0058] According to the lesion classification device based on dialysate image analysis of the embodiment of the present invention, the transparency of the dialysate bag can be determined based on the multi-faceted comparison of the to-be-processed image of the dialysate bag and the reference image of the preset background, and then the patient can be classified whether there is an inflammatory disease, which can reduce the time for identification and diagnosis and the investment of medical resources, and improve the efficiency of dialysis treatment. In addition, when comparing, the edge shape similarity score and the stripe clarity score of the to-be-processed image and the reference image can be determined, so as to form a multi-faceted evaluation of transparency and improve the accuracy of transparency evaluation. When determining the edge shape similarity score, the integrity and edge shape similarity of the first edge can be determined. When determining the integrity of the first edge, the integrity of the first edge can be determined, the minimum clarity of the first edge, and the average pixel difference between the edge and the background of the second edge can be solved, and the ratio of the two can obtain the integrity of the first edge, which can accurately describe whether the first edge is blocked and whether it is complete, and improve the accuracy and objectivity of the integrity of the first edge. When the edge shape similarity can be determined, the similarity of the first edge and the second edge can be determined by the direction and the horizontal and vertical coordinate ratio of the corresponding first vector and the second vector. The similarity of the two edges can be accurately determined while considering the deformation of the first edge, thereby improving the accuracy and objectivity of the edge shape similarity. When determining the stripe clarity score, the lateral distortion score and the longitudinal distortion score can be determined. When determining the lateral distortion score, the difference in the number of pixels whose pixel change rate between the adjacent pixels on the first image mark and the third image mark at the same image height position is greater than or equal to the preset threshold can be counted, so as to determine the clarity of the image to be processed relative to the reference image at each image height based on this, thereby improving the accuracy and objectivity of the lateral distortion score. When determining the longitudinal distortion score, the difference in the number of pixels whose pixel change rate between the adjacent pixels on the second image mark and the fourth image mark at the same image width position is greater than or equal to the preset threshold can be counted, so as to determine the clarity of the image to be processed relative to the reference image at each image width based on this, thereby improving the accuracy and objectivity of the longitudinal distortion score.

[0059] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present invention. Other features and aspects of the present invention will become more apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can be obtained based on these drawings without creative work.

[0061] Figure 1 A schematic diagram of a lesion classification device based on dialysate image analysis according to an embodiment of the present invention is exemplarily shown;

[0062] Figure 2 A schematic diagram exemplarily shows a preset graph according to an embodiment of the present invention;

[0063] Figure 3 A flow chart of a lesion classification method based on dialysate image analysis according to an embodiment of the present invention is exemplified. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0066] Figure 1 A schematic diagram of a lesion classification device based on dialysate image analysis according to an embodiment of the present invention is exemplarily shown. Figure 1 As shown, the device comprises:

[0067] The image to be processed acquisition module 11 is used to acquire the image to be processed of the dialysate bag, wherein the dialysate bag is a transparent bag, the image to be processed is obtained by placing the dialysate bag in front of a preset background and photographing it, the preset background includes a preset graphic with a preset shape, and the preset graphic has a plurality of stripes inside, the stripes include mutually parallel transverse stripes, the camera for photographing the image to be processed is located in front of the dialysate bag, and the preset background is located behind the dialysate bag;

[0068] A reference image acquisition module 12, used to acquire a reference image of the preset background;

[0069] An edge acquisition module 13, used to acquire a first edge of a preset figure in the image to be processed and a second edge of a preset figure in the reference image;

[0070] An edge shape module 14, configured to determine an edge shape similarity score based on the first edge and the second edge;

[0071] An image marking module 15, configured to set a plurality of first image marks parallel to the stripes and a plurality of second image marks perpendicular to the stripes at a plurality of positions on the first edge, and to set a plurality of third image marks parallel to the stripes and a plurality of fourth image marks perpendicular to the stripes at a plurality of positions on the second edge;

[0072] a stripe clarity module 16, configured to obtain a stripe clarity score according to the first image mark, the second image mark, the third image mark and the fourth image mark;

[0073] A dialysate bag transparency module 17, configured to obtain a dialysate bag transparency score according to the stripe clarity score and the edge shape similarity score;

[0074] The lesion classification module 18 is used to obtain the lesion classification result of the dialysis fluid bag owner according to the dialysis fluid bag transparency score.

[0075] According to the lesion classification device based on dialysate image analysis of the embodiment of the present invention, the transparency of the dialysate bag can be determined based on the multi-faceted comparison between the to-be-processed image of the dialysate bag and the reference image of the preset background, and then the patient can be classified to see whether he or she has inflammatory symptoms, which can reduce the time for identification and diagnosis and the investment of medical resources, and improve the efficiency of dialysis treatment. In addition, during the comparison, the edge shape similarity score and the stripe clarity score of the to-be-processed image and the reference image can be determined, thereby forming a multi-faceted evaluation of transparency and improving the accuracy of transparency evaluation.

[0076] According to an embodiment of the present invention, the lesion classification device based on dialysate image analysis may be arranged in a computer terminal, a mobile terminal or a medical detection device.

[0077] According to an embodiment of the present invention, the to-be-processed image acquisition module 11 is used to acquire an image to be processed of a dialysate bag, wherein the dialysate bag is a transparent bag, the to-be-processed image is obtained by placing the dialysate bag in front of a preset background and photographing it, the preset background includes a preset graphic having a preset shape, and the preset graphic has a plurality of stripes inside, the stripes include mutually parallel transverse stripes, the camera for photographing the to-be-processed image is located in front of the dialysate bag, and the preset background is located behind the dialysate bag. The dialysate discharged from the human body can be put into the dialysate bag, and the to-be-processed image can be acquired by photographing the dialysate bag in front of the preset background, wherein the to-be-processed image includes a preset graphic of the preset background photographed across the dialysate bag, and if the dialysate bag has a high degree of transparency, the clarity of the preset graphic is high, and conversely, if the dialysate bag has a low degree of transparency, the clarity of the preset graphic is low.

[0078] Figure 2The schematic diagram of the preset graphic according to the embodiment of the present invention is exemplarily shown. The shape of the preset graphic is, for example, a circle, and has stripes with the same interval. The present invention does not limit the shape of the preset background.

[0079] According to an embodiment of the present invention, the reference image acquisition module 12 is used to acquire a reference image of the preset background. Because the dialysate discharged from the body of a patient with complications is relatively turbid and will block part of the preset background, a reference image of the interval between dialysate bags without dialysate can be taken, that is, a preset pattern of the preset background can be directly photographed, and then the image to be processed obtained by photographing the dialysate discharged from the patient can be compared with the reference image of the preset background to help determine whether the patient has complications.

[0080] According to an embodiment of the present invention, the edge acquisition module 13 is used to acquire the first edge of the preset graphic in the image to be processed and the second edge of the reference image. The edge of the image to be processed and the edge of the preset graphic in the reference image can be obtained by using methods such as micromolecule algorithm, Laplacian operator, Canny edge detection method, or deep learning neural network, and by comparing the edge of the image to be processed with the edge of the shape in the reference image, it helps to determine whether the patient has complications.

[0081] According to an embodiment of the present invention, the edge shape module 14 is used to determine an edge shape similarity score based on the first edge and the second edge. The higher the shape similarity of the two edges, the greater the possibility that the image to be processed is clear, and the lower the shape similarity of the two edges, the greater the possibility that the image to be processed is distorted relative to the reference image, the greater the possibility that the image to be processed is blurred, and the greater the possibility of complications.

[0082] According to an embodiment of the present invention, the method for determining an edge shape similarity score based on the first edge and the second edge includes: setting a plurality of first test points on the first edge; determining the normal direction of the first edge at the location of the first test points; setting a plurality of second test points on the second edge; determining the normal direction of the second edge at the location of the test points; determining the integrity of the first edge based on the first test point, a first pixel point adjacent to the first test point along the normal direction, the second test point, and a second pixel point adjacent to the second test point along the normal direction; obtaining a first vector between the plurality of first test points and a second vector between the plurality of second test points; determining the edge shape similarity based on the first vector and the second vector; and determining the edge shape similarity score based on the integrity of the first edge and the edge shape similarity.

[0083] According to an embodiment of the present invention, the first test point and the second test point may be set at corresponding positions on the edge of a preset figure in the image to be processed and the reference image. For example, if the shape of the preset figure is a circle, the first test point and the second test point may be set at the lowest point of the circle, the first test point and the second test point may be set on the edge at a height position of 20% of the circle, the first test point and the second test point may be set on the edge at a height position of 40% of the circle, the first test point and the second test point may be set on the edge at a height position of 60% of the circle, the first test point and the second test point may be set on the edge at a height position of 80% of the circle, and the first test point and the second test point may be set at the vertex of the circle. The present invention does not limit the setting positions of the first test point and the second test point.

[0084] According to an embodiment of the present invention, a tangent is made at a first test point on a first edge, and the direction of the straight line perpendicular to the tangent and pointing to the center of the circle can be determined as the normal direction of the first edge. A tangent is made at a second test point on a second edge, and the direction of the straight line perpendicular to the tangent and pointing to the center of the circle can be determined as the normal direction of the second edge. The adjacent pixel points along the normal direction of the first test point and located outside the first edge are first pixel points, and the adjacent pixel points along the normal direction of the second test point and located outside the second edge are second pixel points. Because the first edge is the shape edge of the image to be processed, the image may be blurred or distorted due to inflammation of the patient. Based on the first test point, the second test point, the first pixel point, and the second pixel point, it can be determined whether the first edge and the second edge are similar, and then it can be determined whether the edge of the preset image in the image to be processed is blurred or distorted, so as to determine whether the patient has inflammation.

[0085] According to an embodiment of the present invention, determining the integrity of the first edge according to the first test point, a first pixel point adjacent to the first test point along the normal direction, the second test point, and a second pixel point adjacent to the second test point along the normal direction includes:

[0086] Determine the integrity of the first edge according to formula (1): ,

[0087]

[0088] in, is the pixel value of the i-th first test point, is the pixel value of the first pixel point adjacent to the i-th first test point, is the pixel value of the i-th second test point, is the pixel value of the second pixel point adjacent to the i-th second test point, n is the total number of second test points, i≤n, and i and n are both positive integers, is the minimum value of the pixel value difference between the first test point and the first pixel point adjacent to the first test point.

[0089] According to an embodiment of the present invention, the numerator of the formula (1) is a term representing the minimum clarity of the first edge: , the clearer the image to be processed is, the larger the item representing the maximum blur degree of the first edge is. For example, when the image to be processed is relatively clear and the reference image is a black and white image, the pixel value of black is set to 1 and the pixel value of white in the background is set to 0. The first test point on the first edge is close to black, and the first pixel point adjacent to the first test point outside the first edge along the normal direction is white, so the absolute value of the difference between the pixel value of the first test point on the first edge and the pixel value of the first pixel point adjacent to the first test point outside the first edge along the normal direction is relatively larger, and the minimum value of the above difference can be taken. If the minimum value is also large, it means that the first edge in the image to be processed is clear and complete. If there is an obscured position on the first edge, the closer the first test point at the obscured position is to white, the closer the pixel value is to 0, which may be 0.1, 0.2, etc., then the absolute value of the above difference is smaller, and the minimum value of the above difference can be taken. If the minimum value is small, it means that the first edge near the first test point corresponding to the minimum value may be obscured, the first edge is incomplete, and the image to be processed is not clear. The above minimum value is the minimum clarity of the first edge in the image to be processed. The larger the value is, the clearer the image to be processed is, that is, other positions of the first edge are clearer and more complete than the first edge near the first test point corresponding to the minimum value. The smaller the minimum value is, the more blurred the image to be processed is. The denominator of formula (1) is , is the average value of the difference between the pixel value of the second test point and the pixel value of the second pixel point, which can represent the average difference between the pixel value of the pixel point on the edge and the pixel value of the pixel point on the background when the edge is completely clear. In the reference image, this average difference is close to the theoretical value of 1, for example, it may be 0.98, 0.99. In formula (1), the above numerator and denominator can be compared to obtain the first edge integrity. The larger the first edge integrity, the closer it is to 1, the clearer the image to be processed, the more complete the first edge, the higher the transparency of the image to be processed, and the closer it is to 0, the more blurred the image to be processed, and the greater the probability that the patient suffers from inflammation.

[0090] In this way, the minimum clarity of the first edge and the average pixel difference between the edge and the background of the second edge can be solved. The ratio of the two can be used to obtain the completeness of the first edge, which can accurately describe whether the first edge is blocked and whether it is complete, thereby improving the accuracy and objectivity of the completeness of the first edge.

[0091] According to an embodiment of the present invention, by connecting every two adjacent first test points, a first vector between multiple first test points is obtained, which can approximately represent the shape of the first edge. By connecting every two adjacent second test points, a second vector between multiple second test points is obtained, which can approximately represent the shape of the second edge. The edge shape similarity is determined based on the first vector and the second vector. The edge shape similarity can help determine the degree of similarity between the image to be processed and the reference image. The higher the edge shape similarity, the closer it is to 1, the more similar the image to be processed and the reference image are, indicating that the distortion of the shape is smaller, the image to be processed is clearer, and the probability that the patient suffers from inflammation is smaller. The smaller the edge shape similarity, the closer it is to 0, the lower the similarity between the image to be processed and the reference image is, and the greater the probability that the patient suffers from complications.

[0092] According to an embodiment of the present invention, determining edge shape similarity according to the first vector and the second vector includes: determining edge shape similarity according to formula (2): ,

[0093] (2)

[0094] in, is the horizontal coordinate of the first vector between the i-th first test point and the i+1-th first test point, is the ordinate of the first vector between the i-th first test point and the i+1-th first test point, is the horizontal coordinate of the second vector between the i-th second test point and the i+1-th second test point, is the ordinate of the second vector between the i-th second test point and the (i+1)-th second test point, and n is the total number of second test points.

[0095] According to an embodiment of the present invention, although the image to be processed is taken in front of the dialysate bag, the image to be processed may be deformed, for example, it is magnified due to the lens effect of the dialysate bag. However, if the image to be processed has high transparency, the preset graphic in the image to be processed and the preset graphic in the reference image are similar graphics. Although their sizes are different, the directions of the vectors in the two preset graphics and the ratio of the vector coordinates are the same. If the transparency of the image to be processed is insufficient, resulting in distortion of the preset graphics, the direction and the ratio of the vector coordinates of the first vector and the corresponding second vector may deviate. Therefore, the similarity between the first edge and the second edge can be determined based on the degree of deviation between the first vector and the second vector. The term representing the deviation between the first vector and the second vector is included in the formula (2). That is, the difference between the ratio of the horizontal coordinate to the vertical coordinate of the first vector between the i-th first test point to the i+1-th first test point and the ratio of the horizontal coordinate to the vertical coordinate of the second vector between the i-th second test point to the i+1-th second test point. The difference can represent the direction deviation between the first vector and the second vector, and can also represent the deviation in the ratio of the vector coordinates.

[0096] According to an embodiment of the present invention, since the second vector represents a vector without distortion, As a base number. Then the deviation degree of the first vector can be represented, and the term representing the similarity of the first vector and the second vector can be obtained by subtracting the deviation degree from 1. The similarities of the corresponding first vector and the second vector are averaged to obtain the edge shape similarity. The larger the edge shape similarity, the closer it is to 1, the higher the similarity degree of the first edge and the second edge, the higher the transparency of the image to be processed, and the lower the probability of inflammation. The smaller the edge shape similarity, the closer it is to 0, the lower the similarity degree of the first edge and the second edge, the lower the transparency of the image to be processed, and the higher the probability of inflammation.

[0097] In this way, the similarity between the first edge and the second edge can be determined by the direction and the horizontal and vertical coordinate ratio of the corresponding first vector and the second vector. The similarity between the two edges can be accurately determined while considering the deformation of the first edge, thereby improving the accuracy and objectivity of the edge shape similarity.

[0098] According to an embodiment of the present invention, the edge shape similarity score can be determined based on the integrity of the first edge and the edge shape similarity obtained above. For example, weights A and B are set, and the integrity of the first edge and the edge shape similarity are weighted and summed to obtain the edge shape similarity score S=A +B The larger the edge shape similarity score is, the higher the similarity between the first edge and the second edge is, and the lower the probability of having inflammation is; the smaller the edge shape similarity score is, the lower the similarity between the first edge and the second edge is, and the higher the probability of having inflammation is.

[0099] According to an embodiment of the present invention, the image marking module 15 is used to set a plurality of first image marks parallel to the stripes and a plurality of second image marks perpendicular to the stripes at a plurality of positions on the first edge, and set a plurality of third image marks parallel to the stripes and a plurality of fourth image marks perpendicular to the stripes at a plurality of positions on the second edge. For example, a first image mark (e.g., a straight line) horizontal to the stripes may be set every 10% of the image height, and a second image mark (e.g., a straight line) perpendicular to the stripes may be set every 10% of the image width. In the same way, the same number of third image marks (e.g., a straight line) as the first image marks in the first edge may be set on the second edge, and the same number of fourth image marks (e.g., a straight line) as the marks in the second image in the first edge may be set. By comparing the first image mark and the third image mark, the horizontal deviation degree of the first edge and the second edge may be determined, and by comparing the second image mark and the fourth image mark, the vertical deviation degree of the first edge and the second edge may be determined, thereby determining the stripe clarity of the image to be processed.

[0100] According to an embodiment of the present invention, a stripe clarity score is obtained according to the first image mark, the second image mark, the third image mark and the fourth image mark, including: obtaining a lateral distortion score of the image to be processed according to the first image mark and the third image mark; obtaining a longitudinal distortion score of the image to be processed according to the second image mark and the fourth image mark; and obtaining the stripe clarity score according to the lateral distortion score and the longitudinal distortion score.

[0101] According to an embodiment of the present invention, the larger the lateral distortion score is, the smaller the lateral distortion of the first image mark is, and the larger the lateral distortion score is, the higher the clarity of the image to be processed is. The smaller the longitudinal distortion is, the higher the longitudinal distortion score of the first image mark is, and the higher the clarity of the image to be processed is.

[0102] According to an embodiment of the present invention, obtaining the lateral distortion score of the image to be processed according to the first image mark and the third image mark includes: obtaining the lateral distortion score of the image to be processed according to formula (3): ,

[0103] (3)

[0104] in, is the pixel value of the j+1th pixel on the kth first image mark, is the pixel value of the jth pixel on the kth first image marker, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0. is the total number of pixels on the kth first image marker, is the pixel value of the j+1th pixel on the kth third image mark, is the pixel value of the jth pixel on the kth third image mark, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0. is the total number of pixels on the kth third image marker, is the preset threshold, N is the total number of first image tags, j, k, , and N are both positive integers.

[0105] According to an embodiment of the present invention, the formula (3) includes a threshold value T of the conditional function, and the threshold value can help determine the magnitude of the rate of change between two pixel points. For example, T can be set to 0.5, and the rate of change between adjacent pixel points on the first image mark and the rate of change between adjacent pixel points on the third image mark are solved. If the rate of change is greater than T, the rate of change of the pixel values ​​of the two adjacent pixel points is large. Since the first image mark is parallel to the stripe, the rate of change of the two adjacent pixel points should not be large. If the rate of change is large, the image may be distorted or blocked by fuzzy substances in the dialysate bag. The present invention does not limit the setting of the threshold.

[0106] According to an embodiment of the present invention, formula (3) includes a term for counting the number of pixels in the first image marker whose pixel value change rate of adjacent pixels is greater than or equal to a preset threshold. , the term indicates that if If it holds, the conditional function value is 1, otherwise the conditional function value is 0. Indicates the rate of change between adjacent pixels on the first image marker. Then, the number of pixels whose change rate of pixel values ​​of adjacent pixels in the kth first image mark is greater than or equal to a preset threshold may be counted.

[0107] According to an embodiment of the present invention, similarly, the number of pixels in the kth third image mark whose pixel value change rate of adjacent pixels is greater than or equal to a preset threshold value can also be counted. ,Since the third image mark is parallel to the stripes, the change rate of two adjacent pixels should not be large, and may even be close to 0. However, the reference image may capture a small amount of interference in the preset background, such as dust and stains on the preset background, so this item may not be 0.

[0108] According to an embodiment of the present invention, the difference between the above two items can be solved, so that the number difference of pixel points whose pixel value change rate of adjacent pixel points is greater than or equal to the preset threshold in the image mark of the same image height in the image to be processed and the reference image can be counted, and the ratio of the number difference to the total number of pixel points on the first image mark can be solved. The larger the ratio, the lower the clarity of the image to be processed at the image height position. The average value of the above ratio corresponding to the image mark of each image height can be solved, and the average value can represent the average clarity at each image height position, and the lateral distortion score of the image to be processed can be obtained by subtracting the average value from 1. The higher the lateral distortion score, the higher the image clarity of the image to be processed at each image height position, and the smaller the distortion, that is, the higher the transparency, and the lower the probability of inflammation.

[0109] In this way, the difference in the number of pixel points whose pixel change rate between adjacent pixel points on the first image mark and the third image mark at the same image height position is greater than or equal to a preset threshold can be counted, so as to determine the clarity of the image to be processed relative to the reference image at each image height, thereby improving the accuracy and objectivity of the lateral distortion score.

[0110] According to an embodiment of the present invention, obtaining the longitudinal distortion score of the image to be processed according to the second image mark and the fourth image mark includes: obtaining the longitudinal distortion score of the image to be processed according to formula (4): ,

[0111] (4)

[0112] in, is the pixel value of the yth pixel on the xth second image marker, is the pixel value of the y+1th pixel on the xth second image marker, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0. is the total number of pixels on the x-th second image marker, The pixel value of the y+1th pixel on the xth fourth image mark, The pixel value of the yth pixel on the xth fourth image mark, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0. is the total number of pixels on the xth fourth image marker, is the preset threshold, M is the total number of second image tags, x, y, , and M are both positive integers.

[0113] According to an embodiment of the present invention, similar to the lateral distortion score, the number of pixels whose pixel values ​​of adjacent pixels have a change rate greater than or equal to a preset threshold in the x-th second image mark and the number of pixels whose pixel values ​​of adjacent pixels have a change rate greater than or equal to a preset threshold in the x-th fourth image mark can be counted by a conditional function, and the difference between the two numbers can be determined. In an unobstructed reference image, if the fourth image mark is perpendicular to the stripes, the fourth image mark can sequentially pass through each stripe, and therefore, in the fourth image mark, the number of pixels whose pixel values ​​of adjacent pixels have a change rate greater than or equal to the preset threshold can be equal to twice the number of stripes it passes through. If the image to be processed is clear, the number of pixels whose pixel values ​​of adjacent pixels have a change rate greater than or equal to the preset threshold in the second image mark at the same image width position should be equal to the number of pixels whose pixel values ​​of adjacent pixels have a change rate greater than or equal to the preset threshold in the fourth image mark. However, if the image to be processed is blurred or distorted, the above number may be deviated. For example, if there is an object in the dialysis fluid bag that blocks the stripes, the second image mark in the image to be processed passes through the object instead of the stripes blocked by the object, resulting in a smaller rate of change of the pixel values ​​of its adjacent pixels, and thus the number of pixels in the second image mark whose rate of change of the pixel values ​​of adjacent pixels is greater than or equal to the preset threshold is smaller. Therefore, the clarity of the image to be processed at each image width position can be determined based on the above number difference, and then the ratio of the above number difference to the total number of pixels on the second image mark can be solved, and the average value of the above ratio corresponding to each image width position can be solved, which can represent the average clarity at each image width position, and by subtracting the average value from 1, the longitudinal distortion score of the image to be processed can be obtained. The higher the longitudinal distortion score, the higher the image clarity of the image to be processed at each image width position, the smaller the distortion, that is, the higher the transparency, and the lower the probability of inflammation.

[0114] In this way, the difference in the number of pixel points whose pixel change rate between adjacent pixel points on the second image mark and the fourth image mark at the same image width position is greater than or equal to a preset threshold can be counted, so as to determine the clarity of the image to be processed relative to the reference image at each image width, thereby improving the accuracy and objectivity of the longitudinal distortion score.

[0115] According to an embodiment of the present invention, obtaining the stripe clarity score according to the lateral distortion score and the longitudinal distortion score includes: obtaining the stripe clarity score according to formula (5): ,

[0116] (5)

[0117] in, Score the lateral distortion, is the longitudinal distortion score, N is the total number of first image markers, and M is the total number of second image markers.

[0118] According to an embodiment of the present invention, formula (5) includes the weight coefficient , the weight coefficient is obtained by dividing the total number of first image labels by the sum of the total number of first image labels and the total number of second image labels , which can represent the ratio of the total number of first image tags to the total number of first and second image tags. Formula (5) includes the weight coefficient , the total number of second image labels divided by the sum of the total number of first image labels and the total number of second image labels to obtain the weight coefficient , can represent the ratio of the total number of second image tags to the total number of first and second image tags. It can represent the average lateral distortion of the image to be processed. The sum of the average lateral distortion degree and the average longitudinal distortion degree of the image to be processed can be expressed as Get the stripe clarity score The greater the stripe clarity, the fewer stripes are blocked in the image to be processed, the higher the transparency of the image to be processed, and the lower the possibility that the patient suffers from inflammation. The smaller the stripe clarity, the more stripes are blocked in the image to be processed, the lower the transparency of the image to be processed, and the higher the possibility that the patient suffers from inflammation. By determining the stripe clarity score through the lateral distortion score and the longitudinal distortion score of the image to be processed, the probability of the patient suffering from inflammation can be determined.

[0119] According to an embodiment of the present invention, the dialysate bag transparency module 17 is used to obtain a dialysate bag transparency score according to the stripe clarity score and the edge shape similarity score. The stripe clarity score and the edge similarity score can be weighted and summed to obtain a dialysate bag transparency score. The higher the dialysate bag transparency score, the higher the dialysate bag transparency, and the lower the possibility that the patient suffers from inflammation. The smaller the dialysate bag transparency score, the lower the dialysate bag transparency, and the higher the possibility that the patient suffers from inflammation.

[0120] According to an embodiment of the present invention, the lesion classification module 18 is used to obtain the lesion classification result of the dialysis fluid bag owner according to the dialysis fluid bag transparency score. For example, a scoring threshold can be preset, and the owner of the dialysis fluid bag whose dialysis fluid bag transparency score is greater than or equal to the scoring threshold is classified as having no lesion, and the owner of the dialysis fluid bag whose dialysis fluid bag transparency score is less than the scoring threshold is classified as having inflammation.

[0121] According to the lesion classification device based on dialysate image analysis of the embodiment of the present invention, the transparency of the dialysate bag can be determined based on the multi-faceted comparison of the to-be-processed image of the dialysate bag and the reference image of the preset background, and then the patient can be classified whether there is an inflammatory disease, which can reduce the time for identification and diagnosis and the investment of medical resources, and improve the efficiency of dialysis treatment. In addition, when comparing, the edge shape similarity score and the stripe clarity score of the to-be-processed image and the reference image can be determined, so as to form a multi-faceted evaluation of transparency and improve the accuracy of transparency evaluation. When determining the edge shape similarity score, the integrity and edge shape similarity of the first edge can be determined. When determining the integrity of the first edge, the integrity of the first edge can be determined, the minimum clarity of the first edge, and the average pixel difference between the edge and the background of the second edge can be solved, and the ratio of the two can obtain the integrity of the first edge, which can accurately describe whether the first edge is blocked and whether it is complete, and improve the accuracy and objectivity of the integrity of the first edge. When the edge shape similarity can be determined, the similarity of the first edge and the second edge can be determined by the direction and the horizontal and vertical coordinate ratio of the corresponding first vector and the second vector. The similarity of the two edges can be accurately determined while considering the deformation of the first edge, thereby improving the accuracy and objectivity of the edge shape similarity. When determining the stripe clarity score, the lateral distortion score and the longitudinal distortion score can be determined. When determining the lateral distortion score, the difference in the number of pixels whose pixel change rate between the adjacent pixels on the first image mark and the third image mark at the same image height position is greater than or equal to the preset threshold can be counted, so as to determine the clarity of the image to be processed relative to the reference image at each image height based on this, thereby improving the accuracy and objectivity of the lateral distortion score. When determining the longitudinal distortion score, the difference in the number of pixels whose pixel change rate between the adjacent pixels on the second image mark and the fourth image mark at the same image width position is greater than or equal to the preset threshold can be counted, so as to determine the clarity of the image to be processed relative to the reference image at each image width based on this, thereby improving the accuracy and objectivity of the longitudinal distortion score.

[0122] Figure 3 The flowchart of the lesion classification method based on dialysate image analysis according to an embodiment of the present invention is exemplarily shown. The method comprises:

[0123] Step S11, acquiring an image to be processed of a dialysate bag, wherein the dialysate bag is a transparent bag, the image to be processed is obtained by photographing the dialysate bag in front of a preset background, the preset background includes a preset graphic with a preset shape, and the preset graphic has a plurality of stripes inside, the stripes include mutually parallel transverse stripes, the camera for photographing the image to be processed is located in front of the dialysate bag, and the preset background is located behind the dialysate bag;

[0124] Step S12, obtaining a reference image of the preset background;

[0125] Step S13, obtaining a first edge of a preset pattern in the image to be processed and a second edge of a preset pattern in the reference image;

[0126] Step S14, determining an edge shape similarity score according to the first edge and the second edge;

[0127] Step S15, setting a plurality of first image marks parallel to the stripes and a plurality of second image marks perpendicular to the stripes at a plurality of positions on the first edge, and setting a plurality of third image marks parallel to the stripes and a plurality of fourth image marks perpendicular to the stripes at a plurality of positions on the second edge;

[0128] Step S16, obtaining a stripe clarity score according to the first image mark, the second image mark, the third image mark and the fourth image mark;

[0129] Step S17, obtaining a dialysate bag transparency score according to the stripe clarity score and the edge shape similarity score;

[0130] Step S18, obtaining the lesion classification result of the dialysate bag owner according to the dialysate bag transparency score.

[0131] According to one embodiment of the present invention, a lesion classification device based on dialysate image analysis is provided, characterized in that it includes: a processor; a memory for storing processor executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the lesion classification method based on dialysate image analysis.

[0132] According to one embodiment of the present invention, there is provided a computer-readable storage medium, characterized in that computer program instructions are stored thereon, and when the computer program instructions are executed by a processor, the lesion classification method based on dialysate image analysis is implemented.

[0133] It should be understood by those skilled in the art that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments, and the embodiments of the present invention may be deformed or modified in any way without departing from the principles.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A lesion classification device based on dialysate image analysis, characterized in that: include: a module for acquiring an image to be processed, for acquiring an image to be processed of a dialysate bag, wherein the dialysate bag is a transparent bag, the image to be processed is obtained by photographing the dialysate bag in front of a preset background, the preset background comprises a preset graphic with a preset shape, and the preset graphic has a plurality of stripes inside, the stripes comprise mutually parallel transverse stripes, the camera for photographing the image to be processed is located in front of the dialysate bag, and the preset background is located behind the dialysate bag; A reference image acquisition module, used to acquire a reference image of the preset background; An edge acquisition module, used to acquire a first edge of a preset figure in the image to be processed and a second edge of a preset figure in the reference image; an edge shape module, configured to determine an edge shape similarity score based on the first edge and the second edge; An image marking module, configured to set a plurality of first image marks parallel to the stripes and a plurality of second image marks perpendicular to the stripes at a plurality of positions on the first edge, and to set a plurality of third image marks parallel to the stripes and a plurality of fourth image marks perpendicular to the stripes at a plurality of positions on the second edge; a stripe clarity module, configured to obtain a stripe clarity score according to the first image mark, the second image mark, the third image mark and the fourth image mark; A dialysate bag transparency module, used to obtain a dialysate bag transparency score according to the stripe clarity score and the edge shape similarity score; A lesion classification module, used to obtain a lesion classification result of the dialysis fluid bag owner according to the dialysis fluid bag transparency score; Determining an edge shape similarity score according to the first edge and the second edge includes: Setting a plurality of first test points on the first edge; Determining a normal direction of a first edge at a location where the first test point is located; Setting a plurality of second test points on the second edge, wherein the first test point and the second test point are set at corresponding positions on the edge of the preset graphics in the image to be processed and the reference image; Determining the normal direction of the second edge at the location of the test point; Determine the integrity of the first edge according to the first test point, a first pixel point adjacent to the first test point along the normal direction, the second test point, and a second pixel point adjacent to the second test point along the normal direction; Obtaining a first vector between a plurality of first test points and a second vector between a plurality of second test points; Determining edge shape similarity according to the first vector and the second vector; Determining the edge shape similarity score according to the integrity of the first edge and the edge shape similarity; Determining the integrity of the first edge according to the first test point, a first pixel point adjacent to the first test point along the normal direction, the second test point, and a second pixel point adjacent to the second test point along the normal direction includes: According to the formula Determine the integrity of the first edge W1, where P 1,i is the pixel value of the first test point i, PN 1,i is the pixel value of the first pixel point adjacent to the i-th first test point, P 2,i is the pixel value of the second test point i, PN 2,i is the pixel value of the second pixel point adjacent to the i-th second test point, n is the total number of second test points, i≤n, and i and n are both positive integers, |P 1,i -PN 1,i | min is the minimum value of the pixel value difference between the first test point and the first pixel point adjacent to the first test point; Determining edge shape similarity according to the first vector and the second vector includes: According to the formula Determine edge shape similarity S e , where X 1,i is the horizontal coordinate of the first vector between the i-th first test point and the i+1-th first test point, Y 1,i is the ordinate of the first vector between the i-th first test point and the i+1-th first test point, X 2,i is the horizontal coordinate of the second vector between the i-th second test point and the i+1-th second test point, Y 2,i is the ordinate of the second vector between the i-th second test point and the i+1-th second test point, and n is the total number of second test points; Obtaining a stripe clarity score according to the first image mark, the second image mark, the third image mark, and the fourth image mark, comprising: Obtaining a lateral distortion score of the image to be processed according to the first image mark and the third image mark; Obtaining a longitudinal distortion score of the image to be processed according to the second image mark and the fourth image mark; Obtaining the stripe clarity score according to the lateral distortion score and the longitudinal distortion score; Obtaining a lateral distortion score of the image to be processed according to the first image mark and the third image mark, including: According to the formula Get the lateral distortion score D of the image to be processed T , where P 1,k,j+1 is the pixel value of the j+1th pixel on the kth first image marker, P 1,k,j is the pixel value of the jth pixel on the kth first image marker, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0, n 1,k is the total number of pixels on the kth first image marker, P 3,k,j+1 is the pixel value of the j+1th pixel on the kth third image marker, P 3,k,j is the pixel value of the jth pixel on the kth third image mark, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0, n 3,k is the total number of pixels on the kth third image mark, T is the preset threshold, N is the total number of first image marks, j, k, n 1,k , n 3,k and N are both positive integers; Obtaining a longitudinal distortion score of the image to be processed according to the second image mark and the fourth image mark, comprising: According to the formula Get the longitudinal distortion score D of the image to be processed D , where P 2,x,y is the pixel value of the yth pixel on the xth second image marker, P 2,x,y+1 is the pixel value of the y+1th pixel on the xth second image marker, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0, n 2,x is the total number of pixels on the xth second image marker, P 4,x,y+1 is the pixel value of the y+1th pixel on the xth fourth image marker, P 4,x,y The pixel value of the yth pixel on the xth fourth image mark, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0, n 4,x is the total number of pixels on the xth fourth image mark, T is the preset threshold, M is the total number of second image marks, x, y, n 2,x , n 4,x and M are both positive integers.

2. The lesion classification device based on dialysate image analysis according to claim 1, characterized in that: Obtaining the stripe clarity score according to the lateral distortion score and the longitudinal distortion score, including: According to the formula Obtain the fringe clarity score D e , where D T Score the lateral distortion, D D is the longitudinal distortion score, N is the total number of first image markers, and M is the total number of second image markers.

3. A lesion classification method based on dialysate image analysis, characterized in that: include: Acquire an image to be processed of a dialysate bag, wherein the dialysate bag is a transparent bag, the image to be processed is obtained by photographing the dialysate bag in front of a preset background, the preset background includes a preset graphic with a preset shape, and the preset graphic has a plurality of stripes inside, the stripes include mutually parallel transverse stripes, the camera for photographing the image to be processed is located in front of the dialysate bag, and the preset background is located behind the dialysate bag; Acquire a reference image of the preset background; Acquire a first edge of a preset figure in the image to be processed and a second edge of a preset figure in the reference image; Determining an edge shape similarity score based on the first edge and the second edge; A plurality of first image marks parallel to the stripes and a plurality of second image marks perpendicular to the stripes are arranged at a plurality of positions on the first edge, and a plurality of third image marks parallel to the stripes and a plurality of fourth image marks perpendicular to the stripes are arranged at a plurality of positions on the second edge; Obtaining a stripe clarity score according to the first image mark, the second image mark, the third image mark, and the fourth image mark; Obtaining a dialysate bag transparency score according to the stripe clarity score and the edge shape similarity score; Obtaining a lesion classification result of the dialysate bag owner according to the dialysate bag transparency score; Determining an edge shape similarity score according to the first edge and the second edge includes: Setting a plurality of first test points on the first edge; Determining a normal direction of a first edge at a location where the first test point is located; Setting a plurality of second test points on the second edge, wherein the first test point and the second test point are set at corresponding positions on the edge of the preset graphics in the image to be processed and the reference image; Determining the normal direction of the second edge at the location of the test point; Determine the integrity of the first edge according to the first test point, a first pixel point adjacent to the first test point along the normal direction, the second test point, and a second pixel point adjacent to the second test point along the normal direction; Obtaining a first vector between a plurality of first test points and a second vector between a plurality of second test points; Determining edge shape similarity according to the first vector and the second vector; Determining the edge shape similarity score according to the integrity of the first edge and the edge shape similarity; Determining the integrity of the first edge according to the first test point, a first pixel point adjacent to the first test point along the normal direction, the second test point, and a second pixel point adjacent to the second test point along the normal direction includes: According to the formula Determine the integrity of the first edge W1, where P 1,i is the pixel value of the first test point i, PN 1,i is the pixel value of the first pixel point adjacent to the i-th first test point, P 2,i is the pixel value of the second test point i, PN 2,i is the pixel value of the second pixel point adjacent to the i-th second test point, n is the total number of second test points, i≤n, and i and n are both positive integers, |P 1,i -PN 1,i | min is the minimum value of the pixel value difference between the first test point and the first pixel point adjacent to the first test point; Determining edge shape similarity according to the first vector and the second vector includes: According to the formula Determine edge shape similarity S e , where X 1,i is the horizontal coordinate of the first vector between the i-th first test point and the i+1-th first test point, Y 1,i is the ordinate of the first vector between the i-th first test point and the i+1-th first test point, X 2,i is the horizontal coordinate of the second vector between the i-th second test point and the i+1-th second test point, Y 2,i is the ordinate of the second vector between the i-th second test point and the i+1-th second test point, and n is the total number of second test points; Obtaining a stripe clarity score according to the first image mark, the second image mark, the third image mark, and the fourth image mark, comprising: Obtaining a lateral distortion score of the image to be processed according to the first image mark and the third image mark; Obtaining a longitudinal distortion score of the image to be processed according to the second image mark and the fourth image mark; Obtaining the stripe clarity score according to the lateral distortion score and the longitudinal distortion score; Obtaining a lateral distortion score of the image to be processed according to the first image mark and the third image mark, including: According to the formula Get the lateral distortion score D of the image to be processed T , where P 1,k,j+1 is the pixel value of the j+1th pixel on the kth first image marker, P 1,k,j is the pixel value of the jth pixel on the kth first image marker, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0, n 1,k is the total number of pixels on the kth first image marker, P 3,k,j+1 is the pixel value of the j+1th pixel on the kth third image marker, P 3,k,j is the pixel value of the jth pixel on the kth third image mark, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0, n 3,k is the total number of pixels on the kth third image mark, T is the preset threshold, N is the total number of first image marks, j, k, n 1,k , n 3,k and N are both positive integers; Obtaining a longitudinal distortion score of the image to be processed according to the second image mark and the fourth image mark, comprising: According to the formula Get the longitudinal distortion score D of the image to be processed D , where P 2,x,y is the pixel value of the yth pixel on the xth second image marker, P 2,x,y+1 is the pixel value of the y+1th pixel on the xth second image marker, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0, n 2,x is the total number of pixels on the xth second image marker, P 4,x,y+1 is the pixel value of the y+1th pixel on the xth fourth image marker, P 4,x,y The pixel value of the yth pixel on the xth fourth image mark, is the conditional function, indicating If it holds, the conditional function value is 1, otherwise the conditional function value is 0, n 4,x is the total number of pixels on the xth fourth image mark, T is the preset threshold, M is the total number of second image marks, x, y, n 2,x , n 4,x and M are both positive integers.

4. A lesion classification device based on dialysate image analysis, characterized in that: include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the method of claim 3.

Citation Information

Patent Citations

  • Online detection method and device for peritoneal dialysis waste liquid

    CN113029970A

  • System and method for monitoring vascular function

    CN114901137A

  • Health monitoring equipment and system for hemodialysis patient

    CN115547500A

  • Focus classification device and equipment based on peritoneal dialysis solution image segmentation

    CN116740465A

  • Medical image tumor malignant risk assessment method, system and equipment and storage medium

    CN116934743A