| CPC G01F 23/686 (2013.01) [G01F 23/804 (2022.01); G08B 21/182 (2013.01)] | 20 Claims |

|
1. A water level detection method, applied to respiratory humidification apparatus, the respiratory humidification apparatus comprising a humidification chamber and the humidification chamber comprising a float, the method comprising:
obtaining a float position image captured by a current camera;
performing a grayscale processing on the float position image to obtain a current grayscale image data, wherein the current grayscale image data is a grayscale value of each unit height of the humidification chamber in a grayscale image corresponding to the float position image;
generating a grayscale reference line and a grayscale image curve based on the current grayscale image data, wherein the grayscale image curve is a relationship curve between the current grayscale image data and a height value of the humidification chamber, the grayscale reference line comprises a first sub-grayscale reference line, a second sub-grayscale reference line and a third sub-grayscale reference line;
performing a segmentation processing on the grayscale image curve by respectively using the first sub-grayscale reference line, the second sub-grayscale reference line, and the third sub-grayscale reference line as a segmentation reference line, to obtain a first number of segment, a second number of segment, and a third number of segment, wherein the segmentation processing comprises: under each segmentation reference, dividing the grayscale image curve by the segmentation reference line, and counting number of segment located below the segmentation reference line;
determining an intersection point of each of the first sub-grayscale reference line, the second sub-grayscale reference line and the third sub-grayscale reference line with the grayscale image curve, and recording the height value of the humidification chamber corresponding to each intersection point; and
determining a height value of the float from the height value of the humidification chamber corresponding to each intersection point according to the first number of segment, the second number of segment, and the third number of segment;
before generating the grayscale reference line and the grayscale image curve based on the current grayscale image data, the method further comprises:
determining current grayscale image parameters based on the current grayscale image data, the current grayscale image parameters comprise a minimum value and an average value of the current grayscale image data;
the generating the grayscale reference line based on the current grayscale image data comprises:
selecting a first threshold value, a second threshold value, and a third threshold value from a numerical interval corresponding to the minimum value and the average value of the current grayscale image data; and
generating the first sub-grayscale reference line, the second sub-grayscale reference line and the third sub-grayscale reference line by respectively using the first threshold value, the second threshold value and the third threshold value as a segmentation reference.
|