Method, system, electronic device and storage medium for identifying oil fume concentration

By acquiring the frame image of the smoke baffle area of ​​the hood, calculating the frame difference image, and identifying the moving area of ​​the oil smoke, the problem of insufficient accuracy and real-time performance of the existing oil smoke concentration detection method is solved, and high accuracy and timeliness of oil smoke concentration are achieved. detection.

CN112989933BActive Publication Date: 2024-09-20NINGBO FOTILE KITCHEN WARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110162700.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-05
Publication Date
2024-09-20
Estimated Expiration
2041-02-05

AI Technical Summary

Technical Problem

The existing oil smoke concentration detection methods are not very accurate. The infrared reflection method has strict requirements on the installation location and slow response speed. The physical particle detection method is difficult to achieve real-time detection.

Method used

By obtaining the current frame image of the hood smoke baffle area, calculating the target frame difference image, identifying the oil smoke moving area, and based on this, obtaining the oil smoke concentration in the cooking scene, using the background frame image to reduce interference, and improve detection accuracy and real-time performance.

Benefits of technology

It improves the accuracy and real-time performance of oil smoke concentration detection, eliminates the interference of motion information such as hands, reduces detection delay problems, and meets the higher needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112989933B
    Figure CN112989933B
Patent Text Reader

Abstract

The present invention discloses a method, system, electronic device and storage medium for identifying oil fume concentration, the identification method comprising: obtaining a current frame image corresponding to a smoke baffle area of ​​a range hood; calculating a target frame difference image corresponding to the current frame image; obtaining an oil fume motion area corresponding to the current frame image, and obtaining a target oil fume concentration in the current cooking scene based on the oil fume motion area. The present invention selects the smoke baffle area of ​​the range hood as the identification area for oil fume detection, that is, the viewing angle area of ​​the camera includes the smoke baffle area, and judges the oil fume concentration in the current cooking scene according to the oil fume motion on the smoke baffle area, eliminating interference from other motion information such as hands, and improving the accuracy of oil fume concentration; at the same time, a background frame-based oil fume motion area detection method is adopted to achieve a more effective effect of detecting the oil fume motion area, further improving the accuracy of oil fume concentration detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil fume detection, and in particular to an oil fume concentration recognition method, system, electronic equipment and storage medium. Background Art

[0002] The kitchen is a necessary scene for every family to cook every day, and the effect of kitchen fume treatment directly affects the health and quality of life of family members. The traditional methods of detecting fume concentration are mainly infrared reflection method and physical particle detection method to detect the concentration of fume. Among them, the infrared reflection method mainly uses the transmitting end of the device to emit infrared light, and the receiving end receives the intensity of infrared light to judge the current concentration of fume. This method has great requirements on the accuracy of the installation position of the device, and the installation position needs to ensure that there is no relevant interference to the infrared light to ensure the detection accuracy; while the physical particle detection method mainly uses the sensor to detect the amount of particles in the air to judge the current fume concentration. This solution installs the sensor between the path where the fume is generated and discharged. When the fume particles come into contact with the sensor, a corresponding response will be generated, which greatly lags the response speed and fails to meet the requirements of real-time detection. Summary of the invention

[0003] The technical problem to be solved by the present invention is to overcome the defect of low recognition accuracy in the prior art method for identifying oil fume concentration, and the purpose is to provide an oil fume concentration recognition method, system, electronic device and storage medium.

[0004] The present invention solves the above technical problems through the following technical solutions:

[0005] The present invention provides a method for identifying oil smoke concentration, the identification method comprising:

[0006] Obtain the current frame image corresponding to the smoke baffle area of ​​the range hood;

[0007] Calculate and obtain a target frame difference image corresponding to the current frame image;

[0008] Acquire the fume movement area corresponding to the current frame image according to the target frame difference image, and acquire the target fume concentration in the current cooking scene based on the fume movement area;

[0009] Wherein, the oil fume movement area is the oil fume distribution area in the smoke baffle area.

[0010] Preferably, when an image acquisition device is provided on the main structure of the range hood and around the smoke baffle, the step of acquiring the current frame image corresponding to the smoke baffle area of ​​the range hood includes:

[0011] Using the image acquisition device to acquire an initial scene frame image corresponding to the area where the smoke baffle is located;

[0012] The smoke shield area in the initial scene frame image is identified to obtain the current frame image corresponding to the smoke shield area.

[0013] Preferably, the step of calculating and obtaining the target frame difference image corresponding to the current frame image comprises:

[0014] Acquire a background frame image corresponding to the smoke baffle area;

[0015] Perform frame difference processing on the current frame image and the background frame image to obtain the target frame difference image.

[0016] Preferably, the step of obtaining the background frame image corresponding to the smoke baffle area includes:

[0017] Obtain the historical scene frame image corresponding to the area where the smoke barrier is located within the historical set time period;

[0018] Identifying a historical frame image corresponding to the smoke shield area in the historical scene frame image;

[0019] Performing grayscale transformation processing on the historical frame image, and performing frame difference processing on the historical frame image of a subsequent frame after the grayscale transformation processing and the historical frame image of a previous frame to obtain a first frame difference image;

[0020] When the first frame difference image meets a preset condition, the historical frame image of the next frame is used as the background frame image corresponding to the smoke shield area.

[0021] Preferably, when the first frame difference image satisfies a preset condition, the step of using the subsequent historical frame image as the background frame image corresponding to the smoke barrier area includes:

[0022] Obtaining a first ratio between the number of white pixels and the total number of pixels in the first frame difference image;

[0023] When the first proportion is less than a set threshold and lasts for a set time, the historical frame image of the next frame is used as the background frame image corresponding to the smoke shield area.

[0024] Preferably, the step of calculating and obtaining the target frame difference image corresponding to the current frame image comprises:

[0025] Perform frame difference processing on the current frame image and the previous frame image to obtain the target frame difference image.

[0026] Preferably, the identification method further comprises:

[0027] Preset the corresponding relationship between the proportion of the oil smoke movement area and the oil smoke concentration;

[0028] The step of acquiring the fume movement area corresponding to the current frame image according to the target frame difference image, and acquiring the fume concentration in the current cooking scene based on the fume movement area includes:

[0029] Performing grayscale conversion processing on the target frame difference image to obtain a grayscale image;

[0030] Performing image binarization processing on the grayscale image to obtain a binary image;

[0031] Obtaining the fume movement area corresponding to the current frame image according to the area where the white pixels in the binary image are located;

[0032] Calculating a target ratio between the number of white pixels corresponding to the fume motion area and the total number of pixels corresponding to the current frame image;

[0033] The target oil fume concentration in the current cooking scene is obtained according to the corresponding relationship and the target ratio matching.

[0034] The present invention also provides a system for identifying oil fume concentration, the system comprising:

[0035] A current frame image acquisition module is used to acquire a current frame image corresponding to the smoke baffle area of ​​the range hood;

[0036] A target frame difference image calculation module, used for calculating and obtaining a target frame difference image corresponding to the current frame image;

[0037] A fume movement region acquisition module, used to acquire the fume movement region corresponding to the current frame image according to the target frame difference image; wherein the fume movement region is the fume distribution region in the fume baffle region;

[0038] The target oil fume concentration acquisition module is used to acquire the target oil fume concentration in the current cooking scene based on the oil fume movement area.

[0039] Preferably, an image acquisition device is arranged on the main structure of the range hood and around the smoke baffle;

[0040] The current frame image acquisition module comprises:

[0041] An initial image acquisition unit, used to use the image acquisition device to acquire an initial scene frame image corresponding to the area where the smoke baffle is located;

[0042] A smoke barrier region recognition unit, used to recognize the smoke barrier region in the initial scene frame image;

[0043] The current frame image acquisition unit is used to acquire the current frame image corresponding to the smoke baffle area.

[0044] Preferably, the target frame difference image calculation module includes:

[0045] A background frame image acquisition unit, used to acquire a background frame image corresponding to the smoke baffle area;

[0046] The frame difference processing unit is used to perform frame difference processing on the current frame image and the background frame image to obtain the target frame difference image.

[0047] Preferably, the background frame image acquisition unit comprises:

[0048] A historical image acquisition subunit is used to acquire historical scene frame images corresponding to the area where the smoke barrier is located within a historical set time period;

[0049] A historical image recognition subunit, used to recognize the historical frame image corresponding to the smoke shield area in the historical scene frame image;

[0050] A first frame difference image acquisition subunit is used to perform grayscale transformation processing on the historical frame image, and perform frame difference processing on the historical frame image of a subsequent frame after the grayscale transformation processing and the historical frame image of a previous frame to obtain a first frame difference image;

[0051] The background frame image acquisition subunit is used to use the historical frame image of the next frame as the background frame image corresponding to the smoke shield area when the first frame difference image meets a preset condition.

[0052] Preferably, the background frame image acquisition subunit is used to obtain a first ratio between the number of white pixels and the total number of pixels in the first frame difference image; when the first ratio is less than a set threshold and lasts for a set time, the historical frame image of the next frame is used as the background frame image corresponding to the smoke shield area.

[0053] Preferably, the target frame difference image calculation module is used to perform frame difference processing on the current frame image and the previous frame image to obtain the target frame difference image.

[0054] Preferably, the identification system further comprises:

[0055] A preset module, used for presetting the corresponding relationship between the proportion of the oil smoke movement area and the oil smoke concentration;

[0056] The oil smoke movement area acquisition module includes:

[0057] A grayscale image acquisition unit, used for performing grayscale conversion processing on the target frame difference image to acquire a grayscale image;

[0058] A binary image acquisition unit, used for performing image binarization processing on the grayscale image to acquire a binary image;

[0059] A fume movement region acquisition unit, configured to obtain the fume movement region corresponding to the current frame image according to the region where the white pixels in the binary image are located;

[0060] The target fume concentration acquisition module includes:

[0061] A target ratio calculation unit, used to calculate a target ratio between the number of white pixels corresponding to the oil smoke motion area and the total number of pixels corresponding to the current frame image;

[0062] The target fume concentration acquisition unit is used to obtain the target fume concentration in the current cooking scene according to the corresponding relationship and the target ratio matching.

[0063] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for identifying oil fume concentration when executing the computer program.

[0064] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for identifying oil fume concentration are implemented.

[0065] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present invention.

[0066] The positive and progressive effects of the present invention are:

[0067] (1) The smoke baffle area of ​​the range hood is selected as the identification area for oil fume detection, that is, the camera's viewing area includes the smoke baffle area, and the oil fume concentration in the current cooking scene is judged based on the movement of oil fume on the smoke baffle area, eliminating the interference of other movement information such as hands, thereby improving the accuracy of oil fume concentration; (2) Not only can the oil fume concentration be detected in real time, but also, in view of the fact that the traditional frame difference method is difficult to identify the continuous and stable oil fume movement of the smoke baffle part due to the fixed air volume, a background frame-based oil fume movement area detection method is adopted, that is, the frame difference image between the current frame image and the background frame image is used to select the oil fume movement area, so as to achieve a more effective effect of detecting the oil fume movement area, thereby further improving the accuracy of oil fume concentration detection; (3) The oil fume concentration recognition method is not affected by the detection distance, and the characteristic image of the oil fume can be captured at the moment the oil fume is generated, thereby greatly reducing the delay problem existing in the method of using physical particle detection, achieving the purpose of real-time detection, ensuring the timeliness of oil fume concentration detection, and meeting the higher usage needs of users. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 It is a schematic diagram of the cooking scene of the present invention.

[0069] Figure 2 This is a schematic diagram of the smoke baffle area captured by the camera of the present invention.

[0070] Figure 3 This is a flow chart of the method for identifying oil fume concentration according to Example 1 of the present invention.

[0071] Figure 4 This is a flow chart of the method for identifying oil fume concentration according to Example 2 of the present invention.

[0072] Figure 5 This is a module schematic diagram of the oil fume concentration identification system of Example 3 of the present invention.

[0073] Figure 6 This is a module schematic diagram of the oil fume concentration identification system of Example 4 of the present invention.

[0074] Figure 7 This is a schematic diagram of the structure of an electronic device for implementing a method for identifying oil fume concentration according to Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0075] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.

[0076] The oil fume concentration recognition technology of the present invention can be applied to oil fume concentration recognition in various application scenarios, such as oil fume concentration detection in a kitchen scenario.

[0077] Take the kitchen scene as an example. Figure 1 As shown in the figure, a represents the range hood body, b represents the image acquisition device (such as a camera) installed on the range hood, which is used to collect scene images within the camera's field of view in real time; c represents the smoke baffle installed on the range hood body; d represents the stove, e represents the pot placed on the stove d; and f represents the wall. Figure 2 As shown, the image of the area where the smoke baffle (the trapezoid in the figure) is located is captured by the camera. The image consists of the smoke baffle area P1 (upper part) and the wall of the range hood hanging wall (lower part). During actual oil fume detection, only the smoke baffle area on the upper plate is detected.

[0078] Example 1

[0079] like Figure 3 As shown, the method for identifying the oil smoke concentration of this embodiment includes:

[0080] S101, obtaining a current frame image corresponding to a smoke baffle area of ​​a range hood;

[0081] That is, adopt Figure 1 An image acquisition device (such as a camera) arranged on the main structure of the range hood and located around the smoke baffle collects the current frame image corresponding to the smoke baffle area in real time.

[0082] S102, calculating and obtaining a target frame difference image corresponding to the current frame image;

[0083] S103, obtaining the oil smoke movement area corresponding to the current frame image according to the target frame difference image;

[0084] The oil fume movement area is the oil fume distribution area in the smoke baffle area.

[0085] S104, obtaining a target oil fume concentration in the current cooking scene based on the oil fume movement area;

[0086] In the present embodiment, the smoke baffle area of ​​the range hood is selected as the identification area for oil fume detection, and a method for detecting oil fume concentration based on the background frame under the perspective of the smoke baffle is proposed. That is, the viewing area of ​​the camera includes the smoke baffle area, and the oil fume concentration in the current cooking scene is judged according to the movement of the oil fume in the smoke baffle area, thereby eliminating the interference of other movement information such as hands, and improving the accuracy of oil fume concentration. In addition, the oil fume concentration identification method is not affected by the detection distance, and the characteristic image of the oil fume can be captured at the moment the oil fume is generated, thereby greatly reducing the delay problem existing in the method of using physical particle detection, achieving the purpose of real-time detection, ensuring the timeliness of oil fume concentration detection, and meeting the higher usage requirements of users.

[0087] Example 2

[0088] like Figure 4 As shown, the method for identifying the oil smoke concentration of this embodiment is a further improvement of the embodiment 1, specifically:

[0089] Step S101 includes:

[0090] S1011, using an image acquisition device to obtain an initial scene frame image corresponding to the area where the smoke barrier is located;

[0091] S1012: Identify a smoke barrier region in the initial scene frame image to obtain a current frame image corresponding to the smoke barrier region.

[0092] Step S102 includes:

[0093] S1021, obtaining a background frame image corresponding to the smoke barrier area;

[0094] In a possible embodiment, step S1021 includes:

[0095] Obtain the historical scene frame image corresponding to the area where the smoke barrier is located within the historical set time period;

[0096] Identify the historical frame image corresponding to the smoke shield area in the historical scene frame image;

[0097] Performing grayscale transformation processing on the historical frame image, and performing frame difference processing on the historical frame image of a subsequent frame after the grayscale transformation processing and the historical frame image of a previous frame to obtain a first frame difference image;

[0098] When the first frame difference image meets the preset condition, the historical frame image of the next frame is used as the background frame image corresponding to the smoke shield area.

[0099] Specifically, when the first frame difference image meets the preset condition, the step of using the subsequent historical frame image as the background frame image corresponding to the smoke shield area includes:

[0100] Obtaining a first ratio between the number of white pixels and the total number of pixels in the first frame difference image;

[0101] When the first proportion is less than a set threshold and lasts for a set time, the historical frame image of the next frame is used as the background frame image corresponding to the smoke shield area.

[0102] S1022: Perform frame difference processing on the current frame image and the background frame image to obtain a target frame difference image.

[0103] The oil fume concentration detection method based on the background frame under the perspective of the smoke shield in this embodiment adopts an oil fume movement area detection method based on the background frame, that is, the frame difference image between the current frame image and the background frame image is used to select the oil fume movement area, avoiding the influence of interference in the cooking process on the identification of the oil fume movement concentration, achieving the effect of more effective detection of the oil fume movement area, and effectively improving the accuracy of oil fume concentration detection.

[0104] Among them, the historical setting time period corresponds to a period of time before any current detection time. As time goes by, the background frame image corresponding to the cooking area is continuously and timely updated, ensuring the accuracy and effectiveness of the oil fume detection results in the cooking area. The frame difference method is used to select the background frame image, and then the frame difference processing is performed based on the background frame image and the current frame image to obtain the target frame difference image. Compared with the traditional method of calculating the frame difference based on the previous and next frames, it can more effectively detect oil fume, improve the accuracy of oil fume motion area detection, and thus ensure the accuracy of oil fume concentration recognition results; especially for the continuous and stable generation of oil fume (continuous and stable smoke), the motion area detection method based on the background frame can more effectively ensure the accuracy of oil fume motion area detection and identify potential oil fume motion areas to the greatest extent.

[0105] Specifically, within a certain set time period, select a certain frame of image With the previous frame image Perform frame difference processing to obtain a frame difference image Right now when When k∈[0,n)}, the pixel position is black, otherwise it is white. Where m, n are the sizes of the image to be detected, and the white part of the pixel position is the potential oil smoke movement area.

[0106] Statistical frame difference image The ratio of the number of white pixels to the total number of pixels in the video is taken into account. Taking into account the difference between the previous and next frame images caused by the noise of the video stream itself (generated by the hardware performance of the device collecting the video stream), the ratio of the number of pixels in the moving area to the number of pixels of a set value (such as 10%) can be selected as the threshold for dividing whether it is a background frame. That is, when the proportion of the moving area is less than 10% and the duration is greater than T, the current frame is taken as the background frame image in a relatively stable situation.

[0107] The background frame image is updated in real time to ensure that the frame difference image between the background frame image and the current frame image can accurately reflect the oil smoke concentration in the current scene.

[0108] Specifically, using the current frame image Image with background frame Perform frame difference calculation to obtain a target frame difference image based on the background frame image Right now

[0109] Alternatively, step S102 includes:

[0110] The current frame image and the previous frame image are subjected to frame difference processing to obtain a target frame difference image. The detection accuracy corresponding to the motion region detection method based on the frame difference of adjacent frames is lower than the accuracy of the motion region detection method based on the background frame.

[0111] Step S103 includes:

[0112] S1031, performing grayscale conversion processing on the target frame difference image to obtain a grayscale image;

[0113] Among them, the original image can be converted into a grayscale image according to the following formula, as follows:

[0114] Gray=0.299R+0.587G+0.114B

[0115] Of course, other grayscale conversion formulas can be used to process the original image according to actual conditions, which will not be described here.

[0116] S1032, performing image binarization processing on the grayscale image to obtain a binary image;

[0117] Image binarization is used to convert the grayscale image into a binary image. The specific formula is as follows:

[0118]

[0119] In the formula, T is the image segmentation threshold, G(x i ,y i ) is a grayscale image, t(x i ,y i ) is a binary image.

[0120] S1033, obtaining the fume movement area corresponding to the current frame image according to the area where the white pixels in the binary image are located;

[0121] Before step S104, the following steps are also included:

[0122] S1040, a correspondence between a proportion of a preset oil smoke movement area and an oil smoke concentration;

[0123] Step S104 includes:

[0124] S1041, calculating a target ratio between the number of white pixels corresponding to the fume motion area and the total number of pixels corresponding to the current frame image;

[0125] S1042: Obtain the target oil fume concentration in the current cooking scene according to the corresponding relationship and the target ratio matching.

[0126] In the present embodiment, the smoke baffle area of ​​the range hood is selected as the identification area for oil fume detection, that is, the viewing angle area of ​​the camera includes the smoke baffle area, and the oil fume concentration in the current cooking scene is judged according to the movement of oil fume on the smoke baffle area, thereby eliminating the interference of other movement information such as hands, and improving the accuracy of oil fume concentration; not only can the oil fume concentration be detected in real time, but also, in view of the fact that the traditional frame difference method is difficult to identify the continuous and stable oil fume movement of the smoke baffle part due to the fixed air volume, a background frame-based oil fume movement area detection method is adopted, that is, the frame difference image between the current frame image and the background frame image is used to select the oil fume movement area, so as to achieve the effect of more effective detection of the oil fume movement area, and further improve the accuracy of oil fume concentration detection; in addition, the oil fume concentration recognition method is not affected by the detection distance, and the characteristic image of the oil fume can be captured at the moment the oil fume is generated, thereby greatly reducing the delay problem existing in the method of using physical particle detection, achieving the purpose of real-time detection, ensuring the timeliness of oil fume concentration detection, and meeting the higher usage needs of users.

[0127] Example 3

[0128] like Figure 5 As shown, the oil fume concentration recognition system of this embodiment includes a current frame image acquisition module 1, a target frame difference image calculation module 2, an oil fume movement area acquisition module 3 and a target oil fume concentration acquisition module 4.

[0129] The current frame image acquisition module 1 is used to acquire the current frame image corresponding to the smoke baffle area of ​​the range hood;

[0130] That is, adopt Figure 1 An image acquisition device (such as a camera) arranged on the main structure of the range hood and located around the smoke baffle collects the current frame image corresponding to the smoke baffle area in real time.

[0131] The target frame difference image calculation module 2 is used to calculate the target frame difference image corresponding to the current frame image;

[0132] The fume movement region acquisition module 3 is used to acquire the fume movement region corresponding to the current frame image according to the target frame difference image; wherein the fume movement region is the fume distribution region in the fume baffle area;

[0133] The target oil fume concentration acquisition module 4 is used to acquire the target oil fume concentration in the current cooking scene based on the oil fume movement area.

[0134] In the present embodiment, the smoke baffle area of ​​the range hood is selected as the identification area for oil fume detection, and a method for detecting oil fume concentration based on the background frame under the perspective of the smoke baffle is proposed. That is, the viewing area of ​​the camera includes the smoke baffle area, and the oil fume concentration in the current cooking scene is judged according to the movement of the oil fume in the smoke baffle area, thereby eliminating the interference of other movement information such as hands, and improving the accuracy of oil fume concentration. In addition, the oil fume concentration identification method is not affected by the detection distance, and the characteristic image of the oil fume can be captured at the moment the oil fume is generated, thereby greatly reducing the delay problem existing in the method of using physical particle detection, achieving the purpose of real-time detection, ensuring the timeliness of oil fume concentration detection, and meeting the higher usage requirements of users.

[0135] Example 4

[0136] like Figure 6 As shown, the oil fume concentration recognition system of this embodiment is a further improvement of the embodiment 3, specifically:

[0137] The current frame image acquisition module 1 of this embodiment includes an initial image acquisition unit 5 , a smoke baffle region recognition unit 6 and a current frame image acquisition unit 7 .

[0138] The initial image acquisition unit 5 is used to acquire an initial scene frame image corresponding to the area where the smoke baffle is located by using an image acquisition device;

[0139] The smoke barrier region recognition unit 6 is used to recognize the smoke barrier region in the initial scene frame image;

[0140] The current frame image acquisition unit 7 is used to acquire the current frame image corresponding to the smoke baffle area.

[0141] The target frame difference image calculation module 2 of this embodiment includes a background frame image acquisition unit 8 and a frame difference processing unit 9 .

[0142] The background frame image acquisition unit 8 is used to acquire the background frame image corresponding to the smoke baffle area;

[0143] Specifically, the background frame image acquisition unit 8 includes a history image acquisition subunit, a history image recognition subunit, a first frame difference image acquisition subunit and a background frame image acquisition subunit.

[0144] The historical image acquisition subunit is used to acquire the historical scene frame image corresponding to the area where the smoke shield is located within the historical set time period;

[0145] The historical image recognition subunit is used to recognize the historical frame image corresponding to the smoke shield area in the historical scene frame image;

[0146] The first frame difference image acquisition subunit is used to perform grayscale transformation processing on the historical frame image, and perform frame difference processing on the historical frame image of the subsequent frame after the grayscale transformation processing and the historical frame image of the previous frame to obtain a first frame difference image;

[0147] The background frame image acquisition subunit is used to use the subsequent historical frame image as the background frame image corresponding to the smoke shield area when the first frame difference image meets a preset condition.

[0148] Among them, the background frame image acquisition subunit is used to obtain the first ratio between the number of white pixels and the total number of pixels in the first frame difference image; when the first ratio is less than the set threshold and lasts for a set time, the historical frame image of the next frame is used as the background frame image corresponding to the smoke shield area.

[0149] The frame difference processing unit 9 is used to perform frame difference processing on the current frame image and the background frame image to obtain a target frame difference image.

[0150] The oil fume concentration detection method based on the background frame under the perspective of the smoke shield in this embodiment adopts an oil fume movement area detection method based on the background frame, that is, the frame difference image between the current frame image and the background frame image is used to select the oil fume movement area, avoiding the influence of interference in the cooking process on the identification of the oil fume movement concentration, achieving the effect of more effective detection of the oil fume movement area, and effectively improving the accuracy of oil fume concentration detection.

[0151] Among them, the historical setting time period corresponds to a period of time before any current detection time. As time goes by, the background frame image corresponding to the cooking area is continuously and timely updated, ensuring the accuracy and effectiveness of the oil fume detection results in the cooking area. The frame difference method is used to select the background frame image, and then the frame difference processing is performed based on the background frame image and the current frame image to obtain the target frame difference image. Compared with the traditional method of calculating the frame difference based on the previous and next frames, it can more effectively detect oil fume, improve the accuracy of oil fume motion area detection, and thus ensure the accuracy of oil fume concentration recognition results; especially for the continuous and stable generation of oil fume (continuous and stable smoke), the motion area detection method based on the background frame can more effectively ensure the accuracy of oil fume motion area detection and identify potential oil fume motion areas to the greatest extent.

[0152] Specifically, within a certain set time period, select a certain frame of image With the previous frame image Perform frame difference processing to obtain a frame difference image Right now when When k∈[0,n)}, the pixel position is black, otherwise it is white. Where m, n are the sizes of the image to be detected, and the white part of the pixel position is the potential oil smoke movement area.

[0153] Statistical frame difference image The ratio of the number of white pixels to the total number of pixels in the video is taken into account. Taking into account the difference between the previous and next frame images caused by the noise of the video stream itself (generated by the hardware performance of the device collecting the video stream), the ratio of the number of pixels in the moving area to the number of pixels of a set value (such as 10%) can be selected as the threshold for dividing whether it is a background frame. That is, when the proportion of the moving area is less than 10% and the duration is greater than T, the current frame is taken as the background frame image in a relatively stable situation.

[0154] The background frame image is updated in real time to ensure that the frame difference image between the background frame image and the current frame image can accurately reflect the oil smoke concentration in the current scene.

[0155] Specifically, using the current frame image Image with background frame Perform frame difference calculation to obtain a target frame difference image based on the background frame image Right now

[0156] Alternatively, the target frame difference image calculation module 2 of this embodiment is used to perform frame difference processing on the current frame image and the previous frame image to obtain the target frame difference image. The detection accuracy corresponding to the motion area detection method based on the frame difference of adjacent frames is lower than the accuracy of the motion area detection method based on the background frame.

[0157] The recognition system of the present embodiment further includes a preset module 10 for presetting a corresponding relationship between a proportion corresponding to the oil fume movement area and the oil fume concentration.

[0158] The oil fume movement area acquisition module 3 comprises a grayscale image acquisition unit 11 , a binary image acquisition unit 12 and an oil fume movement area acquisition unit 13 .

[0159] The grayscale image acquisition unit 11 is used to perform grayscale conversion processing on the target frame difference image to obtain a grayscale image;

[0160] Among them, the original image can be converted into a grayscale image according to the following formula, as follows:

[0161] Gray=0.299R+0.587G+0.114B

[0162] Of course, other grayscale conversion formulas can be used to process the original image according to actual conditions, which will not be described here.

[0163] The binary image acquisition unit 12 is used to perform image binarization processing on the grayscale image to obtain a binary image;

[0164] Image binarization is used to convert the grayscale image into a binary image. The specific formula is as follows:

[0165]

[0166] In the formula, T is the image segmentation threshold, G(x i ,y i ) is a grayscale image, t(x i ,y i ) is a binary image.

[0167] The fume movement region acquisition unit 13 is used to obtain the fume movement region corresponding to the current frame image according to the region where the white pixel points in the binary image are located;

[0168] The target oil fume concentration acquisition module 4 includes a target ratio calculation unit 14 and a target oil fume concentration acquisition unit 15 .

[0169] The target ratio calculation unit 14 is used to calculate the target ratio between the number of white pixels corresponding to the fume motion area and the total number of pixels corresponding to the current frame image;

[0170] The target fume concentration acquisition unit 15 is used to obtain the target fume concentration in the current cooking scene according to the corresponding relationship and the target ratio matching.

[0171] In the present embodiment, the smoke baffle area of ​​the range hood is selected as the identification area for oil fume detection, that is, the viewing angle area of ​​the camera includes the smoke baffle area, and the oil fume concentration in the current cooking scene is judged according to the movement of oil fume on the smoke baffle area, thereby eliminating the interference of other movement information such as hands, and improving the accuracy of oil fume concentration; not only can the oil fume concentration be detected in real time, but also, in view of the fact that the traditional frame difference method is difficult to identify the continuous and stable oil fume movement of the smoke baffle part due to the fixed air volume, a background frame-based oil fume movement area detection method is adopted, that is, the frame difference image between the current frame image and the background frame image is used to select the oil fume movement area, so as to achieve the effect of more effective detection of the oil fume movement area, and further improve the accuracy of oil fume concentration detection; in addition, the oil fume concentration recognition method is not affected by the detection distance, and the characteristic image of the oil fume can be captured at the moment the oil fume is generated, thereby greatly reducing the delay problem existing in the method of using physical particle detection, achieving the purpose of real-time detection, ensuring the timeliness of oil fume concentration detection, and meeting the higher usage needs of users.

[0172] Example 5

[0173] Figure 7This is a schematic diagram of the structure of an electronic device provided in Example 5 of the present invention. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method for identifying the oil fume concentration in Example 1 or 2 when executing the program. Figure 7 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0174] like Figure 7 As shown, the electronic device 30 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).

[0175] The bus 33 includes a data bus, an address bus, and a control bus.

[0176] The memory 32 may include a volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322 , and may further include a read-only memory (ROM) 323 .

[0177] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, such program modules 324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0178] The processor 31 executes various functional applications and data processing by running the computer program stored in the memory 32, such as the method for identifying the oil smoke concentration in Embodiment 1 or 2 of the present invention.

[0179] The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 35. Furthermore, the model generating device 30 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 36. Figure 7 As shown, the network adapter 36 communicates with other modules of the model-generated device 30 via the bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the model-generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0180] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0181] Example 6

[0182] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the method for identifying oil fume concentration in Embodiment 1 or 2 are implemented.

[0183] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0184] In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps in the method for identifying the oil fume concentration in Example 1 or 2.

[0185] Among them, the program code for executing the present invention can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.

[0186] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. A method for identifying oil fume concentration, characterized in that: The identification method comprises: Obtain the current frame image corresponding to the smoke baffle area of ​​the range hood; Calculate and obtain a target frame difference image corresponding to the current frame image; Acquire the fume movement area corresponding to the current frame image according to the target frame difference image, and acquire the target fume concentration in the current cooking scene based on the fume movement area; Wherein, the oil fume movement area is the oil fume distribution area in the smoke baffle area; The step of calculating and obtaining a target frame difference image corresponding to the current frame image comprises: Acquire a background frame image corresponding to the smoke baffle area; Performing frame difference processing on the current frame image and the background frame image to obtain the target frame difference image; The step of obtaining the background frame image corresponding to the smoke baffle area comprises: Obtain the historical scene frame image corresponding to the area where the smoke barrier is located within the historical set time period; Identifying a historical frame image corresponding to the smoke shield area in the historical scene frame image; Performing grayscale transformation processing on the historical frame image, and performing frame difference processing on the historical frame image of a subsequent frame after the grayscale transformation processing and the historical frame image of a previous frame to obtain a first frame difference image; Obtaining a first ratio between the number of white pixels and the total number of pixels in the first frame difference image; When the first proportion is less than a set threshold and lasts for a set time, the historical frame image of the next frame is used as the background frame image corresponding to the smoke shield area; Perform frame difference processing on the current frame image and the background frame image to obtain the target frame difference image.

2. The method for identifying oil fume concentration according to claim 1, characterized in that: An image acquisition device is arranged on the main structure of the range hood and around the smoke baffle; The step of obtaining the current frame image corresponding to the smoke baffle area of ​​the range hood comprises: Using the image acquisition device to acquire an initial scene frame image corresponding to the area where the smoke baffle is located; The smoke shield area in the initial scene frame image is identified to obtain the current frame image corresponding to the smoke shield area.

3. The method for identifying oil smoke concentration according to claim 1, characterized in that: The step of calculating and obtaining a target frame difference image corresponding to the current frame image comprises: Perform frame difference processing on the current frame image and the previous frame image to obtain the target frame difference image.

4. The method for identifying oil fume concentration according to claim 1 or 3, characterized in that: The identification method further comprises: Preset the corresponding relationship between the proportion of the oil smoke movement area and the oil smoke concentration; The step of acquiring the fume movement area corresponding to the current frame image according to the target frame difference image, and acquiring the fume concentration in the current cooking scene based on the fume movement area includes: Performing grayscale conversion processing on the target frame difference image to obtain a grayscale image; Performing image binarization processing on the grayscale image to obtain a binary image; Obtaining the fume movement area corresponding to the current frame image according to the area where the white pixels in the binary image are located; Calculating a target ratio between the number of white pixels corresponding to the fume motion area and the total number of pixels corresponding to the current frame image; The target oil fume concentration in the current cooking scene is obtained according to the corresponding relationship and the target ratio matching.

5. A system for identifying oil fume concentration, characterized in that: The identification system comprises: A current frame image acquisition module is used to acquire a current frame image corresponding to the smoke baffle area of ​​the range hood; A target frame difference image calculation module, used for calculating and obtaining a target frame difference image corresponding to the current frame image; A fume movement region acquisition module, used to acquire the fume movement region corresponding to the current frame image according to the target frame difference image; wherein the fume movement region is the fume distribution region in the fume baffle region; A target fume concentration acquisition module, used to acquire a target fume concentration in a current cooking scene based on the fume movement area; Wherein, the target frame difference image calculation module includes: A background frame image acquisition unit, used to acquire a background frame image corresponding to the smoke baffle area; A frame difference processing unit, used for performing frame difference processing on the current frame image and the background frame image to obtain the target frame difference image; The background frame image acquisition unit comprises: A historical image acquisition subunit is used to acquire historical scene frame images corresponding to the area where the smoke barrier is located within a historical set time period; A historical image recognition subunit, used to recognize the historical frame image corresponding to the smoke shield area in the historical scene frame image; A first frame difference image acquisition subunit is used to perform grayscale transformation processing on the historical frame image, and perform frame difference processing on the historical frame image of a subsequent frame after the grayscale transformation processing and the historical frame image of a previous frame to obtain a first frame difference image; The background frame image acquisition subunit is used to obtain a first ratio between the number of white pixels and the total number of pixels in the first frame difference image; when the first ratio is less than a set threshold and lasts for a set time, the historical frame image of the next frame is used as the background frame image corresponding to the smoke shield area.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for identifying the oil smoke concentration according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for identifying oil smoke concentration described in any one of claims 1 to 4 are implemented.