A detection device and a hemodialysis apparatus
Patent Information
- Application Number
- CN202310816548.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-05
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-07-05
AI Technical Summary
[0004]本发明提供了一种检测装置和血液透析设备,以解决现有的检测装置存在只能检测单一故障以及易产生误报警的问题
[0060]本发明实施例的技术方案,通过使透析液流过检测空间,光源模块2提供检测光源,颜色采集模块采集检测空间的图像RGB信号,然后通过控制模块获取图像RGB信号,基于所述图像RGB信号确定白度和黑度中的至少一项,并基于所述白度和所述黑度中的至少一项便可确定故障原因,故障原因包括杂质、漏血和气泡中的至少一个。通过此方式,相较于现有技术中仅能够对漏血进行检测,本方案能够对杂质、漏血和气泡三者均进行检测,同时本方案是基于白度和黑度等来判断,能够避免沉积物在管壁上的沉积造成误报警的情况,故解决了现有的检测装置存在只能检测单一故障以及易产生误报警的问题。
Smart Images

Figure CN116858786B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of medical devices, and more particularly to a detection device and a hemodialysis equipment. Background Technology
[0002] When a dialysis machine malfunctions, it may cause the patient's dialysate to leak into the waste bag, leading to blood loss, or cause air bubbles to enter the body. The detection device is used to check the dialysate tubing of the dialysis machine to prevent problematic dialysate from entering the body due to a dialysis machine malfunction. Therefore, the detection device is a key device in the hemodialysis process.
[0003] Existing detection devices typically use photoelectric sensors to detect blood leakage. When there is blood leakage, the light transmittance in the dialysate changes, so the leakage can be detected by the change in light transmittance. However, this may cause false alarms due to the deposition of deposits on the tube wall. At the same time, it cannot detect impurities and air bubbles in the dialysate. Therefore, existing detection devices have the problems of only being able to detect a single fault and being prone to false alarms. Summary of the Invention
[0004] This invention provides a detection device and a hemodialysis device to solve the problems of existing detection devices being able to detect only a single fault and being prone to false alarms.
[0005] According to one aspect of the present invention, a detection device is provided, the detection device comprising a device body, a light source module, a color acquisition module, and a control module;
[0006] The main body of the device is provided with a detection space for the flow of dialysis fluid. The detection space has an inlet and an outlet. The light source module is located on one side of the main body of the device, and the color acquisition module is located on the other side of the main body of the device.
[0007] The light source module is used to provide a detection light source, and the color acquisition module is used to acquire the RGB signal of the image of the detection space;
[0008] The control module is electrically connected to the color acquisition module and is used to acquire the image RGB signal, determine at least one of whiteness and blackness based on the image RGB signal, and determine the cause of the fault based on at least one of the whiteness and blackness. The cause of the fault includes at least one of impurities, blood leakage, and bubbles.
[0009] In an optional embodiment of the present invention, the image RGB signal includes the RGB values of each pixel in the image, and the control module is specifically used for:
[0010] Extract the characteristic RGB values from the acquired image RGB signal;
[0011] At least one of whiteness and blackness is determined based on the RGB value of the feature.
[0012] In an optional embodiment of the present invention, the control module is specifically used to: determine the hue based on the feature RGB value;
[0013] The cause of the malfunction is determined based on the hue, whiteness, and / or blackness.
[0014] In an optional embodiment of the present invention, the control module is specifically used for:
[0015] Determine whether the whiteness is lower than a preset whiteness threshold;
[0016] If not, ensure there is no leakage, impurities, or air bubbles;
[0017] If so, determine the presence of at least one of blood leakage, impurities, and bubbles, and determine the cause of the malfunction based on the hue.
[0018] In an optional embodiment of the present invention, the control module is specifically used for:
[0019] Determine whether the hue is within a preset red phase range;
[0020] If so, the cause of the malfunction is determined to be blood leakage;
[0021] If not, the cause of the malfunction is determined to be impurities or air bubbles;
[0022] Preferably, the preset red phase range is 300-360 and 0-60.
[0023] In an optional embodiment of the present invention, the control module is specifically used after determining that the cause of the fault is impurities or bubbles:
[0024] Determine whether the hue is within a preset bubble phase range;
[0025] If the hue is within the preset bubble phase range, the cause of the fault is determined to be bubbles;
[0026] If the hue is not within the preset bubble phase range, the cause of the fault is determined to be impurities;
[0027] Furthermore, the preset bubble phase range is 210-300;
[0028] Furthermore, the preset bubble phase range is 230-270.
[0029] In an optional embodiment of the present invention, the detection device further includes an alarm module, which is used to issue an alarm message. The alarm module is electrically connected to the control module, and the control module is specifically used to control the alarm module to issue an alarm message after determining that at least one of blood leakage, impurities, and bubbles is present.
[0030] And / or, the preset whiteness threshold is any value between 90 and 99.
[0031] In an optional embodiment of the present invention, the preset whiteness threshold is 95.
[0032] In an optional embodiment of the present invention, the control module is specifically used for:
[0033] Histogram filtering is performed on the RGB signal of the image;
[0034] The feature RGB values are obtained by calculating a weighted average of the RGB values of each pixel in the histogram-filtered image.
[0035] In an optional embodiment of the present invention, when the weighted average is calculated, the RGB value of a pixel in the image is the RGB value of a non-white value multiplied by a first weighting value, and the RGB value of a pixel in the image is the RGB value of a white value multiplied by a second weighting value, wherein the first weighting value is greater than the second weighting value.
[0036] In an optional embodiment of the present invention, the control module is specifically used for:
[0037] The RGB values of each pixel in the histogram-filtered image are weighted and averaged using the following formula to obtain the feature RGB values:
[0038]
[0039]
[0040]
[0041] Wherein, 0.8≤w1<1, w2<0.2, A>250, Z is the RGB value of each pixel in the image, Z′ is the feature RGB value obtained after weighted average calculation, w1 is the first weighted value, and w2 is the second weighted value; preferably, 0.9≤w1<0.99, w2<0.1; preferably, A=255.
[0042] In an optional embodiment of the present invention, the light source module includes a white LED circuit, which is used to emit white light;
[0043] The color acquisition module is used to acquire the maximum white light output value of the white light, and the control module is used to perform white balance calibration on the color acquisition module based on the maximum white light output value.
[0044] In an optional embodiment of the present invention, the light source module further includes a red LED circuit, which is used to emit red light;
[0045] The control module is electrically connected to the red LED circuit and is used to control the red LED circuit to emit red light after white balance calibration.
[0046] The color acquisition module is used to acquire the red light and output the image RGB signal;
[0047] The control module is used to acquire the image RGB signal, determine the feature RGB value based on the image RGB signal, determine whether the feature RGB value is within a preset red light range, determine that the color acquisition module is normal when the feature RGB value is within the preset red light range, and determine that the color acquisition module is faulty when the feature RGB value is not within the preset red light range or when the feature RGB value is not acquired, and issue a fault signal.
[0048] In an optional embodiment of the present invention, the color acquisition module includes a color sensor, and the acquisition speed of the color sensor is 30FPS-200FPS;
[0049] Furthermore, the color sensor (31) has a sampling speed of 40FPS-90FPS;
[0050] Furthermore, the color sensor (31) has a sampling speed of 50FPS-70FPS.
[0051] In an optional embodiment of the present invention, the color sensor includes a CMOS photosensitive array, an analog-to-digital conversion unit, and a first data communication bus;
[0052] The CMOS photosensitive array faces the detection space and is used to acquire RGB signals of the detection space and convert the corresponding light signals into electrical signals.
[0053] The input terminal of the analog-to-digital converter is electrically connected to the output terminal of the CMOS photosensitive array, and is used to convert the image RGB signal, which is an analog signal, into a digital signal.
[0054] The first data communication bus is electrically connected to the output terminal of the analog-to-digital conversion unit and is used to send the image RGB signal, which is a digital signal, to the control module.
[0055] In an optional embodiment of the present invention, the device body further includes a first transparent waterproof plate and a second transparent waterproof plate;
[0056] The first transparent waterproof plate is disposed between the light source module and the detection space, and the detection light source emitted by the light source module enters the detection space through the first transparent waterproof plate;
[0057] The second transparent waterproof plate is disposed between the detection space and the color acquisition module, and the color acquisition module acquires the image RGB signal of the detection space through the second transparent waterproof plate;
[0058] And / or, the shape of the detection space is any one of cuboid, cylinder, and elliptical cylinder, and the cross-sectional shape of the detection space is any one of rectangle, polygon, circle, and ellipse.
[0059] According to another aspect of the present invention, a hemodialysis device is provided, including the detection device described in any embodiment of the present invention.
[0060] The technical solution of this invention involves allowing dialysate to flow through a detection space. A light source module 2 provides a detection light source, and a color acquisition module acquires the RGB signal of the detection space. Then, a control module obtains the RGB signal and determines at least one of whiteness and blackness based on the RGB signal. The cause of the fault can be determined based on at least one of the whiteness and blackness, including at least one of impurities, blood leakage, and air bubbles. Compared to existing technologies that can only detect blood leakage, this solution can detect all three: impurities, blood leakage, and air bubbles. Furthermore, this solution uses whiteness and blackness as the basis for judgment, avoiding false alarms caused by deposits on the tube wall. Therefore, it solves the problems of existing detection devices that can only detect a single fault and are prone to false alarms.
[0061] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0063] Figure 1 This is a schematic diagram of the structure of a detection device provided in an embodiment of the present invention;
[0064] Figure 2 A circuit block diagram of a detection device provided in an embodiment of the present invention;
[0065] Figure 3 A circuit block diagram of another detection device provided in an embodiment of the present invention;
[0066] Figure 4 A circuit block diagram of another detection device provided in an embodiment of the present invention;
[0067] Figure 5 A circuit block diagram of another detection device provided in an embodiment of the present invention.
[0068] The components include: 1. Main body of the device; 11. Detection space; 12. Water inlet; 13. Water outlet; 14. First transparent waterproof plate; 15. Second transparent waterproof plate; 2. Light source module; 21. White LED circuit; 22. Red LED circuit; 23. Constant voltage source; 3. Color acquisition module; 31. Color sensor; 311. CMOS photosensitive array; 312. Analog-to-digital conversion unit; 313. First data communication bus; 4. Control module; 41. Control unit; 42. Second data communication bus; 43. Data processing unit; 44. External communication bus; 5. Alarm module; 6. Power supply module; 61. DC regulated power supply; 62. DC-DC step-down circuit. Detailed Implementation
[0069] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0070] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0071] Figure 1 This is a schematic diagram of the structure of a detection device provided in an embodiment of the present invention. Figure 2 A circuit block diagram of a detection device provided in an embodiment of the present invention is shown below. Figure 1 and Figure 2 As shown, the detection device includes a main body 1, a light source module 2, a color acquisition module 3, and a control module 4.
[0072] The main body 1 of the device is provided with a detection space 11 for the flow of dialysis fluid. The detection space 11 has an inlet 12 and an outlet 13. The light source module 2 is set on the main body 1 of the device on one side of the detection space 11, and the color acquisition module 3 is set on the main body 1 of the device on the other side of the detection space 11.
[0073] The light source module 2 is used to provide the detection light source, and the color acquisition module 3 is used to acquire the RGB signal of the image in the detection space 11.
[0074] The control module 4 is electrically connected to the color acquisition module 3 and is used to acquire the image RGB signal, determine at least one of whiteness and blackness based on the image RGB signal, and determine the cause of the fault based on at least one of whiteness and blackness. The cause of the fault includes at least one of impurities, blood leakage and bubbles.
[0075] The inlet 12 is used to supply dialysate into the detection space 11, and the outlet 13 is used to supply dialysate out of the detection space 11. The light source module 2 is a module that provides the detection light source and can emit light. The color acquisition module 3 is a module that can acquire the RGB signal of the image in the detection space 11.
[0076] Since the light source module 2 is located on the main body 1 of the device on one side of the detection space 11, and the color acquisition module 3 is located on the main body 1 of the device on the other side of the detection space 11, the light source module 2 and the color acquisition module 3 are opposite each other. The light source module 2 emits light to provide light to the detection space 11, so that the color acquisition module 3 can collect data from the detection space 11.
[0077] Control module 4 refers to the module capable of performing logical operations, which may include MCU, DSP, and FPGA. The RGB color mode is an industry-standard color system that generates various colors by varying the red (R), green (G), and blue (B) color channels and their superposition. RGB represents the colors of the red, green, and blue channels. This standard encompasses almost all colors perceptible to human vision and is one of the most widely used color systems. An image RGB signal reflects the RGB color mode. Whiteness refers to the density of white, ranging from 0% to 100%, and blackness refers to the density of black, also ranging from 0% to 100%.
[0078] There are several ways to determine at least one of blackness and whiteness based on an image's RGB signal. For example, converting the image's RGB signal to an HWB signal allows for the simultaneous determination of both blackness and whiteness. HWB is a color representation where H represents hue, W represents whiteness (the intensity of white), and B represents blackness (the intensity of black), ranging from 0% to 100%. The HWB signal reflects hue, whiteness, and blackness. The conversion can be performed using the conversion formula between the RGB and HWB color gamuts. By converting the image's RGB signal to an HWB signal, blackness and whiteness can be obtained. This explanation does not specify a particular method for determining at least one of blackness and whiteness based on an image's RGB signal; it is merely an example.
[0079] The following specific example illustrates how to determine whiteness and / or blackness based on an image RGB signal, wherein the image RGB signal includes the RGB values of each pixel in the image:
[0080] W = min(R, G, B), where W is the whiteness and min(R, G, B) is the minimum value of the RGB signal of the image.
[0081] B = 1 - min(R, G, B), where B is the emissivity.
[0082] Since whiteness can reflect the content of non-transparent components and bubbles flowing through the detection space 11, for example, when the liquid in the detection space 11 is transparent, the whiteness is 100, that is, 100%. By judging the content, it is possible to distinguish whether there is blood leakage, bubbles, or impurities.
[0083] Optionally, in a specific embodiment, the control module 4 determines whether there is a foreign object by whiteness alone, and controls the light source module 2 to emit green light. Since the green light weakens when there is blood leakage, the presence or absence of blood leakage can be distinguished based on the different absorption rates of the green light.
[0084] Optionally, in one specific embodiment, the control module 4 determines the presence of blood leakage, impurities, and bubbles solely by the blackness of the ink. For example, it determines whether the blackness exceeds a preset blackness. If the blackness exceeds the preset blackness, it determines that blood leakage, impurities, and bubbles exist; if the blackness does not exceed the preset blackness, it determines that blood leakage, impurities, and bubbles do not exist. Since blackness is the concentration of black, ranging from 0% to 100%, blackness can reflect the impurity content and / or bubble content. When the impurity content and / or bubble content is too high, it indicates that the machine has faults such as impurities and bubbles. Preferably, the preset blackness is 1-10, and further, the preset blackness is 5.
[0085] Optionally, in one specific embodiment, the control module 4 can also combine blackness and whiteness to determine whether there is leakage, impurities, and bubbles. That is, it simultaneously determines whether the blackness exceeds a preset blackness and whether the whiteness is lower than a preset whiteness threshold. When the blackness exceeds the preset blackness and the whiteness is lower than the preset whiteness threshold, it is determined that there is leakage, impurities, and bubbles. Conversely, it is determined that there is no leakage, impurities, and bubbles. This method can more accurately determine whether there is leakage, impurities, and bubbles, but compared with judging solely by whiteness, the computational load is larger and the efficiency is lower.
[0086] The above solution involves allowing the dialysate to flow through the detection space 11, with the light source module 2 providing the detection light source. The color acquisition module 3 acquires the RGB signal of the detection space 11, and then the control module 4 obtains the RGB signal. Based on the RGB signal, at least one of whiteness and blackness is determined, and the cause of the fault can be determined based on at least one of whiteness and blackness. The cause of the fault includes at least one of impurities, blood leakage, and air bubbles. Compared to existing technologies that can only detect blood leakage, this solution can detect impurities, blood leakage, and air bubbles. Furthermore, this solution uses whiteness and / or blackness for judgment, avoiding false alarms caused by deposits on the tube wall. Therefore, it solves the problems of existing detection devices that can only detect a single fault and are prone to false alarms.
[0087] In an optional embodiment of the present invention, the control module is specifically used for: extracting feature RGB values from the acquired image RGB signal, which includes the RGB values of each pixel in the image; and determining at least one of whiteness and blackness based on the feature RGB values.
[0088] However, directly determining at least one of whiteness and blackness based on the acquired image RGB signal results in excessive noise and low accuracy. By first extracting the characteristic RGB values from the acquired image RGB signal, and then determining at least one of whiteness and blackness based on these characteristic RGB values, the accuracy of whiteness and blackness can be improved, thereby enhancing the detection precision.
[0089] Based on the above embodiments, the control module is specifically used to: determine the hue based on the characteristic RGB values; and determine the cause of the fault based on the hue, the whiteness, and / or the blackness. That is, the cause of the fault is determined based on the hue, and at least one of whiteness and blackness.
[0090] The hue ranges from 0 to 360 degrees. Since both whiteness and blackness can reflect the content of non-transparent components and bubbles flowing through the detection space 11, hue can determine the color intensity of the image acquired by the color acquisition module 3. By comprehensively judging the content and color, it is possible to distinguish whether there is leakage, bubbles, or impurities. In practical applications, whiteness or blackness alone can be used to determine whether there is leakage, bubbles, or impurities. Alternatively, hue and whiteness can be used together to determine whether there is leakage, bubbles, or impurities. At the same time, hue, blackness, and whiteness can all be used simultaneously to comprehensively determine whether there is leakage, bubbles, or impurities; no specific limitation is made here.
[0091] There are several ways to determine hue based on the aforementioned characteristic RGB values. In specific applications, hue can be determined solely based on the characteristic RGB values, and then other methods can be used to determine blackness and / or whiteness. Alternatively, hue, blackness, and whiteness can be determined simultaneously. For example, converting the characteristic RGB values to an HWB signal allows for the simultaneous determination of hue, blackness, and whiteness. HWB is a color representation method where H represents hue, W represents whiteness (the intensity of white), and B represents blackness (the intensity of black), ranging from 0% to 100%. The HWB signal reflects hue, whiteness, and blackness. The conversion can be performed using the conversion formula between the RGB and HWB color gamuts. By converting the image's RGB signal to an HWB signal, hue, blackness, and whiteness can be obtained. Of course, only hue and whiteness can be obtained as needed. For example, the characteristic RGB values can also be converted to an HSV signal to obtain hue; this is merely an example.
[0092] The following specific example illustrates how to determine hue based on characteristic RGB values:
[0093]
[0094]
[0095]
[0096] Where max(R,G,B) is the maximum value of the characteristic RGB value, min(R,G,B) is the minimum value of the characteristic RGB value, and H is the hue. The above formula can be used to easily determine the hue based on the characteristic RGB value.
[0097] In an optional embodiment of the present invention, the control module 4 is specifically used for:
[0098] Determine whether the whiteness is lower than a preset whiteness threshold.
[0099] If not, confirm that there is no leakage of blood, impurities, or air bubbles.
[0100] If so, determine the presence of at least one of blood leakage, impurities, and bubbles, and determine the cause of the malfunction based on the hue.
[0101] When the liquid in the detection space 11 is transparent, free of impurities and bubbles, the whiteness value is 100. Therefore, the presence of blood leakage, impurities, and bubbles can be determined based on the whiteness value. The preset whiteness threshold can be selected based on the sensitivity of the color acquisition module 3 and the desired detection effect. Preferably, the preset whiteness threshold is any value between 90 and 99. Specifically, the preset whiteness threshold is 95. When the whiteness is lower than this preset whiteness threshold, at least one of blood leakage, impurities, and bubbles can be identified, i.e., blood leakage, impurities, and bubbles are present. The preset whiteness threshold is related to sensitivity. The higher the preset whiteness threshold, the more sensitive the detection device is, and the more easily machine shaking, voltage fluctuations, and environmental changes can affect the results, thus increasing the likelihood of false alarms. By setting the preset whiteness threshold to 95, it is possible to detect the presence of faults such as blood leakage, impurities, and bubbles while preventing false alarms.
[0102] Based on the above embodiments, the control module 4 is specifically used for:
[0103] Determine if the hue is within the preset red phase range.
[0104] If so, the cause of the malfunction is determined to be blood leakage.
[0105] If not, determine that the cause of the malfunction is impurities or air bubbles.
[0106] The step of determining whether the hue is within the preset red phase range is a refinement of the step of determining the cause of the fault based on hue and blackness. Since blood is red, the preset red phase range refers to the range in which the hue would be when there is blood leakage. By determining whether the hue is within the preset red phase range, it is possible to determine whether there is blood leakage.
[0107] For example, the preset red phase range is 300-360 and 0-60. That is, when the hue is in the range of 300-360 or 0-60, it indicates that there is bleeding.
[0108] In an optional embodiment of the present invention, when the control module 4 also converts the image RGB signal into blackness, that is, when the control module 4 converts the image RGB signal into blackness, whiteness and hue, the control module 4 can be specifically used to determine the bleeding parameters based on the blackness after determining that the cause of the fault is bleeding. The bleeding parameters include at least one of instantaneous bleeding amount, maximum instantaneous bleeding amount and cumulative bleeding amount.
[0109] The correspondence between blackness value and blood leakage volume needs to be calibrated or set according to the length and cross-sectional area of the detection space 11, as containers of different lengths and areas hold different volumes of dialysate. The total blackness value detected instantaneously by the color acquisition module 3 represents the total blood leakage volume in the volume of the detection space 11 at the current moment. Instantaneous blood leakage volume refers to the blood volume in the volume of the detection space 11 at the current moment. The maximum instantaneous blood leakage volume is the maximum value of the blood leakage volume over multiple moments, and the cumulative blood leakage volume refers to the total blood leakage volume from the initial moment of detection to the current moment. In addition, it can also reflect the instantaneous blood leakage volume / flow rate. Preferably, the detection device may also include a display module, and the control module 4 can send the blood leakage parameters to the display module for display, so that the staff can use the blood leakage parameters as a reference for equipment maintenance and other processing. Specifically, the display module can be a display screen.
[0110] In an optional embodiment of the present invention, the control module 4 is specifically used to: determine whether the hue is within a preset bubble phase range after determining that the cause of the fault is impurities or bubbles; if the hue is within the preset bubble phase range, determine that the cause of the fault is bubbles; if the hue is not within the preset bubble phase range, determine that the cause of the fault is impurities.
[0111] The preset bubble phase range refers to the range in which the hue will be when there are bubbles in the liquid in the detection space 11. Therefore, by determining whether the hue is within the preset bubble phase range, it is possible to determine whether there are bubbles. Since this step is performed after determining that the cause of the fault is impurities or bubbles, if the hue is not within the preset bubble phase range, the cause of the fault is determined to be impurities.
[0112] Based on the above embodiments, the preset bubble phase range is 210-300°. Preferably, the preset bubble phase range is 230-270°. Therefore, the bubbles present in the liquid within the detection space 11 will fall within this range. By simply determining whether the hue is within the preset bubble phase range, the presence of bubbles can be determined. This detection result facilitates the staff's judgment of fault conditions.
[0113] In optional embodiments of the present invention, such as Figure 3 As shown, the detection device also includes an alarm module 5, which is used to issue alarm information. The alarm module 5 is electrically connected to the control module 4. Specifically, the control module 4 is used to control the alarm module 5 to issue alarm information after determining that at least one of blood leakage, impurities, and bubbles is present.
[0114] Alarm module 5 refers to a module capable of issuing alarm information, which can be audible or visual. Therefore, alarm module 5 may include LED lights or buzzers. When at least one of the following is detected: blood leakage, impurities, or air bubbles, it indicates a machine malfunction. Issuing an alarm at this time allows staff to be promptly informed and prevents the malfunction from causing further adverse effects.
[0115] In an optional embodiment of the present invention, the image RGB signal includes the RGB values of each pixel in the image, and the control module is specifically used for:
[0116] Histogram filtering is performed on the RGB signal of the image;
[0117] The feature RGB values are obtained by calculating a weighted average of the RGB values of each pixel in the histogram-filtered image.
[0118] The purpose of histogram filtering is to make pixels close to white appear white and non-white pixels appear darker, thus removing the white background and extracting the colored pixels to obtain their RGB values. Histogram filtering essentially sharpens the overall RGB values of each pixel in the image, increasing image contrast. Preferably, in one specific embodiment of the invention, the RGB values at the peak of the histogram are amplified, while the RGB values of other parts are decreased, with the amplification and reduction performed as percentages, making pixels close to white appear white and non-white pixels appear darker.
[0119] Without histogram filtering, directly converting the acquired image RGB signal to whiteness for thresholding results in excessive noise and low accuracy. By performing histogram filtering on the image RGB signal, followed by weighted calculation to obtain characteristic RGB values, and then converting these characteristic RGB values to at least one of whiteness and blackness, or to at least one of hue, whiteness, and blackness, noise can be reduced and the accuracy of fault diagnosis can be improved.
[0120] For example, in the weighted average calculation, the RGB value of a pixel in the image is the RGB value of the non-white value multiplied by a first weighting value, and the RGB value of a pixel in the image is the RGB value of the white value multiplied by a second weighting value, where the first weighting value is greater than the second weighting value. In practical applications, other weighting values can be set according to requirements. For example, if it is desired to more accurately detect red and improve the accuracy of blood leakage detection, the weighting value of red can be increased. This solution, by setting two weighting values, namely the first weighting value and the second weighting value, facilitates calculation and differentiation, and also minimizes the proportion of white and increases the proportion of non-white after histogram filtering and weighted average calculation.
[0121] By using the above method, histogram filtering and weighted average calculation are performed on the RGB signal of the image to obtain the characteristic RGB value, thereby reducing the proportion of white and increasing the proportion of non-white, extracting as many colored pixels as possible, and simultaneously achieving noise reduction. The result is the characteristic RGB value with reduced white and increased non-white proportion.
[0122] Specifically, the control module is used to: calculate the feature RGB values by weighting the RGB values of each pixel in the histogram-filtered image using the following formula:
[0123]
[0124]
[0125]
[0126] Where 0.8≤w1<1, w2<0.2, A>250, Z is the RGB value of each pixel in the image, Z′ is the feature RGB value obtained after weighted average calculation, w1 is the first weighted value, w2 is the second weighted value, and n and m are the pixel numbers.
[0127] Since both the RGB signal and the characteristic RGB values of an image include three parameters: R, G, and B, Z includes the original R, G, and B of the image, and Z′ corresponds to R′, G′, and B′. By performing a weighted average calculation on the original R, G, and B of the image, we can obtain the corresponding R′, G′, and B′, which are the characteristic RGB values: R′, G′, and B′. The following uses R as an example to illustrate the specific method of weighted average calculation:
[0128]
[0129]
[0130]
[0131] R′ can be calculated using the above method. The calculation methods for G′ and B′ are similar and will not be elaborated here. Preferably, the values of w1, w2, and A are the same when calculating the weighted average of the three parameters R, G, and B.
[0132] Preferably, A = 255.
[0133] Preferably, 0.9 ≤ w1 < 0.99.
[0134] Preferably, w2 < 0.1. If w2 is too small, such as 0 or 0.0001, the detection will be too sensitive and may produce false alarms, such as scattering caused by jitter or ambient light triggering an alarm. Further, w2 is 0.01-0.2 or 0.05-0.15.
[0135] In optional embodiments of the present invention, such as Figure 4As shown, the light source module 2 includes a white LED circuit 21, which is used to emit white light. Specifically, the color temperature of the white light is greater than 6000K and less than 7500K. The color acquisition module 3 is used to acquire the maximum white light output value, and the control module 4 is used to perform white balance calibration on the color acquisition module 3 based on the maximum white light output value.
[0136] The white LED circuit 21 is a circuit that emits white light. This white light is used to calibrate the white balance of the color acquisition module 3, and the calibration data is stored in the control module 4 as a basis for detection and judgment. The white balance calibration principle is the same as that of camera sensors in cameras and mobile phones. The color acquisition module 3 records the maximum white light output value. Using this value as a reference, all subsequent values detected by the color acquisition module 3 are compared and calculated based on this maximum white light output value.
[0137] In an optional embodiment of the present invention, the light source module 2 further includes a red LED circuit 22, which is used to emit red light. Specifically, the wavelength of the red light is greater than 615nm and less than 630nm. The control module 4 is electrically connected to the red LED circuit 22 and is used to control the red LED circuit 22 to emit red light after white balance calibration. The color acquisition module 3 is used to output an image RGB signal after being irradiated by red light. The control module 4 is used to acquire the image RGB signal, determine the characteristic RGB value based on the image RGB signal, determine whether the characteristic RGB value is within a preset red light range, determine that the color acquisition module 3 is normal when the characteristic RGB value is within the preset red light range, and determine that the color acquisition module 3 is faulty when the characteristic RGB value is not within the preset red light range or when the characteristic RGB value is not acquired, and issue a fault signal.
[0138] The red LED circuit 22 refers to a circuit that emits red light. The fault signal refers to a signal that reflects a fault condition; for example, it can issue an alarm message when the alarm module 5 is included, or display the fault condition when the display module is included. The image RGB signal includes the original RGB values of each pixel in the image, and the characteristic RGB value is the RGB value of the image obtained after histogram filtering, noise reduction, or other noise reduction processes. The preset red light range refers to the range within which the characteristic RGB values collected when the red LED circuit 22 emits red light will fall. If the color acquisition module 3 is functioning normally, the collected characteristic RGB values will fall within the preset red light range; if the color acquisition module 3 is malfunctioning, the collected characteristic RGB values will not fall within the preset red light range. Therefore, by determining whether the characteristic RGB values are within the preset red light range, it is possible to determine whether the color acquisition module 3 is faulty. Thus, it is possible to determine whether the color acquisition module 3 is functioning normally before the detection begins; otherwise, blood detection is stopped, avoiding false alarms caused by a malfunction of the color acquisition module 3.
[0139] Preferably, the control module 4 can perform histogram filtering on the image RGB signal, calculate the weighted average of the RGB values of each pixel in the histogram-filtered image to obtain the feature RGB value, and then determine whether the feature RGB value is within the preset red light range. When the feature RGB value is within the preset red light range, the color acquisition module 3 is determined to be normal. When the feature RGB value is not within the preset red light range or the feature RGB value is not acquired, the color acquisition module 3 is determined to be faulty, and a fault signal is issued.
[0140] In an optional embodiment of the present invention, the light source module 2 further includes a constant voltage source 23, used to provide a stable voltage to the white LED circuit 21 and the red LED circuit 22. By setting the constant voltage source 23, the current of the white LED circuit 21 is always kept at a fixed value to maintain constant white light brightness. The control module 4 controls and adjusts the voltage of the white LED circuit 21 to achieve brightness control and constant current of the white light, ensuring that the brightness of the background white light remains constant during the detection process, providing a reference for detection.
[0141] In optional embodiments of the present invention, such as Figure 5 As shown, the color acquisition module 3 includes a color sensor 31, and the acquisition speed of the color sensor 31 is 30FPS-200FPS. Preferably, the color sensor 31 is a CMOS sensor.
[0142] Based on the above embodiments, the acquisition speed of the color sensor 31 is 40FPS-90FPS. Preferably, the acquisition speed of the color sensor 31 is 50FPS-70FPS. Acquiring images at this speed ensures that the time for the detected particulate matter (such as leaked blood, impurities, or bubbles) to flow through the detection space 11 is greater than the interval between two frames, ensuring that no particulate matter is missed.
[0143] In an optional embodiment of the present invention, the color sensor 31 includes a CMOS photosensitive array 311, an analog-to-digital converter 312, and a first data communication bus 313; the CMOS photosensitive array 311 faces the detection space 11 and is used to acquire image RGB signals of the detection space 11 and convert the corresponding light signals into electrical signals; the input terminal of the analog-to-digital converter 312 is electrically connected to the output terminal of the CMOS photosensitive array 311 and is used to convert the image RGB signals, which are analog signals, into digital signals; the first data communication bus 313 is electrically connected to the output terminal of the analog-to-digital converter 312 and is used to send the image RGB signals, which are digital signals, to the control module 4.
[0144] Since the original signal acquired during acquisition is usually an optical signal, by setting up a CMOS photosensitive array 311, an analog-to-digital converter 312 and a first data communication bus 313, the optical signal can be easily converted into an electrical signal. Then, the image RGB signal, which is an analog signal, is converted into a digital signal and finally transmitted to the control module 4, so that the control module 4 can perform data processing and calculation on the image RGB signal.
[0145] Preferably, the control module 4 includes a control unit 41, a second data communication bus 42, a data processing unit 43, and an external communication bus 44. The control module 4 interacts with the first data communication bus 313 of the color sensor 31 through the second data communication bus 42. The data processing unit 43 is used to process the data acquired by the second data communication bus 42. The control unit 41 is used to execute the main logic control functions. Specifically, the control unit 41 is an I / O control unit 41.
[0146] In optional embodiments of the present invention, such as Figure 1 As shown, the device body also includes a first transparent waterproof plate 14 and a second transparent waterproof plate 15.
[0147] The first transparent waterproof plate 14 is disposed between the light source module 2 and the detection space 11, and the detection light source emitted by the light source module 2 enters the detection space 11 through the first transparent waterproof plate 14;
[0148] The second transparent waterproof plate 15 is disposed between the detection space 11 and the color acquisition module 3. The color acquisition module 3 acquires the image RGB signal of the detection space 11 through the second transparent waterproof plate 15.
[0149] The first transparent waterproof plate 14 and the second transparent waterproof plate 15 are made of transparent and waterproof materials, preferably acrylic sheets. By setting the first transparent waterproof plate 14 and the second transparent waterproof plate 15, water can be prevented from entering the light source module 2 and the color acquisition module 3. At the same time, the acrylic sheet has good light transmittance, which allows the light emitted by the light source module 2 to enter the detection space 11 more fully and be acquired by the color acquisition module 3.
[0150] Preferably, the device body may also include a light source driver board, which is a circuit board used to set the light source module 2. The light source module 2 is set on the light source driver board, and by setting the light source driver board, the circuit connection of the light source module 2 is facilitated.
[0151] Preferably, the device body may further include an image driver board, which is a circuit board used to set up the color acquisition module 3. By setting up the image driver board, the circuit connection of the color acquisition module 3 is facilitated.
[0152] In an optional embodiment of the present invention, the detection space 11 is shaped as a cuboid, a cylinder, or an elliptical cylinder, and its cross-sectional shape is shaped as a rectangle, a polygon, a circle, or an ellipse. Preferably, the detection space 11 is cylindrical or elliptical, thereby minimizing the number of corners and edges inside the detection space 11 and reducing the likelihood of impurities or bacteria remaining.
[0153] In optional embodiments of the present invention, such as Figure 5 As shown, the detection device also includes a power supply module 6, which is electrically connected to the light source module 2, the color acquisition module 3 and the control module 4 to provide power.
[0154] Based on the above embodiments, the power supply module 6 includes a DC regulated power supply 61 and a DC-DC step-down circuit 62. The DC regulated power supply 61 can provide stable DC power, and the DC-DC step-down circuit 62 can convert the DC power provided by the DC regulated power supply 61 into the working voltage of the light source module 2, the color acquisition module 3 and the control module 4, so as to facilitate the normal operation of the light source module 2, the color acquisition module 3 and the control module 4.
[0155] Example 2
[0156] Embodiment 2 of the present invention provides a hemodialysis device, which includes the detection device described in any embodiment of the present invention.
[0157] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0158] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A detection device, characterized in that, It includes the main body of the device (1), the light source module (2), the color acquisition module (3), and the control module (4); The main body (1) of the device is provided with a detection space (11) for the flow of dialysis fluid. The detection space (11) has an inlet (12) and an outlet (13). The light source module (2) is located on the main body (1) of the device on one side of the detection space (11). The color acquisition module (3) is located on the main body (1) of the device on the other side of the detection space (11). The light source module (2) is used to provide a detection light source, and the color acquisition module (3) is used to acquire the image RGB signal of the detection space (11); The control module (4) is electrically connected to the color acquisition module (3) and is used to acquire the image RGB signal, determine at least one of whiteness and blackness based on the image RGB signal, and determine the cause of the fault based on at least one of whiteness and blackness. The cause of the fault includes at least one of impurities, blood leakage and bubbles. The image RGB signal includes the RGB values of each pixel in the image, and the control module (4) is specifically used for: Extract the characteristic RGB values from the acquired image RGB signal; At least one of whiteness and blackness is determined based on the characteristic RGB value, wherein the whiteness is used to reflect the content of non-transparent components and bubbles flowing through the detection space (11), and the blackness is used to reflect the content of impurities and / or bubbles; Hue is determined based on the aforementioned RGB values; Determine whether the whiteness is lower than a preset whiteness threshold; If not, ensure there is no leakage, impurities, or air bubbles; If so, determine the presence of at least one of blood leakage, impurities, and bubbles, and determine the cause of the malfunction based on the hue. Determine whether the hue is within a preset red phase range, wherein the preset red phase range is 300-360 and 0-60; If so, the cause of the malfunction is determined to be blood leakage; If not, the cause of the malfunction is determined to be impurities or air bubbles; Furthermore, it is determined whether the hue is within a preset bubble phase range, wherein the preset bubble phase range is 210-300 and 230-270; If the hue is within the preset bubble phase range, the cause of the fault is determined to be bubbles; If the hue is not within the preset bubble phase range, the cause of the fault is determined to be impurities; Specifically, the control module (4) is used for: Histogram filtering is performed on the RGB signal of the image; The feature RGB values are obtained by calculating a weighted average of the RGB values of each pixel in the histogram-filtered image. In the weighted average calculation, the RGB value of a pixel in the image is the RGB value of a non-white value multiplied by a first weighting value, and the RGB value of a pixel in the image is the RGB value of a white value multiplied by a second weighting value, wherein the first weighting value is greater than the second weighting value. The RGB values of each pixel in the histogram-filtered image are weighted and averaged using the following formula to obtain the feature RGB values: ; ; ; Where 0.8 ≤ w1 < 1, w2 < 0.2, A > 250, and Z represents the RGB values of each pixel in the image. The RGB values are obtained after weighted average calculation, where w1 is the first weighted value and w2 is the second weighted value; 0.9 ≤ w1 < 0.99, w2 < 0.1; preferably, A = 255.
2. The detection device according to claim 1, characterized in that, The detection device further includes an alarm module (5), which is used to issue alarm information. The alarm module (5) is electrically connected to the control module (4). The control module (4) is specifically used to control the alarm module (5) to issue alarm information after determining that at least one of blood leakage, impurities and bubbles is present. And / or, the preset whiteness threshold is any value between 90 and 99, preferably, the preset whiteness threshold is 95.
3. The detection device according to claim 1, characterized in that, The light source module (2) includes a white LED circuit (21) for emitting white light; The color acquisition module (3) is used to acquire the maximum white light output value of the white light, and the control module (4) is used to perform white balance calibration on the color acquisition module (3) based on the maximum white light output value.
4. The detection device according to claim 3, characterized in that, The light source module (2) also includes a red LED circuit (22), which is used to emit red light; The control module (4) is electrically connected to the red LED circuit (22) and is used to control the red LED circuit (22) to emit red light after white balance calibration; The color acquisition module (3) is used to output an image RGB signal after being irradiated by the red light; The control module (4) is used to acquire the image RGB signal, determine the feature RGB value based on the image RGB signal, determine whether the feature RGB value is within the preset red light range, determine that the color acquisition module (3) is normal when the feature RGB value is within the preset red light range, determine that the color acquisition module (3) is faulty when the feature RGB value is not within the preset red light range or when the feature RGB value is not acquired, and issue a fault signal.
5. The detection device according to claim 1, characterized in that, The color acquisition module (3) includes a color sensor (31), and the acquisition speed of the color sensor (31) is 30FPS-200FPS; Furthermore, the color sensor (31) has a sampling speed of 40FPS-90FPS; Furthermore, the color sensor (31) has a sampling speed of 50FPS-70FPS.
6. The detection device according to claim 5, characterized in that, The color sensor (31) includes a CMOS photosensitive array (311), an analog-to-digital converter (312), and a first data communication bus (313); The CMOS photosensitive array (311) faces the detection space (11) and is used to acquire RGB signals of the image in the detection space (11) and convert the corresponding light signals into electrical signals. The input terminal of the analog-to-digital converter (312) is electrically connected to the output terminal of the CMOS photosensitive array (311) and is used to convert the image RGB signal, which is an analog signal, into a digital signal. The first data communication bus (313) is electrically connected to the output terminal of the analog-to-digital conversion unit (312) and is used to send the image RGB signal, which is a digital signal, to the control module (4).
7. The detection device according to claim 1, characterized in that, The device body also includes a first transparent waterproof plate (14) and a second transparent waterproof plate (15); The first transparent waterproof plate (14) is disposed between the light source module (2) and the detection space (11), and the detection light source emitted by the light source module (2) enters the detection space (11) through the first transparent waterproof plate (14); The second transparent waterproof plate (15) is disposed between the detection space (11) and the color acquisition module (3), and the color acquisition module (3) acquires the image RGB signal of the detection space (11) through the second transparent waterproof plate (15); And / or, the shape of the detection space (11) is any one of cuboid, cylinder, and elliptical cylinder, and the cross-sectional shape of the detection space is any one of rectangle, polygon, circle, and ellipse.
8. A hemodialysis device, characterized in that, The detection device includes any one of claims 1-7.
Citation Information
Patent Citations
Blood clearing machine leaks blood detector
CN204655616U