Method and device for analyzing blood coagulation grade of dialyzer, server and medium
Through image stitching and red component pixel proportion analysis, the dialyzer coagulation level is automatically evaluated, which solves the problem of low evaluation accuracy in the prior art, and achieves higher evaluation accuracy and information visualization.
Patent Information
- Application Number
- CN202510159556.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is not very accurate when evaluating the coagulation condition of the dialyzer and is prone to errors due to manual ratings.
By acquiring multiple images on the side of the dialyzer, the image is stitched together to form a panoramic image, the pixel proportion of the red component in the panoramic image is analyzed, and the blood coagulation level is automatically evaluated based on the preset correspondence relationship.
Improves the accuracy of coagulation assessment, reduces artificial errors, enhances the degree of visualization of information, and enables users to make decisions quickly.
Smart Images

Figure CN120014358A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image analysis, and in particular to a dialyzer coagulation level analysis method, device, server and medium. Background Art
[0002] In the field of medical devices, dialyzers are an important medical device, mainly used for dialysis treatment of patients with renal failure. During or after hemodialysis, blood coagulation may occur in the dialyzer membrane, which may reduce the dialysis effect, increase the risk of blood loss in patients, waste medical supplies, and may cause anxiety and fear in patients.
[0003] Therefore, during the dialysis process, it is necessary to evaluate the coagulation situation and obtain the coagulation rating results after treatment, so that doctors can take effective intervention measures based on the coagulation rating results after treatment, such as increasing the dose of anticoagulants, improving dialysis operation techniques, and selecting dialyzers with better biocompatibility, etc., to reduce the incidence of dialyzer coagulation, thereby reducing treatment risks and improving treatment efficiency. Therefore, residual coagulation rating of dialyzers is a very necessary part of the hemodialysis treatment process.
[0004] Currently, manual rating is commonly used in clinical practice, or the grayscale average value in the collected image is used as the coagulation value to determine the coagulation status, which can easily lead to inaccurate determination of the coagulation status. Summary of the invention
[0005] The purpose of this application is to provide a dialyzer coagulation level analysis method, device, server and medium, which can accurately evaluate the coagulation level.
[0006] In a first aspect, a dialyzer coagulation level analysis method is provided, and the method is executed by a server and includes:
[0007] Acquire multiple images of the side and surrounding of the dialyzer, wherein the multiple images are images taken continuously in a preset order;
[0008] Performing image stitching according to the multiple images to obtain a first panoramic image of the dialyzer;
[0009] Determine the pixel ratio of the red component in the RGB value of the pixel in the first panoramic image within a preset range; obtain the coagulation level corresponding to the pixel ratio according to the pixel ratio and a preset corresponding relationship, wherein the preset corresponding relationship is a corresponding relationship between multiple pixel ratio ranges and multiple coagulation levels;
[0010] The coagulation level, the pixel ratio, and the first panoramic image are returned to a terminal device, so that the first panoramic image, the coagulation level, and the pixel ratio are displayed on a display interface of the terminal device.
[0011] In a preferred example, the present application may be further configured as follows: the acquisition of multiple images of the side and surrounding of the dialyzer includes:
[0012] Acquire multiple initial images of the side and surrounding of the dialyzer;
[0013] The multiple initial images of the side and surrounding of the dialyzer are subjected to image preprocessing to obtain the multiple images of the side and surrounding of the dialyzer; wherein the image preprocessing includes at least one of the following: image noise filtering, geometric correction, and exposure correction.
[0014] In a preferred example, the present application may be further configured as follows: after stitching the multiple images to obtain the first panoramic image of the dialyzer, the method further includes:
[0015] identifying a label area in the first panoramic image;
[0016] Replacing pixel values of the label area in the first panoramic image with background values to obtain a second panoramic image;
[0017] performing region repair on the label region in the second panoramic image according to image information of an adjacent region of the label region in the second panoramic image to obtain a repaired first panoramic image;
[0018] Correspondingly, the determining the pixel proportion of the red component in the RGB value of the pixel in the first panoramic image within a preset range includes: determining the pixel proportion of the red component in the RGB value of the pixel in the patched first panoramic image within a preset range;
[0019] The returning the coagulation level, the pixel ratio, and the first panoramic image to the terminal device includes: returning the coagulation level, the pixel ratio, and the repaired first panoramic image to the terminal device.
[0020] In a preferred example, the present application may be further configured as follows: performing image stitching according to the plurality of images to obtain a first panoramic image of the dialyzer includes:
[0021] Determine the first image as the initial panoramic image;
[0022] Extracting first feature points of the initial panoramic image and descriptors corresponding to the first feature points, and extracting second feature points of adjacent images and descriptors corresponding to the second feature points;
[0023] According to the descriptor corresponding to the first feature point and the descriptor corresponding to the second feature point, feature point matching is performed on the first feature point of the initial panoramic image and the second feature point of the adjacent image to obtain a successfully matched feature point pair;
[0024] According to the successfully matched feature point pairs, the initial panoramic image and the adjacent images are fused to obtain a new initial panoramic image, and the above process is repeated according to the new initial panoramic image and the next adjacent image until the fusion of the multiple images is completed to obtain the first panoramic image of the dialyzer.
[0025] In a preferred example, the present application may be further configured as follows: the fusing the initial panoramic image and the adjacent image according to the successfully matched feature point pairs to obtain a new initial panoramic image, including: determining a homography matrix of the initial panoramic image and the adjacent image; correcting the adjacent image according to the homography matrix to obtain a corrected adjacent image; and fusing the initial panoramic image and the corrected adjacent image according to the successfully matched feature point pairs to obtain a new initial panoramic image;
[0026] and / or,
[0027] After matching the first feature point of the initial panoramic image with the second feature point of the adjacent image according to the descriptor corresponding to the first feature point and the descriptor corresponding to the second feature point to obtain a successfully matched feature point pair, the method further includes: using the RANSAC algorithm to identify and remove abnormal feature point pairs from the successfully matched feature point pairs to obtain final successfully matched feature point pairs.
[0028] In a preferred example, the present application can be further configured as follows: the multiple images are uploaded by a client deployed on a terminal device; the display interface is the display interface of the client; and the client is a terminal software or applet.
[0029] In a preferred example, the present application may be further configured as follows: before returning the coagulation level, the pixel ratio and the first panoramic image to the terminal device, the following may also be included:
[0030] Obtaining a preset maximum size and a size of the first panoramic image;
[0031] Based on a preset maximum size and a size of the first panoramic image, compressing the first panoramic image to obtain a compressed first panoramic image, wherein the size of the compressed first panoramic image does not exceed the preset maximum size;
[0032] Accordingly, returning the coagulation level, the pixel ratio, and the first panoramic image to the terminal device includes:
[0033] The coagulation level, the pixel ratio and the compressed first panoramic image are returned to the terminal device.
[0034] In a second aspect, a dialyzer coagulation level analysis device is provided, comprising:
[0035] An image receiving module, used to obtain multiple images of the side and surrounding of the dialyzer, wherein the multiple images are images taken continuously in a preset order;
[0036] An image stitching module, used for performing image stitching according to the multiple images to obtain a first panoramic image of the dialyzer;
[0037] a target recognition module, configured to determine a pixel ratio of a red component in an RGB value of a pixel in the first panoramic image within a preset range; and obtain a coagulation level corresponding to the pixel ratio according to the pixel ratio and a preset corresponding relationship, wherein the preset corresponding relationship is a corresponding relationship between multiple pixel ratio ranges and multiple coagulation levels;
[0038] The result returning module is used to return the coagulation level, the pixel ratio and the first panoramic image to the terminal device, so as to display the first panoramic image, the coagulation level and the pixel ratio in the display interface of the terminal device.
[0039] In a third aspect, a server is provided, including:
[0040] one or more processors;
[0041] Memory;
[0042] One or more applications, wherein the one or more applications are stored in a memory and configured to be executed by one or more processors, and the one or more programs are configured to: perform operations corresponding to the dialyzer coagulation grade analysis method shown in any possible implementation of the first aspect.
[0043] In a fourth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded by a processor and executed according to the steps of the dialyzer coagulation grade analysis method shown in any possible implementation method of the first aspect.
[0044] In a fifth aspect, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, operations corresponding to the dialyzer coagulation grade analysis method shown in any possible implementation manner in the first aspect are implemented.
[0045] In a sixth aspect, an image analysis system is provided, comprising: a terminal device and the server as described in the third aspect;
[0046] Among them, the terminal device is used to collect multiple images of the side and surrounding of the dialyzer, and display the first panoramic image, coagulation level and pixel ratio.
[0047] In summary, the dialyzer coagulation level analysis method provided by the present application includes the following beneficial technical effects:
[0048] Acquire multiple images of the side and surrounding of the dialyzer, where the multiple images are images taken continuously in a preset order; perform image stitching based on the multiple images to obtain a first panoramic image of the dialyzer; determine the pixel ratio of the red component in the RGB value of the pixel in the first panoramic image within a preset range; obtain the coagulation level corresponding to the pixel ratio based on the pixel ratio and a preset correspondence, where the preset correspondence is a correspondence between multiple pixel ratio ranges and multiple coagulation levels; return the coagulation level, pixel ratio and the first panoramic image to the terminal device, so as to display the first panoramic image, the coagulation level and pixel ratio in the display interface of the terminal device.
[0049] In this scheme, multiple images with continuous angles around the side of the dialyzer are obtained to obtain a comprehensive residual coagulation status of the dialyzer; multiple images are spliced to form a first panoramic image; by accurately analyzing the pixel ratio of the red component in the panoramic image and based on a preset correspondence, the coagulation level can be accurately evaluated; the coagulation level, pixel ratio and panoramic image are returned to the terminal device, so that the user can intuitively see the status of the dialyzer and the coagulation status on the interface; not only the accuracy of the coagulation evaluation is improved, but also the visualization of the information is enhanced, so that the user can make decisions quickly.
[0050] In addition, the present application also provides a dialyzer coagulation level analysis device, server and medium, all of which have the above-mentioned beneficial technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions of 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 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 paying any creative work.
[0052] Figure 1 This is a schematic diagram of an application scenario of a dialyzer coagulation level analysis method provided in an embodiment of the present application;
[0053] Figure 2It is a flowchart of a specific implementation of image analysis provided in an embodiment of the present application;
[0054] Figure 3 It is a structural schematic diagram of a dialyzer coagulation level analysis device provided in an embodiment of the present application;
[0055] Figure 4 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, a person skilled in the art may make non-creative modifications to the present embodiment as needed, but such modifications are protected by the patent law as long as they are within the scope of the present application.
[0057] It should be noted that in the optional embodiments of the present application, the object information and other related data involved, when the embodiments in the present application are applied to specific products or technologies, need to obtain the permission or consent of the object, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of the present application involve data related to the object, it needs to be obtained with the authorization and consent of the object, the authorization and consent of the relevant departments, and in compliance with the relevant laws, regulations and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information needs to obtain the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained. The embodiments also need to be implemented with the authorization and consent of the object.
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.
[0060] For ease of understanding, the following are explanations of relevant terms:
[0061] 1. Hemodialyzer: It is a key component in the hemodialysis process. It removes excess water and toxins from the patient's body through the principle of a semi-permeable membrane.
[0062] 2. Coagulation / residual coagulation: refers to the phenomenon that during the hemodialysis process, due to the interaction between blood and dialyzer materials, blood components are retained and coagulated inside the dialyzer.
[0063] 3. API (Application Programming Interface): is a set of definitions, protocols, and tools for building computer software applications. They allow different software applications to communicate without having to understand each other's internal code or logical structure. In short, API is an intermediary that enables developers to use certain software services or data without having to write all the functions from scratch.
[0064] 4. OpenCV (Open Source Computer Vision Library): is an open source computer vision and machine learning software library. It contains hundreds of computer vision algorithms, including but not limited to image processing, video analysis, image recognition, machine learning, real-time image processing, etc.
[0065] 5.Base64 encoding function: Base64 is an encoding method that can convert binary data into a 64-character ASCII string.
[0066] 6.HTTPS (Hypertext Transfer Protocol Secure) request: It is a network protocol for secure communication. It provides encryption, data integrity and authentication through SSL / TLS under HTTP.
[0067] 7.ORB (Oriented FAST and Rotated BRIEF) algorithm: is an algorithm for image feature point detection and description, which combines the advantages of FAST key point detection and BRIEF descriptor and improves them to improve performance and calculation speed.
[0068] 8. FAST (Features from Accelerated Segment Test) algorithm: It is an algorithm for fast corner detection, proposed by Edward Rosten and Tom Drummond in 2006. It is designed to quickly detect corners in images with limited computing resources in real-time applications such as SLAM (Simultaneous Localization and Mapping) of mobile robots.
[0069] 9. BRIEF (Binary Robust Independent Elementary Features) algorithm: is an algorithm for describing image feature points. Its core idea is to select a set of random non-overlapping pixel pairs around the key point and encode the grayscale values of these pixels as binary numbers to form feature descriptors.
[0070] 10. RANSAC (Random Sample Consensus) algorithm is an iterative method for estimating mathematical model parameters from data containing outliers (noise). It fits the model by randomly selecting a small sample of the data set, evaluates its fit, and then iteratively optimizes the model to eventually obtain a better fitting model.
[0071] 11. Feature Descriptor: It is a vector used in computer vision to represent the area around key points in an image. It is usually used with feature detection algorithms to extract image features and match them.
[0072] 12. Robustness: A key concept in computer science that describes the ability of a system or algorithm to maintain its performance and stability in the face of uncertainties and abnormalities such as input errors, environmental changes, noise interference, parameter changes, etc. In the field of machine learning, robustness is particularly important because it is directly related to the stability and effectiveness of the model in practical applications.
[0073] 13. High-order global threshold image segmentation (Otsu) algorithm: It is a method for automatically selecting a global threshold. It determines the optimal threshold by maximizing the variance between classes. This method was proposed by Nobuyuki Otsu in 1979 and is considered to be one of the best algorithms for threshold selection in image segmentation. The core idea of the Otsu algorithm is to minimize the intra-class variance or maximize the inter-class variance.
[0074] 14.RGB color space: It is a color model that produces a variety of colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other.
[0075] The embodiment of the present application provides a hemodialyzer residual coagulation degree analysis system that can rely on the mini-program platform. The core goal of the system is to optimize the process of clinical medical personnel rating the residual coagulation status of the dialyzer after the hemodialysis treatment is completed.
[0076] To assess the severity of coagulation, the Blood Purification Standard Operating Procedure (2021) divides the coagulation degree of the dialyzer into Grade 0, Grade I, Grade II, and Grade III. Based on the coagulation rating results after treatment, doctors can take effective intervention measures, such as increasing the dose of anticoagulants, improving dialysis operation techniques, and selecting dialyzers with better biocompatibility, to reduce the incidence of dialyzer coagulation, thereby reducing treatment risks and improving treatment efficiency.
[0077] At present, this process mainly relies on manual evaluation by medical staff, which not only requires a huge workload, but also the evaluation results are easily affected by personal subjective judgment and have certain deviations.
[0078] Alternatively, a device having a dialyzer holding device, an image capture device, and an image processing system is used. The image capture device is used to capture detailed images of the dialyzer or filter, and is disposed inside the support element, while the dialyzer can be rotatably mounted in a semi-cylindrical recess of the support element to facilitate capturing images at multiple angles. A system integrating an image capture device, an illumination device, and a control device will increase costs; the effective operation of the device requires regular calibration and maintenance, and the rotational mounting of the image capture device requires precise mechanical design, which poses a risk of mechanical failure; the setting of the illumination device may have a significant effect on the image quality, which may cause the image to be overexposed or underexposed, affecting the accurate analysis of the color value; the device may be designed primarily for dialyzers of a specific type and size, and may not be applicable to other types of dialysis equipment or may require adjustment, and has poor adaptability.
[0079] Based on this, the system provided in the embodiment of the present application realizes the automatic rating function through the server (taking the cloud server as an example), and the operation process is very simple, specifically: after the treatment, the medical staff starts the client to trigger the shooting command and take high-definition photos of the dialyzer; then, upload these photos to the cloud server, and the built-in image processing function of the cloud server will process the uploaded pictures, and then identify and analyze the distribution and proportion of specific color blocks in the picture according to the preset color interval; the level of coagulation degree of the dialyzer will be automatically assessed according to the above color block distribution ratio, and the rating results will be presented to the user. By adopting the above intelligent rating method, the embodiment of the present application can replace the traditional manual rating work, thereby reducing the workload of medical staff and improving work efficiency. More importantly, it can also provide more accurate and objective evaluation results, which is of great reference value for clinicians to formulate dialysis treatment plans and conduct patient health education, thereby promoting technological progress in the field of hemodialysis treatment and contributing to improving the quality of medical services and patient care effects.
[0080] Specifically, the present application embodiment provides a dialyzer coagulation level analysis method, such as Figure 1As shown, the method provided in the embodiment of the present application can be executed by a server, which can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The terminal device and the cloud server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The method includes:
[0081] S101, acquiring multiple images of the side and surrounding of the dialyzer;
[0082] The multiple images are images taken continuously in a preset order;
[0083] Among them, the multiple images of the side and the whole body are multi-angle images of the dialyzer to show the residual coagulation of the dialyzer after the hemodialysis treatment is completed. The preset order is clockwise or counterclockwise, that is, the multiple images are taken continuously in a clockwise or counterclockwise direction, and the angles are continuous.
[0084] In a possible implementation manner of the embodiment of the present application, the multiple images are uploaded by a client deployed on a terminal device; the display interface is the display interface of the client; and the client is a terminal software or a small program.
[0085] Taking the mini program as an example, the user triggers the photo command through the mini program interface. After receiving the command, the mini program starts the camera of the terminal device by calling the first API interface. The timer function calls the photo function at a specified time interval. The camera is then turned on and takes an image of the dialyzer. After the image is taken, the image is saved in a temporary storage area accessible to the mini program. After the image is taken, the second API is called to upload the image to the server. Directly use the mini program API. The mini program provides APIs such as wx.chooseImage and wx.createCameraContext, which can be used directly to select album pictures or call the camera to take pictures without encapsulating additional API interfaces.
[0086] S102, performing image stitching according to the multiple images to obtain a first panoramic image of the dialyzer;
[0087] Since the multiple images show images of the dialyzer from different perspectives, the multiple images with overlapping parts are stitched into a first panoramic image. In the embodiment of the present application, stitching can be performed by matching feature points, or by using a deep learning network for image stitching, which is not limited in the embodiment of the present application.
[0088] S103, determining the pixel ratio of the red component in the RGB value of the pixel in the first panoramic image within a preset range; obtaining the coagulation level corresponding to the pixel ratio according to the pixel ratio and a preset corresponding relationship, wherein the preset corresponding relationship is a corresponding relationship between multiple pixel ratio ranges and multiple coagulation levels;
[0089] Among them, RGB images are images of various colors generated based on different intensities of the three basic colors of red, green, and blue. In RGB images, each pixel is usually composed of three components, representing the brightness values of the three colors red, green, and blue. When evaluating the coagulation level, the change of the red component may be related to the content or state of hemoglobin during the coagulation process. The red component reflects the brightness information of the red component in the image. The coagulation condition can be determined more accurately through the situation of the red component.
[0090] In an embodiment of the present application, the RGB value of each pixel of the first panoramic image is analyzed, with particular attention paid to the pixel ratio of the red (R) component within a preset range, which can be set by the user according to actual needs, such as a pixel frequency in the range of 190 to 250. The coagulation level of the dialyzer is evaluated based on the pixel ratio of the R value within this range and the preset correspondence. The preset correspondence is set by the user according to actual conditions. For example, a ratio of 30% to 50% is level 1, 50% to 80% is level 2, and more than 80% is level 3. Finally, the analysis results are compared with the coagulation level standard to determine the coagulation level of the dialyzer.
[0091] S104, returning the coagulation level, pixel ratio and the first panoramic image to the terminal device, so as to display the first panoramic image, the coagulation level and pixel ratio in a display interface of the terminal device.
[0092] In an embodiment of the present application, the first panoramic image may be displayed in a first area of a display interface of the terminal device, and the coagulation level and pixel ratio may be displayed in a second area. The first panoramic image is returned to the terminal device so that the first panoramic image is displayed in the first area of the display interface of the terminal device;
[0093] The coagulation level and pixel ratio are sorted into JSON format and returned to the terminal device. Specifically, taking the mini program as an example, the coagulation level and pixel ratio are sorted into JSON format and transferred to the mini program of dialyzer residual coagulation rating via the public platform server. The mini program displays the coagulation level and pixel ratio of the dialyzer in the second area of the mini program interface according to the received matching results and storage address.
[0094] It can be seen that in the embodiment of the present application, multiple images of the side and surrounding of the dialyzer are obtained in order to obtain a comprehensive residual coagulation situation of the dialyzer; multiple images are spliced to form a first panoramic image; by accurately analyzing the pixel ratio of the red component in the panoramic image, and based on the preset corresponding relationship, the coagulation level can be accurately evaluated; the coagulation level, pixel ratio and panoramic image are returned to the terminal device, so that the user can intuitively see the status of the dialyzer and the coagulation situation on the interface; not only the accuracy of the coagulation assessment is improved, but also the visualization of the information is enhanced, so that the user can make decisions quickly.
[0095] A possible implementation method of the embodiment of the present application is that S101 obtains multiple images of the side and surrounding of the dialyzer, including: obtaining multiple initial images of the side and surrounding of the dialyzer; performing image preprocessing on the multiple initial images of the side and surrounding of the dialyzer to obtain multiple images of the side and surrounding of the dialyzer; wherein the image preprocessing includes at least one of the following: image noise filtering, geometric correction, and exposure correction.
[0096] Image preprocessing can be performed on the server. The preprocessing steps include image denoising, geometric correction, and exposure correction. The purpose is to improve the detectability of feature points through image enhancement techniques such as contrast enhancement and noise reduction.
[0097] For image denoising, traditional denoising techniques, such as mean filtering and Gaussian filtering, mainly rely on linear or nonlinear filtering techniques to smooth images, but these methods may cause the loss of image details. The core of the embodiment of the present application is to identify the proportion of specific color blocks in the image, so that bilateral filtering technology can be used to process noise to retain image details. The advantage of bilateral filtering lies in its unique weighted averaging mechanism, which comprehensively considers the spatial proximity between pixels and the similarity of pixel values, thereby effectively protecting the key detail information of the image while reducing noise.
[0098] In an embodiment of the present application, the image to be processed is loaded by the cv2.imread() function, and then the cv2.bilateralFilter() function is used to apply bilateral filtering to reduce the noise in the image while keeping the edges clear, and finally the denoised image is saved to a file by the cv2.imwrite() function.
[0099] The specific implementation process includes:
[0100] import cv2
[0101]
[0102] d = 9
[0103] sigmaColor = 75
[0104] sigmaSpace = 75
[0105] filtered_image = cv2.bilateralFilter(image, d, sigmaColor,sigmaSpace)
[0106]
[0107] Where, d: filter diameter; sigmaColor: standard deviation in color space; sigmaSpace: standard deviation in coordinate space.
[0108] For geometric correction, perspective distortion occurs when the camera's viewing angle is not frontal and the shooting plane is not parallel to the camera lens. This distortion causes the edges of objects in the image to be stretched or compressed out of proportion, causing the image to be distorted or distorted. Image geometric correction refers to the process of adjusting the geometric distortion in an image to ensure that straight lines in the image remain straight, angles remain at the correct angles, and the proportions of objects remain true.
[0109] In the embodiment of the present application, four corner points in the image are automatically detected, usually the four corners of a rectangle, thereby defining a quadrilateral area and determining the target positions to which these points should be mapped after perspective correction. The cv2.getPerspectiveTransform() function is used to calculate the perspective transformation matrix based on the selected source points (src_points), i.e. the detected corner points, and the target points (dst_points), i.e. the four corner points of the corrected image. The perspective transformation matrix is used to transform the image from one perspective projection to another.
[0110] The specific implementation process includes:
[0111] src_points = np.array([[x1, y1], [x2, y2], [x3, y3], [x4, y4]],
[0112] dtype = np.float32)
[0113] dst_points = np.array( ,
[0114] dtype = np.float32)
[0115] M = cv2.getPerspectiveTransform(src_points, dst_points)
[0116] Then, use the cv2.warpPerspective() function and the perspective transformation matrix calculated in the previous step to transform the original image to obtain the corrected image. Where width and height are the width and height of the corrected image (the same as the original image). Specifically, warped_image = cv2.warpPerspective(original_image, M,(width, height)).
[0117] Display or save the corrected image to verify that the perspective distortion has been successfully corrected.
[0118] Specifically,
[0119] cv2.waitKey(θ)
[0120] cv2.destroyAllWindows().
[0121] For exposure correction, first read the image through cv2.imread(), then convert it from BGR color space to YCrCb color space to separate brightness and color information, then perform linear adjustment of contrast and brightness on the Y channel alone (increase brightness, alpha > 1; reduce brightness, θ < alpha < 1), finally convert the adjusted image back to BGR color space, and use cv2.imwrite() to save the corrected image.
[0122] Specifically,
[0123] ycrcb_image = cv2.cvtColor(image, cv2.COLOR_BGR2YCrCb) converts to y color space
[0124] alpha = 1.2
[0125] beta = 20
[0126] ycrcb_image[:, :, θ] = cv2.convertScaleAbs(ycrcb_image[:, :, 0],alpha=alpha, beta=beta)
[0127] contrast = 1.4
[0128]
[0129] corrected_image = cv2.cvtColor(ycrcb_image, cv2.COLOR_YCrCb2BGR)
[0130]
[0131] Among them, alpha: brightness adjustment coefficient; beta: brightness offset.
[0132] This application does not limit the order of the three methods, and users can set them according to actual needs.
[0133] It can be seen that in the embodiment of the present application, after obtaining multiple initial images of the side and body of the dialyzer, an image preprocessing step is performed. Image noise filtering helps to reduce interference information in the image and improve image quality; geometric correction can correct shape distortion in the image to ensure the accuracy of image stitching; exposure correction can adjust the brightness of the image to minimize the brightness difference between different images. By taking at least one of the preprocessing operations, multiple accurate images can be provided, which improves the reliability of the entire analysis process.
[0134] A possible implementation method of the embodiment of the present application, after S102 performs image stitching according to multiple images to obtain a first panoramic image of the dialyzer, it also includes: identifying the label area in the first panoramic image; replacing the pixel value of the label area in the first panoramic image with the background value to obtain a second panoramic image; performing regional repair on the label area in the second panoramic image according to image information of adjacent areas of the label area in the second panoramic image to obtain a repaired first panoramic image; accordingly, determining the pixel ratio of the red component in the RGB value of the pixel in the first panoramic image within a preset range, including: determining the pixel ratio of the red component in the RGB value of the pixel in the repaired first panoramic image within a preset range; returning the coagulation level, the pixel ratio and the first panoramic image to the terminal device, including: returning the coagulation level, the pixel ratio and the repaired first panoramic image to the terminal device.
[0135] It should be noted that for dialyzers, labels are generally attached to the surface of the instrument to mark the dialyzer model, batch, membrane area, manufacturer information and precautions. The label will affect the evaluation of pixel ratio. Therefore, in the embodiment of the present application, the label will be removed and repaired to make the first panoramic image more accurate, thereby improving the accuracy of the coagulation results.
[0136] In an embodiment of the present application, through OpenCV, first use cv2.imread to read the first panoramic image and convert it into a grayscale image, and then apply cv2.threshold combined with the Otsu method to perform automatic threshold calculation and binarization processing to identify and isolate the label areas in the image; replace the pixel values of these areas with background values, which can be (0, 0, 0) or (255, 255, 255). And encode the image into JPEG or PNG format through cv2.imencode; the encoded image is converted to a Base64 string for safe transmission to the image repair API. The API identifies and repairs blank or damaged areas in the image, intelligently fills them with surrounding background textures and colors, and then returns the repaired image; the repaired image is converted to RGB format and saved to ensure the integrity and color accuracy of the image.
[0137] It can be seen that in the embodiment of the present application, after obtaining the first panoramic image, the label area in the image is identified; the pixel value of the label area is replaced with the background value, and the area is repaired using the image information of the adjacent area, which can effectively remove the interference elements in the image and make the panoramic image clearer and more complete.
[0138] In a possible implementation of the embodiment of the present application, S102 performs image stitching based on multiple images to obtain a first panoramic image of the dialyzer, including: SA1-SA4 (not shown in the drawings), wherein:
[0139] SA1, determine the first image as the initial panoramic image;
[0140] Create an ORB detector through the cv2.ORB_create() function, convert multiple images into grayscale images, and initialize the first image as the basis of the panoramic image.
[0141] SA2, extracting the first feature point of the initial panoramic image and the descriptor corresponding to the first feature point, and extracting the second feature point of the adjacent image and the descriptor corresponding to the second feature point;
[0142] SA3, performing feature point matching on the first feature point of the initial panoramic image and the second feature point of the adjacent image according to the descriptor corresponding to the first feature point and the descriptor corresponding to the second feature point to obtain a successfully matched feature point pair;
[0143] Create a BFMatcher object, use the detectAndCompute() method to detect ORB feature points for each image, and calculate its descriptor, and use cv2.BFMatcher() to perform accurate matching based on the Hamming distance between adjacent image feature points and descriptors. The user can customize the threshold of the Hamming distance, which is not limited in the present embodiment.
[0144] The specific implementation process includes:
[0145] orb = cv2.ORB_create()
[0146]
[0147] gray_images = [cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) for img inimages]
[0148] panorama = gray_images[0].copy()
[0149] bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True)
[0150] for i in range(1, len(gray_images)):
[0151] kp1, des1 = orb.detectAndCompute(panorama, None)
[0152] kp2, des2 = orb.detectAndCompute(gray_images[i], None)
[0153] matches = bf.match(des1, des2)
[0154] matches = sorted(matches, key=lambda x: x.distance)
[0155] Furthermore, to ensure the accuracy of the matching, the RANSAC algorithm is applied to filter out the outliers and wrong matches in the matching, and the coordinates of the matching points are obtained. Specifically, according to the descriptor corresponding to the first feature point and the descriptor corresponding to the second feature point, the first feature point of the initial panoramic image and the second feature point of the adjacent image are matched to obtain the successfully matched feature point pair, and the method further includes: using the RANSAC algorithm to identify and remove the abnormal feature point pairs of the successfully matched feature point pairs, and obtain the final successfully matched feature point pairs. By introducing the RANSAC algorithm to identify and remove the abnormalities of the successfully matched feature point pairs, the accuracy and robustness of the feature point matching are further improved.
[0156] Furthermore, the homography matrix of the initial panoramic image and the adjacent images can be determined; the adjacent images are corrected according to the homography matrix to obtain the corrected adjacent images; and the initial panoramic image and the corrected adjacent images are fused according to the successfully matched feature point pairs to obtain a new initial panoramic image. When fusing the initial panoramic image and the adjacent images, the homography matrix is first determined to correct the adjacent images to ensure the alignment accuracy between the images.
[0157] In the embodiment of the present application, cv2.findHomography() is used to calculate the homography matrix between images according to the matched feature points, and cv2.warpPerspective() is used to correct the image.
[0158] The specific implementation process includes:
[0159] good_matches = [match for match in matches if match.distance < 30]
[0160] src_pts = np.float32([kp1[m.queryIdx].pt for m in good_matches]).reshape(-1, 1, 2)
[0161] dst_pts = np.float32([kp2[m.trainIdx].pt for m in good_matches]).reshape(-1, 1, 2)
[0162] H, _ = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC, 5.0)
[0163] height, width = panorama.shape
[0164] warped_image = cv2.warpPerspective(gray_images[i], H, (width + int(width 0.5), height)) .
[0165] SA4. Based on the successfully matched feature point pairs, the initial panoramic image and the adjacent images are fused to obtain a new initial panoramic image. Based on the new initial panoramic image and the next adjacent image, the above process is repeated until the fusion of multiple images is completed to obtain the first panoramic image of the dialyzer.
[0166] Specifically, when performing feature point fusion, a weight matrix is created in the overlapping area so that the weights are smoothly transitioned in the overlapping area, so as to facilitate sequential splicing of images and finally obtain the first panoramic image. Use cv2.addWeighted() to fuse the pixel values in the overlapping area according to the weight matrix and save the image. The specific implementation process includes:
[0167] mask = np.zeros_like(panorama, dtype=np.float32)
[0168] roi_x = [max(0, np.min(src_pts[:, 0]) - 10), min(panorama.shape[1],np.max(src_pts[:, 0]) + 10)]
[0169] roi_y = [max(0, np.min(src_pts[:, 1]) - 10), min(panorama.shape[0],np.max(src_pts[:, 1]) + 10)]
[0170] mask[roi_y[0]:roi_y[1], roi_x[0]:roi_x[1]] = 1
[0171] for y in range(roi_y[0], roi_y[1]):
[0172] for x in range(roi_x[0], roi_x[1]):
[0173]
[0174]
[0175] panorama = cv2.addWeighted(panorama, 1 - mask, warped_image, mask, 0)
[0176] cv2.imwrite('panorama.jpg', panorama_bgr)
[0177] It can be seen that in the embodiment of the present application, the first image is used as the initial panoramic image, and the feature points of adjacent images are extracted and matched in sequence; by gradually fusing adjacent images, a complete panoramic image of the dialyzer is finally obtained.
[0178] A possible implementation method of the embodiment of the present application, after stitching multiple images to obtain a first panoramic image of the dialyzer, also includes: performing quality assessment on the first panoramic image; when the assessment passes, determining the pixel proportion of the red component in the RGB value of the pixels in the first panoramic image within a preset range; when the assessment fails, correcting the first panoramic image, and performing the step of performing quality assessment on the first panoramic image again until the assessment passes.
[0179] The evaluation method may be to receive the evaluation result of the user, which includes passing the evaluation, failing the evaluation, or performing a quality evaluation on the stitched panoramic image. Specifically, the color consistency of different areas in the panoramic image is evaluated; for example, whether there is obvious color difference, hue change or saturation difference; the clarity of the panoramic image is evaluated to ensure that the details in the image are clear; and whether there are artifacts. If the evaluation fails, the first panorama is corrected according to the reason for the failure. For example, if the color is distorted, a color correction algorithm can be tried; if the image is blurred, an image sharpening algorithm can be tried; if artifacts exist, image repair is performed. The corrected image needs to be evaluated again to ensure that it meets the quality standard. Multiple iterations can be performed until the image quality meets the requirements, or the number of iterations reaches a preset threshold, and a prompt message is generated and returned to the terminal device so that the user can retake multiple images.
[0180] A possible implementation of the embodiment of the present application, before returning the coagulation level, the pixel ratio, and the first panoramic image to the terminal device, further includes:
[0181] Obtaining a preset maximum size and a size of the first panoramic image;
[0182] Based on a preset maximum size and a size of the first panoramic image, compressing the first panoramic image to obtain a compressed first panoramic image, wherein the size of the compressed first panoramic image does not exceed the preset maximum size;
[0183] Accordingly, the coagulation level, pixel ratio and the first panoramic image are returned to the terminal device, including:
[0184] The coagulation level, pixel ratio and compressed first panoramic image are returned to the terminal device.
[0185] In an embodiment of the present application, the size of the first panoramic image, such as width (width) and height (height), is obtained by calling the third API interface. According to the preset maximum size, such as the maximum width (maxWidth) and the maximum height (maxHeight), the size of the compressed first panoramic image, such as the new width (newWidth) and the new height (newHeight), is calculated. Among them, the preset maximum size is the maximum size preset by the user, which corresponds to the display interface. For example, if the display interface is the canvas of the applet, the preset maximum size is not greater than the canvas size. Preferably, the preset maximum size is the canvas size.
[0186] If the width or height of the first panoramic image exceeds the maximum limit, it is scaled proportionally to keep the aspect ratio of the image unchanged. If width > maxWidth, newWidth = maxWidth, newHeight = (maxHeight / maxWidth) height, and ensure that newHeight does not exceed maxHeight. If it exceeds, it is calculated in reverse. Then, call the API interface encapsulated based on the Base64 encoding function to draw the compressed first panoramic image into the corresponding area of the terminal device, exemplarily, onto the canvas inside the applet. In the callback function of the canvas function, execute the export function, export the content on the canvas as the initial image, and obtain its address. Use the pre-set encoding function to convert the initial image into a string in Base64 encoding format for easy network transmission.
[0187] Furthermore, the terminal device sends the encrypted image data to the server via the HTTPS protocol. After receiving the data, the server decodes it into the original image and extracts the image matching result and storage location.
[0188] Based on any of the above embodiments, the embodiments of the present application provide a dialyzer residual coagulation rating system based on a mini-program, including three main parts: a client, a mini-program and a server (taking a cloud server as an example). The user logs in through the client and starts the mini-program. The mini-program guides the user to take side and full-body photos of the dialyzer, usually 3 to 5 photos are required. After the photo is taken, the mini-program automatically uploads the image to the cloud server. The cloud server (with OpenCV installed) performs a series of preprocessing operations on the image, including noise filtering, geometric correction, and exposure correction to improve image quality. The images captured by multiple cameras are stitched together through a software algorithm to form a seamless 360° panoramic image, ensuring a smooth transition between images and avoiding overlap. After the image stitching is completed, the cloud server identifies the label position in the wide image, removes the area, and supplements the missing area through an algorithm to form a complete panoramic image of the dialyzer without label occlusion. The system compresses the processed image according to the preset transmission size to ensure the clarity and proportion of the image during transmission. The mini program sends encrypted image data to the cloud server through the HTTPS protocol. After the server pre-processes the image, it counts the pixel ratio according to the preset pixel range, and generates a rating result by matching it with the rating criteria. The result is then transmitted back to the mini program and displayed intuitively on the mini program interface.
[0189] The system provided in the embodiment of the present application is dedicated to automating the rating process of residual coagulation of dialyzers by integrating the convenience of applet and the rich functions of OpenCV. This integrated innovation not only significantly improves the accuracy and consistency of the rating work, but also effectively relieves the pressure of medical staff by reducing human errors, allowing them to focus more on providing direct medical services. Compared with traditional mechanical rating equipment, applet costs are low and eliminates the cumbersome equipment maintenance and repair. Users only need to simply take a photo of the dialyzer and upload it to the applet to quickly get the system's intelligent rating feedback, which greatly improves the operating efficiency. In addition, the ease of use and intuitive user interface design of the applet make this system very easy for medical staff to use without additional training. The image processing algorithm within the system can optimize the uploaded images and further improve the accuracy of the rating. Relying on the advanced technology of OpenCV, the system can accurately identify and analyze specific color blocks in the image to ensure the objectivity of the rating. Finally, the cloud infrastructure of the system ensures that it can easily accept updates and maintenance, ensuring that the rating technology is always up to date. Accurate coagulation ratings provide physicians with critical information to support more precise medical decision making and improve patient outcomes.
[0190] See also Figure 2, the specific implementation method is as follows: the interface of the dialyzer residual coagulation rating applet consists of a camera button, a picture preview area and a result display area, wherein the result display area includes the proportion of the dialyzer coagulation part and the coagulation grade assessment result. The cloud server includes five parts: an image receiving and preprocessing module, an image stitching module, an image de-labeling processing module, a target recognition module and a result return module. The image receiving and preprocessing module is responsible for receiving the dialyzer images temporarily stored in the mobile terminal to be uploaded and performing pre-recognition pre-processing. The preprocessing steps include noise filtering, geometric correction and exposure correction; the image stitching module includes feature point recognition and extraction, image registration and image fusion; the image de-labeling processing module removes the label part of the synthesized image and performs image repair according to the features of the area outside the label; the target recognition module performs pixel traversal on the processed image and counts the proportion of pixels in the preset range; the result return module is used to extract the analysis result data of the target recognition module, and organize it into JSON format and transfer it to the dialyzer residual coagulation rating applet via the public platform server.
[0191] Specifically, an embodiment in a specific scenario is provided: a nurse in a dialysis room of a hospital uses a mobile phone terminal installed with a client to log in to the client through a wireless network, enters the dialyzer residual coagulation rating applet by searching for "dialyzer residual coagulation rating" on the applet interface, clicks the "take photo" button on the start interface of the dialyzer residual coagulation rating applet, and calls the mobile phone terminal camera to take 360° full-circle photos of the dialyzer (4 to 6 photos), which are uploaded to the cloud server analysis platform through the public platform server through the network Http service. The cloud server analysis platform receives the temporarily stored dialyzer image to be identified through the image receiving and preprocessing module, and performs dialyzer image denoising, geometric correction and exposure correction preprocessing. The preprocessed image data is input into the image stitching module of the cloud server analysis platform, and these images are fused according to the feature points of the uploaded images to stitch them into a wide picture. The image de-labeling processing module that uploads this wide image to the cloud server removes the label part of the synthesized image and repairs the image according to the characteristics of the area outside the label; the target recognition module traverses the pixels of the processed image and counts the proportion of pixels in the preset range; the result return module is used to extract the analysis result data of the target recognition module, and organizes it into JSON format and transfers it to the dialyzer residual coagulation rating applet via the public platform server. The result display area of the dialyzer residual coagulation rating applet displays the residual coagulation proportion of the dialyzer and the corresponding coagulation level.
[0192] It can be seen that the solution provided by the embodiment of the present application has the following excellent effects:
[0193] Automated rating function: The system can automatically assess the degree of coagulation of the dialyzer. This is an automated rating function achieved through image recognition technology, which reduces the need for manual rating and improves efficiency.
[0194] Simplicity of operation process: The patent emphasizes the simplicity of operation process. Medical staff only need to take high-definition photos of the dialyzer and upload them to the mini program without complicated operations. Using cloud functions, the mini program supports cloud development, and the calling logic of the smart cloud API can be integrated into the cloud function to realize image uploading, processing and result feedback.
[0195] Image processing and analysis: The cloud server with OpenCV installed can pre-process the uploaded images, stitch them together, remove labels, and fill in missing areas, and identify and analyze the distribution and proportion of specific color blocks in the image.
[0196] Presentation of rating results: The system can intuitively present the automatically assessed dialyzer coagulation level to the user, which improves the convenience of users in obtaining information. Direct compression on the front end: Use JavaScript libraries (such as compressorjs) to compress images directly on the front end.
[0197] The following is an introduction to a device provided in an embodiment of the present application. The device described below and the method described above can be referenced to each other. The device of this embodiment is set in a server. Figure 3 , Figure 3 It is a structural block diagram of a device of one embodiment of the present application, comprising:
[0198] An image receiving module 210 is used to obtain multiple images of the side and surrounding of the dialyzer, where the multiple images are images taken continuously in a preset order;
[0199] An image stitching module 220, configured to stitch multiple images to obtain a first panoramic image of the dialyzer;
[0200] The target recognition module 230 is used to determine the pixel ratio of the red component in the RGB value of the pixel in the first panoramic image within a preset range; obtain the coagulation level corresponding to the pixel ratio according to the pixel ratio and the preset corresponding relationship, wherein the preset corresponding relationship is a correspondence relationship between multiple pixel ratio ranges and multiple coagulation levels;
[0201] The result returning module 240 is used to return the coagulation level, the pixel ratio and the first panoramic image to the terminal device, so as to display the first panoramic image, the coagulation level and the pixel ratio in the display interface of the terminal device.
[0202] In one achievable manner, the image receiving module 210 is used to obtain multiple initial images of the side and surrounding area of the dialyzer; perform image preprocessing on the multiple initial images of the side and surrounding area of the dialyzer to obtain multiple images of the side and surrounding area of the dialyzer; wherein the image preprocessing includes at least one of the following: image noise filtering, geometric correction, and exposure correction.
[0203] In one achievable manner, the present invention further includes:
[0204] The de-labeling module is used to: identify the label area in the first panoramic image;
[0205] Replacing the pixel values of the label area in the first panoramic image with the background values to obtain a second panoramic image;
[0206] Performing regional repair on the label area in the second panoramic image according to image information of an adjacent area of the label area in the second panoramic image to obtain a repaired first panoramic image;
[0207] Accordingly, the target recognition module 230 is used to determine the pixel ratio of the red component in the RGB value of the pixel in the repaired first panoramic image within a preset range;
[0208] The result returning module 240 is used to return the coagulation level, pixel ratio and the repaired first panoramic image to the terminal device.
[0209] In one achievable manner, the image stitching module 220 is used to:
[0210] Determine the first image as the initial panoramic image;
[0211] Extracting a first feature point of the initial panoramic image and a descriptor corresponding to the first feature point, and extracting a second feature point of an adjacent image and a descriptor corresponding to the second feature point;
[0212] According to the descriptor corresponding to the first feature point and the descriptor corresponding to the second feature point, the first feature point of the initial panoramic image and the second feature point of the adjacent image are matched to obtain a successfully matched feature point pair;
[0213] According to the successfully matched feature point pairs, the initial panoramic image and the adjacent images are fused to obtain a new initial panoramic image, and the above process is repeated according to the new initial panoramic image and the next adjacent image until the fusion of multiple images is completed to obtain the first panoramic image of the dialyzer.
[0214] In an achievable manner, the image stitching module 220 is further used for:
[0215] Determine the homography matrix of the initial panoramic image and the adjacent images; correct the adjacent images according to the homography matrix to obtain the corrected adjacent images; fuse the initial panoramic image and the corrected adjacent images according to the successfully matched feature point pairs to obtain a new initial panoramic image;
[0216] The image stitching module 220 is further used for:
[0217] The RANSAC algorithm is used to identify and remove abnormal feature point pairs among the successfully matched feature point pairs to obtain the final successfully matched feature point pairs.
[0218] In one achievable manner, the multiple images are uploaded by a client deployed on the terminal device; the display interface is the display interface of the client; and the client is terminal software or a small program.
[0219] In one achievable manner, the present invention further includes:
[0220] A compression module, used to: obtain a preset maximum size and a size of the first panoramic image;
[0221] Based on a preset maximum size and a size of the first panoramic image, compressing the first panoramic image to obtain a compressed first panoramic image, wherein the size of the compressed first panoramic image does not exceed the preset maximum size;
[0222] Correspondingly, the result returning module 240 is used to return the coagulation level, pixel ratio and the compressed first panoramic image to the terminal device.
[0223] In an embodiment of the present application, a server is provided, such as Figure 4 As shown, Figure 4 The server 300 shown includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the server 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the server 300 does not constitute a limitation on the embodiments of the present application.
[0224] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0225] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0226] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0227] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the contents shown in the above method embodiment.
[0228] Figure 4 The server shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0229] A system provided in an embodiment of the present application is introduced below. The system described below and the method described above can refer to each other.
[0230] An embodiment of the present application provides an image analysis system, including: a terminal device and a server;
[0231] The terminal device is used to collect multiple images of the side and surrounding of the dialyzer, and to display the first panoramic image, the coagulation level and the pixel ratio;
[0232] A server, used for acquiring multiple images of the side and surrounding of the dialyzer;
[0233] Performing image stitching according to the multiple images to obtain a first panoramic image of the dialyzer;
[0234] Determine the pixel ratio of the red component in the RGB value of the pixel in the first panoramic image within a preset range; obtain the coagulation level corresponding to the pixel ratio according to the pixel ratio and the preset corresponding relationship, wherein the preset corresponding relationship is a corresponding relationship between multiple pixel ratio ranges and multiple coagulation levels;
[0235] The coagulation level, pixel ratio and the first panoramic image are returned to the terminal device, so that the first panoramic image, the coagulation level and the pixel ratio are displayed in the display interface of the terminal device.
[0236] Furthermore, the multiple images are uploaded by a client deployed on the terminal device; the display interface is the display interface of the client; and the client is the terminal software or applet.
[0237] The system is easy to operate, allowing medical staff to quickly get started without professional training, greatly improving the usability of the system. The automated rating function not only reduces dependence on professionals and reduces human errors, but also improves the accuracy and consistency of ratings. The built-in image processing function demonstrates powerful image recognition and processing capabilities, and can effectively pre-process and analyze uploaded images. The real-time feedback provided by the system enables medical staff to quickly obtain rating results and make medical decisions in a timely manner. In addition, by analyzing the distribution and proportion of specific color blocks in the image, the system provides scientific and objective ratings based on data, which helps to improve the quality of medical decisions. The system is designed to be highly scalable, allowing for the integration of more image recognition APIs or connections with other medical devices and services in the future. Through mini-program operation, the platform's security mechanism is utilized to ensure the protection of user data and privacy.
[0238] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment.
[0239] An embodiment of the present application provides a computer program product, including a computer program, which implements the corresponding contents of the aforementioned method embodiment when the computer program is executed by a processor.
[0240] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0241] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A dialyzer coagulation level analysis method, characterized in that: The method executed by the server includes: Acquire multiple images of the side and surrounding of the dialyzer, wherein the multiple images are images taken continuously in a preset order; Performing image stitching according to the multiple images to obtain a first panoramic image of the dialyzer; Determine the pixel ratio of the red component in the RGB value of the pixel in the first panoramic image within a preset range; obtain the coagulation level corresponding to the pixel ratio according to the pixel ratio and a preset corresponding relationship, wherein the preset corresponding relationship is a corresponding relationship between multiple pixel ratio ranges and multiple coagulation levels; The coagulation level, the pixel ratio, and the first panoramic image are returned to a terminal device, so that the first panoramic image, the coagulation level, and the pixel ratio are displayed on a display interface of the terminal device.
2. The method according to claim 1, characterized in that The step of obtaining multiple images of the side and surrounding of the dialyzer includes: Acquire multiple initial images of the side and surrounding of the dialyzer; The multiple initial images of the side and surrounding of the dialyzer are subjected to image preprocessing to obtain the multiple images of the side and surrounding of the dialyzer; wherein the image preprocessing includes at least one of the following: image noise filtering, geometric correction, and exposure correction.
3. The method according to claim 1, characterized in that After stitching the multiple images to obtain the first panoramic image of the dialyzer, the method further includes: identifying a label area in the first panoramic image; Replacing pixel values of the label area in the first panoramic image with background values to obtain a second panoramic image; performing region repair on the label region in the second panoramic image according to image information of an adjacent region of the label region in the second panoramic image to obtain a repaired first panoramic image; Correspondingly, the determining the pixel proportion of the red component in the RGB value of the pixel in the first panoramic image within a preset range includes: determining the pixel proportion of the red component in the RGB value of the pixel in the patched first panoramic image within a preset range; The returning the coagulation level, the pixel ratio, and the first panoramic image to the terminal device includes: returning the coagulation level, the pixel ratio, and the repaired first panoramic image to the terminal device.
4. The method according to claim 1, characterized in that The step of performing image stitching according to the plurality of images to obtain a first panoramic image of the dialyzer comprises: Determine the first image as the initial panoramic image; Extracting first feature points of the initial panoramic image and descriptors corresponding to the first feature points, and extracting second feature points of adjacent images and descriptors corresponding to the second feature points; According to the descriptor corresponding to the first feature point and the descriptor corresponding to the second feature point, feature point matching is performed on the first feature point of the initial panoramic image and the second feature point of the adjacent image to obtain a successfully matched feature point pair; According to the successfully matched feature point pairs, the initial panoramic image and the adjacent images are fused to obtain a new initial panoramic image, and the above process is repeated according to the new initial panoramic image and the next adjacent image until the fusion of the multiple images is completed to obtain the first panoramic image of the dialyzer.
5. The method according to claim 4, characterized in that The step of fusing the initial panoramic image and the adjacent image according to the successfully matched feature point pairs to obtain a new initial panoramic image includes: determining a homography matrix of the initial panoramic image and the adjacent image; correcting the adjacent image according to the homography matrix to obtain a corrected adjacent image; and fusing the initial panoramic image and the corrected adjacent image according to the successfully matched feature point pairs to obtain a new initial panoramic image. and / or, After matching the first feature point of the initial panoramic image with the second feature point of the adjacent image according to the descriptor corresponding to the first feature point and the descriptor corresponding to the second feature point to obtain a successfully matched feature point pair, the method further includes: using the RANSAC algorithm to identify and remove abnormal feature point pairs from the successfully matched feature point pairs to obtain final successfully matched feature point pairs.
6. The method according to claim 1, characterized in that The multiple images are uploaded by a client deployed on a terminal device; the display interface is the display interface of the client; and the client is a terminal software or a small program.
7. The method according to claim 1, characterized in that Before returning the coagulation level, the pixel ratio, and the first panoramic image to the terminal device, the method further includes: Obtaining a preset maximum size and a size of the first panoramic image; Based on a preset maximum size and a size of the first panoramic image, compressing the first panoramic image to obtain a compressed first panoramic image, wherein the size of the compressed first panoramic image does not exceed the preset maximum size; Accordingly, returning the coagulation level, the pixel ratio, and the first panoramic image to the terminal device includes: The coagulation level, the pixel ratio and the compressed first panoramic image are returned to the terminal device.
8. A dialyzer coagulation level analysis device, characterized in that: include: An image receiving module, used to obtain multiple images of the side and surrounding of the dialyzer, wherein the multiple images are images taken continuously in a preset order; An image stitching module, used for performing image stitching according to the multiple images to obtain a first panoramic image of the dialyzer; A target recognition module, used to determine the pixel ratio of the red component in the RGB value of the pixel in the first panoramic image within a preset range; According to the pixel proportion and a preset corresponding relationship, obtaining a coagulation level corresponding to the pixel proportion, wherein the preset corresponding relationship is a corresponding relationship between multiple pixel proportion ranges and multiple coagulation levels; The result returning module is used to return the coagulation level, the pixel ratio and the first panoramic image to the terminal device, so as to display the first panoramic image, the coagulation level and the pixel ratio in the display interface of the terminal device.
9. A server, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to: perform the steps of the method according to any one of claims 1 to 7.
10. An image analysis system, characterized in that: include: A terminal device and a server as claimed in claim 9; Among them, the terminal device is used to collect multiple images of the side and surrounding of the dialyzer, and display the first panoramic image, coagulation level and pixel ratio.