Water yield control method and device, water dispenser and storage medium

By performing image processing on the water storage container in the water dispenser and automatically controlling the water output, the water overflow problem caused by users' inattention is solved, and the user experience and safety are improved.

CN119048323APending Publication Date: 2024-11-29WUHU MIDEA KITCHEN & BATH APPLIANCES MFG CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411024605.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

When existing water dispensers are not focused, they can easily cause water overflow and reduce user experience.

Method used

By obtaining the initial grayscale image of the water storage container, performing feature filtering and contour fitting, determining the set of feature circles of the water storage container, calculating the water volume, and generating effluent control instructions to realize automatic control of the water dispenser effluent.

Benefits of technology

Improve user experience, ensure the accuracy and safety of the water discharge of the water dispenser and avoid water overflow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048323A_ABST
    Figure CN119048323A_ABST
Patent Text Reader

Abstract

The invention provides a water yield control method and device, a water dispenser and a storage medium, the method is applied to the field of drinkers, and the method comprises the following steps: obtaining an initial grayscale image of a water storage container, and performing feature filtering on the initial grayscale image to obtain a target grayscale image; determining a pixel contour set from the target grayscale image, and performing contour fitting on target pixel contours in the pixel contour set to determine a feature circle set of the water storage container; the water volume of the water storage container is determined based on the characteristic circle set to obtain the single water yield of the water dispenser for the water storage container, a water outlet control instruction is generated based on the single water yield to control the water dispenser to discharge water to the water storage container, and automatic control over the water yield of the water dispenser is achieved. Therefore, the use experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of water dispensers, and in particular to a water output control method, device, water dispenser 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] The present application provides a water output control method, device, water dispenser and storage medium, aiming to control the water output of the water dispenser 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] Acquire an initial grayscale image of the water storage container, and perform feature filtering on the initial grayscale image to obtain a target grayscale image;

[0006] Determine a pixel contour set from the target grayscale image, and perform contour fitting on the target pixel contour in the pixel contour set to determine a characteristic circle set of the water storage container;

[0007] The water volume of the water storage container is determined based on the characteristic circle set to obtain the single water output of the water dispenser for the water storage container, and a water output control instruction is generated based on the single water output to control the water dispenser to output water to the water storage container.

[0008] In a second aspect, an embodiment of the present application provides a water output control device, comprising:

[0009] An image acquisition unit is configured to acquire an initial grayscale image of the water storage container and perform feature filtering on the initial grayscale image to obtain a target grayscale image;

[0010] A pixel fitting unit is configured to determine a pixel contour set from a target grayscale image, and perform contour fitting on a target pixel contour in the pixel contour set to determine a characteristic circle set of the water storage container;

[0011] The control unit is configured to determine the water volume of the water storage container based on the characteristic circle set to obtain the single water output of the water dispenser for the water storage container, and generate a water output control instruction based on the single water output to control the water dispenser to output water to the water storage container.

[0012] In a third aspect, an embodiment of the present application provides a water dispenser, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, any of the above water output control methods is implemented.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, any of the water output control methods described above is implemented.

[0014] In the above technical solution, by acquiring the initial grayscale image and performing feature filtering, the key information related to the water storage container can be accurately extracted to form a target grayscale image. By fitting the target pixel contour, the characteristic circle set of the water storage container is accurately determined. Based on these characteristic circles, the water volume of the water storage container can be quickly and accurately calculated, and the water output control instruction is generated accordingly to realize the automatic control of the water output of the water dispenser, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings 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.

[0016] Figure 1 It is a scene schematic diagram of a water output control method provided in an embodiment of the present application;

[0017] Figure 2 It is a flow chart of a water output control method provided in an embodiment of the present application;

[0018] Figure 3 It is a flow chart of a water output control method provided in an embodiment of the present application;

[0019] Figure 4 It is a flow chart of a water output control method provided in an embodiment of the present application;

[0020] Figure 5 It is a scene schematic diagram of a water output control method provided in an embodiment of the present application;

[0021] Figure 6 It is a flow chart of a water output control method provided in an embodiment of the present application;

[0022] Figure 7 It is a scene schematic diagram of a water output control method provided in an embodiment of the present application;

[0023] Figure 8 It is a flow chart of a water output control method provided in an embodiment of the present application;

[0024] Fig. 9 It is a scene schematic diagram of a water output control method provided in an embodiment of the present application;

[0025] Fig.10 It is a structural schematic diagram of a water output control device provided in an embodiment of the present application;

[0026] Fig.11 It is a structural schematic diagram of a water dispenser provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0028] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present 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 the present application, "multiple" means two or more than two.

[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, 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 the use of the water dispenser, the embodiment of the present application provides a water output control method, and the execution subject of the water output control method is the water dispenser. The following are detailed descriptions respectively. It should be noted that the description order of the following embodiments is not intended to 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 1It is a scenario schematic diagram of a water output control method provided in an embodiment of the present application.

[0032] like Figure 1 As shown, the water dispenser 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 use scenario and is not specifically limited here. Figure 1 As shown in the schematic diagram on the left, the left framing range of the image acquisition device falls on the side wall of the water dispenser. The following description is based on the side wall framing intersection, that is, when there is a water storage container below the side wall framing intersection, the complete image of the water storage container can be fully acquired. At the same time, by detecting the distance between the side wall framing intersection and the cup mouth of the water storage container, the height information of the water storage container can be obtained, such as Figure 1 As shown in the schematic diagram on the right, the area on the left side of the dotted line is the image of the area of ​​the side wall. Since the side wall is made of mirror material, the image of the water storage container on the side wall can be obtained at the same time when the image of the area is obtained. The height information of the container can be determined by analyzing the distance between the water storage container and the intersection of the side wall.

[0033] It should be noted that the height information of the water storage container is obtained by the distance between the side wall framing intersection and the cup mouth of the water storage container based on actual experimental data. In actual experiments, the corresponding relationship data of water storage containers of different heights and the side wall framing intersection are saved respectively. In actual application, it is only necessary to call the corresponding reference data from the used corresponding relationship database to obtain the actual height information of the water storage container under the distance between the current water storage container and the side wall framing intersection. At the same time, the actual scale of the cup mouth of the water storage container under different height information is recorded in the corresponding relationship database, where the actual scale refers to the ratio of the diameter length distance of the cup mouth of the water storage container in the grayscale image to the actual length in the real scene, which is used to measure the degree of reduction between the distance on the image and the actual distance.

[0034] Specifically, it is preferred to set the shooting angle of the image acquisition device to be perpendicular to the water storage container for image capture. When the water dispenser is in a standby state, the image acquisition device is controlled by using a difference frame method to intermittently acquire multiple frame images, and by comparing the current frame image with the previous frame image, it is determined whether there is a water storage container in the current frame image. When any water storage container is detected in the current frame image, the water dispenser is switched from the standby state to the pre-water discharge state. In the pre-water discharge state, the acquired current frame image is converted into a grayscale image, which contains a series of pixel features about the water storage container. At the same time, in order to speed up the processing speed, the redundant pixel area in the grayscale image needs to be filtered to highlight the pixel features of the water storage container. After filtering, it is necessary to use algorithms such as Canny or Prewitt to obtain the edge contour in the image, wherein the edge contour in the image refers to a curve with continuous points of the same color or grayscale value in the image, that is, an important processing object in image processing, which is used for shape analysis and object detection and recognition.

[0035] Find out all closed edge contours in the image, and obtain the area of ​​each closed edge contour respectively, traverse the area of ​​each edge contour to obtain the edge contour with the largest area and the edge contour with the second largest area, and perform contour fitting operations on the edge contour with the largest area and the edge contour with the second largest area respectively to generate a first characteristic circle and a second characteristic circle, and use the first characteristic circle as the cup mouth of the water storage container and the second characteristic circle as the cup bottom of the water storage container.

[0036] The height information of the water storage container is determined by determining the distance between the mouth of the water storage container and the intersection of the side wall view, and calling the corresponding control data at the current distance from the corresponding relationship database. At the same time, it is determined that the grayscale image size ratio under the height information is greater than or equal to the actual size ratio in the real scene, and the actual size ratio is used as the actual scale of the mouth of the cup. The relative distance between the image acquisition device and the container tray of the water dispenser is obtained in advance, and the relative distance is converted into the actual size ratio of the bottom of the water storage container, and the water volume of the container is obtained by the water volume calculation formula. The single water output of the water dispenser is determined according to the water volume, and the water outlet of the water dispenser is controlled to start discharging water. After the water output reaches the single water output, the water dispenser is controlled to stop discharging water.

[0037] based on Figure 1 The scene diagram shown below will be combined with Figure 2-Figure 8 , a water output control method provided in an embodiment of the present application is introduced in detail.

[0038] Based on the above situation, the present application embodiment proposes a water output control method. Figure 2 , Figure 2 Schematic diagram of 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-S103.

[0039] S101, obtaining an initial grayscale image of a water storage container, and performing feature filtering on the initial grayscale image to obtain a target grayscale image.

[0040] In the embodiment of the present application, since the side wall of the water dispenser is made of mirror material, the surface image of the water storage container in the side wall will be acquired together in the regional image captured by the image acquisition device. At this time, the image of this part of the region is the interference area.

[0041] Specifically, when the water dispenser is in standby mode, the image acquisition device continuously captures the image frames below the water outlet with low power consumption, and compares and analyzes the continuous image frames frame by frame to detect whether there is a feature change between the current frame image and the previous frame image. Once the container feature is detected in the current frame image, the current frame image is converted into an initial grayscale image, and the water dispenser is switched from the standby mode to the pre-discharge mode. In the pre-discharge mode, the acquired current frame image is converted into a grayscale image. At the same time, the area image of the side wall of the water dispenser is deleted from the grayscale image to obtain the target grayscale image after filtering the interference area.

[0042] S102, determining a pixel contour set from the target grayscale image, and performing contour fitting on the target pixel contour in the pixel contour set to determine a characteristic circle set of the water storage container.

[0043] In an embodiment of the present application, the target grayscale image is processed using the Canny algorithm or the Prewitt algorithm to identify the edge contours of each pixel area in the target grayscale image. The specific algorithm to be used is determined according to the actual usage scenario and is not specifically limited here. The Canny algorithm smoothes the image based on a Gaussian filter, then calculates the gradient amplitude and direction, and finds the local maximum through non-maximum suppression, and finally determines the edge through double threshold processing. The Prewitt algorithm uses two sets of 3x3 convolution kernels to approximate the gradient, and then detects the edge of the image through threshold processing.

[0044] Specifically, a binarization operation is performed on the target grayscale image after edge detection, that is, the target grayscale image is converted into a binary image, that is, the grayscale values ​​of pixels in the target grayscale image whose grayscale values ​​are greater than the grayscale value threshold are fixed, and the grayscale values ​​of pixels in the target grayscale image whose grayscale values ​​are less than the grayscale value threshold are fixed to generate a target grayscale image after binarization processing.

[0045] The target grayscale image after binarization is subjected to pixel dilation, wherein the pixel dilation is used to expand an isolated pixel region in the target grayscale image into a continuous region to generate a pixel contour, and the pixel contour set is generated based on all pixel contours in the target grayscale image.

[0046] Each pixel contour in the pixel contour set is traversed, and the contour area of ​​each pixel contour is determined after ellipse fitting is performed on the traversed pixel contours, and the pixel contours with contour areas smaller than a preset area threshold are filtered and deleted, and the pixel contour with the largest contour area is determined as the first characteristic circle, i.e., the cup mouth of the water storage container, and the pixel contour with a contour area second only to the first characteristic circle is determined as the second characteristic circle, so as to generate a characteristic circle set of the water storage container.

[0047] S103, determining the water volume of the water storage container based on the characteristic circle set to obtain a single water output of the water dispenser for the water storage container, and generating a water output control instruction based on the single water output to control the water dispenser to output water to the water storage container.

[0048] In the embodiment of the present application, the correspondence data of the water storage container at different heights and the intersection of the side wall framing are saved respectively. In actual application, only the corresponding comparison data needs to be called from the used correspondence database to obtain the actual height information of the water storage container at the distance between the current water storage container and the intersection of the side wall framing. At the same time, the actual scale of the cup mouth of the water storage container at different height information is recorded in the correspondence database, where the actual scale refers to the ratio of the diameter length distance of the cup mouth of the water storage container in the grayscale image to the actual length in the real scene, which is used to measure the reduction degree between the distance on the image and the actual distance.

[0049] Specifically, the distance between the first characteristic circle in the initial image and the intersection of the side wall framing is obtained, and the corresponding control data is called from the corresponding relationship database to determine the height information of the water storage container. At the same time, it is determined that the size ratio of the target grayscale image under the height information is equal to the actual size ratio in the real scene, and the actual size ratio is used as the first scale of the first characteristic circle in the characteristic circle set. The relative distance between the image acquisition device and the container tray of the water dispenser is obtained in advance, and the relative distance is converted into the actual size ratio of the second characteristic circle in the characteristic circle set.

[0050] The water volume of the container is obtained by a water volume calculation formula, and the single water output of the water dispenser is determined according to the water volume. A water output control instruction is generated according to the single water output to control the water outlet of the water dispenser to start discharging water, and the water dispenser is controlled to stop discharging water after monitoring that the water output of the water dispenser reaches the single water output.

[0051] As can be seen from the above, by obtaining the initial grayscale image and performing feature filtering, the key information related to the water storage container can be accurately extracted to form a target grayscale image. By fitting the target pixel contour, the characteristic circle set of the water storage container is accurately determined. Based on the characteristic circle, the water volume of the water storage container can be quickly and accurately calculated, and the water output control instruction is generated accordingly to realize the automatic control of the water output of the water dispenser, thereby improving the user experience.

[0052] Since there is interference image data in the initial grayscale image, it is necessary to filter the interference image data to improve the data processing speed. Figure 3 , Figure 3 Schematic diagram of 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-S203.

[0053] S201, performing edge detection on a target grayscale image to determine a plurality of initial pixel contours.

[0054] In the embodiment of the present application, the edge contour is a set of pixels corresponding to the boundary of the target grayscale image object, which is a closed curve formed by connecting adjacent pixels with the same value (usually 0).

[0055] Specifically, the target grayscale image is processed using the Canny algorithm or the Prewitt algorithm to identify the edge contours of each pixel area in the target grayscale image. The Canny algorithm smoothes the image based on a Gaussian filter, then calculates the gradient amplitude and direction, finds the local maximum value through non-maximum suppression, and finally determines the edge through double threshold processing. The Prewitt algorithm uses two sets of 3x3 convolution kernels to approximate the gradient, and then detects the edge through threshold processing. The specific algorithm to be used is determined according to the actual usage scenario and is not specifically limited here.

[0056] S202, converting the target grayscale image into a binary image, and performing contour enhancement processing on the initial pixel contour based on the binary image to generate a pixel contour set.

[0057] Specifically, a binarization operation is performed on the target grayscale image after edge detection, that is, the target grayscale image is converted into a binary image, that is, the grayscale values ​​of pixels in the target grayscale image whose grayscale values ​​are greater than the grayscale value threshold are fixed to generate a binary image. For example, the grayscale value threshold is 128, and there are pixel A, pixel B and pixel C in the target grayscale image, wherein the grayscale value of pixel A is 230, the grayscale value of pixel B is 220 and the grayscale value of pixel C is 50. Since the grayscale value of pixel A and the grayscale value of pixel B are greater than the grayscale value threshold, the grayscale value of pixel A and the grayscale value of pixel B are both set to 200, and the grayscale value of pixel C is set to 0.

[0058] Contour enhancement is performed on all pixel contours in the binary image, wherein the purpose of contour enhancement is to highlight the edges and contours in the image for subsequent processing. For example, the lines of pixel contours in the white area of ​​the binary image are enhanced to generate a set of pixel contours.

[0059] S203 , performing pixel expansion on each pixel in each initial pixel contour to connect each pixel with an adjacent pixel to generate a pixel contour set.

[0060] Specifically, all closed pixel contours are extracted from the binary image to generate the pixel contour set. For example, the composition of each pixel in the initial pixel contour is [0,0,0], [0,1,0], [0,0,0]. To simplify the example, it is assumed that the grayscale threshold is 1 (that is, only pixels with a value of 1 will be considered for expansion) and the distance threshold is 1 (that is, only adjacent pixels will be connected). The expansion operation is performed on the pixels in each initial pixel contour. In this example, there is only one pixel with a value of 1, located in the second row and second column, so the pixel is connected to its adjacent pixels. The adjacent pixels are defined as pixels whose grayscale values ​​are greater than the grayscale threshold and whose relative distances are less than the distance threshold. After the expansion operation, a new pixel contour set is obtained, which is [0,0,0], [0,1,1], [0,1,1]. In this pixel contour set, the original isolated pixels have been connected to their adjacent pixels to form a continuous contour.

[0061] As can be seen from the above, the edge information in the image can be identified through the edge detection step to form a plurality of preliminary pixel contours. By converting the target grayscale image into a binary image, the processing of the binary image simplifies the image data, making the subsequent contour analysis and processing more efficient. The preliminary pixel contour is enhanced on the basis of the binary image to enhance the clarity of the contour and improve the accuracy and stability of the contour. By dilating the pixel, a single pixel can be connected to its adjacent pixels that meet specific conditions to form a more complete and continuous pixel contour. By combining the plurality of enhanced pixel contours processed above to form a pixel contour set, the recognition accuracy of the cup mouth and cup bottom of any water storage container can be improved.

[0062] Divide the grayscale image into granularity to improve the accuracy of determining the grayscale value of each pixel in the grayscale image. Figure 4 , Figure 4 Schematic diagram of 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-S307.

[0063] S301, screening each pixel contour in a pixel contour set to obtain a target pixel contour.

[0064] Specifically, the contour area of ​​each pixel contour in the contour set is obtained, and the target pixel contour is determined according to the contour area, wherein the target pixel contour includes a first target pixel contour and a second target pixel contour, the contour areas of the first target pixel contour and the second target pixel contour are both greater than the area threshold, and the area of ​​the first target pixel contour is greater than the contour area of ​​the second target pixel contour.

[0065] S302, performing circle fitting on the target pixel contour to obtain a first characteristic circle and a second characteristic circle.

[0066] S303: Generate a characteristic circle set based on the first characteristic circle and the second characteristic circle.

[0067] Specifically, in S302-S303, a circle fitting operation is performed on the first target pixel contour and the second target pixel contour, respectively, that is, the first target pixel contour and the second target pixel contour are simulated as elliptical contours, and a first characteristic circle corresponding to the first target pixel contour and a second characteristic circle corresponding to the second target pixel contour are obtained, and based on the first characteristic circle and the second characteristic circle, a characteristic circle set is generated.

[0068] S304: Filter the pixel contours in an unclosed state in the pixel contour set to obtain a plurality of pixel contours in a closed state.

[0069] Specifically, each pixel contour in the pixel contour set is traversed to determine the pixel contours in an unclosed state. For example, the pixel contour set includes pixel contour A, pixel contour B, and pixel contour C. After detection, it is found that the contour of pixel contour B is in an unclosed state. At this time, the pixel contour B is filtered and deleted from the pixel contour set.

[0070] S305, obtaining the contour area of ​​each pixel contour in a closed state.

[0071] S306: Obtain a first target pixel contour and a second target pixel contour based on the contour area.

[0072] S307, determining the first target pixel contour as a first characteristic circle and determining the second target pixel contour as a second characteristic circle.

[0073] Specifically, in S305-S307, the closed state refers to a continuous and uninterrupted pixel boundary. For example, a complete circular or rectangular contour is closed, while an open line segment is not. Obtain the contour area of ​​each pixel contour in a closed state. For example, the pixel contour in a closed state includes pixel contour A and pixel contour B. Through calculation, it can be known that the contour area of ​​pixel contour A is greater than the contour area of ​​pixel contour B. At this time, pixel contour A is determined as the first target pixel contour, and pixel contour B is determined as the second target pixel contour. At the same time, the first target pixel contour is determined as the first characteristic circle and the second target pixel contour is determined as the second characteristic circle, wherein the first characteristic circle is the cup mouth of the water storage container, and the second characteristic circle is the cup bottom of the water storage container.

[0074] Please also read Figure 5 , Figure 5 It is a scenario schematic diagram of a water output control method provided in an embodiment of the present application.

[0075] like Figure 5 As shown, when there are multiple pixel contours in the grayscale image, the area sizes of the multiple pixel contours are respectively obtained, and the first characteristic circle and the second characteristic circle are determined according to the area sizes of the pixel contours.

[0076] As can be seen from the above, by screening pixel contours to identify representative and accurate pixel contours, a reliable basis is provided for the subsequent characteristic circle fitting. By performing a circle fitting operation on the screened target pixel contours, the circle that best represents these pixel contours can be found. In order to further optimize the recognition speed of the characteristic circle, the pixel contours in an unclosed state in the pixel contour set are filtered, and the contour area of ​​the pixel contours in a closed state is obtained to determine the first target pixel contour and the second target pixel contour, and the first target pixel contour is determined as the first characteristic circle and the second target pixel contour is determined as the second characteristic circle, thereby further improving the recognition accuracy of the cup mouth and cup bottom of the water storage container.

[0077] Since the side wall of the water dispenser is made of mirror material, the surface image of the water storage container in the side wall will be acquired together in the regional image collected by the image acquisition device. At this time, the image of this part of the area is the interference area. In order to improve the image processing speed. Figure 6 , Figure 6 Schematic diagram of 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-S403.

[0078] S401, obtaining an initial grayscale image of the water storage container.

[0079] Specifically, when the water dispenser is in standby mode, the image acquisition device continuously captures image frames below the water outlet with low power consumption, and compares and analyzes continuous image frames frame by frame to detect whether there are feature changes between the current frame image and the previous frame image, especially those regional changes that may indicate that the water cup is placed in front of the water dispenser. Once the presence of container features is detected in the current frame image, the current frame image is converted into an initial grayscale image.

[0080] S402, determining an interference region image from the initial grayscale image.

[0081] S403, determining an image division range for the initial grayscale image based on the interference region image, and dividing the initial grayscale image based on the image division range to obtain a target grayscale image.

[0082] Specifically, in S402-S403, the relative position of the side ratio image of the water dispenser in the initial grayscale image is determined by a preset image processing algorithm, and the image division range is determined based on the relative position, and the initial grayscale image is divided based on the image division range to obtain a target grayscale image.

[0083] Please also read Figure 7 , Figure 7It is a scenario schematic diagram of a water output control method provided in an embodiment of the present application.

[0084] like Figure 7 As shown, Figure 7 As shown in the schematic diagram on the left, the area to the left of the dotted line in the initial grayscale image is the interference area image of the side wall. At this time, the image division range for the initial grayscale image is determined based on the dotted line. After dividing and deleting the interference area image on the left, the target grayscale image is obtained.

[0085] From the above, it can be seen that by determining the interference area image from the initial grayscale image, dividing and cropping the interference area image from the initial grayscale image, and then generating a target grayscale image, it is possible to focus more on the key information of the water storage container, reduce the time overhead caused by processing redundant data, and thus speed up the processing speed.

[0086] In order to further improve the precise control of water output by the water dispenser. Figure 8 , Figure 8 Schematic diagram of a flow chart of a water output control method provided in an embodiment of the present application. Figure 8 As shown, the method of the embodiment of the present application may include the following steps S501-S505.

[0087] S501: Acquire a first relative distance between a side boundary of a water dispenser and a first characteristic circle from an initial grayscale image.

[0088] S502: Determine height information of the water storage container and a first scale of the first characteristic circle according to the first relative distance, and determine a first area of ​​the first characteristic circle based on the first scale.

[0089] Specifically, in S501-S502, the side boundary is the intersection point of the image acquisition device on the side wall of the water dispenser, that is, the side wall framing intersection. In the initial grayscale image, the distance between the leftmost point of the first characteristic circle and the side wall framing intersection is measured to obtain the first relative distance.

[0090] The height information of the water storage container at the first relative distance is queried in the corresponding relationship database, and the actual scale of the first characteristic circle at the height information is queried, recorded as the first scale, and the actual area of ​​the cup mouth is determined based on the first scale, and recorded as the first area. For example, 5 mm of the cup mouth in the initial grayscale image is equal to 1 cm in the actual scene. For another example, the diameter of the cup mouth in the initial grayscale image is 2 cm, which is equal to 4 cm in the actual scene.

[0091] S503: Acquire a second relative distance between a lower boundary of the water dispenser and an image acquisition device of the water dispenser from the initial grayscale image.

[0092] S504: Determine a second scale of the second characteristic circle according to the second relative distance, and determine a second area of ​​the second characteristic circle based on the second scale.

[0093] Specifically, in S503-S504, the relative distance between the image acquisition device and the container tray of the water dispenser is obtained in advance, wherein the relative distance is a fixed distance. The relative distance is converted into the actual scale of the cup bottom of the water storage container, recorded as the second scale, and the actual area of ​​the second characteristic circle is determined according to the second scale, that is, the area of ​​the cup bottom of the water storage container, recorded as the second area.

[0094] S505: Determine the water volume of the water storage container based on the height information, the first area, and the second area.

[0095] Specifically, for example, the height information is 8 cm, the scale of the first characteristic circle is 1:2 (1 cm on each photo represents 2 cm in reality), and the scale of the second characteristic circle is 1:1.5 (1 cm on each photo represents 1.5 cm in reality). At this time, the scale of the first characteristic circle will be used to convert the height information into the actual height, that is, the height information is 8 cm×2=16 cm. For another example, assuming that the second characteristic circle on the target grayscale image photo is 4 cm and the first characteristic circle is 6 cm, then the second area corresponding to the second characteristic circle is 4 cm×1.5=6 cm, and the second area corresponding to the second characteristic circle is 6 cm×2=12 cm. According to the water volume calculation formula v=π×((6 cm+12 cm) / 2)^2×16 cm≈3600π cubic centimeters, the water volume of the water storage container is approximately equal to 3600π cubic centimeters.

[0096] Please also read Fig. 9 , Fig. 9 Schematic diagram of a water output control method provided in an embodiment of the present application. Fig. 9 As shown, the first relative distance is the relative distance between the side wall framing interface of the side wall and the left pixel point of the first characteristic circle, and the second relative distance is the relative distance between the image acquisition device and the container tray of the water dispenser.

[0097] As can be seen from the above, by measuring the first relative distance between the side boundary of the water dispenser and the first characteristic circle, the height information of the water storage container is determined, and the scale of the first characteristic circle is determined based on the height information, thereby accurately calculating its area. By measuring the second relative distance between the lower boundary of the water dispenser and the image acquisition device, the scale of the second characteristic circle is determined, so that the water volume of the water storage container can be accurately calculated to ensure that each water outlet can meet the needs of the user, thereby improving the user experience.

[0098] based on Figure 1 The system architecture will be combined with Fig.10, the water output control device provided in the embodiment of the present application is introduced in detail. It should be noted that, Fig.10 The water output control device is used to implement the present application Figure 2-Figure 8 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 8 In the embodiment shown, the water output control device 600 may include an image acquisition unit 601, a pixel fitting unit 602 and a control unit 603, as follows:

[0099] The image acquisition unit 601 is configured to acquire an initial grayscale image of the water storage container and perform feature filtering on the initial grayscale image to obtain a target grayscale image;

[0100] A pixel fitting unit 602 is configured to determine a pixel contour set from a target grayscale image, and perform contour fitting on a target pixel contour in the pixel contour set to determine a characteristic circle set of the water storage container;

[0101] The control unit 603 is configured to determine the water volume of the water storage container based on the characteristic circle set to obtain the single water output of the water dispenser for the water storage container, and generate a water output control instruction based on the single water output to control the water dispenser to output water to the water storage container.

[0102] In some embodiments, the receiving strategy detection unit 601 further includes an image acquisition unit and an image generation unit.

[0103] An acquisition unit is configured to respectively acquire a background image at the infusion port and a foreground image at the infusion port, wherein the background image is an image not including the container, and the foreground image is an image including the container;

[0104] The image generating unit is configured to generate a grayscale image based on the background image and the foreground image.

[0105] In some embodiments, the pixel fitting unit 602 further includes an edge detection unit and an image enhancement unit.

[0106] an edge detection unit configured to perform edge detection on the target grayscale image to determine a plurality of initial pixel contours;

[0107] The image enhancement unit is configured to convert the target grayscale image into a binary image, and perform contour enhancement processing on the initial pixel contour based on the binary image to generate a pixel contour set.

[0108] In some embodiments, the pixel fitting unit 602 further includes a first pixel processing unit.

[0109] The first pixel processing unit is configured to perform pixel expansion on each pixel in each initial pixel contour to connect each pixel with an adjacent pixel to generate a pixel contour set, wherein the adjacent pixel is a pixel having a grayscale value greater than a grayscale threshold and a relative distance less than a distance threshold.

[0110] In some embodiments, the pixel fitting unit 602 further includes a second pixel processing unit, a circle fitting unit, and a generating unit.

[0111] A second pixel processing unit is configured to screen each pixel contour in the pixel contour set to obtain a target pixel contour;

[0112] A circle fitting unit is configured to perform circle fitting on the target pixel contour to obtain a first characteristic circle and a second characteristic circle, wherein the first characteristic circle is larger than the second characteristic circle;

[0113] The generating unit is configured to generate a characteristic circle set based on the first characteristic circle and the second characteristic circle.

[0114] In some embodiments, the pixel fitting unit 602 further includes a filtering unit, a calculating unit, a target pixel contour acquiring unit, and a determining unit.

[0115] A filtering unit, configured to filter pixel contours in an unclosed state in the pixel contour set to obtain a plurality of pixel contours in a closed state;

[0116] A calculation unit, configured to obtain the contour area of ​​each pixel contour in a closed state;

[0117] a target pixel contour obtaining unit, configured to obtain a first target pixel contour and a second target pixel contour based on contour areas, wherein the contour area of ​​the first target pixel contour is greater than the contour area of ​​the second target pixel contour;

[0118] The determining unit is configured to determine the first target pixel contour as a first characteristic circle and determine the second target pixel contour as a second characteristic circle.

[0119] In some embodiments, the image acquisition unit 601 further includes an interference image determination unit and an image division unit.

[0120] an interference image determining unit, configured to determine an interference region image from an initial grayscale image;

[0121] The image division unit is configured to determine an image division range for the initial grayscale image based on the interference region image, and divide the initial grayscale image based on the image division range to obtain a target grayscale image.

[0122] In some embodiments, the image control unit 603 further includes a first relative distance determination unit, a first area determination unit, a first relative distance determination unit, a first area determination unit, and a water volume determination unit.

[0123] A first relative distance determination unit, configured to obtain a first relative distance between a side boundary of the water dispenser and a first characteristic circle from an initial grayscale image;

[0124] A first area determination unit is configured to determine the height information of the water storage container and a first scale of the first characteristic circle according to the first relative distance, and determine a first area of ​​the first characteristic circle based on the first scale;

[0125] A first relative distance determination unit is configured to obtain a second relative distance between a lower boundary of the water dispenser and an image acquisition device of the water dispenser from an initial grayscale image;

[0126] a first area determination unit, configured to determine a second scale of the second characteristic circle according to the second relative distance, and determine a second area of ​​the second characteristic circle based on the second scale;

[0127] The water volume determination unit is configured to determine the water volume of the water storage container based on the height information, the first area, and the second area.

[0128] In the embodiment of the present application, by acquiring the initial grayscale image and performing feature filtering, key information related to the water storage container can be accurately extracted to form a target grayscale image. By fitting the target pixel contour, the characteristic circle set of the water storage container is accurately determined. Based on these characteristic circles, the water volume of the water storage container can be quickly and accurately calculated, and the water output control instruction is generated accordingly to realize the automatic control of the water output of the water dispenser, thereby improving the user experience.

[0129] 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.

[0130] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. In some cases, the actions or steps recorded in the claims can 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 continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0131] See also Fig.11 , which is a schematic diagram of the structure of a water dispenser provided in an embodiment of the present application. Fig.11As shown, the water dispenser 700 includes a processor 601 and a memory 702. The processor 701 is electrically connected to the memory 702.

[0132] The processor 701 is the control center of the water dispenser 700 and may include one or more processing cores. The processor 701 uses various interfaces and lines to connect the various parts of the entire water dispenser, and executes various functions of the water dispenser and processes data by running or calling the computer program stored in the memory 702, and calling the data stored in the memory 702, so as to control the water dispenser as a whole. Optionally, the processor 701 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 701 may integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, the CPU mainly processes the operating system, user pages, and applications; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 701, but may be implemented separately through a communication chip.

[0133] The memory 702 can be used to store software programs and modules, and the processor 701 executes various functional applications and data processing by running the computer programs and modules stored in the memory 702. The memory 702 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, a computer program required for at least one function, etc.; the data storage area can store data created according to the use of the water dispenser, etc.

[0134] In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.

[0135] In the embodiment of the present application, the processor 701 in the water dispenser 700 will load the instructions corresponding to the processes of one or more computer programs into the memory 702 according to the following steps, and the processor 701 will run the computer program stored in the memory 702 to implement various functions, as follows: obtain an initial grayscale image of the water storage container, and perform feature filtering on the initial grayscale image to obtain a target grayscale image; determine a pixel contour set from the target grayscale image, and perform contour fitting on the target pixel contour in the pixel contour set to determine a characteristic circle set of the water storage container; determine the water volume of the water storage container based on the characteristic circle set to obtain a single water output of the water dispenser for the water storage container, and generate a water output control instruction based on the single water output to control the water dispenser to output water to the water storage container.

[0136] Optionally, the processor 701 performs contour enhancement processing on the initial pixel contour based on the binary image to generate a pixel contour set, specifically performing: pixel expansion on each pixel in each initial pixel contour to connect each pixel with adjacent pixels to generate a pixel contour set, where the adjacent pixels are pixels whose grayscale value is greater than a grayscale threshold and whose relative distance is less than a distance threshold.

[0137] Optionally, the processor 701 performs contour fitting on the target pixel contour in the pixel contour set to determine the characteristic circle set of the water storage container, specifically performing: screening each pixel contour in the pixel contour set to obtain the target pixel contour; performing circle fitting on the target pixel contour to obtain a first characteristic circle and a second characteristic circle, the first characteristic circle being larger than the second characteristic circle; and generating a characteristic circle set based on the first characteristic circle and the second characteristic circle.

[0138] Optionally, the processor 701 performs screening of each pixel contour in the pixel contour set to obtain a target pixel contour, specifically performing: filtering the pixel contours in an unclosed state in the pixel contour set to obtain a plurality of pixel contours in a closed state; obtaining the contour area of ​​each pixel contour in a closed state; obtaining a first target pixel contour and a second target pixel contour based on the contour area, the contour area of ​​the first target pixel contour being greater than the contour area of ​​the second target pixel contour; determining the first target pixel contour as a first characteristic circle and determining the second target pixel contour as a second characteristic circle.

[0139] Optionally, the processor 701 performs feature filtering on the initial grayscale image to obtain a target grayscale image, specifically performing the following steps: determining an interference area image from the initial grayscale image; determining an image division range for the initial grayscale image based on the interference area image, and dividing the initial grayscale image based on the image division range to obtain a target grayscale image.

[0140] Optionally, when the processor 701 determines the water volume of the water storage container based on the feature circle set, the following specifically executes: obtaining a first relative distance between the side boundary of the water dispenser and the first feature circle from an initial grayscale image; determining height information of the water storage container and a first scale of the first feature circle based on the first relative distance, and determining a first area of ​​the first feature circle based on the first scale; obtaining a second relative distance between the lower boundary of the water dispenser and an image acquisition device of the water dispenser from the initial grayscale image; determining a second scale of the second feature circle based on the second relative distance, and determining a second area of ​​the second feature circle based on the second scale; and determining the water volume of the water storage container based on the height information, the first area, and the second area.

[0141] In the embodiment of the present application, by acquiring the initial grayscale image and performing feature filtering, key information related to the water storage container can be accurately extracted to form a target grayscale image. By fitting the target pixel contour, the characteristic circle set of the water storage container is accurately determined. Based on these characteristic circles, the water volume of the water storage container can be quickly and accurately calculated, and the water output control instruction is generated accordingly to realize the automatic control of the water output of the water dispenser, thereby improving the user experience.

[0142] 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 device control method provided in the above embodiment.

[0143] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a device control method provided in the above-mentioned embodiment.

[0144] The 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 device control method provided by the above-mentioned embodiment.

[0145] 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.

[0146] 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 assigned to 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.

[0147] In the embodiments provided in the present 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 only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, 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.

[0148] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A water output control method, applied to a water dispenser, the method comprising: Acquire an initial grayscale image of the water storage container, and perform feature filtering on the initial grayscale image to obtain a target grayscale image; Determine a pixel contour set from the target grayscale image, and perform contour fitting on the target pixel contour in the pixel contour set to determine a characteristic circle set of the water storage container; The water volume of the water storage container is determined based on the characteristic circle set to obtain the single water output of the water dispenser for the water storage container, and a water output control instruction is generated based on the single water output to control the water dispenser to output water to the water storage container.

2. The method according to claim 1, wherein: Determining a pixel contour set from the target grayscale image comprises: Performing edge detection on the target grayscale image to determine a plurality of initial pixel contours; The target grayscale image is converted into a binary image, and the initial pixel contour is subjected to contour enhancement processing based on the binary image to generate the pixel contour set.

3. The method according to claim 2, wherein: The performing contour enhancement processing on the initial pixel contour based on the binary image to generate the pixel contour set includes: Pixel dilation is performed on each pixel in each of the initial pixel contours to connect each of the pixels with adjacent pixels to generate the pixel contour set, wherein the adjacent pixels are pixels whose grayscale values ​​are greater than a grayscale threshold and whose relative distances are less than a distance threshold.

4. The method according to claim 1, wherein: The step of performing contour fitting on the target pixel contour in the pixel contour set to determine the characteristic circle set of the water storage container comprises: Screening each of the pixel contours in the pixel contour set to obtain the target pixel contour; Performing circle fitting on the target pixel contour to obtain a first characteristic circle and a second characteristic circle, wherein the first characteristic circle is larger than the second characteristic circle; The characteristic circle set is generated based on the first characteristic circle and the second characteristic circle.

5. The method according to claim 4, wherein: The step of screening each pixel contour in the pixel contour set to obtain the target pixel contour includes: Filtering the pixel contours in an unclosed state in the pixel contour set to obtain a plurality of pixel contours in a closed state; Acquire the contour area of ​​each of the pixel contours in the closed state; Based on the contour area, obtaining a first target pixel contour and a second target pixel contour, wherein the contour area of ​​the first target pixel contour is greater than the contour area of ​​the second target pixel contour; The first target pixel outline is determined as the first characteristic circle and the second target pixel outline is determined as a second characteristic circle.

6. The method according to claim 1, wherein: The step of performing feature filtering on the initial grayscale image to obtain a target grayscale image includes: Determining an interference region image from the initial grayscale image; An image division range for the initial grayscale image is determined based on the interference region image, and the initial grayscale image is divided based on the image division range to obtain the target grayscale image.

7. The method according to any one of claims 1 to 6, wherein: The step of determining the water volume of the water storage container based on the characteristic circle set includes: Acquire a first relative distance between a side boundary of the water dispenser and the first characteristic circle from the initial grayscale image; Determine the height information of the water storage container and a first scale of the first characteristic circle according to the first relative distance, and determine a first area of ​​the first characteristic circle based on the first scale; Acquire a second relative distance between a lower boundary of the water dispenser and an image acquisition device of the water dispenser from the initial grayscale image; determining a second scale of the second characteristic circle according to the second relative distance, and determining a second area of ​​the second characteristic circle based on the second scale; The water volume of the water storage container is determined based on the height information, the first area, and the second area.

8. A water output control device, wherein: include: An image acquisition unit is configured to acquire an initial grayscale image of the water storage container, and perform feature filtering on the initial grayscale image to obtain a target grayscale image; A pixel fitting unit is configured to determine a pixel contour set from the target grayscale image, and perform contour fitting on the target pixel contour in the pixel contour set to determine a characteristic circle set of the water storage container; The control unit is configured to determine the water volume of the water storage container based on the characteristic circle set to obtain a single water output of the water dispenser for the water storage container, and generate a water output control instruction based on the single water output to control the water dispenser to output water to the water storage container.

9. A water dispenser, wherein: The water dispenser 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 water dispenser executes the control method of the drinking water equipment as described in any one of claims 1 to 7.

10. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, the control method of the drinking water device according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Intelligent control system for water yield of water purifier

    CN121028618A

  • Intelligent control system for water output of water purifier

    CN121028618B

  • Water dispenser, water dispensing volume control method and apparatus, device control method and apparatus, and storage medium

    WO2026021218A1