Range hood control method, device and system and medium
By collecting image data in front of the range hood and performing segmentation and rotation processing, the air volume level is automatically adjusted, solving the inconvenience of manual adjustment when the amount of oil smoke suddenly increases, and improving the user experience.
Patent Information
- Application Number
- CN202310998865.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2025-02-25
AI Technical Summary
When the amount of oil smoke suddenly increases while the user is cooking, the air volume level set when the range hood is turned on cannot be discharged in time and needs to be adjusted manually, causing inconvenience in use.
By installing a camera in front of the range hood to collect image data, the image segmentation algorithm is used to separate the face image and the background image, the rotation direction is determined based on the three primary colors of the background image, the face image is rotated, and the data is sent to the server for restoration and analysis, and the range hood adjustment instructions are generated to automatically adjust the air volume level.
It enables timely adjustment of the range hood air volume level without the need for manual operation by the user, thereby improving the user experience.
Smart Images

Figure CN119516584A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart home appliances, and in particular to a control method, device, system and medium for a range hood. Background Art
[0002] With the improvement of living standards, range hoods have become essential household appliances in daily life. Currently, range hoods are mainly controlled to turn on by human touch or sensing the corresponding position of human hands approaching the range hood, and to control the range hood to adjust the air volume level, etc., so as to discharge the fumes generated by users during cooking as soon as possible.
[0003] However, when users are cooking, there may be a sudden increase in oil smoke, and the air volume level set when the range hood is turned on cannot completely exhaust all the oil smoke at this time, resulting in the user having to manually adjust the air volume level during cooking, which brings great inconvenience to the user. Summary of the invention
[0004] In order to solve the above-mentioned problem, that is, when the user is cooking and the oil smoke suddenly increases, the air volume level set when the cooker is turned on cannot discharge the oil smoke in time, and the user needs to manually adjust the air volume level during cooking, thereby causing great inconvenience to the user. The present application provides a control method, device, system and medium for a range hood.
[0005] In a first aspect, an embodiment of the present application provides a control method for a range hood, the method comprising:
[0006] When the range hood is in working state, collecting and acquiring image data in front of the range hood;
[0007] If the image data includes a face image, segment the image data using an image segmentation algorithm to obtain a face image and a background image in the image data respectively, and divide the pixels in the face image according to a preconfigured pixel division strategy to obtain multiple groups of pixels;
[0008] Determine a rotation direction based on the three primary colors of each pixel in the background image, and perform rotation processing on each group of pixels according to the rotation direction;
[0009] Sending the rotated face image and the rotation direction to the server, so that the server can restore the rotated face image based on the preconfigured pixel point division strategy and the rotation direction, and analyze the restored face image to determine whether to generate a range hood adjustment instruction;
[0010] When the range hood adjustment instruction fed back by the server is received, the range hood is adjusted accordingly based on the range hood adjustment instruction.
[0011] In the above-mentioned preferred technical solution of the range hood control method, the pixel points in the face image are divided according to the preconfigured pixel point division strategy to obtain multiple groups of pixel points, including:
[0012] The pixel points in the face image are divided into a group of three pre-configured pixels to obtain a plurality of groups of pixels.
[0013] In the preferred technical solution of the control method of the range hood described above, the determining of the rotation direction based on the three primary colors of each pixel in the background image includes:
[0014] If the sum of the values of the three primary colors of each pixel in the background image is divisible by 3 with a remainder of 0, then the rotation direction is determined to be 90 degrees;
[0015] or,
[0016] If the sum of the values of the three primary colors of each pixel in the background image is divisible by 3 with a remainder of 1, then the rotation direction is determined to be 180 degrees;
[0017] or,
[0018] If the sum of the values of the three primary colors of each pixel in the background image is divisible by 3 with a remainder of 2, it is determined that the rotation direction is 270 degrees.
[0019] In the preferred technical solution of the above-mentioned range hood control method, the method comprises:
[0020] Obtaining the rotation direction and the rotated face image sent by the range hood;
[0021] According to the pre-configured pixel division strategy and rotation direction, the rotated face image is restored;
[0022] The restored facial image is analyzed and processed, and when it is determined that a range hood adjustment instruction is generated, the range hood adjustment instruction is sent to the range hood, so that the range hood performs corresponding adjustment processing on the range hood according to the range hood adjustment instruction.
[0023] In the preferred technical solution of the control method of a range hood described above, the restoring process of the rotated face image according to the preconfigured pixel point division strategy and rotation direction includes:
[0024] According to the pre-configured three pixel points as a group, the pixel points in the rotated face image are divided and processed to obtain multiple groups of pixel points;
[0025] According to the rotation direction, each group of pixels is restored to obtain a restored face image.
[0026] In the preferred technical solution of the control method of a range hood described above, the analyzing and processing the restored facial image and, when determining to generate a range hood adjustment instruction, sending the range hood adjustment instruction to the range hood comprises:
[0027] Analyzing and processing the restored facial image to determine whether the facial expression of the human face in the facial image is an expression stimulated by oil smoke;
[0028] If yes, determining whether the current air volume level of the range hood is the highest air volume level;
[0029] If it is determined that the current air volume level of the range hood is not the highest air volume level, a range hood adjustment instruction for increasing the air volume level of the range hood is generated, and the range hood adjustment instruction is sent to the range hood.
[0030] In a second aspect, an embodiment of the present application provides a range hood, comprising:
[0031] An acquisition module, used for collecting and acquiring image data in front of the range hood when the range hood is in working state;
[0032] a processing module, configured to, if the image data includes a face image, segment the image data using an image segmentation algorithm to obtain a face image and a background image in the image data respectively, and to segment the pixels in the face image according to a preconfigured pixel segmentation strategy to obtain a plurality of groups of pixels;
[0033] The processing module is further used to determine the rotation direction based on the three primary colors of each pixel in the background image; and perform rotation processing on each group of pixels according to the rotation direction;
[0034] The processing module is further used to send the rotated face image and the rotation direction to the server, so that the server can restore the rotated face image based on the preconfigured pixel point division strategy and the rotation direction, and analyze the restored face image to determine whether to generate a range hood adjustment instruction;
[0035] The processing module is further configured to, upon receiving a range hood adjustment instruction fed back by the server, perform corresponding adjustment processing on the range hood based on the range hood adjustment instruction.
[0036] In a third aspect, an embodiment of the present application provides a server, including:
[0037] A receiving module, used for acquiring the rotation direction and the rotated face image sent by the range hood;
[0038] An analysis module, used for restoring the rotated face image according to a preconfigured pixel point division strategy and rotation direction;
[0039] The analysis module is also used to analyze and process the restored facial image, and when determining to generate a range hood adjustment instruction, send the range hood adjustment instruction to the range hood, so that the range hood can perform corresponding adjustment processing on the range hood according to the range hood adjustment instruction.
[0040] In a fourth aspect, an embodiment of the present application provides a range hood system, comprising: a range hood and a server, wherein the range hood is used to execute a range hood control method as described in any one of the first aspects; and the server is used to execute a range hood control method as described in any one of the first aspects.
[0041] In a fifth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, a control method for a range hood as described in any one of the first aspects is implemented.
[0042] It can be understood by those skilled in the art that the present application provides a control method, device, system and medium for a range hood, and the method is specifically as follows: first, when the range hood is in a working state, image data in front of the range hood is collected and acquired; if the image data includes a face image, the image data is segmented using an image segmentation algorithm to respectively acquire a face image and a background image in the image data, and the pixels in the face image are segmented according to a preconfigured pixel division strategy to acquire multiple groups of pixels; secondly, the rotation direction is determined based on the three primary colors of each pixel in the background image; direction; and according to the rotation direction, each group of pixels is rotated respectively, and the rotated face image and the rotation direction are sent to the server, so that the server can restore the rotated face image based on the preconfigured pixel division strategy and rotation direction, and perform analysis based on the restored face image to determine whether to generate a range hood adjustment instruction; finally, when the range hood adjustment instruction is received from the server, the range hood is adjusted accordingly based on the range hood adjustment instruction, so that the oil smoke can be discharged in time without the user manually adjusting the air volume level, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The following describes a preferred embodiment of a range hood control method, device, system and medium of the present application with reference to the accompanying drawings, which are as follows:
[0044] Figure 1 A schematic structural diagram of a range hood embodiment 1 provided in the present application;
[0045] Figure 2 A schematic flow chart of a first embodiment of a range hood control method provided in an embodiment of the present application;
[0046] Figure 3 A schematic flow chart of a second embodiment of a range hood control method provided in an embodiment of the present application;
[0047] Figure 4 A schematic flow chart of a third embodiment of a range hood control method provided in an embodiment of the present application;
[0048] Figure 5 A schematic flow chart of a fourth embodiment of a range hood control method provided in an embodiment of the present application;
[0049] Figure 6 A flowchart of a fifth embodiment of a range hood control method provided in an embodiment of the present application;
[0050] Figure 7A schematic structural diagram of a range hood embodiment 2 provided in the present application;
[0051] Figure 8 A schematic diagram of the structure of a server embodiment 1 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] First, those skilled in the art should understand that these implementations are only used to explain the technical principles of the present application and are not intended to limit the scope of protection of the present application. Those skilled in the art can make adjustments to them as needed to adapt to specific application scenarios.
[0053] Secondly, it should be noted that in the description of the embodiments of the present application, terms such as "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description, and does not indicate or imply that the device or component must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present application.
[0054] In addition, it should be noted that in the description of the embodiments of the present application, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0056] In the prior art, when a user is cooking in the kitchen and the oil smoke suddenly increases, the oil smoke cannot be discharged in time according to the gear set when the range hood is started. At this time, the user needs to manually adjust the gear of the range hood. However, the user is holding food and kitchen utensils in his hands and cannot operate the range hood in time, causing the user to be choked by the oil smoke, which in turn causes a poor user experience.
[0057] Based on the above problems, the inventive concept of the present application is: how to provide a new control method for a range hood so as to discharge the oil smoke in time without manual operation by the user.
[0058] Figure 1 A schematic diagram of the structure of a range hood embodiment 1 provided in the present application is shown in FIG. Figure 1 As shown, the range hood system mainly includes: a range hood 11 and a server 12.
[0059] Specifically, the range hood 11 sends the rotated face image and the rotation direction to the server 12, so that the server 12 can restore the rotated face image based on the configured pixel point division strategy and the rotation direction, and analyze the restored face image to determine whether to generate a range hood adjustment instruction. When the server 12 determines to generate a range hood adjustment instruction, it sends the range hood adjustment instruction to the range hood 11, so that the range hood 11 can perform corresponding adjustment processing.
[0060] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0061] Figure 2 A flow chart of a control method for a range hood provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the execution subject of this embodiment is a range hood, and the method includes the following steps:
[0062] Step S201: when the range hood is in operation, image data in front of the range hood is collected and acquired.
[0063] In this embodiment, for example, a camera is installed in the front of the range hood. When the range hood is started, the camera is used to collect image data in front of the range hood every 2 seconds.
[0064] Step S202: If the image data includes a face image, the image data is segmented using an image segmentation algorithm to separately obtain the face image and the background image in the image data, and the pixels in the face image are divided according to a preconfigured pixel division strategy to obtain multiple groups of pixels.
[0065] In this embodiment, for example, a face classification algorithm is used to determine whether the image data includes a face image. If it is determined that the image data includes a face image, a pre-trained U-Net network is used to obtain the face image and background image in the image data.
[0066] Step S203: Determine the rotation direction based on the three primary colors of each pixel in the background image, and perform rotation processing on each group of pixels according to the rotation direction.
[0067] In this embodiment, for example, the rotation direction of the face image can be determined based on the values corresponding to the three primary colors of red, green, and blue for each pixel in the background image. The rotation direction can include rotating 90 degrees (clockwise or counterclockwise), 180 degrees (clockwise or counterclockwise), and 270 degrees (clockwise or counterclockwise), and then each group of pixels is rotated according to the rotation direction.
[0068] In addition, in order to improve the security of transmission, the facial image will not be rotated as a whole in this application, but will be rotated according to the center of each group of pixels after division, and then the rotated pixels will be combined to form a rotated facial image, thereby effectively improving the security of transmission.
[0069] Step S204: Send the rotated facial image and the rotation direction to the server, so that the server can restore the rotated facial image based on the preconfigured pixel division strategy and rotation direction, and analyze the restored facial image to determine whether to generate a range hood adjustment instruction.
[0070] In this embodiment, the server rotates the rotated face image in the opposite direction of the rotation direction based on a preconfigured pixel division strategy, thereby obtaining a restored face image.
[0071] Step S205: upon receiving the range hood adjustment instruction fed back by the server, corresponding adjustment processing is performed on the range hood based on the range hood adjustment instruction.
[0072] In this embodiment, first, when the range hood is in working state, image data in front of the range hood is collected and acquired. If the image data includes a face image, the image data is segmented by using an image segmentation algorithm to separately acquire the face image and the background image in the image data, and the pixels in the face image are divided according to a preconfigured pixel division strategy to acquire multiple groups of pixels. Secondly, based on the three primary colors of each pixel in the background image, a rotation direction is determined, and according to the rotation direction, each pixel in each group of pixels is rotated respectively, and the rotated face image and the rotation direction are sent to the server, so that the server can restore the rotated face image based on the preconfigured pixel division strategy and the rotation direction, and analyze the restored face image to determine whether to generate a range hood adjustment instruction. Finally, when the range hood adjustment instruction fed back by the server is received, the range hood is adjusted accordingly based on the range hood adjustment instruction. Compared with the prior art that requires manual adjustment of the range hood air volume level when the oil smoke suddenly increases, the present application segments the collected image data to obtain a face image and a background image, and divides the pixels in the face image according to a preconfigured pixel division strategy to obtain multiple groups of pixels, and then determines the rotation direction based on the three primary colors of each pixel of the background image, and then rotates each pixel in each group of pixels according to the rotation direction, and sends the rotated face image and rotation direction to the server, so that upon receiving the range hood adjustment instruction generated by the server based on the rotated face image, the range hood can be adjusted accordingly. This can not only effectively ensure the security of face data transmission, but also effectively realize automatic adjustment of the range hood level, thereby increasing user convenience and improving user experience.
[0073] Figure 3 The flowchart of the second embodiment of the control method of a range hood provided in the present application is based on the above embodiment. Figure 3 As shown, specifically, a specific implementation of step S202 is:
[0074] Step S301: dividing the pixels in the face image into a group of three pre-configured pixels to obtain a plurality of groups of pixels.
[0075] In this embodiment, for example, the facial image is divided into a group of three pixels in each vertical row from top to bottom and from left to right. If the remaining vertical row of pixels is less than three pixels, no grouping is performed.
[0076] It should be noted that, in this application, only three pixels are used as a group for explanation, but it is not limited to this division method, and the pixels in the face image can also be divided and processed based on other numbers of division methods.
[0077] Accordingly, a specific implementation method of determining the rotation direction based on the three primary colors of each pixel in the background image in step S203 is:
[0078] Step S302: If the sum of the values of the three primary colors of each pixel in the background image is divisible by 3 with a remainder of 0, the rotation direction is determined to be 90 degrees.
[0079] or,
[0080] Step S302: if the sum of the values of the three primary colors of each pixel in the background image is divisible by 3 with a remainder of 1, then the rotation direction is determined to be 180 degrees;
[0081] or,
[0082] Step S302: If the sum of the values of the three primary colors of each pixel in the background image is divisible by 3 with a remainder of 2, it is determined that the rotation direction is 270 degrees.
[0083] In this embodiment, for example, the red, green, and blue values of each pixel in the background image are added to obtain the sum of the pixel values, and then the sum of the pixel values is divided by 3 to obtain a remainder. If the remainder is 0, the rotation direction is determined to be 90 degrees clockwise; if the remainder is 1, the rotation direction is determined to be 180 degrees clockwise; if the remainder is 2, the rotation direction is determined to be 270 degrees clockwise.
[0084] It should be noted that the present application only provides an exemplary solution for determining the rotation direction, but is not limited to this rotation direction determination. It is also possible to obtain the remainder based on the sum of pixel values being divided by a preset threshold, and determine different rotation directions and rotation angles based on the remainder.
[0085] In this embodiment, first, the remainder is obtained by dividing the sum of the values of the three primary colors of each pixel in the background image by 3. If the remainder is 0, the rotation direction is determined to be 90 degrees; if the remainder is 1, the rotation direction is determined to be 180 degrees; if the remainder is 2, the rotation direction is determined to be 270 degrees, and then the pixels in the face image are divided and processed according to the pre-configured three pixels as a group to obtain multiple groups of pixels. This application obtains the remainder by dividing the sum of the values of the three primary colors of each pixel in the background image by 3, and determines the rotation angle through the remainder, and then divides the pixels in the face image according to the pre-configured three pixels as a group to obtain multiple groups of pixels, so as to realize the rotation of the image data, ensure the data security of the user, and further ensure that the privacy of the user is not leaked.
[0086] Figure 4 A flow chart of a third embodiment of a range hood control method provided in the present application is shown in FIG. Figure 4 As shown, the execution subject of this embodiment is a server, and the method includes the following steps:
[0087] Step S401: Obtain the rotation direction sent by the range hood and the face image after rotation processing.
[0088] In this embodiment, for example, the server receives the rotation direction and the rotated face image sent by the range hood, and saves the rotation direction and the rotated face image into a database.
[0089] Step S402: restore the rotated face image according to the preconfigured pixel division strategy and rotation direction.
[0090] In this embodiment, for example, according to the preconfigured pixel division strategy, the rotated image and the rotation direction are retrieved from the database, and then the rotated face image is processed in the opposite direction of the rotation direction to obtain a restored face image.
[0091] Step S403: Analyze and process the restored facial image, and when determining to generate a range hood adjustment instruction, send the range hood adjustment instruction to the range hood, so that the range hood can perform corresponding adjustment processing on the range hood according to the range hood adjustment instruction.
[0092] In this embodiment, for example, the server analyzes and processes the restored facial image to determine whether to raise the gear, lower the gear, or keep it unchanged, and sends the generated range hood adjustment instruction to the range hood so that the range hood can make corresponding adjustments to the range hood according to the range hood adjustment instruction.
[0093] In this embodiment, the rotation direction and the facial image after rotation processing sent by the range hood are first obtained, and then the facial image after rotation processing is restored according to the preconfigured pixel point division strategy and rotation direction, and finally the facial image after restoration processing is analyzed and processed, and when it is determined to generate a range hood adjustment instruction, the range hood adjustment instruction is sent to the range hood, so that the range hood can perform corresponding adjustment processing on the range hood according to the range hood adjustment instruction. In this embodiment, the rotation direction and the facial image after rotation processing are obtained, and the facial image after rotation processing is restored according to the preconfigured pixel point division strategy and rotation direction, and the restored facial image is analyzed and processed, and then the range hood adjustment instruction is generated according to the result of the analysis and processing, and the range hood adjustment instruction is sent to the range hood, so that the range hood can perform corresponding adjustment processing on the range hood according to the range hood adjustment instruction, so as to realize the automatic adjustment of the gear of the range hood on the basis of ensuring the safe transmission of the user's facial image, and improve the convenience of the user in using the range hood.
[0094] Figure 5 The flowchart of the fourth embodiment of the control method of a range hood provided in the present application is based on the above embodiment. Figure 5 As shown, specifically, a specific implementation of step S402 is:
[0095] Step S501: dividing the pixels in the rotated face image into a group of three pre-configured pixels to obtain a plurality of groups of pixels.
[0096] In this embodiment, for example, if the rotation direction is 180 degrees, the face image is grouped into three pixels in each vertical row from top to bottom and from left to right. If the remaining pixels are less than three pixels, no grouping is performed.
[0097] Step S502: performing restoration processing on each group of pixels according to the rotation direction to obtain a restored face image.
[0098] In this embodiment, according to the rotation direction, each group of pixel points is rotated in the opposite direction of the rotation direction, and each group of pixel points after rotation is combined to obtain a restored face image.
[0099] In this embodiment, the pixels in the rotated face image are first divided into a group of three pre-configured pixels to obtain a plurality of groups of pixels, and then each group of pixels is restored according to the rotation direction to obtain a restored face image. In this embodiment, the pixels in the rotated face image are divided into a group of three pre-configured pixels to obtain a plurality of groups of pixels, and then each group of pixels is restored according to the rotation direction to obtain a restored face image, thereby restoring the encrypted face image and ensuring the security of the face image data during transmission, thereby ensuring that the user's privacy is not leaked.
[0100] Figure 6 The flowchart of the fifth embodiment of the control method of a range hood provided in the present application is based on the above embodiment. Figure 6 As shown, specifically, a specific implementation of step S403 is:
[0101] Step S601: Analyze and process the restored facial image to determine whether the facial expression in the facial image is an expression stimulated by oil smoke.
[0102] In this embodiment, for example, the restored facial image is input into a pre-trained facial expression recognition model to obtain a recognition result, and through the recognition result, it is determined whether the facial expression in the facial expression is an expression stimulated by oil smoke.
[0103] Step S602: If yes, determine whether the current air volume level of the range hood is the highest air volume level.
[0104] In this embodiment, for example, if the current facial expression is frowning or covering the mouth and nose, it is an expression of being irritated by oil smoke, and then the server sends a gear query command to the range hood. After receiving the gear query command, the range hood sends the current gear information to the server, so that the server can determine whether the current air volume gear of the range hood is the highest air volume gear.
[0105] Step S603: if it is determined that the current air volume level of the range hood is not the highest air volume level, a range hood adjustment instruction for increasing the air volume level of the range hood is generated, and the range hood adjustment instruction is sent to the range hood.
[0106] In this embodiment, for example, if it is determined that the current air volume level of the range hood is a low air volume level, a hood adjustment instruction for increasing the air volume level of the range hood is generated, and the hood adjustment instruction is sent to the range hood. After receiving the hood adjustment instruction, the range hood increases the air volume level to a medium air volume level.
[0107] In this embodiment, the facial image after restoration processing is first analyzed and processed to determine whether the facial expression of the human face in the facial image belongs to the expression of being stimulated by oil fume. If so, it is determined whether the current air volume gear of the range hood is the highest air volume gear. If it is determined that the current air volume gear of the range hood is not the highest air volume gear, a range hood adjustment instruction for increasing the air volume gear of the range hood is generated, and the range hood adjustment instruction is sent to the range hood. In this embodiment, the facial image after restoration processing is analyzed and processed to determine whether the facial expression of the human face in the facial image belongs to the expression of being stimulated by oil fume. If so, it is determined whether the current air volume gear of the range hood is the highest air volume gear. If it is determined that the current air volume gear of the range hood is not the highest air volume gear, a range hood adjustment instruction for increasing the air volume gear of the range hood is generated, and the range hood adjustment instruction is sent to the range hood, so as to realize automatic adjustment of the range hood gear according to the facial expression, thereby improving the convenience of users in using the range hood.
[0108] Figure 7 This is a schematic diagram of the structure of a range hood embodiment 2 provided in the present application. Figure 7 As shown, the range hood includes: an acquisition module 71 and a processing module 72 .
[0109] Specifically, the acquisition module 71 is used to collect and obtain image data in front of the range hood when the range hood is in working state. The processing module 72 is used to use the image segmentation algorithm to segment the image data if the image data includes a face image, so as to obtain the face image and the background image in the image data respectively, and to divide the pixels in the face image according to the pre-configured pixel division strategy to obtain multiple groups of pixels. The processing module 72 is also used to determine the rotation direction based on the three primary colors of each pixel in the background image, and to rotate each group of pixels according to the rotation direction. The processing module 72 is also used to send the rotated face image and the rotation direction to the server, so that the server can restore the rotated face image based on the pre-configured pixel division strategy and the rotation direction, and analyze and process the restored face image to determine whether to generate a range hood adjustment instruction. The processing module 72 is also used to adjust the range hood accordingly based on the range hood adjustment instruction when receiving the range hood adjustment instruction fed back by the server.
[0110] In this embodiment, the range hood can be used to execute a range hood control method provided by any of the above embodiments. The specific implementation method and technical effect are similar and will not be described in detail here.
[0111] Figure 8 A schematic diagram of the structure of a server embodiment 1 provided in the embodiment of the present application, such as Figure 8As shown, the server includes: a receiving module 81 and an analyzing module 82.
[0112] Specifically, the receiving module 81 is used to obtain the rotation direction and the rotated face image sent by the range hood. The analyzing module 82 is used to restore the rotated face image according to the preconfigured pixel point division strategy and the rotation direction. The analyzing module 82 is also used to analyze and process the restored face image, and when determining to generate a range hood adjustment instruction, send the range hood adjustment instruction to the range hood, so that the range hood can perform corresponding adjustment processing on the range hood according to the range hood adjustment instruction.
[0113] In this embodiment, the server can be used to execute a range hood control method provided by any of the above embodiments. The specific implementation method and technical effect are similar and will not be described in detail here.
[0114] The present application also provides a computer-readable storage medium having a computer program stored thereon. When a processor executes the computer program, the above-mentioned range hood control method is implemented.
[0115] The computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The computer-readable storage medium may be any available medium that can be accessed by a general or special purpose computer.
[0116] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0117] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0119] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0120] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0121] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0122] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A range hood control method, characterized in that: include: When the range hood is in operation, collecting and acquiring image data in front of the range hood; If the image data includes a face image, segmenting the image data using an image segmentation algorithm to separately obtain a face image and a background image in the image data, and dividing the pixels in the face image according to a preconfigured pixel segmentation strategy to obtain multiple groups of pixels; Determine a rotation direction based on the three primary colors of light of each pixel in the background image, and perform rotation processing on each group of pixels according to the rotation direction; Sending the rotated facial image and the rotation direction to a server, so that the server can restore the rotated facial image based on the preconfigured pixel division strategy and the rotation direction, and analyze the restored facial image to determine whether to generate a range hood adjustment instruction; When the range hood adjustment instruction fed back by the server is received, the range hood is adjusted accordingly based on the range hood adjustment instruction.
2. The method according to claim 1, characterized in that The pixel points in the face image are divided according to a preconfigured pixel division strategy to obtain multiple groups of pixel points, including: The pixels in the face image are divided into a group of three pre-configured pixels to obtain a plurality of groups of pixels.
3. The method according to claim 2, characterized in that The determining of the rotation direction based on the three primary colors of light of each pixel in the background image includes: If the sum of the values of the three primary colors of each pixel in the background image is divisible by 3 with a remainder of 0, then the rotation direction is determined to be 90 degrees; or, If the sum of the values of the three primary colors of each pixel in the background image is divisible by 3 with a remainder of 1, then the rotation direction is determined to be 180 degrees; or, If the sum of the values of the three primary colors of each pixel in the background image is divisible by 3 with a remainder of 2, the rotation direction is determined to be 270 degrees.
4. A range hood control method, characterized in that: include: Obtaining the rotation direction and the rotated facial image sent by the range hood; Restore the rotated face image according to the pre-configured pixel division strategy and rotation direction; The restored facial image is analyzed and processed, and when it is determined that a range hood adjustment instruction is generated, the range hood adjustment instruction is sent to the range hood, so that the range hood performs corresponding adjustment processing on the range hood according to the range hood adjustment instruction.
5. The method according to claim 4, characterized in that The restoring process of the rotated face image according to the preconfigured pixel division strategy and rotation direction includes: Divide the pixels in the rotated face image into a group of three pre-configured pixels to obtain multiple groups of pixels; According to the rotation direction, each group of pixels is restored to obtain a restored face image.
6. The method according to claim 5, characterized in that The analyzing and processing the restored facial image and, when determining to generate a range hood adjustment instruction, sending the range hood adjustment instruction to the range hood, comprises: Analyzing and processing the restored facial image to determine whether the facial expression of the person in the facial image is an expression stimulated by oil smoke; If yes, determining whether the current air volume level of the range hood is the highest air volume level; If it is determined that the current air volume level of the range hood is not the highest air volume level, a range hood adjustment instruction for increasing the air volume level of the range hood is generated, and the range hood adjustment instruction is sent to the range hood.
7. A range hood, characterized in that: include: an acquisition module, configured to collect image data in front of the range hood when the range hood is in operation; a processing module configured to, if the image data includes a facial image, segment the image data using an image segmentation algorithm to separately obtain a facial image and a background image from the image data, and to divide the pixels in the facial image according to a preconfigured pixel segmentation strategy to obtain a plurality of groups of pixels; The processing module is further configured to determine a rotation direction based on the three primary colors of light of each pixel in the background image, and perform rotation processing on each group of pixels according to the rotation direction; The processing module is further configured to send the rotated facial image and the rotation direction to the server, so that the server can restore the rotated facial image based on the preconfigured pixel division strategy and rotation direction, and perform analysis based on the restored facial image to determine whether to generate a range hood adjustment instruction. The processing module is further configured to, upon receiving the range hood adjustment instruction fed back by the server, perform corresponding adjustment processing on the range hood based on the range hood adjustment instruction.
8. A server, characterized in that: include: A receiving module, configured to obtain the rotation direction and the rotated facial image sent by the range hood; An analysis module is used to restore the rotated face image according to a pre-configured pixel division strategy and rotation direction; The analysis module is also used to analyze and process the restored facial image, and when it is determined to generate a range hood adjustment instruction, send the range hood adjustment instruction to the range hood, so that the range hood can perform corresponding adjustment processing on the range hood according to the range hood adjustment instruction.
9. A range hood system, characterized in that: include: A range hood and a server, wherein the range hood is used to execute the range hood control method according to any one of claims 1 to 3; The server is used to execute the range hood control method according to any one of claims 4 to 6.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the range hood control method according to any one of claims 1 to 6 is implemented.