Water output control method, device, drinking water equipment and storage medium
By collecting and processing images of water storage containers in drinking water equipment, judging the water level in real time and adjusting the water outlet state, the possible overflow problem of drinking water equipment when users are not concentrated is solved, and the automation of the equipment and user safety are improved.
Patent Information
- Application Number
- CN202411814997.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-08
AI Technical Summary
Existing drinking water equipment is prone to overflow when users are not concentrated, reducing user experience and safety.
When the drinking water equipment is in the water outlet state, the target frame image of the water inlet area of the water storage container is collected, and the difference frame binarization process is performed on the target frame image and the historical frame image to generate a target liquid level superposition image, and determine in real time whether the water level reaches the preset threshold value and adjust the water outlet state.
Real-time control of the water outlet of drinking water equipment is achieved, the automation level of the equipment is improved, the risk of overflow caused by excessive water level is avoided, and the safety and convenience of users are improved.
Smart Images

Figure CN119784567A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of drinking water equipment, and in particular to a water output control method, device, drinking water equipment and storage medium. Background Art
[0002] In daily life, drinking water equipment is widely used as a device for heating or cooling water. In related technologies, users are often required to manually control the infusion volume or infusion duration of the drinking water equipment. However, when the user is not paying attention, water will overflow and cause harm to the user, thereby reducing the user's experience. Summary of the Invention
[0003] This application provides a water output control method, device, drinking water equipment and storage medium, aiming to control the water output of the drinking water equipment in real time, thereby improving the user experience. The technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a water output control method, comprising:
[0005] When the drinking water device is in the water discharging state, a target frame image of the water inlet area of the water storage container is collected;
[0006] Performing a difference frame binarization process on the target frame image and the historical frame image to obtain a changed pixel point image between the target frame image and the historical frame image, where the historical frame image is the frame image before the target frame image;
[0007] Perform pixel fusion on the changed pixel point image and the historical liquid level superposition image corresponding to the historical frame image to generate the target liquid level superposition image corresponding to the target frame image;
[0008] The number of liquid level pixels in the target liquid level overlay image is compared with the total number of pixels in the water inlet area in the initial foreground image, and the water outlet state of the drinking water equipment is adjusted according to the comparison result.
[0009] In a second aspect, an embodiment of the present application provides a water output control device, comprising:
[0010] An image acquisition unit, configured to acquire a target frame image of the water inlet area of the water storage container when the drinking water device is in a water discharge state;
[0011] An image processing unit performs a difference frame binarization process on the target frame image and the historical frame image to obtain an image of changed pixels between the target frame image and the historical frame image, where the historical frame image is the frame image before the target frame image;
[0012] A pixel fusion unit is used to fuse the changed pixel point image with the historical liquid level superposition image corresponding to the historical frame image to generate a target liquid level superposition image corresponding to the target frame image;
[0013] The state adjustment unit is used to compare the number of liquid level pixels in the target liquid level superimposed image with the total number of pixels in the water inlet area in the initial foreground image, and adjust the water outlet state of the drinking water equipment according to the comparison result.
[0014] In a third aspect, an embodiment of the present application provides a drinking water device, which includes: a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the computer program is executed by the processor, it implements any of the above water output control methods.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, any of the above water output control methods is implemented.
[0016] In the above technical solution, by capturing a target frame image of the water inlet area of the water storage container while the drinking water device is in the water discharging state and performing differential frame binarization processing on the target frame image and the historical frame image, water level changes can be accurately identified. By pixel-by-pixel fusion of the changing pixel image and the historical liquid level overlay image to generate a target liquid level overlay image, and calculating the ratio of the number of liquid level pixels in the target liquid level overlay image to the total number of pixels in the water inlet area in the initial foreground image, it is possible to determine in real time whether the current water level has reached a preset threshold, thereby controlling the water discharging state of the drinking water device in real time. This not only improves the automation level of the drinking water device, but also effectively avoids the risk of overflow caused by excessively high water levels, improving user safety and convenience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is a schematic diagram of a water output control method provided in an embodiment of the present application;
[0019] Figure 2 This is a flow chart of a water output control method provided in an embodiment of the present application;
[0020] Figure 3This is a flow chart of a water output control method provided in an embodiment of the present application;
[0021] Figure 4 This is a flow chart of a water output control method provided in an embodiment of the present application;
[0022] Figure 5 This is a schematic diagram of a water output control method provided in an embodiment of the present application;
[0023] Figure 6 This is a flow chart of a water output control method provided in an embodiment of the present application;
[0024] Figure 7 This is a schematic diagram of a water output control method provided in an embodiment of the present application;
[0025] Figure 8 This is a structural diagram of a water output control device provided in an embodiment of the present application;
[0026] Figure 9 This is a structural diagram of a drinking water device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] To make the features and advantages of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.
[0028] The following will clearly and thoroughly describe the technical solutions in this application in conjunction with the accompanying drawings. In the description of the embodiments of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text 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 mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more than two.
[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0030] In order to improve the safety of drinking water equipment, the embodiment of the present application provides a water output control method, and the execution subject of the water output control method is the drinking water equipment. The following is a detailed description. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments. Figure 1 , Figure 1 This is a system architecture diagram of a water output control method provided in an embodiment of the present application. The specific process of the water output control method can be as follows:
[0031] Figure 1 This is a scenario diagram of a water output control method provided in an embodiment of the present application.
[0032] like Figure 1 As shown, the water outlet device includes an image acquisition device and a water outlet, wherein the image acquisition device is used to capture the image of the area below the outlet in real time. The shooting angle of the image acquisition device is determined according to the actual usage scenario and is not specifically limited here. When the water outlet device is in standby mode, the image acquisition device will monitor whether there is any water storage container below the water outlet of the water outlet device by an infrared sensing device. If the presence of a water storage container is detected, the image acquisition device will be controlled to enter operation to obtain the initial foreground image below the water outlet in real time, and further determine the water inlet of the water storage container from the initial foreground image. At the same time, when it is detected that the water storage container is in a stationary state, the drinking water device will be controlled to enter the water outlet state. As Figure 1 As shown in the figure on the right, when the drinking water device enters the water-discharging state, the image acquisition device will capture images of the water storage container from a top-down perspective to obtain each frame image of the water storage container in the water-discharging state.
[0033] Specifically, when the infrared detection module of the drinking water equipment detects that there is any water storage container below the water outlet of the drinking water equipment, the image acquisition device is controlled to enter the operation state. At this time, the image acquisition device will obtain the video image below the water outlet, and perform image analysis on each frame of the video image to determine the water inlet area of the water storage container. At the same time, based on the position change information of the water inlet area in each frame image, it is determined whether the water storage container is in a stationary state. When it is detected that the water storage container is in a stationary state, the current frame image is determined as the initial foreground image of the water storage container.
[0034] The total number of pixels in the water inlet area of the water storage container is determined from the initial foreground image, the drinking water device is controlled to enter a water-discharging state, and the image acquisition device is controlled to capture multiple frame images at a preset shooting interval. The current frame image at the current moment is determined as the target frame image and converted into a target grayscale image. Simultaneously, the previous frame image of the current frame image, i.e., the historical frame image, is obtained and converted into a historical frame image.
[0035] Performing absolute value difference analysis on the pixel values of the pixels in the target grayscale image and the historical pixel values of each pixel in the historical grayscale image to update the pixel values of each pixel in the target grayscale image, and generating a changed pixel image based on each pixel after the updated pixel value. Furthermore, obtaining a historical liquid level overlay image corresponding to the historical grayscale image, wherein the historical liquid level overlay image includes each liquid level pixel in the water inlet area of the water storage container at the previous moment, i.e., the historical liquid level pixel, wherein the liquid level pixel refers to a pixel whose pixel value is equal to a preset pixel value. Performing pixel value difference frame binarization processing on the historical liquid level pixel in the historical liquid level overlay image and the pixel values of each pixel in the water inlet area of the changed pixel image to obtain a target overlay pixel value for each pixel in the changed pixel image, and generating a target liquid level overlay image corresponding to the target grayscale image based on the target overlay pixel value.
[0036] Determine the ratio of the number of liquid level pixels in the target liquid level superimposed image to the total number of pixels in the water inlet area. If the ratio is greater than or equal to the preset ratio threshold, the drinking water equipment is controlled to change from the water-discharging state to the water-stopping state. If the ratio is less than the preset ratio threshold, the drinking water equipment is controlled to maintain the water-discharging state.
[0037] For example, the total number of pixels in the water inlet area is 1000, and the preset ratio threshold of the drinking water device is 0.7 (i.e., 70%). When the drinking water device is in the water-discharging state, the number of liquid level pixels detected in the target liquid level superimposed image is 700 pixels. At this time, it is determined that the number of liquid level pixels has reached 70% (i.e., 0.7) of the total number of pixels in the water inlet area. Since this ratio is equal to the preset ratio threshold (0.7), the drinking water device is switched from the water-discharging state to the water-stopping state to prevent water overflow. For another example, the number of liquid level pixels in the target liquid level superimposed image is 600 pixels. At this time, it is determined that the number of liquid level pixels has not reached 70% (i.e., 0.7) of the total number of pixels in the water inlet area. The drinking water device is then controlled to maintain the water-discharging state to continue supplying water to the water storage container.
[0038] based on Figure 1 The scene diagram shown below will be combined with Figure 2-Figure 7 , a water output control method provided in an embodiment of the present application is introduced in detail.
[0039] Based on the above situation, the present application embodiment proposes a water output control method. Figure 2 , Figure 2 This is a flow chart of a water output control method provided in an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps S101 to S104.
[0040] S101 , when the drinking water device is in a water discharging state, a target frame image of a water inlet area of a water storage container is collected.
[0041] Specifically, an infrared detection module is provided in the water outlet area of the drinking water equipment. When the infrared detection module of the drinking water equipment detects the presence of a water storage container below the water outlet, it will control the image acquisition device to enter the operating state. At this time, the image acquisition device will capture a video image of the area below the water outlet, and at the same time call the preset area detection algorithm to identify the video image to identify the water inlet area of the water storage container in the video image.
[0042] After identifying the water inlet area, the drinking water device will further detect changes in the water inlet area's position, continuously monitoring its location. If no movement is detected within a preset time period (e.g., a few seconds or minutes, the specific time period can be set based on actual needs), the water storage container is deemed to be stationary, and the drinking water device will be controlled to enter the water discharging state to supply water to the water storage container. This process ensures that the drinking water device will only dispense water when the water storage container is stably placed and will not be accidentally moved, effectively avoiding the risk of overflow, water waste, or equipment damage caused by container movement or instability.
[0043] When the drinking water device enters the water discharge state, in order to obtain the liquid level data in the water storage container in real time, it is necessary to control the image acquisition device to capture and store images according to a preset interval (the preset interval can be set according to actual needs and is not specifically limited here). At the same time, the frame image captured at the current moment is used as the target frame image of the water storage container, wherein the target frame image is the foreground image of the area below the water outlet and the foreground image includes at least one water storage container.
[0044] S102 , performing a difference frame binarization process on the target frame image and the historical frame image to obtain a changed pixel point image between the target frame image and the historical frame image.
[0045] In an embodiment of the present application, the target frame image is an image containing the water inlet area of the water storage container captured by the image acquisition device at the current moment, and the historical frame image is an image containing the water inlet area of the water storage container captured at the previous moment before the current moment. The difference frame binarization processing is an image processing technology mainly used in video image analysis to detect image changes by comparing the pixel value differences between pixel points between consecutive image frames.
[0046] Specifically, the target frame image is converted into a target grayscale image, and the pixel values of each pixel in the water inlet region of the target grayscale image are traversed to obtain the target pixel value corresponding to each pixel. Simultaneously, the historical grayscale image corresponding to the historical frame image is obtained from the saved image, and the historical pixel values of each pixel in the water inlet region of the historical grayscale image are obtained. The target pixel value of each pixel in the target grayscale image is subtracted from the historical pixel value of each pixel, thereby generating the absolute difference value of each pixel in the target grayscale image.
[0047] The absolute value of the difference of each pixel point is analyzed, and the target pixel value corresponding to the pixel point whose absolute value of the difference is greater than the preset absolute value threshold is updated to the first pixel value, and the target pixel value corresponding to the pixel point whose absolute value of the difference is less than or equal to the preset absolute value threshold is updated to the first pixel value. Based on each pixel point after the pixel value is updated, a changed pixel point image is generated, wherein the changed pixel point image is a grayscale image, and the color corresponding to the pixel point with the pixel value of the first pixel value in the changed pixel point image is white, and the color corresponding to the pixel point with the pixel value of the second pixel value is black.
[0048] S103 , performing pixel fusion on the changed pixel image and the historical liquid level superposition image corresponding to the historical frame image to generate a target liquid level superposition image corresponding to the target frame image.
[0049] In an embodiment of the present application, the historical liquid level overlay image is a grayscale image, which is an image composed of pixel points whose pixel values are the first pixel value and the second pixel value. Among them, the pixel point with the pixel value of the first pixel value in the water inlet area of the water storage container in the historical liquid level overlay image is the liquid level pixel point of the water storage container at the previous moment.
[0050] Specifically, the pixel values of each pixel in the changing pixel image are fused with the pixel values of each pixel in the historical liquid level superposition image, and then the pixel values of each pixel are numerically added to obtain a summed pixel value of each pixel. The pixel values of pixels whose summed pixel values are greater than a preset pixel value threshold and those whose pixel values are less than or equal to the preset pixel value threshold are updated to update the pixel values of each pixel to the target superposition pixel value. The target liquid level superposition image is generated based on the updated pixel values of each pixel.
[0051] S104, comparing the number of liquid level pixels in the target liquid level superimposed image with the total number of pixels in the water inlet area in the initial foreground image, and adjusting the water outlet state of the drinking water device according to the comparison result.
[0052] In the embodiment of the present application, the initial foreground image is an image captured before the drinking water device enters the water-discharging state and when the water storage container is in a stationary state.
[0053] Specifically, when the water storage container is stationary, a preset detection algorithm is invoked to determine the water inlet region of the water storage container from the initial foreground image and obtain the total number of pixels in the water inlet region. Pixel values in the water inlet region of the target liquid level overlay image are then traversed to identify a pixel with a preset value, which is then identified as the liquid level pixel. A ratio analysis is performed on the number of liquid level pixels relative to the total number of pixels. If the ratio is greater than or equal to a preset ratio threshold, the drinking water device is controlled to switch from a water-discharging state to a water-off state.
[0054] When the water storage container is stationary, a preset detection algorithm is invoked to determine the water inlet area of the water storage container from the initial foreground image and obtain the total number of pixels in the water inlet area. The pixel values of the pixels in the water inlet area of the target liquid level overlay image are traversed to obtain a pixel with a preset pixel value, and this pixel is determined as the liquid level pixel. The ratio of the number of liquid level pixels to the total number of pixels is analyzed. If the ratio is less than a preset ratio threshold, the drinking water device is controlled to maintain the water discharge state to continue supplying water to the water storage container.
[0055] As can be seen from the above, by capturing a target frame image of the water inlet area of the water storage container when the drinking water device is in the water discharge state and performing differential frame binarization processing on the target frame image and the historical frame image, the water level change can be accurately identified. By pixel-by-pixel fusion of the changing pixel point image and the historical liquid level overlay image to generate a target liquid level overlay image, and calculating the ratio of the number of liquid level pixels in the target liquid level overlay image to the total number of pixels in the water inlet area in the initial foreground image, it is possible to determine in real time whether the current water level has reached the preset threshold and control the water discharge state of the drinking water device in real time. This not only improves the automation level of the drinking water device, but also effectively avoids the risk of overflow caused by excessively high water levels, improving user safety and convenience.
[0056] Since the image will contain a lot of redundant data in its initial state, the redundant data will occupy a high resource overhead during image processing, thus affecting the overall processing speed. Therefore, the image needs to be preprocessed. Figure 3 , Figure 3 This is a flow chart of a water output control method provided in an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps S201-S208.
[0057] S201, converting a target frame image into a target grayscale image.
[0058] In an embodiment of the present application, the target frame image can specifically be a panoramic image including the water inlet area of the water storage container captured by the image acquisition device, or it can be an image including only the water inlet area of the water storage container obtained by separating the water inlet area of the water storage container from the panoramic image. No specific limitation is made here.
[0059] Specifically, the target frame image is typically composed of three color channels: red, green, and blue (RGB). During the image conversion process, a specific algorithm converts the values of the three RGB channels into a single grayscale value. Following a certain weighting formula, such as the weighted average method, green is given the highest weight because the human eye is most sensitive to green. The RGB values of each pixel in the target frame image are mapped to a single grayscale value, thus generating the target grayscale image. This conversion not only reduces the data dimension and computational complexity, but also helps highlight the structural features of the image and reduce the interference caused by color changes, making subsequent image processing and analysis more efficient and accurate.
[0060] S202 , obtaining a target pixel value of each pixel point in the water inlet area in the target grayscale image, and obtaining a historical pixel value of each pixel point in the historical grayscale image corresponding to the historical frame image.
[0061] In the embodiment of the present application, when the water storage container is in a stationary state, the position information of the water inlet area of the water storage container will remain unchanged in each frame of the image.
[0062] Specifically, the water inlet region of the water storage container is located in the target grayscale image, and each pixel in the water inlet region is traversed to obtain the target pixel value corresponding to each pixel. Since images captured by the image acquisition device are temporarily stored in a preset image repository, the previous captured image frame can be directly retrieved from the image repository and recorded as a historical frame image. The historical frame image is converted into the corresponding historical grayscale image. The conversion process is similar to the steps executed in S201 above and will not be repeated here. Further, each pixel in the water inlet region of the historical grayscale image is traversed to obtain the historical pixel value corresponding to each pixel in the historical grayscale image.
[0063] S203 , based on the target pixel value of each pixel and the historical pixel value of each pixel, performing binarization update on the target pixel value of each pixel to obtain an updated pixel value of each pixel.
[0064] S204 , generating a changed pixel point image between the target frame image and the historical frame image based on the updated pixel value of each pixel point.
[0065] Specifically, in S203-S204, the target pixel value of each pixel point obtained from the target grayscale image is subtracted from the historical pixel value of each pixel point obtained from the historical grayscale image to obtain the absolute value of the difference of each pixel point, and the absolute value of the difference of each pixel point is analyzed, and the target pixel value corresponding to the pixel point whose absolute value of the difference is greater than the preset absolute value threshold is updated to the first pixel value, and the target pixel value corresponding to the pixel point whose absolute value of the difference is less than or equal to the preset absolute value threshold is updated to the first pixel value, and based on each pixel point after the pixel value is updated, a changed pixel point image is generated, wherein the changed pixel point image is a grayscale image, and the color corresponding to the pixel point whose pixel value is the first pixel value in the changed pixel point image is white, and the color corresponding to the pixel point whose pixel value is the second pixel value is black.
[0066] For example, the preset absolute value threshold is 30. For each pixel, if the absolute value of the difference is greater than 30, we update the target pixel value of the pixel to 255 (white); if the absolute value of the difference is less than or equal to 30, the target pixel value of the pixel is updated to 0 (black). Finally, based on these updated pixel values, a changed pixel image is generated. In the changed pixel image, pixels with a pixel value of 255 are displayed in white, and pixels with a pixel value of 0 are displayed in black. In this way, we can intuitively see the difference in pixel changes between the target grayscale image and the historical grayscale image.
[0067] S205 , obtaining an absolute value of a difference between a target pixel value of a first pixel and a historical pixel value of the first pixel, where the first pixel is any pixel among the pixels.
[0068] For example, if the historical pixel value of the first pixel is 100 and the pixel value of the first pixel in the target grayscale image is 150, then the absolute value of the difference between the first pixel and the target grayscale image is 150-100 = 50. This absolute value of the difference represents the degree of brightness change of the first pixel.
[0069] S206: If the absolute value of the difference is greater than a preset absolute value threshold, the target pixel value of the first pixel point is updated to the first pixel value.
[0070] S207: If the absolute value of the difference is less than or equal to the absolute value threshold, update the target pixel value of the first pixel point to a second pixel value.
[0071] Specifically, in S206-S207, the preset absolute value threshold is set according to the actual usage scenario and is not specifically limited here. The first pixel value is specifically 255, and the second pixel value is specifically 0.
[0072] For example, the historical pixel value of the first pixel in the historical grayscale image is 120, and the target pixel value of the first pixel in the target grayscale image is 140. The absolute value of the difference of the first pixel is 40, and the preset absolute value threshold is set to 30. Since the absolute value of the difference is greater than the absolute value threshold of 30, the target pixel value of the first pixel is updated to 255.
[0073] Exemplarily, the absolute value of the difference of the first pixel is 20. Since the absolute value of the difference is less than the absolute value threshold of 30, the target pixel value of the first pixel is updated to 0.
[0074] From the above, it can be seen that by grayscale processing the target frame image, the data processing speed can be effectively improved. By extracting the target pixel value of each pixel point in the water inlet area, the pixel value change information of the pixel points in the water inlet area between the target frame image and the historical frame image can be effectively detected. By comparing the target pixel value of each pixel point in the target grayscale image with the historical pixel value of the corresponding pixel point in the historical frame image, and performing difference absolute value analysis on each pixel point, the target pixel value of each pixel point is updated, thereby achieving rapid and accurate identification of the water level changes inside the water storage container, and improving the real-time and accuracy of drinking water equipment control.
[0075] Since the liquid level in the water storage container will change in real time when the drinking water device is in the water discharging state, it is necessary to obtain the liquid level data in the water storage container at the current moment in time to improve the control accuracy of the water output. Figure 4 , Figure 4 This is a flow chart of a water output control method provided in an embodiment of the present application. Figure 4 As shown, the method of the embodiment of the present application may include the following steps S301-S306.
[0076] S301 , performing pixel fusion on the changed pixel image and the historical liquid level superposition image corresponding to the historical frame image to generate a target liquid level superposition image corresponding to the target frame image.
[0077] Specifically, please refer to the above step S103 for S301, which will not be repeated here.
[0078] S302 , summing the updated pixel value of each pixel in the changed pixel image and the historical superimposed pixel value of each pixel in the historical liquid level superimposed image corresponding to the historical frame image to obtain a target superimposed pixel value of each pixel.
[0079] Specifically, after obtaining the updated pixel value for each pixel in the changed pixel image according to S203-S204 above, the historical superimposed pixel value for each pixel in the historical liquid level superimposed image corresponding to the historical frame image is further obtained from the image repository. The updated pixel value for each pixel is added to the historical superimposed pixel value to obtain a summed pixel value for each pixel. The summed pixel value for each pixel is compared with a preset pixel value threshold, and the pixel value for each pixel is updated based on the comparison result to generate a target superimposed pixel value corresponding to each pixel.
[0080] S303 : Generate a target liquid level superimposed image corresponding to the target frame image based on the target superimposed pixel value of each pixel point.
[0081] Specifically, the pixel value of each pixel point is updated according to the target superimposed pixel value, and after the pixel value update is completed, each pixel point generates a target liquid level superimposed image corresponding to the target frame image. At this time, there will be several liquid level pixel points in the water inlet area of the target liquid level superimposed image, among which the liquid level pixel point is the pixel point whose target superimposed pixel value is the preset pixel value.
[0082] S304 , summing the updated pixel value of the second pixel in the changed pixel image and the historical superimposed pixel value of the second pixel in the historical liquid level superimposed image corresponding to the historical frame image to obtain a summed pixel value of the second pixel.
[0083] In the embodiment of the present application, the second pixel point is any pixel point among the pixel points.
[0084] For example, the updated pixel value of the second pixel in the changed pixel image is 155, and the historical superimposed pixel value of the second pixel in the historical liquid level superimposed image corresponding to the historical frame image is 155, so the summed pixel value of the second pixel is 310.
[0085] S305: If the summed pixel value of the second pixel point is greater than a preset pixel value threshold, determine the third pixel value as the target superimposed pixel value of the second pixel point.
[0086] In this embodiment, the specific values of the pixel value threshold and the third pixel value can be set according to the actual scenario and are not specifically limited here.
[0087] For example, the preset pixel value threshold is 255, and the third pixel value is 255. When the summed pixel value of the second pixel is 310, it can be determined that the summed pixel value of the second pixel is greater than the pixel value threshold of 255. In this case, the third pixel value of 255 is used as the target superimposed pixel value of the second pixel, and the pixel value of the second pixel is updated to 255.
[0088] S306 : If the summed pixel value of the second pixel point is less than or equal to the pixel value threshold, determine the summed pixel value of the second pixel point as the target superimposed pixel value of the second pixel point.
[0089] In this embodiment, the pixel value threshold can be set according to the actual scenario and is not specifically limited here.
[0090] For example, the preset pixel value threshold is 255, and the summed pixel value of the second pixel point is 255. It can be seen that the summed pixel value of the second pixel point is equal to the pixel value threshold 255. At this time, the summed pixel value of the second pixel point is 255 as the target superimposed pixel value of the second pixel point, and the pixel value of the second pixel point is updated to 255.
[0091] Please also see Figure 5 , Figure 5 This is a scenario diagram of a water output control method provided in an embodiment of the present application.
[0092] like Figure 5 As shown, there are several pixel points with target pixel values in the changing pixel point image and the historical liquid level superposition image respectively. After image fusion of the changing pixel point image and the historical liquid level superposition image, a target liquid level superposition image containing all pixel points with target pixel values in the changing pixel point image and the historical liquid level superposition image is obtained.
[0093] From the above, it can be seen that by summing the updated pixel value of each pixel point in the changed pixel point image with the pixel value of the corresponding historical liquid level superimposed image in the historical frame image, the accurate fusion of the new pixel value and the historical data can be ensured, thereby improving the accuracy of the target liquid level superimposed image corresponding to the target frame image. By setting the pixel value threshold to dynamically adjust the target superimposed pixel value, the recognition accuracy and response speed of the liquid level change are improved while maintaining the image details.
[0094] Because different water storage containers vary in size and shape, it is necessary to determine the water inlet area of the water storage container before the drinking water device enters the water dispensing state. Figure 6 , Figure 6 This is a flow chart of a water output control method provided in an embodiment of the present application. Figure 6 As shown, the method of the embodiment of the present application may include the following steps S401-S404.
[0095] S401: Calling a preset detection algorithm to determine the water inlet boundary of the water storage container, and determining the inner area of the water inlet boundary as the water inlet area of the water storage container.
[0096] In this embodiment of the present application, the preset detection algorithm includes an object detection algorithm and an instance segmentation algorithm. The object detection algorithm aims to identify the location of water storage containers in an image and mark their locations with bounding boxes. The instance segmentation algorithm further refines object detection, enabling pixel-level classification of water storage containers, thereby achieving accurate segmentation of the water storage containers. The object detection algorithm is used as the preset detection algorithm for the following description.
[0097] Specifically, a pre-set object detection algorithm is used to identify and locate the boundaries of the water storage container's water inlet. Once the inlet boundary is detected, the algorithm generates a precise bounding box that clearly defines the inlet's outer contours. Pixel contour analysis is then performed on the inner area of the bounding box to identify the pixel with the largest outline area as the water storage container's inlet. This method enables automatic and accurate identification and location of the water storage container's water inlet, providing technical support for condition monitoring and safety management of water storage containers.
[0098] S402: If it is detected that the position of the water inlet area of the water storage container has not moved within a preset time, an initial foreground image of the water inlet area is obtained, and the drinking water device is controlled to enter a water discharging state.
[0099] In the embodiment of the present application, the initial foreground image is a color image captured by an image capture device when the drinking water device is in a water-out state.
[0100] For example, the preset time is set to 3 seconds. The image acquisition device monitors the water inlet area of the water storage container in real time, and uses an object detection algorithm to continuously track the position of the water inlet. If the position of the water inlet area remains unchanged without any displacement during the continuous 3-second monitoring period, an initial foreground image of the water inlet area is automatically acquired, and the drinking water device is controlled to enter the water discharging state to begin supplying water to the water storage container.
[0101] Please also see Figure 7 , Figure 7 This is a schematic diagram of a water output control method provided in an embodiment of the present application. Figure 7 The target detection algorithm is used to identify the water inlet boundary of the water storage container. There are characteristic circles composed of two pixel contours in the water inlet boundary. By comparing the contour areas, it can be seen that the area of the outer characteristic circle is larger than that of the inner characteristic circle. That is, the outer characteristic circle is determined to be the water inlet area of the water storage container.
[0102] S403 , capturing a panoramic image including the water storage container, and obtaining a target frame image of the water inlet area of the water storage container in the panoramic image based on the water inlet boundary.
[0103] In the embodiment of the present application, since only the water inlet area of the water storage container needs to be focused on during liquid level detection, without focusing on other image areas, it is preferred to separate the water inlet area of the water storage container from the panoramic image to obtain a target frame image containing only the water inlet area of the water storage container, thereby achieving the technical effect of improving image processing speed, as follows:
[0104] Specifically, the system controls the image acquisition device to capture a panoramic image, capturing a wide scene encompassing the water container. The system then uses a target detection algorithm to analyze the panoramic image to identify and locate the water container's water inlet. When the drinking water device enters the dispensing state, the system automatically separates the portion of the panoramic image containing only the water container's water inlet to generate a target frame image. This target frame image focuses exclusively on the water inlet area, enabling more detailed monitoring and analysis of the water inlet region.
[0105] S404: If the target frame image is the first frame image captured when the drinking water device is in the water-discharging state, the initial foreground image is determined as the historical frame image, and the process proceeds to the step of performing a difference frame binarization process on the target frame image and the historical frame image.
[0106] In this embodiment of the present application, the initial foreground image is a color image captured by an image acquisition device while the water container is in a stationary state, and this initial foreground image is stored in an image database. In actual scene collection, since the initial foreground image may contain some liquid within the water container, when the target frame image is the first frame captured by the image acquisition device, it is necessary to perform a liquid level analysis on the initial liquid level data of the water container and the liquid level data of the first frame image.
[0107] Specifically, when the target frame image is the first frame image captured when the drinking water device is in the dispensing state, an initial foreground image is extracted from the image database and used as the historical frame image. The steps of performing the difference frame binarization processing on the target frame image and the historical frame image are described in S101-S105 above and are not further described here.
[0108] As can be seen above, by invoking a preset detection algorithm to determine the water container's water inlet boundary and defining the area within that boundary as the water inlet area, the water inlet location can be accurately identified. By identifying the placement of the water container and controlling the drinking water device to enter the water discharge state accordingly, the water inflow process of the water container can be automatically monitored and controlled, ensuring that the drinking water device can start and supply water in a timely manner while the water inlet position remains unchanged. This improves the drinking water device's automation level and response speed, effectively reducing the need for human intervention and improving the reliability and efficiency of the drinking water device's water supply.
[0109] based on Figure 1 The following is a schematic diagram of the scene. Figure 8 , the water output control device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 8 The water output control device is used to implement this application Figure 2-Figure 7 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2-Figure 7 In the embodiment shown, the water output control device 500 may include an image acquisition unit 501, an image processing unit 502, a pixel fusion unit 503, and a state adjustment unit 504, as follows:
[0110] The image acquisition unit 501 is used to acquire a target frame image of the water inlet area of the water storage container when the drinking water device is in the water discharge state;
[0111] The image processing unit 502 performs a difference frame binarization process on the target frame image and the historical frame image to obtain a changed pixel point image between the target frame image and the historical frame image, where the historical frame image is the frame image before the target frame image.
[0112] A pixel fusion unit 503 is configured to fuse the changed pixel image with the historical liquid level superposition image corresponding to the historical frame image to generate a target liquid level superposition image corresponding to the target frame image;
[0113] The state adjustment unit 504 is used to compare the number of liquid level pixels in the target liquid level superimposed image with the total number of pixels in the water inlet area in the initial foreground image, and adjust the water outlet state of the drinking water device according to the comparison result; wherein the initial foreground image is the initial image of the water inlet area collected before the drinking water device is in the water outlet state.
[0114] In some embodiments, the image processing unit 502 further includes an image conversion unit, a pixel value acquisition unit, a first updating unit, and a first image generating unit.
[0115] An image conversion unit, configured to convert a target frame image into a target grayscale image;
[0116] A pixel value acquisition unit is used to acquire a target pixel value of each pixel point in the water inlet area in the target grayscale image, and to acquire a historical pixel value of each pixel point in the historical grayscale image corresponding to the historical frame image;
[0117] a pixel value updating unit, configured to perform binarization updating on the target pixel value of each pixel point based on the target pixel value of each pixel point and the historical pixel value of each pixel point, so as to obtain an updated pixel value of each pixel point;
[0118] The first image generating unit is configured to generate a changed pixel point image between the target frame image and the historical frame image based on the updated pixel value of each pixel point.
[0119] In some embodiments, the image processing unit 502 further includes a pixel difference absolute value acquiring unit, a second updating unit, and a third updating unit.
[0120] a pixel difference absolute value acquisition unit, configured to acquire an absolute value of a difference between a target pixel value of a first pixel point and a historical pixel value of the first pixel point, where the first pixel point is any pixel point among the pixel points;
[0121] a second updating unit, configured to update the target pixel value of the first pixel point to the first pixel value if the absolute value of the difference is greater than a preset absolute value threshold;
[0122] The third updating unit is configured to update the target pixel value of the first pixel point to a second pixel value if the absolute value of the difference is less than or equal to the absolute value threshold.
[0123] In some embodiments, the pixel fusion unit 503 further includes a first calculation unit and an overlay image generation unit.
[0124] The first calculation unit is configured to sum the updated pixel value of each pixel in the changed pixel image and the historical superimposed pixel value of each pixel in the historical liquid level superimposed image corresponding to the historical frame image, so as to obtain a target superimposed pixel value of each pixel;
[0125] The overlay image generating unit is used to generate a target liquid level overlay image corresponding to the target frame image based on the target overlay pixel value of each pixel point.
[0126] In some embodiments, the pixel fusion unit 503 further includes a second calculation unit, a first determination unit, and a second determination unit.
[0127] a second calculating unit, configured to sum an updated pixel value of a second pixel point in the changed pixel point image and a historical superimposed pixel value of the second pixel point in the historical liquid level superimposed image corresponding to the historical frame image, to obtain a summed pixel value of the second pixel point;
[0128] a first determining unit, configured to determine the third pixel value as a target superimposed pixel value of the second pixel point if the summed pixel value of the second pixel point is greater than a preset pixel value threshold, where the second pixel point is any pixel point among the pixel points;
[0129] The second determination unit is configured to determine the summed pixel value of the second pixel point as the target superimposed pixel value of the second pixel point if the summed pixel value of the second pixel point is less than or equal to the pixel value threshold.
[0130] In some embodiments, the image acquisition unit 501 further includes a region determination unit and a third determination unit.
[0131] an area determination unit, configured to call a preset detection algorithm to determine a water inlet boundary of the water storage container, and determine an inner area of the water inlet boundary as the water inlet area of the water storage container;
[0132] The third determination unit is configured to obtain an initial foreground image of the water inlet area and control the drinking water device to enter a water outlet state if it is detected that the area position of the water inlet area of the water storage container has not moved within a preset time.
[0133] In some embodiments, the image acquisition unit 501 further includes a target frame image determination unit.
[0134] The target frame image determination unit is used to collect a panoramic image containing the water storage container, and obtain a target frame image of the water inlet area of the water storage container in the panoramic image based on the water inlet boundary.
[0135] In some embodiments, a fourth determination unit is further included.
[0136] The fourth determination unit is used to determine the initial foreground image as the historical frame image if the target frame image is the first frame image captured when the drinking water device is in the water-discharging state, and to proceed to the step of performing differential frame binarization processing on the target frame image and the historical frame image.
[0137] In an embodiment of the present application, by capturing a target frame image of the water inlet area of the water storage container while the drinking water device is in the water discharging state and performing a differential frame binarization process on the target frame image and the historical frame image, water level changes can be accurately identified. By pixel-by-pixel fusion of the changing pixel image and the historical liquid level overlay image to generate a target liquid level overlay image, and calculating the ratio of the number of liquid level pixels in the target liquid level overlay image to the total number of pixels in the water inlet area in the initial foreground image, it is possible to determine in real time whether the current water level has reached a preset threshold, thereby controlling the water discharging state of the drinking water device in real time. This not only improves the automation level of the drinking water device, but also effectively avoids the risk of overflow caused by excessively high water levels, thereby enhancing user safety and convenience.
[0138] In addition, the water output control device provided in the above embodiment and a water output control method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment and will not be repeated here.
[0139] The serial numbers of the embodiments of the present application are for descriptive purposes only and do not represent the merits of the embodiments. In some cases, the actions or steps described in the claims may be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0140] See Figure 9 , provides a schematic diagram of the structure of a drinking water device according to an embodiment of the present application. Figure 9 As shown, the drinking water device 600 includes a processor 601 and a memory 602. The processor 601 is electrically connected to the memory 602.
[0141] The processor 601 is the control center of the drinking water device 600 and may include one or more processing cores. The processor 601 utilizes various interfaces and circuits to connect the various components of the drinking water device. By running or invoking computer programs stored in the memory 602, as well as accessing data stored in the memory 602, the processor 601 executes the various functions of the drinking water device and processes data, thereby providing overall control over the drinking water device. Optionally, the processor 601 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field programmable gate array (FPGA), or a programmable logic array (PLA). The processor 601 may integrate one or a combination of a CPU, a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interfaces, and applications; the GPU is responsible for rendering and drawing display content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 601 and may be implemented separately via a communication chip.
[0142] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the computer programs and modules stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one computer program required for the function, etc.; the data storage area can store data generated based on the use of the drinking water device, etc.
[0143] In addition, the memory 602 may include a high-speed random access memory and a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0144] In the embodiment of the present application, the processor 601 in the drinking water device 600 loads instructions corresponding to one or more computer program processes into the memory 602 according to the following steps, and the processor 601 runs the computer program stored in the memory 602 to implement various functions as follows:
[0145] When the drinking water device is in the water discharging state, a target frame image of the water inlet area of the water storage container is collected;
[0146] Performing a difference frame binarization process on the target frame image and the historical frame image to obtain a changed pixel point image between the target frame image and the historical frame image, where the historical frame image is the frame image before the target frame image;
[0147] Perform pixel fusion on the changed pixel point image and the historical liquid level superposition image corresponding to the historical frame image to generate the target liquid level superposition image corresponding to the target frame image;
[0148] The number of liquid level pixels in the target liquid level overlay image is compared with the total number of pixels in the water inlet area in the initial foreground image, and the water outlet state of the drinking water device is adjusted according to the comparison result; wherein, the initial foreground image is the initial image of the water inlet area captured before the drinking water device is in the water outlet state.
[0149] Optionally, the processor 601 performs differential frame binarization processing on the target frame image and the historical frame image to obtain a changed pixel point image between the target frame image and the historical frame image, specifically performing the following steps: converting the target frame image into a target grayscale image; obtaining the target pixel value of each pixel point in the water inlet area of the target grayscale image, and obtaining the historical pixel value of each pixel point in the historical grayscale image corresponding to the historical frame image; binarizing and updating the target pixel value of each pixel point based on the target pixel value of each pixel point and the historical pixel value of each pixel point to obtain an updated pixel value of each pixel point; and generating a changed pixel point image between the target frame image and the historical frame image based on the updated pixel value of each pixel point.
[0150] Optionally, the processor 601 performs a binarization update on the target pixel value of each pixel point based on the target pixel value of each pixel point and the historical pixel value of each pixel point to obtain the updated pixel value of each pixel point. Specifically, the processor 601 performs the following steps: obtaining the absolute value of the difference between the target pixel value of the first pixel point and the historical pixel value of the first pixel point, where the first pixel point is any pixel point among the pixel points; if the absolute value of the difference is greater than a preset absolute value threshold, updating the target pixel value of the first pixel point to the first pixel value; if the absolute value of the difference is less than or equal to the absolute value threshold, updating the target pixel value of the first pixel point to the second pixel value.
[0151] Optionally, the processor 601 performs pixel fusion of the changed pixel point image and the historical liquid level superposition image corresponding to the historical frame image to generate a target liquid level superposition image corresponding to the target frame image. Specifically, the processor 601 performs: summing the updated pixel value of each pixel point in the changed pixel point image with the historical superposition pixel value of each pixel point in the historical liquid level superposition image corresponding to the historical frame image to obtain the target superposition pixel value of each pixel point; and generating the target liquid level superposition image corresponding to the target frame image based on the target superposition pixel value of each pixel point.
[0152] Optionally, the processor 601 executes the summing of the updated pixel value of each pixel point in the changing pixel point image and the historical superimposed pixel value of each pixel point in the historical liquid level superimposed image corresponding to the historical frame image to obtain the target superimposed pixel value of each pixel point. Specifically, the processor 601 performs the following steps: summing the updated pixel value of the second pixel point in the changing pixel point image and the historical superimposed pixel value of the second pixel point in the historical liquid level superimposed image corresponding to the historical frame image to obtain the summed pixel value of the second pixel point; if the summed pixel value of the second pixel point is greater than a preset pixel value threshold, determining the third pixel value as the target superimposed pixel value of the second pixel point, where the second pixel point is any pixel point; if the summed pixel value of the second pixel point is less than or equal to the pixel value threshold, determining the summed pixel value of the second pixel point as the target superimposed pixel value of the second pixel point.
[0153] Optionally, before the processor 601 collects the target frame image of the water inlet area of the water storage container when the drinking water device is in the water discharge state, it specifically performs the following steps: calling a preset detection algorithm to determine the water inlet boundary of the water storage container, and determining the internal area of the water inlet boundary as the water inlet area of the water storage container; if it is detected that the area position of the water inlet area of the water storage container has not moved within a preset time, then obtaining an initial foreground image of the water inlet area, and controlling the drinking water device to enter the water discharge state.
[0154] Optionally, the processor 601 executes the acquisition of a target frame image of the water inlet area of the water storage container by specifically acquiring a panoramic image including the water storage container, and obtaining a target frame image of the water inlet area of the water storage container in the panoramic image based on the water inlet boundary.
[0155] Optionally, the processor 601 is also used to specifically execute: if the target frame image is the first frame image captured when the drinking water equipment is in a water-discharging state, the initial foreground image is determined as the historical frame image, and the step of performing differential frame binarization processing on the target frame image and the historical frame image is executed.
[0156] In an embodiment of the present application, by capturing a target frame image of the water inlet area of the water storage container while the drinking water device is in the water discharging state and performing a differential frame binarization process on the target frame image and the historical frame image, water level changes can be accurately identified. By pixel-by-pixel fusion of the changing pixel image and the historical liquid level overlay image to generate a target liquid level overlay image, and calculating the ratio of the number of liquid level pixels in the target liquid level overlay image to the total number of pixels in the water inlet area in the initial foreground image, it is possible to determine in real time whether the current water level has reached a preset threshold, thereby controlling the water discharging state of the drinking water device in real time. This not only improves the automation level of the drinking water device, but also effectively avoids the risk of overflow caused by excessively high water levels, thereby enhancing user safety and convenience.
[0157] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the computer executes the above-mentioned related method steps to implement a water output control method provided by the above embodiment.
[0158] In addition, the device provided in the embodiment of the present application can specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a water output control method provided in the above embodiment.
[0159] An embodiment of the present application also provides a computer-readable storage medium, which stores computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a water output control method provided by the above embodiment.
[0160] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement a water output control method provided in the above embodiment.
[0161] Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0162] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0163] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between the related ones shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0164] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A water output control method, characterized in that: The method comprises: When the drinking water device is in a water outlet state, a target frame image of the water inlet area of the water storage container is collected; Performing a difference frame binarization process on the target frame image and the historical frame image to obtain a changed pixel point image between the target frame image and the historical frame image, wherein the historical frame image is a frame image previous to the target frame image; Perform pixel fusion on the changed pixel point image and the historical liquid level superposition image corresponding to the historical frame image to generate a target liquid level superposition image corresponding to the target frame image; The number of liquid level pixels in the target liquid level overlay image is compared with the total number of pixels in the water inlet area in the initial foreground image, and the water outlet state of the drinking water device is adjusted according to the comparison result; wherein the initial foreground image is the initial image of the water inlet area captured before the drinking water device is in the water outlet state.
2. The method according to claim 1, characterized in that The performing frame difference binarization processing on the target frame image and the historical frame image to obtain a changed pixel point image between the target frame image and the historical frame image includes: Converting the target frame image into a target grayscale image; Obtaining target pixel values of each pixel point in the water inlet area in the target grayscale image, and obtaining historical pixel values of each pixel point in the historical grayscale image corresponding to the historical frame image; Based on the target pixel value of each pixel point and the historical pixel value of each pixel point, the target pixel value of each pixel point is binarized and updated to obtain an updated pixel value of each pixel point; A changed pixel point image between the target frame image and the historical frame image is generated based on the updated pixel values of each pixel point.
3. The method according to claim 2, characterized in that The binarization updating of the target pixel value of each pixel point based on the target pixel value of each pixel point and the historical pixel value of each pixel point to obtain the updated pixel value of each pixel point includes: Obtaining an absolute value of a difference between a target pixel value of a first pixel and a historical pixel value of the first pixel, wherein the first pixel is any pixel among the pixel points; If the absolute value of the difference is greater than a preset absolute value threshold, updating the target pixel value of the first pixel point to the first pixel value; If the absolute value of the difference is less than or equal to the absolute value threshold, the target pixel value of the first pixel is updated to a second pixel value.
4. The method according to claim 2, characterized in that: The step of performing pixel fusion on the changed pixel point image and the historical liquid level superposition image corresponding to the historical frame image to generate a target liquid level superposition image corresponding to the target frame image includes: Respectively summing the updated pixel value of each pixel in the changed pixel image and the historical superimposed pixel value of each pixel in the historical liquid level superimposed image corresponding to the historical frame image to obtain a target superimposed pixel value of each pixel; A target liquid level superimposed image corresponding to the target frame image is generated based on the target superimposed pixel value of each pixel point.
5. The method according to claim 4, characterized in that The step of summing up the updated pixel value of each pixel in the changed pixel image and the historical superimposed pixel value of each pixel in the historical liquid level superimposed image corresponding to the historical frame image to obtain the target superimposed pixel value of each pixel includes: Summing an updated pixel value of a second pixel point in the changed pixel point image and a historical superimposed pixel value of the second pixel point in a historical liquid level superimposed image corresponding to the historical frame image to obtain a summed pixel value of the second pixel point; If the summed pixel value of the second pixel point is greater than a preset pixel value threshold, determining the third pixel value as the target superimposed pixel value of the second pixel point, the second pixel point being any pixel point among the pixel points; If the summed pixel value of the second pixel point is less than or equal to the pixel value threshold, the summed pixel value of the second pixel point is determined as the target superposition pixel value of the second pixel point.
6. The method according to claim 1, characterized in that When the drinking water device is in a water outlet state, before collecting a target frame image of a water inlet area of a water storage container, the method includes: Calling a preset detection algorithm to determine a water inlet boundary of the water storage container, and determining an inner area of the water inlet boundary as a water inlet area of the water storage container; If it is detected that the area position of the water inlet area of the water storage container has not moved within a preset time, an initial foreground image of the water inlet area is acquired, and the drinking water device is controlled to enter a water outlet state.
7. The method according to claim 6, characterized in that The step of collecting a target frame image of a water inlet area of a water storage container comprises: A panoramic image including the water storage container is acquired, and a target frame image of the water inlet area of the water storage container is obtained in the panoramic image based on the water inlet boundary.
8. The method according to claim 1 or 6, characterized in that: The method further comprises: If the target frame image is the first frame image captured when the drinking water device is in a water outlet state, the initial foreground image is determined as a historical frame image, and the step of performing differential frame binarization processing on the target frame image and the historical frame image is executed.
9. A water output control device, characterized in that: include: An image acquisition unit, used to acquire a target frame image of a water inlet area of a water storage container when the drinking water device is in a water outlet state; An image processing unit performs a difference frame binarization process on the target frame image and the historical frame image to obtain a changed pixel point image between the target frame image and the historical frame image, wherein the historical frame image is a frame image previous to the target frame image; A pixel fusion unit, used for performing pixel fusion on the changed pixel point image and the historical liquid level superposition image corresponding to the historical frame image to generate a target liquid level superposition image corresponding to the target frame image; A state adjustment unit is used to compare the number of liquid level pixels in the target liquid level superimposed image with the total number of pixels in the water inlet area in the initial foreground image, and adjust the water outlet state of the drinking water device according to the comparison result; wherein the initial foreground image is an initial image of the water inlet area collected before the drinking water device is in the water outlet state.
10. A drinking water device, characterized in that: The drinking water equipment comprises: A memory for storing executable program codes; A processor is used to call and run the executable program code from the memory, so that the drinking water equipment executes the water output control method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the water output control method according to any one of claims 1 to 8 is implemented.