Cooker hood control method and cooker hood
By acquiring real-time images of the area surrounding the range hood, the difference between the predicted coded frame and the reference frame is used to determine smoke overflow. Combined with the detection of smoke conditions of the target object and adjacent objects, the airflow direction and wind speed of the range hood are adjusted. This solves the problem of inaccurate wind speed adjustment in the existing technology and achieves higher accuracy in smoke overflow detection and intelligent operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU ROBAM APPLIANCES CO LTD
- Filing Date
- 2026-01-08
- Publication Date
- 2026-06-02
AI Technical Summary
The existing range hoods rely on the temperature of the stove or cookware to adjust the fan speed, resulting in inaccurate adjustment, loud noise, serious power waste, and complicated operation.
By acquiring real-time images of the area surrounding the range hood, the difference between the predicted coded frame and the reference frame is used to determine smoke overflow. Combined with the smoke detection of the target object and adjacent objects, the wind direction and wind speed of the range hood are adjusted, and an air pump is used to form an air curtain and clean the camera.
It improves the accuracy of smoke overflow detection, reduces noise and power waste, simplifies the operation process, and enhances the intelligence level of the range hood.
Smart Images

Figure CN122129727A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home, in particular to a range hood control method and a range hood. BACKGROUND
[0002] The oil smoke extractor is provided with a wind force gear adjusting function, and a user can manually adjust the wind force gear according to a cooking method, a cooking object, etc. There are problems such as complex operation, inaccurate wind force adjustment, large noise, and power waste.
[0003] With the development of intelligent technology, kitchen appliances are gradually becoming intelligent. For example, the wind force gear adjusting function of the oil smoke extractor is developed from manual adjustment by a user to automatic adjustment. At present, the oil smoke extractor often detects the temperature of a cooking bench or a pot by using an infrared sensor, and adjusts the wind force gear of the oil smoke extractor according to the temperature.
[0004] However, the temperature of the cooking bench or the pot is not strongly related to the oil smoke condition in the cooking process, and the way of adjusting the wind force gear based on the temperature has the problem of inaccurate adjustment. SUMMARY
[0005] In view of the above defects or deficiencies in the prior art, it is desirable to provide a range hood control method and a range hood, which can effectively improve the accuracy of smoke overflow detection.
[0006] In a first aspect, the present application provides a range hood control method. The method comprises: obtaining a real-time image of a periphery of the range hood, and determining a prediction encoding frame according to the real-time image of the periphery of the range hood and a reference frame; the reference frame is a complete image frame under a smoke-free condition of the periphery of the range hood, and the prediction encoding frame is used to represent the difference between the real-time image of the periphery of the range hood and the reference frame; determining whether there is smoke overflow according to the prediction encoding frame, and if there is smoke overflow, performing adjacent object smoke condition detection based on a target object in the real-time image of the periphery of the range hood to determine a smoke overflow direction; the object in the real-time image of the periphery of the range hood is one of a plurality of sub-regions obtained by region division on the real-time image of the periphery of the range hood, and the target object is a sub-region representing smoke in the real-time image of the periphery of the range hood; adjusting the wind direction of the range hood for smoke suction based on the smoke overflow direction.
[0007] In combination with the first aspect, in a possible implementation manner, determining whether there is smoke overflow according to the prediction encoding frame comprises: if the data amount of the prediction encoding frame is less than a first threshold, there is no smoke overflow; and if the data amount of the prediction encoding frame is greater than or equal to the first threshold, there is smoke overflow.
[0008] With reference to the first aspect, in a possible implementation manner, the smoke overflow direction is determined based on positions of all the target objects in the real-time image of the periphery of the smoke machine.
[0009] With reference to the first aspect, in a possible implementation manner, the smoke overflow direction is determined based on positions of all the target objects in the real-time image of the periphery of the smoke machine.
[0010] With reference to the first aspect, in a possible implementation manner, the smoke machine control method further includes: acquiring two frames of real-time images of the smoke collection area at intervals of a preset time, performing grayscale processing on the two frames of real-time images of the smoke collection area, calculating a difference image based on pixel grayscale values of each frame of image, and converting the difference image into a binary image; determining a smoke area based on a connected region in the binary image, determining a smoke level according to the smoke area, and adjusting a wind level of the smoke machine according to the smoke level.
[0011] With reference to the first aspect, in a possible implementation manner, the smoke machine is provided with a camera and an air pump, and the method further includes: determining an air flow level of the air pump according to the smoke level, and controlling the air pump to blow air in a parallel direction of a plane on which a lens of the camera is located based on the air flow level, so as to form an air curtain opposite to and parallel to the plane on which the lens is located.
[0012] With reference to the first aspect, in a possible implementation manner, the smoke machine control method further includes: determining a definition of the real-time image of the periphery of the smoke machine, determining a degree of oil stain coverage of a camera of the smoke machine based on the definition, and starting a self-cleaning program of the camera and controlling a cleaning mechanism to clean the camera in a case where the degree of oil stain coverage is greater than a second threshold.
[0013] With reference to the first aspect, in a possible implementation manner, the reference frame is a pre-stored I frame, or the reference frame is an I frame obtained by independently compressing a video starting frame.
[0014] With reference to the second aspect, the application further provides an extractor hood, which is applied to the method of the first aspect or any one of the implementation manners of the first aspect. The extractor hood is provided with a smoke collecting plate, and is further provided with a processor and a camera. The camera is configured to capture a real-time image of a peripheral area of the extractor hood and send the image to the processor. The processor is configured to detect smoke overflow based on the real-time image of the peripheral area of the extractor hood, and adjust a direction of the smoke collecting plate according to a smoke overflow direction, so as to adjust a wind direction of the extractor hood.
[0015] With reference to the second aspect, in a possible implementation manner, the extractor hood further comprises an air pump and a cleaning mechanism. The air pump and the cleaning mechanism are arranged within a preset distance of the camera. The air pump is configured to blow air towards a direction parallel to a plane on which a lens of the camera is located, so as to form an air curtain opposite to and parallel to the plane on which the lens is located. The cleaning mechanism is configured to clean the lens of the camera.
[0016] With reference to the third aspect, the application further provides a computer program product. The computer program product comprises a computer program, which, when executed by a processor, implements the method of the first aspect.
[0017] The method and the extractor hood provided in the embodiments of the application can capture a real-time image of a peripheral area of an extractor hood, determine a prediction coding frame based on the real-time image of the peripheral area of the extractor hood and a reference frame, determine whether there is smoke overflow based on the prediction coding frame, if there is smoke overflow, detect a smoke condition of a target object based on the target object in the real-time image of the peripheral area of the extractor hood, determine a smoke overflow direction, and adjust a wind direction of the extractor hood based on the smoke overflow direction. In the embodiments of the application, the extractor hood detects the smoke overflow condition based on an image visual technology that can intuitively and accurately represent smoke, and specifically takes an image of a peripheral area of the extractor hood in a smoke-free condition as a reference frame. The difference between the image of the peripheral area of the extractor hood in a cooking process and the reference frame is used to determine whether there is smoke in the peripheral area of the extractor hood, which can effectively improve the accuracy of the determination of the smoke overflow condition. If it is determined that there is smoke overflow, the smoke condition of each object is further detected based on the object, and the smoke overflow direction is determined based on the smoke condition detection result of each object, which effectively improves the accuracy of the smoke overflow detection. BRIEF DESCRIPTION OF DRAWINGS
[0018] Other characteristics, objects and advantages of the application will become more apparent from the following detailed description of non-restrictive embodiments, made with reference to the accompanying drawings: Figure 1 FIG. 1 is a structural schematic diagram of an extractor hood in one embodiment; Figure 2 This is a flowchart illustrating a method for controlling a range hood in one embodiment; Figure 3 This is a schematic diagram of another structure of the range hood in one embodiment; Figure 4 This is a schematic diagram of another structure of the range hood in one embodiment; Figure 5 This is a schematic diagram illustrating the smoke detection of various objects in a real-time image of the area surrounding the smoke machine in one embodiment. Figure 6 This is another flowchart illustrating the smoke machine control method in one embodiment; Figure 7 This is another flowchart illustrating the smoke machine control method in one embodiment; Figure 8 This is a schematic diagram of the smoke overflow direction detection results in one embodiment; Figure 9 This is another flowchart illustrating the smoke machine control method in one embodiment; Figure 10 This is another flowchart illustrating the smoke machine control method in one embodiment. Detailed Implementation
[0019] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0020] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present application will now be described in detail with reference to the accompanying drawings and embodiments. Furthermore, the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The terms "first" and "second," etc., in the specification and claims of the embodiments of this application are used to distinguish different objects, not to describe a specific order of objects.
[0021] Range hoods are equipped with adjustable fan speeds, allowing users to manually set or adjust the speed according to cooking methods (e.g., steaming, stir-frying) and the food being cooked. However, this can be cumbersome. Furthermore, users often set the fan speed to the highest setting, resulting in excessive noise and wasted electricity.
[0022] With the development of smart technology, kitchen appliances are gradually becoming intelligent as well. The fan speed adjustment function of range hoods has evolved from manual adjustment to automatic adjustment. Currently, range hoods often use infrared sensors to detect the temperature of the stovetop or cookware, adjusting the fan speed accordingly. However, the temperature of the stovetop or cookware is not strongly correlated with the amount of oil fumes produced during cooking, leading to inaccuracies in fan speed adjustment based on temperature.
[0023] Based on this, embodiments of this application provide a range hood control method and a range hood that can effectively improve the accuracy of smoke overflow detection.
[0024] The smoke hood control method provided in this application embodiment can be applied to, for example, Figure 1 The range hood shown includes a main body 10, a smoke-gathering plate 20, a processor 30, and a camera 40. An air pump 50 and a cleaning mechanism 60 are located within a preset distance of the camera 40. The camera 40 captures real-time images of the area surrounding the range hood and sends them to the processor 30. The processor 30 detects smoke overflow based on the real-time images and adjusts the direction of the smoke-gathering plate 20 according to the direction of smoke overflow to adjust the airflow direction of the range hood. The air pump 50 blows air towards the camera 40 to create an airflow covering the lens. The cleaning mechanism 60 cleans the camera 40.
[0025] In one embodiment, such as Figure 2 As shown, a method for controlling a range hood is provided, which is applied to... Figure 1 The following steps are used as an example to illustrate the process: Step 101: Obtain real-time images of the area surrounding the smoke machine, and determine the predicted encoding frame based on the real-time images of the area surrounding the smoke machine and the reference frame.
[0026] In this embodiment, when the user starts the range hood through the control panel or client, the range hood automatically turns on the camera 40 and instructs the camera 40 to capture images of the area outside the range hood's smoke collection area (e.g., the range hood's projection area), i.e., the outer area of the range hood, to obtain a real-time image of the range hood's periphery.
[0027] One possible implementation is, such as Figure 3 As shown, a camera 40 can be installed on the range hood body 10. The camera 40 can be a wide-angle camera, so that the camera 40 can capture an image of the entire stove area (area A+B), and then crop the outer area of the range hood (area B) to obtain a real-time image of the outer area of the range hood. Alternatively, the range hood controls the rotation of the lens of the camera 40, adjusting the lens to face the outer area of the range hood, instructing the camera 40 to capture a real-time image of the outer area of the range hood.
[0028] One possible implementation is, such as Figure 4 As shown, multiple cameras 40 can be installed at the edge of the range hood body 10. Each camera 40 can capture a portion of the outer area of the range hood (e.g., B1, B2, B3). The combination of the portions of the outer area corresponding to each camera 40 can obtain a real-time image of the outer area of the range hood.
[0029] The reference frame is a complete image frame showing the area surrounding the range hood without smoke. In other words, the reference frame is an image frame containing complete image data of the area surrounding the range hood in a smoke-free environment.
[0030] In one possible implementation, the reference frame can be an I-frame, specifically an I-frame obtained by encoding the image of the outer area of the range hood captured by the camera 40 in the absence of smoke, and then encoded by an encoder or processor.
[0031] The reference frame is a pre-stored I-frame, meaning it can be a pre-encoded image of the area surrounding the range hood before cooking, stored within the range hood itself. Alternatively, the reference frame can be an I-frame obtained by independently compressing the starting frame of a video taken in real-time of the area surrounding the range hood. In other words, the reference frame can be obtained by independently compressing the starting frame of a video captured by the camera during cooking to obtain a real-time image of the area surrounding the range hood (i.e., the aforementioned encoding process); that is, the reference frame can be obtained through real-time acquisition and processing during cooking. It is understandable that the camera begins capturing video in real-time when cooking begins. At this time, smoke is not generated or has not overflowed into the area surrounding the range hood; therefore, the starting frame of the video can also represent an image of the area surrounding the range hood without smoke.
[0032] Among them, the predictive coded frame is used to characterize the difference between the real-time image of the smoke machine's periphery and the reference frame, and can specifically be a P-frame.
[0033] During the cooking process, camera 40 can capture real-time video of the area surrounding the range hood, with each frame representing a real-time image of the area surrounding the range hood. Camera 40 can send the captured video to processor 30, which can compress and encode the video captured by camera 40 using Moving Pictures Experts Group (MPEG) format, calculate the difference between each real-time image of the area surrounding the range hood and a reference frame, and obtain the predicted coded frame corresponding to each real-time image of the area surrounding the range hood.
[0034] Step 102: Determine whether there is smoke overflow based on the predicted encoded frame. If there is smoke overflow, detect the smoke situation of adjacent objects based on the target object in the real-time image of the smoke machine's periphery to determine the direction of smoke overflow.
[0035] The object is a region division of the real-time image of the periphery of the range hood. For example, the rows of the real-time image of the periphery of the range hood are divided into 21 equal parts and the columns are divided into 11 equal parts, for a total of 231 sub-regions. The object is a sub-region of the real-time image of the periphery of the range hood.
[0036] The target object is the sub-region representing smoke in the real-time image of the smoke machine's periphery.
[0037] In this embodiment, the predictive coded frame represents the difference between the real-time image of the area surrounding the range hood during cooking and the image of the same area under smoke-free conditions. Therefore, the predictive coded frame can reflect whether smoke exists in the area surrounding the range hood. For example, if the difference value represented by the predictive coded frame is greater than a preset threshold, it indicates a large difference between the real-time image of the area surrounding the range hood and the image under smoke-free conditions, thus determining that smoke exists in the area surrounding the range hood; if the difference value represented by the predictive coded frame is less than or equal to the preset threshold, it indicates a small difference between the real-time image of the area surrounding the range hood and the image under smoke-free conditions, thus determining that no smoke exists in the area surrounding the range hood.
[0038] In one possible implementation, considering that the data volume of the predictive coded frame can characterize the number of pixels with different pixel values among all corresponding pixels in the real-time image of the range hood's periphery and the reference frame, that is, the size of this data volume can reflect the area of smoke in the periphery of the range hood, and the two are positively correlated. Therefore, the presence of smoke overflow can be determined based on the data volume of the predictive coded frame. This implementation is as follows: if the data volume of the predictive coded frame is less than a first threshold, there is no smoke overflow; if the data volume of the predictive coded frame is greater than or equal to the first threshold, there is smoke overflow.
[0039] Specifically, a first threshold can be set. If the amount of data in the predicted encoded frame is less than the first threshold, it indicates that the difference between the real-time image of the range hood's perimeter and the reference frame is small, and the difference may be caused by image noise or other issues. Therefore, it is determined that there is no smoke in the area surrounding the range hood, i.e., no smoke overflow. If the amount of data in the predicted encoded frame is greater than or equal to the first threshold, it indicates that the difference between the real-time image of the range hood's perimeter and the reference frame is large, and the difference may be caused by smoke. Therefore, it is determined that there is smoke in the area surrounding the range hood, i.e., smoke overflow.
[0040] In this embodiment, if smoke overflows, the specific location of the overflowing smoke in the peripheral area of the range hood can be further detected. Specifically, a single object can be randomly selected in the real-time image of the range hood's perimeter for smoke detection. Preferably, a pixel or sub-region located at the center of the real-time image of the range hood's perimeter can be selected for smoke detection to determine whether smoke exists at the location of the object (i.e., whether it represents smoke). If smoke exists at the location of the object, the object is marked as a target object; if no smoke exists at the location of the object, another object can be randomly selected for smoke detection. Preferably, the selected object is located close to the center of the real-time image of the range hood's perimeter until it is determined that smoke exists at the location of the selected object, then the object is marked as a target object.
[0041] After identifying the target object, from among multiple adjacent objects surrounding the target object, select multiple adjacent objects located in different directions for smoke detection, identify the objects that represent smoke, and mark them. For example... Figure 5 As shown, taking the real-time image of the smoke machine's perimeter as divided into 231 sub-regions, with the central region designated as the target object, as an example: For the eight sub-regions surrounding the target object, smoke detection can be performed on all of them, or multiple (e.g., four) sub-regions located in different directions can be selected for smoke detection. For example, regions 2, 4, 5, and 7 can be selected for smoke detection, or regions 1, 3, 6, and 8 can be selected for smoke detection.
[0042] The real-time image of the perimeter of the smoke machine after segmentation can be represented by the following code: typedef struct { Image** data; / / Two-dimensional data pointer int rows; / / Number of rows int cols; / / Number of columns Matrix2D; In one possible implementation, to reduce the amount of data to be processed and improve detection efficiency, adjacent objects located one or two objects away from the target object and in different directions can be selected for smoke detection. For example, regions 9, 10, 11, and 12 can be selected for smoke detection.
[0043] After completing the smoke detection, adjacent objects can be marked based on the smoke detection results, for example, marked as "smoke" or "no smoke". If the adjacent object of the target object is an object separated from the target object, then the object separated from the target object is marked with the smoke detection result corresponding to that adjacent object. For example, if regions 9, 10, 11, and 12 are selected as adjacent objects of the target object for smoke detection, and region 10 is determined to represent smoke, then region 5 is marked as representing smoke.
[0044] For multiple neighboring objects of the target object, the neighboring objects representing smoke are updated to the target object. Smoke detection is then performed on the updated target object's neighboring objects, and the smoke detection results are labeled. This process of updating the target object and detecting smoke is repeated until all objects in the real-time image surrounding the range hood have been traversed. Based on the positional distribution of objects representing smoke in the real-time image surrounding the range hood, the location of the concentrated distribution area of these objects is determined. The direction of this location relative to the center of the real-time image surrounding the range hood is the smoke overflow direction. For example, if most objects representing smoke are located in the upper right of the real-time image surrounding the range hood, i.e., to the right rear of the range hood's perimeter, then the smoke overflow direction is determined to be to the right rear of the range hood.
[0045] Step 103: Adjust the smoke extraction direction of the range hood based on the direction of smoke overflow.
[0046] In this embodiment of the application, after determining the direction of smoke overflow, the direction of the smoke collection plate 20 of the range hood can be adjusted. Specifically, the direction of the smoke collection plate 20 can be adjusted to face the direction of smoke overflow, so that the airflow of the smoke collection plate 20 after the direction adjustment is from the smoke concentration area to the smoke collection plate 20, thereby realizing the exhaust of overflowing smoke.
[0047] In one possible implementation, the range hood can pre-store a mapping relationship between different smoke overflow directions and the adjustment parameters of the smoke collection plate. After determining the smoke overflow direction, the range hood can query the corresponding adjustment parameters from this mapping relationship and adjust the smoke collection plate according to the queried adjustment parameters to adjust the airflow direction of the range hood. The adjustment parameters of the smoke collection plate 20 may include sliding position, opening size, rotation direction, and rotation angle.
[0048] The method provided in this application can acquire real-time images of the area surrounding the range hood, determine a predicted encoding frame based on the real-time images and a reference frame, determine whether smoke overflow exists based on the predicted encoding frame, and if smoke overflow exists, detect the smoke conditions of adjacent objects based on the target objects in the real-time images of the area surrounding the range hood to determine the direction of smoke overflow, and adjust the airflow direction of the range hood based on the direction of smoke overflow. In this application embodiment, the range hood detects smoke overflow based on image vision technology that can intuitively and accurately represent smoke, and specifically uses an image of the area surrounding the range hood in a smoke-free state as a reference frame. The difference between the image of the area surrounding the range hood during cooking and the reference frame is used to determine whether smoke exists in the area surrounding the range hood, which can effectively improve the accuracy of smoke overflow judgment. When smoke overflow is determined to exist, smoke conditions are further detected based on each object, and the direction of smoke overflow is determined comprehensively based on the smoke condition detection results of each object, which effectively improves the accuracy of smoke overflow detection.
[0049] The embodiments described above introduce a scheme for determining the smoke overflow direction by detecting the smoke condition of adjacent objects based on the target object in the real-time image of the smoke machine's periphery. In another embodiment of this application, smoke condition detection in the direction of objects that do not represent smoke can be stopped. This embodiment includes, as follows: Figure 6 The steps shown are as follows: Step 201: Based on the difference between the gray values of the neighboring objects of the target object and the gray values of the corresponding positions in the reference frame, determine whether the neighboring objects represent smoke.
[0050] Understandably, the pixel values of objects in the image of the area surrounding the range hood differ significantly between smoke-filled and smoke-free conditions. Therefore, the presence of smoke in each object can be determined based on the differences in pixel values. Considering that pixels have three channels (R, G, B), to reduce the amount of data to be processed and improve the efficiency of smoke detection, the presence of smoke in each object can be determined based on the differences in grayscale values between smoke-filled and smoke-free conditions in the image of the area surrounding the range hood.
[0051] In this embodiment, a reference frame can be grayscaled to obtain a reference grayscale image; a real-time image of the periphery of the smoke machine can be grayscaled to obtain a real-time grayscale image. Then, an object is randomly selected in the real-time grayscale image, and the difference in grayscale value between the object and the corresponding object in the reference grayscale image is calculated. Based on this difference, it is determined whether the object represents smoke. For example, if the difference is greater than a preset difference, the object is determined to represent smoke; if the difference is less than or equal to the preset difference, the object is determined not to represent smoke.
[0052] If the object represents smoke, it is marked as the target object. If the object does not represent smoke, another object is randomly selected for grayscale difference calculation and comparison with a preset difference until it is determined that the selected object represents smoke; if so, it is marked as the target object. After determining the target object, multiple neighboring objects located in different directions are selected from the multiple neighboring objects surrounding the target object. For each selected neighboring object, the difference between the grayscale value of the neighboring object and the grayscale value of the object at the corresponding position in the reference frame is calculated and compared with a preset difference. Based on the comparison result, it is determined whether each neighboring object represents smoke.
[0053] Step 202: If the adjacent object does not represent smoke, ignore the adjacent object; if the adjacent object represents smoke, update the adjacent object to the target object, until the pixels or sub-regions of the real-time image around the smoke machine are traversed.
[0054] In this embodiment, considering that smoke is often concentrated, if an adjacent object does not indicate smoke, it means that there is no smoke near the adjacent object or its vicinity. Therefore, further smoke detection for that adjacent object or its adjacent objects can be stopped to avoid unnecessary data processing. If an adjacent object indicates smoke, then that adjacent object is updated as the target object, and further smoke detection for adjacent objects is performed until all pixels or sub-regions of the real-time image surrounding the smoke generator are traversed.
[0055] Step 203: Determine the direction of smoke overflow based on the position of all target objects in the real-time image around the smoke machine during the traversal process.
[0056] In this embodiment, after traversing all objects in the real-time image surrounding the smoke hood, the target object determined during the traversal is the object representing the smoke. In the real-time image surrounding the smoke hood, the direction of the target object's position relative to the center position is the direction of smoke overflow.
[0057] In one possible implementation, considering that smoke is often concentrated and that images contain noise (such as pixel jitter), adjacent and connected target objects can be identified as smoke regions. Specifically, individual target objects and multiple target objects with fewer than a preset number of adjacent and connected target objects can be discarded, and the area containing multiple target objects with a number greater than or equal to the preset number of adjacent and connected target objects can be identified as a smoke region. Alternatively, the area containing the multiple target objects with the largest number of adjacent and connected target objects can be identified as a smoke region. In the real-time image of the smoke machine's periphery, the direction of the smoke region relative to the center is the direction of smoke overflow.
[0058] The method provided in this application embodiment can ignore objects that do not represent smoke when detecting smoke in adjacent objects of the target object, thus avoiding smoke detection in all objects in the real-time image of the smoke machine's periphery. This avoids processing unnecessary data and effectively improves the efficiency of smoke overflow direction detection.
[0059] The embodiments described above illustrate a scheme for ignoring objects that are not characterized as smoke. In another embodiment of this application, objects can be labeled with different values to distinguish different situations for different objects. This embodiment includes, for example... Figure 7 The steps shown are as follows: Step 301: If the adjacent objects do not represent smoke, then use the first value to mark the adjacent objects and ignore the adjacent objects and all pixels or sub-regions of the adjacent objects in the direction relative to the target object.
[0060] In this embodiment, a second numerical value (e.g., 2) can be used to mark the target object. After detecting smoke conditions for each adjacent object of the target object, if the adjacent object does not represent smoke, it can be marked with a first numerical value (e.g., 1); if the adjacent object represents smoke, it is also marked with a second numerical value. This allows for the differentiation of different situations (whether or not smoke is represented) of objects based on numerical values.
[0061] Furthermore, considering that smoke is often concentrated, if adjacent objects do not represent smoke, it indicates that there may be no smoke in the direction of the adjacent objects. Therefore, adjacent objects and all objects in the direction of adjacent objects relative to the target object can be ignored, and smoke detection on these objects can be stopped. Specifically, a third value (e.g., 3) can be used to mark all objects in the direction of adjacent objects that do not represent smoke, to indicate that these objects may not represent smoke, distinguishing them from objects whose smoke representation can be accurately determined.
[0062] Step 302: If the adjacent object represents smoke, then use the second value to mark the adjacent object and update the adjacent object to the target object. Perform smoke detection and smoke marking on the updated target object until the pixels or sub-regions of the real-time image around the smoke machine are traversed.
[0063] In this embodiment, if an adjacent object represents smoke, it is marked with the same numerical value (i.e., the second numerical value) as the target object, and the adjacent object is updated to the target object. Next, smoke detection is performed on the adjacent objects of the updated target object. The first numerical value is used to mark adjacent objects that do not represent smoke in the smoke detection results, and the second numerical value is used to mark adjacent objects that represent smoke in the smoke detection results, thus completing the smoke detection marking of the adjacent objects of the updated target object. This process is repeated until all pixels or sub-regions of the real-time image surrounding the smoke generator have been traversed.
[0064] In one possible implementation, all objects in the real-time image surrounding the smoke hood can be pre-marked using a fourth numerical value to indicate that no smoke detection has been performed on those objects. During the smoke detection process, the marks of each object can be replaced based on the smoke detection results of the target object and its neighboring objects. This avoids missing any objects in the real-time image surrounding the smoke hood and accurately completes the traversal of all objects in the image.
[0065] The real-time image of the periphery of the smoke machine after numerical labeling can be represented by the following code: typedef struct { intwidth; / / Image width (in pixels) Intheight; / / Image height (in pixels) intchannels; / / Number of color channels (e.g., 1-grayscale, 3-RGB, 4-RGBA) int bits_per_pixel; / / Bits per pixel (e.g., 8, 16, 32) unsignedchar* data; / / Pixel data pointer Intfsmoke; / / Whether the current image contains smoke information, 0 indicates no smoke is detected. Detection results: 1. No smoke characterization; 2. Smoke characterization.
[0066] Image Step 303: Determine the direction of smoke overflow based on the position of the pixel or sub-region marked with the first value in the real-time image around the smoke machine.
[0067] In this embodiment of the application, as described above, the pixel or sub-region marked with the first value represents smoke. Therefore, as... Figure 8 As shown, this area can be highlighted, and its direction relative to the center position in the real-time image of the smoke machine's periphery can be determined, thereby identifying the direction of smoke overflow.
[0068] The method provided in this application embodiment can mark pixels or sub-regions with different values for different situations, so as to accurately determine the area representing smoke and the position of the area in the real-time image of the smoke machine's periphery, and thus accurately determine the direction of smoke overflow.
[0069] The embodiments described above introduce a scheme for adjusting the airflow direction of a range hood to address overflowing smoke. In another embodiment of this application, the smoke-collecting area of the range hood (i.e., the area where smoke overflows) can be adjusted before detecting smoke overflow. Figure 3 The smoke size in the central area (A) is detected; or, when detecting smoke overflow, the size of the overflowing smoke is detected, and the wind speed can be adjusted accordingly. This embodiment includes, for example... Figure 9 The steps shown; Step 401: Acquire two real-time images of the smoke collection area at preset intervals, perform grayscale processing on the two real-time images of the smoke collection area, calculate the difference image based on the pixel grayscale values of each image, and convert the difference image into a binary image.
[0070] In this embodiment, after the range hood is started, the camera 40 can be instructed to capture a real-time image of the smoke-collecting area of the range hood, and the real-time image of the smoke-collecting area can be processed into grayscale to obtain the corresponding grayscale image I. t-1 (x, y). Then, at a preset time interval, camera 40 is instructed to capture another real-time image of the smoke-collecting area of the range hood, and this real-time image of the smoke-collecting area is then processed into grayscale to obtain the corresponding grayscale image I. t (x,y).
[0071] Next, for each corresponding pixel in the two grayscale images, the difference in grayscale values is calculated. This difference is then used as the pixel value at the corresponding position in the difference image, resulting in the difference image. The calculation process for the difference image can be expressed as follows: D t (x,y)=|I t (x,y)- I t-1 (x,y)| Where x represents the row number of the pixel in the image, y represents the column number of the pixel in the image, and (x,y) represents the position of the pixel in the image. t-1 (x,y) represents the grayscale image corresponding to the first frame of the real-time image of the smoke-gathering area, I t (x,y) represents the grayscale image corresponding to the second frame of the smoke collection area real-time image obtained after a preset time interval.
[0072] After obtaining the difference image, it is converted into a binary image based on a grayscale threshold. Specifically, for pixels with grayscale values greater than or equal to the grayscale threshold, their grayscale values are set to 1, and for pixels with grayscale values less than the grayscale threshold, their grayscale values are set to 0, thus obtaining the binary image corresponding to the difference image.
[0073] The grayscale threshold can be determined by professionals based on experience, or it can be calculated based on the grayscale values of each pixel in the differential image according to the following formula: Threshold=μ+k σ Where μ is the mean gray value of each pixel in the difference image, σ is the standard deviation of the gray values of each pixel in the difference image, and k is an empirical coefficient. The empirical coefficient k can be determined by professionals based on experience, and can be in the range of 1.5-2. Understandably, the larger the empirical coefficient, the larger the gray threshold.
[0074] In one possible implementation, after acquiring two real-time images of the smoke-gathering area, the resolution of these two images can be reduced, for example, to 160×120, to reduce the amount of data to be processed and improve data processing efficiency. Then, the two real-time images of the smoke-gathering area with reduced resolution are converted to grayscale, and a difference image is calculated based on the pixel grayscale values of each image.
[0075] Step 402: Determine the smoke region based on the connected regions in the binary image, determine the smoke level based on the smoke region, and adjust the wind speed of the smoke machine based on the smoke level.
[0076] In a binary image, a pixel with a value of 1 indicates a significant difference in the grayscale image corresponding to the smoke-gathering area at that pixel location, suggesting the possible presence of smoke at that position. Therefore, in this embodiment, adjacent and connected pixel regions with a value of 1 in a binary image can be identified as smoke regions.
[0077] In one possible implementation, considering that smoke is often concentrated and there is noise in the image (such as pixel jitter), for all candidate pixels with a pixel value of 1, a single candidate pixel in the binary image and multiple candidate pixels whose number of adjacent connected candidate pixels is less than a preset number of pixels can be discarded, and the area where multiple candidate pixels whose number of adjacent connected candidate pixels is greater than or equal to the preset number of pixels is determined as the smoke area.
[0078] Next, the ratio S of the smoke area to the area of the binary image is calculated. For example, the ratio of the number of pixels in the smoke area to the number of pixels in the binary image can be calculated. Based on the ratio and the preset correspondence between different smoke levels and different ratio ranges, the smoke level of the acquired smoke-collecting area is determined. For example, the smoke level corresponding to a smoke area ratio of S < 5% can be preset as no smoke, the smoke level corresponding to a smoke area ratio of 5% ≤ S < 20% can be preset as light smoke, and the smoke level corresponding to a smoke area ratio of S ≥ 20% can be preset as heavy smoke. Then, based on the smoke level of the smoke-collecting area and the preset correspondence between smoke level and wind speed level, the wind speed level of the range hood is determined and adjusted to that wind speed level.
[0079] In one possible implementation, smoke overflow detection can be performed according to the above embodiment when the smoke in the smoke-gathering area is stable. Specifically, a real-time image of the smoke-gathering area can be acquired at preset time intervals. Based on the current frame and the previous frame of the real-time image of the smoke-gathering area, the size of the smoke area corresponding to each frame of the real-time image of the smoke-gathering area is determined through the aforementioned grayscale processing, differential image calculation, binary image conversion, smoke area and proportion calculation. When the change between two adjacent smoke areas is less than a preset change value, the smoke in the smoke-gathering area is determined to be stable. It can be understood that in the process of determining the stability of the smoke in the smoke-gathering area, the fan speed can be determined based on the smoke level corresponding to each smoke area, and the fan speed of the range hood can be adjusted accordingly when the fan speed changes.
[0080] The method provided in this application embodiment can detect the smoke situation in the smoke collection area before conducting smoke overflow detection, and adjust the wind speed accordingly to achieve precise smoke collection, improve the smoke collection effect in the smoke collection area, and thus reduce the severity of smoke overflow.
[0081] In one embodiment, considering that cooking fumes can contaminate the camera lens and affect the quality of images captured by the camera, therefore, as Figure 1 As shown, the range hood is equipped with an air pump 50, which can isolate the camera lens from grease. This embodiment includes the following steps: The airflow level of the air pump is determined based on the smoke level, and the air pump is controlled to blow air towards the camera based on the airflow level to form an airflow covering the lens.
[0082] In this embodiment, to reduce energy consumption and avoid the air pump using high-speed airflow even when the smoke area is small, a pre-defined correspondence between smoke level and air pump airflow level can be established. After determining the smoke level, the corresponding airflow level is determined based on this correspondence, and the air pump's airflow is adjusted to the determined airflow level. This allows the air pump to blow air onto the camera lens at this airflow level, forming an airflow covering the lens, isolating the camera lens from oil stains, preventing oil contamination of the camera lens, and ensuring the quality of the images captured by the camera. It is understood that the smoke level and airflow level are positively correlated.
[0083] In one possible implementation, the air pump can be installed on the range hood body 10. The processor 30 controls the air pump to face the camera lens when in use via a robotic arm, and to retract it when not in use to avoid bumping the air pump, while improving the cleanliness of the range hood. Alternatively, the air pump can be installed in a smaller size at the position of the camera lens to avoid adjusting the position of the air pump and ensure the accuracy of the air pump's blowing.
[0084] The method provided in this application embodiment can determine the airflow level of the air pump based on the smoke level, avoiding the use of high-speed airflow when the smoke range is small, and can effectively reduce the energy consumption of the air pump.
[0085] In one embodiment, considering that prolonged use of a range hood inevitably leads to some degree of grease contamination on the camera lens, the camera lens can be cleaned using a cleaning mechanism installed on the range hood. This embodiment includes, for example... Figure 10 The steps shown are as follows: Step 501: Determine the clarity of the real-time image around the range hood, and determine the degree of oil stain coverage of the range hood's camera based on the clarity.
[0086] In this embodiment, the image sharpness can be determined for any frame of image acquired during the use of the range hood, such as a real-time image of the area surrounding the range hood. Based on the correspondence between this sharpness and a preset level of oil stain coverage, the current level of oil stain coverage on the camera lens can be determined.
[0087] Step 502: When the oil stain coverage exceeds the second threshold, activate the camera's self-cleaning program and control the cleaning mechanism to clean the camera.
[0088] In this embodiment, the degree of oil stain coverage is compared with a second threshold. If the degree of oil stain coverage is greater than the second threshold, it indicates that the camera lens is seriously contaminated by oil. Therefore, the cleaning structure of the range hood is activated before the range hood is turned off to clean the lens and avoid affecting the smoke detection results when the range hood is used next time.
[0089] In one possible implementation, a lens cleaning cycle can be set. Before the range hood is turned off, it is determined whether the current time has exceeded the preset cycle since the last lens cleaning. If it has, the cleaning mechanism is controlled to clean the camera.
[0090] The method provided in this application embodiment can determine the degree of oil stain coverage on the camera lens based on image clarity, and clean the lens in a timely manner to avoid serious camera lens contamination affecting the smoke detection effect of the range hood, thereby avoiding affecting the smoke exhaust effect of the range hood.
[0091] In one embodiment, such as Figure 1 As shown, a range hood is provided. The main body 10 of the range hood is provided with a smoke gathering plate 20. The main body 10 is also provided with a processor 30 and a camera 40. An air pump 50 and a cleaning mechanism 60 are arranged within a preset distance of the camera 40. The camera 40 is used to capture real-time images of the periphery of the range hood and send them to the processor 30. The processor 30 is used to detect the smoke overflow based on the real-time images of the periphery of the range hood and adjust the direction of the smoke gathering plate 20 according to the direction of smoke overflow to adjust the airflow direction of the range hood. The air pump 50 blows air towards the camera 40 to form an airflow covering the lens. The cleaning mechanism 60 is used to clean the camera 40.
[0092] This range hood, applied to the range hood control method described in the above embodiments, can acquire real-time images of the area surrounding the range hood, determine a predicted encoding frame based on the real-time images and a reference frame, determine whether smoke overflow exists based on the predicted encoding frame, and if smoke overflow exists, detect the smoke conditions of adjacent objects based on the target objects in the real-time images of the area surrounding the range hood to determine the direction of smoke overflow, and adjust the airflow direction of the range hood based on the direction of smoke overflow. In this embodiment, the range hood detects smoke overflow based on image vision technology that can intuitively and accurately represent smoke, and specifically uses an image of the area surrounding the range hood in a smoke-free state as a reference frame. The difference between the image of the area surrounding the range hood during cooking and the reference frame is used to determine whether smoke exists in the area surrounding the range hood, which can effectively improve the accuracy of the range hood in judging smoke overflow. If smoke overflow is determined, further smoke detection is performed on each object, and the direction of smoke overflow is comprehensively determined based on the smoke detection results of each object, thereby effectively improving the accuracy of the range hood's smoke overflow detection and thus improving the range hood's smoke extraction effect.
[0093] It should be noted that although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0094] On the other hand, this application also provides a computer-readable storage medium, which may be included in the computer device described in the above embodiments, or may exist independently and not assembled into the computer device. The aforementioned computer-readable storage medium stores one or more programs that, when used by one or more processors, execute the methods described in this application. For example, it may execute... Figure 2 The steps of the method shown.
[0095] This application provides a computer program product including instructions that, when executed, cause the method described in this application to be performed. For example, it can execute... Figure 2 The steps of the method shown.
[0096] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0097] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for controlling a smoke hood, characterized in that, The method includes: Acquire a real-time image of the area surrounding the range hood, and determine a predictive coded frame based on the real-time image of the area surrounding the range hood and a reference frame; the reference frame is a complete image frame of the area surrounding the range hood when there is no smoke, and the predictive coded frame is used to characterize the difference between the real-time image of the area surrounding the range hood and the reference frame. Based on the predicted encoded frame, it is determined whether there is smoke overflow. If there is smoke overflow, the smoke situation of adjacent objects is detected based on the target object in the real-time image of the smoke machine's periphery to determine the direction of smoke overflow. The object in the real-time image of the smoke machine's periphery is one of the multiple sub-regions obtained after dividing the real-time image of the smoke machine's periphery into regions, and the target object is the sub-region representing smoke in the real-time image of the smoke machine's periphery. The direction of the smoke extraction from the smoke machine is adjusted based on the direction of the smoke overflow.
2. The method according to claim 1, characterized in that, The step of determining whether smoke overflow exists based on the predicted coded frame includes: If the data volume of the predicted encoded frame is less than the first threshold, there is no smoke overflow; if the data volume of the predicted encoded frame is greater than or equal to the first threshold, there is smoke overflow.
3. The method according to claim 1 or 2, characterized in that, The step of detecting the smoke situation of adjacent objects based on the target object in the real-time image of the smoke machine's periphery and determining the direction of smoke overflow includes: Based on the difference between the gray values of the neighboring objects of the target object and the gray values of the corresponding positions in the reference frame, it is determined whether the neighboring objects represent smoke; If the adjacent object does not represent smoke, then the adjacent object is ignored; if the adjacent object represents smoke, then the adjacent object is updated to the target object, until the pixels or sub-regions of the real-time image around the smoke machine are traversed. The direction of smoke overflow is determined based on the position of all target objects in the real-time image around the smoke machine during the traversal process.
4. The method according to claim 3, characterized in that, If the adjacent object does not represent smoke, then the adjacent object is ignored; if the adjacent object represents smoke, then the adjacent object is updated to the target object, until the pixels or sub-regions of the real-time image around the smoke machine are traversed. Based on the positions of all target objects in the real-time image surrounding the smoke machine during the traversal process, the direction of smoke overflow is determined, including: If the adjacent object does not represent smoke, the adjacent object is marked with a first value, and the adjacent object and all pixels or sub-regions of the adjacent object in the direction relative to the target object are ignored; If the adjacent object represents smoke, then the adjacent object is marked with the second value and the adjacent object is updated as the target object. The smoke situation of the adjacent object is detected and marked on the updated target object until the pixels or sub-regions of the real-time image of the smoke machine are traversed. The direction of smoke overflow is determined based on the position of the pixel or sub-region marked with a first value in the real-time image of the periphery of the smoke machine.
5. The method according to claim 1, characterized in that, The method further includes: Two real-time images of the smoke-gathering area are acquired at preset intervals. The two real-time images of the smoke-gathering area are then converted to grayscale. A difference image is calculated based on the pixel grayscale values of each image, and the difference image is converted into a binary image. The smoke region is determined based on the connected regions in the binary image, the smoke level is determined based on the smoke region, and the wind speed of the smoke machine is adjusted based on the smoke level.
6. The method according to claim 5, characterized in that, The range hood is equipped with a camera and an air pump, and the method further includes: The airflow level of the air pump is determined based on the smoke level, and the air pump is controlled to blow air in a direction parallel to the plane where the camera lens is located, so as to form an air curtain that is opposite to the lens and parallel to the plane where the lens is located.
7. The method according to claim 1, characterized in that, The method further includes: Determine the clarity of the real-time image surrounding the range hood, and determine the degree of oil stain coverage of the range hood's camera based on the clarity; If the oil stain coverage exceeds the second threshold, the self-cleaning program of the camera is activated, and the cleaning mechanism is controlled to clean the camera.
8. The method according to claim 1, characterized in that, The reference frame is a pre-stored I-frame, or... The reference frame is an I-frame obtained by independently compressing the starting frame of the video of the area surrounding the smoke machine in real time.
9. A range hood, characterized in that, The method described in any one of claims 1-8, wherein the range hood body is provided with a smoke-collecting plate, and the body is further provided with a processor and a camera. The camera is used to capture real-time images of the area surrounding the smoke machine and send them to the processor; The processor is used to detect smoke overflow based on real-time images of the periphery of the smoke machine, and adjust the direction of the smoke collection plate according to the direction of smoke overflow, so as to adjust the airflow direction of the smoke machine.
10. The range hood according to claim 9, characterized in that, The range hood also includes an air pump and a cleaning mechanism, which are positioned within a preset distance of the camera. The air pump is used to blow air in a direction parallel to the plane where the camera lens is located, so as to form an air curtain that is opposite to the lens and parallel to the plane where the lens is located. The cleaning structure is used to clean the camera lens.