Method, system, electronic device and storage medium for detecting oil fume concentration
By calculating the high-frequency energy of the fume image in the frequency domain, combined with the average amplitude gain, the problems of low detection accuracy of fume concentration and user experience are solved, and more accurate fume concentration detection and smart fume control are achieved.
Patent Information
- Application Number
- CN202110104078.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-26
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2041-01-26
AI Technical Summary
The existing oil smoke concentration detection methods have problems with low accuracy and user experience, especially the judgment results of grayscale calculations vary greatly under different background environments, and the accuracy of oil smoke concentration detection cannot be guaranteed.
By obtaining the current scene frame image of the smoke stove scene, the oil smoke generation area is identified, its high-frequency energy in the frequency domain is calculated to characterize the edge information of the oil smoke, and the oil smoke concentration is determined based on the high-frequency energy, and high-pass filtering is performed using a preset proportional window. To obtain high-frequency energy, finally compare it with the oil smoke concentration threshold according to the average amplitude gain to determine the target oil smoke concentration and adjust the hood gear.
It improves the accuracy and reliability of oil fume concentration detection, reduces user operation burden, improves user experience, and ensures the intelligent level of hood control and smoke removal effect.
Smart Images

Figure CN112926576B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil fume identification, and in particular to an oil fume concentration detection method, system, electronic equipment and storage medium. Background Art
[0002] As the amount of oil smoke generated during cooking changes dynamically, the air volume of the range hood needs to be adjusted accordingly according to the amount of oil smoke in order to achieve a good kitchen smoke removal effect. At present, the range hood's own sensing system has gaps or poor performance in judging the oil smoke condition, so it is very necessary to improve the range hood sensing system's detection effect on oil smoke concentration.
[0003] The following methods are currently used to detect the concentration of oil smoke: (1) The user determines the concentration of kitchen oil smoke with the naked eye, and then manually adjusts the air volume of the range hood based on the determination result; however, this detection method increases the user's workload and has a low degree of intelligence, which affects the user's experience; (2) Using an oil smoke sensor to detect the concentration of kitchen oil smoke; however, this detection method relies on the performance of hardware equipment, and gas sensors, light sensors and other sensors have problems such as short lifespan, high cost, and installation inside the exhaust duct, making later replacement and maintenance difficult; (3) Using a camera to capture images of the cooking scene, the measurement value is obtained through grayscale calculation, and the smoke concentration is determined based on the oil smoke setting threshold; however, in this detection method, the grayscale calculation results vary under different background environments, and using a fixed oil smoke setting threshold will greatly affect the oil smoke classification effect, and the accuracy of oil smoke concentration detection cannot be guaranteed. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the defect that the oil fume concentration detection method in the prior art has low oil fume concentration detection accuracy, which affects the user experience, and to provide an oil fume concentration detection method, system, electronic device and storage medium.
[0005] The present invention solves the above technical problems through the following technical solutions:
[0006] The present invention provides a method for detecting oil fume concentration, the detection method comprising:
[0007] Get the current scene frame image corresponding to the smoke stove scene;
[0008] Identifying a fume generating area in the current scene frame image;
[0009] Calculating the high-frequency energy of the oil smoke generating area in the frequency domain; wherein the high-frequency energy is used to characterize the edge information corresponding to the oil smoke;
[0010] The target oil smoke concentration in the current scene frame image is determined according to the high-frequency energy.
[0011] Preferably, the step of calculating the high-frequency energy of the oil smoke generating area in the frequency domain comprises:
[0012] Performing size normalization processing on the oil smoke generating area;
[0013] Converting the oil smoke generating area after size normalization to the frequency domain to obtain a transformation array in the frequency domain;
[0014] Converting the transformation array into an amplitude spectrum; wherein the amplitude spectrum is used to characterize an amplitude surface of the amplitude in a two-dimensional frequency domain;
[0015] The high-frequency energy corresponding to the oil smoke generating area in the high-frequency area is obtained based on the amplitude spectrum.
[0016] Preferably, the step of determining the target oil fume concentration in the current scene frame image according to the high-frequency energy comprises:
[0017] Calculate and obtain the average amplitude gain corresponding to the high-frequency energy in the high-frequency region of the oil smoke generation area;
[0018] The target oil smoke concentration in the current scene frame image is determined according to the average amplitude gain.
[0019] Preferably, the step of determining the target oil fume concentration in the current scene frame image according to the average amplitude gain comprises:
[0020] The average amplitude gain and the oil fume concentration threshold are compared to obtain a comparison result, and the target oil fume concentration in the current scene frame image is determined according to the comparison result.
[0021] Preferably, the step of obtaining the high-frequency energy corresponding to the oil smoke generating area in the high-frequency area based on the amplitude spectrum includes:
[0022] The amplitude spectrum is high-pass filtered using a preset proportional window to obtain the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area.
[0023] Preferably, the calculation formula corresponding to the step of converting the oil smoke generating area after the size normalization process to the frequency domain to obtain the transformation array in the frequency domain is as follows:
[0024]
[0025] Among them, Ω Nor represents the oil smoke generating area after normalization, whose size is M×N, u and v are frequency variables in different directions, x and y are integers, and F(u,v) represents the transformation array;
[0026] The calculation formula corresponding to the step of converting the transformation array into an amplitude spectrum is as follows:
[0027]
[0028] Where |F(u,v)| represents the amplitude spectrum, R(u,v) and I(u,v) are the real and imaginary parts of |F(u,v)| respectively;
[0029] The calculation formula corresponding to the step of high-pass filtering the amplitude spectrum using a preset proportional window to obtain the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area is as follows:
[0030]
[0031] Wherein, |F(u,v)|′ represents the high-frequency energy corresponding to the high-frequency region, Φ represents the preset proportional window, the size of Φ is αM×αN, and α is the low-frequency filter coefficient;
[0032] The calculation formula corresponding to the step of calculating the average amplitude gain corresponding to the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area is as follows:
[0033]
[0034] Wherein, M represents the average amplitude gain.
[0035] Preferably, the step of obtaining the current scene frame image corresponding to the smoke stove scene includes:
[0036] Collecting a cooking video frame image corresponding to the smoke stove scene, and using a current cooking video frame image as the current scene frame image corresponding to the smoke stove scene;
[0037] The step of identifying the oil smoke generation area in the current scene frame image comprises:
[0038] Performing grayscale conversion processing on the current scene frame image to obtain a corresponding grayscale image;
[0039] A target detection algorithm is used to detect a pot area image of the area where the pot is located in the grayscale image, and the oil smoke generating area is determined according to the pot area image.
[0040] Preferably, the detection method further comprises:
[0041] Preset the corresponding relationship between different oil smoke concentrations and range hood gears;
[0042] After the step of determining the target oil smoke concentration in the current scene frame image according to the high-frequency energy, the following step is further included:
[0043] The corresponding target range hood gear position is obtained according to the target oil fume concentration, and the working gear position of the range hood is adjusted according to the target range hood gear position.
[0044] The present invention also provides a system for detecting oil fume concentration, the detection system comprising:
[0045] The current scene frame image acquisition module is used to acquire the current scene frame image corresponding to the smoke stove scene;
[0046] A fume generation area recognition module, used to recognize the fume generation area in the current scene frame image;
[0047] A high-frequency energy calculation module, used to calculate the high-frequency energy of the oil smoke generating area in the frequency domain; wherein the high-frequency energy is used to characterize the edge information corresponding to the oil smoke;
[0048] The oil fume concentration determination module is used to determine the target oil fume concentration in the current scene frame image according to the high-frequency energy.
[0049] Preferably, the high-frequency energy calculation module includes:
[0050] A normalization processing unit, used for performing size normalization processing on the oil smoke generating area;
[0051] A transformation array acquisition unit, used for converting the oil smoke generating area after size normalization into a frequency domain to obtain a transformation array in the frequency domain;
[0052] An amplitude spectrum acquisition unit, used to convert the transformation array into an amplitude spectrum; wherein the amplitude spectrum is used to characterize an amplitude surface of the amplitude in a two-dimensional frequency domain;
[0053] A high-frequency energy acquisition unit is used to acquire the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area based on the amplitude spectrum.
[0054] Preferably, the oil fume concentration determination module includes:
[0055] An average amplitude gain calculation unit, used for calculating and obtaining an average amplitude gain corresponding to the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area;
[0056] A target oil fume concentration determination unit is used to determine the target oil fume concentration in the current scene frame image according to the average amplitude gain.
[0057] Preferably, the target oil fume concentration determination unit is used to compare the average amplitude gain and the oil fume concentration threshold and obtain a comparison result, and determine the target oil fume concentration in the current scene frame image according to the comparison result.
[0058] Preferably, the high-frequency energy acquisition unit is used to perform high-pass filtering on the amplitude spectrum using a preset proportional window to obtain the high-frequency energy corresponding to the oil smoke generation area in the high-frequency region.
[0059] Preferably, the transformation array acquisition unit acquires the calculation formula corresponding to the transformation array as follows:
[0060]
[0061] Among them, Ω Nor represents the oil smoke generating area after normalization, whose size is M×N, u and v are frequency variables in different directions, x and y are integers, and F(u,v) represents the transformation array;
[0062] The amplitude spectrum acquisition unit acquires the amplitude spectrum corresponding to the following calculation formula:
[0063]
[0064] Where |F(u,v)| represents the amplitude spectrum, R(u,v) and I(u,v) are the real and imaginary parts of |F(u,v)| respectively;
[0065] The high-frequency energy acquisition unit performs high-pass filtering on the amplitude spectrum to obtain the high-frequency energy. The corresponding calculation formula is as follows:
[0066]
[0067] Wherein, |F(u,v)|′ represents the high-frequency energy corresponding to the high-frequency region, Φ represents the preset proportional window, the size of Φ is αM×αN, and α is the low-frequency filter coefficient;
[0068] The calculation formula corresponding to the average amplitude gain obtained by the average amplitude gain calculation unit is as follows:
[0069]
[0070] Wherein, M represents the average amplitude gain.
[0071] Preferably, the current scene frame image acquisition module is used to collect the cooking video frame image corresponding to the smoke stove scene, and use the current cooking video frame image as the current scene frame image corresponding to the smoke stove scene;
[0072] The oil smoke generating area identification module comprises:
[0073] A grayscale conversion unit, used for performing grayscale conversion processing on the current scene frame image to obtain a corresponding grayscale image;
[0074] The oil fume generation area determination unit is used to detect a pot area image of the area where the pot is located in the grayscale image by using a target detection algorithm, and determine the oil fume generation area according to the pot area image.
[0075] Preferably, the detection system further comprises:
[0076] A corresponding relationship preset module is used to preset the corresponding relationship between different oil fume concentrations and range hood gear positions;
[0077] The range hood gear matching module is used to obtain a corresponding target range hood gear according to the target oil fume concentration, and adjust the working gear of the range hood according to the target range hood gear.
[0078] 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 detecting oil fume concentration when executing the computer program.
[0079] 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 detecting oil fume concentration are implemented.
[0080] 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.
[0081] The positive and progressive effects of the present invention are:
[0082] By counting the high-frequency energy of the oil fume image in the frequency domain to determine the oil fume concentration in the current scene frame image, the image is converted to the frequency domain for amplitude statistics, which avoids the interference of color differences in different user environments on the judgment of oil fume concentration, effectively improves the accuracy and reliability of oil fume concentration detection, ensures the intelligent level of range hood control, reduces the burden of user operation, and improves the user experience; introduces the corresponding average amplitude gain in the high-frequency area, and compares the average amplitude gain with the oil fume concentration threshold to finally determine the oil fume concentration of the current range hood scene, further improving the reliability of oil fume concentration detection; in addition, according to the pre-set correspondence between the oil fume concentration and the range hood gear, the range hood working gear is matched and automatically adjusted in real time according to the determined oil fume concentration to ensure the best smoke removal effect and the lowest energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 It is a schematic diagram of a smoke stove scene of the present invention.
[0084] Figure 2 This is a flow chart of the method for detecting oil fume concentration according to Example 1 of the present invention.
[0085] Figure 3 This is a flow chart of the method for detecting oil fume concentration according to Example 2 of the present invention.
[0086] Figure 4 This is a module schematic diagram of the oil fume concentration detection system of Example 3 of the present invention.
[0087] Figure 5 This is a module schematic diagram of the oil fume concentration detection system of Example 4 of the present invention.
[0088] Figure 6 This is a schematic diagram of the structure of an electronic device for implementing a method for detecting oil fume concentration according to Example 5 of the present invention. DETAILED DESCRIPTION
[0089] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.
[0090] The oil fume concentration detection 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 smoke stove scenario.
[0091] Take the smoke stove scene as an example. Figure 1 As shown, a represents a range hood, b represents an image acquisition device (such as a camera) arranged on the range hood, which is used to acquire scene images within the camera's field of view in real time; c represents a stove, and d represents a pot placed on the stove c.
[0092] Example 1
[0093] like Figure 2 As shown, the method for detecting the oil smoke concentration of this embodiment includes:
[0094] S101, obtaining a current scene frame image corresponding to a smoke stove scene;
[0095] S102, identifying the oil smoke generating area in the current scene frame image;
[0096] S103, calculating the high-frequency energy of the oil smoke generating area in the frequency domain; wherein the high-frequency energy is used to characterize the edge information corresponding to the oil smoke;
[0097] For oil smoke images, the characteristic of oil smoke in the image is to blur the edge of the image, and the edge information corresponds to the high-frequency area in the image frequency domain. According to this principle, the oil smoke concentration of the current image can be determined by counting the high-frequency energy in the image frequency domain.
[0098] S104: Determine the target oil smoke concentration in the current scene frame image according to the high-frequency energy.
[0099] In this embodiment, a method for measuring the oil fume concentration of an image in the image frequency domain is proposed. The high-frequency energy of the oil fume image in the frequency domain is counted to judge the oil fume concentration in the current scene frame image, thereby avoiding the interference of color differences in different user environments on the oil fume concentration judgment, effectively improving the accuracy and reliability of oil fume concentration detection, ensuring the intelligent level of range hood control, reducing the burden of user operation, and improving the user's usage experience.
[0100] Example 2
[0101] like Figure 3 As shown, the method for detecting the oil smoke concentration of this embodiment is a further improvement on the embodiment 1, specifically:
[0102] Step S101 includes:
[0103] S1011, collecting cooking video frame images corresponding to the smoke and stove scene, and using the current cooking video frame image as the current scene frame image corresponding to the smoke and stove scene;
[0104] Step S102 includes:
[0105] S1021, performing grayscale conversion processing on the current scene frame image to obtain a corresponding grayscale image; wherein, the processing is performed using existing image grayscale processing technology, so it is not repeated here.
[0106] S1022: Detect the pot area image of the area where the pot is located in the grayscale image using a target detection algorithm, and determine the oil smoke generation area based on the pot area image. In addition, other algorithms that can identify the area where the pot is located in the grayscale image can also be used.
[0107] Step S103 includes:
[0108] S1031, performing size normalization processing on the oil smoke generating area;
[0109] The directly obtained oil smoke generating area Ω Nor Scaling to a fixed size means adjusting the image size to a certain size to facilitate subsequent image processing efficiency. Nor The size is M×N, where M and N are constants and can be re-determined or adjusted according to actual needs.
[0110] S1032, converting the oil smoke generation area after the size normalization process to the frequency domain to obtain a transformation array in the frequency domain;
[0111] Among them, the oil smoke generating area Ω after size normalization Nor A two-dimensional discrete Fourier transform is performed to convert it into the frequency domain. Of course, it can also be converted into the frequency domain according to other methods.
[0112] The calculation formula corresponding to step S1032 is as follows:
[0113]
[0114] Where u and v are frequency variables in different directions, x and y are integers, and F(u,v) represents the transformation array;
[0115] S1033, converting the transformation array into an amplitude spectrum; wherein the amplitude spectrum is used to characterize an amplitude surface of the amplitude in a two-dimensional frequency domain;
[0116] The calculation formula corresponding to step S1033 is as follows:
[0117]
[0118] Where |F(u,v)| represents the amplitude spectrum, R(u,v) and I(u,v) are the real and imaginary parts of |F(u,v)| respectively;
[0119] S1034, obtaining high-frequency energy corresponding to the oil smoke generation area in the high-frequency region based on the amplitude spectrum, that is, obtaining the high-frequency energy in the image by performing statistical calculations on the amplitude spectrum.
[0120] Specifically, step S1034 includes:
[0121] The amplitude spectrum is high-pass filtered using a preset proportional window to obtain the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area. The calculation formula corresponding to this step is as follows:
[0122]
[0123] Among them, |F(u,v)|′ represents the high-frequency energy corresponding to the high-frequency area, Φ represents the preset proportional window, the size of Φ is αM×αN, and α is the low-frequency filter coefficient;
[0124] The above calculation formula |F(u,v)|′ only calculates the amplitude gain in the high-frequency region, and sets the low-frequency region to zero, that is, the amplitude spectrum is high-pass filtered through a preset proportional window Φ to filter out the amplitude spectrum in the low-frequency band.
[0125] In this embodiment, the image is transferred to the frequency domain for amplitude statistics, thereby avoiding the interference of color differences in different user environments on the determination of oil fume concentration, and effectively improving the accuracy and reliability of the oil fume concentration detection results.
[0126] Step S104 includes:
[0127] S1041, calculating and obtaining the average amplitude gain corresponding to the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area;
[0128] S1042: Determine the target oil fume concentration in the current scene frame image according to the average amplitude gain.
[0129] Specifically, step S1042 includes:
[0130] Compare the average amplitude gain and the oil smoke concentration threshold and obtain the comparison result. According to the comparison result, determine the target oil smoke concentration in the current scene frame image. The calculation formula corresponding to this step is as follows:
[0131]
[0132] Wherein, M represents the average amplitude gain.
[0133] In this embodiment, the average amplitude gain M is introduced to effectively measure the oil fume concentration in the image, and effectively improve the accuracy and reliability of the oil fume concentration detection result.
[0134] In addition, the detection method of this embodiment also includes:
[0135] Preset the corresponding relationship between different oil smoke concentrations and range hood gears;
[0136] After step S104, the following steps are also included:
[0137] S105, obtaining a corresponding target range hood gear position according to the target oil fume concentration, and adjusting the range hood operating gear position according to the target range hood gear position.
[0138] According to the pre-set correspondence between the oil fume concentration and the range hood gear, the range hood working gear is matched and automatically adjusted in real time according to the determined oil fume concentration to ensure the best smoke removal effect and the lowest energy consumption; it reduces the burden on users to operate the range hood, improves the intelligence level of range hood control, and enhances the user experience.
[0139] In this embodiment, the high-frequency energy of the oil fume image in the frequency domain is counted to determine the oil fume concentration in the current scene frame image, and the image is converted to the frequency domain for amplitude statistics, thereby avoiding the interference of color differences in different user environments on the judgment of oil fume concentration, effectively improving the accuracy and reliability of oil fume concentration detection, ensuring the intelligent level of range hood control, reducing the burden of user operation, and improving the user's usage experience; the corresponding average amplitude gain is introduced in the high-frequency area, and the average amplitude gain is compared with the oil fume concentration threshold to finally determine the oil fume concentration of the current range hood scene, thereby further improving the reliability of oil fume concentration detection.
[0140] Example 3
[0141] like Figure 4As shown, the oil fume concentration detection system of this embodiment includes a current scene frame image acquisition module 1, an oil fume generation area recognition module 2, a high-frequency energy calculation module 3 and an oil fume concentration determination module 4.
[0142] The current scene frame image acquisition module 1 is used to acquire the current scene frame image corresponding to the smoke stove scene;
[0143] The oil smoke generation area recognition module 2 is used to recognize the oil smoke generation area in the current scene frame image;
[0144] The high-frequency energy calculation module 3 is used to calculate the high-frequency energy of the oil smoke generation area in the frequency domain; wherein the high-frequency energy is used to characterize the edge information corresponding to the oil smoke;
[0145] For oil smoke images, the characteristic of oil smoke in an image is to blur the edge of the image, and the edge information corresponds to the high-frequency area in the image frequency domain. According to this principle, the oil smoke concentration of the current image can be determined by counting the high-frequency energy in the image frequency domain. The oil smoke concentration determination module 4 is used to determine the target oil smoke concentration in the current scene frame image according to the high-frequency energy.
[0146] In this embodiment, a method for measuring the oil fume concentration of an image in the image frequency domain is proposed. The high-frequency energy of the oil fume image in the frequency domain is counted to judge the oil fume concentration in the current scene frame image, thereby avoiding the interference of color differences in different user environments on the oil fume concentration judgment, effectively improving the accuracy and reliability of oil fume concentration detection, ensuring the intelligent level of range hood control, reducing the burden of user operation, and improving the user's usage experience.
[0147] Example 4
[0148] like Figure 5 As shown, the oil smoke concentration detection system of this embodiment is a further improvement of embodiment 3, specifically:
[0149] The current scene frame image acquisition module 1 of this embodiment is used to collect the cooking video frame image corresponding to the smoke stove scene, and use the current cooking video frame image as the current scene frame image corresponding to the smoke stove scene.
[0150] The oil fume generating area identification module 2 comprises a grayscale conversion unit 5 and an oil fume generating area determination unit 6 .
[0151] The grayscale conversion unit 5 is used to perform grayscale conversion processing on the current scene frame image to obtain a corresponding grayscale image; wherein, the processing is performed using existing image grayscale processing technology, so it is not repeated here.
[0152] The fume generation area determination unit 6 is used to detect the pot area image of the pot area in the grayscale image using a target detection algorithm, and determine the fume generation area based on the pot area image. In addition, other algorithms that can identify the pot area in the grayscale image can also be used.
[0153] The high-frequency energy calculation module 3 of this embodiment includes a normalization processing unit 7 , a transformation array acquisition unit 8 , an amplitude spectrum acquisition unit 9 and a high-frequency energy acquisition unit 10 .
[0154] The normalization processing unit 7 is used to perform size normalization processing on the oil smoke generating area;
[0155] The directly obtained oil smoke generating area Ω Nor Scaling to a fixed size means adjusting the image size to a certain size to facilitate subsequent image processing efficiency. Nor The size is M×N, where M and N are constants and can be re-determined or adjusted according to actual needs.
[0156] The transformation array acquisition unit 8 is used to transform the oil smoke generation area after the size normalization process into the frequency domain to obtain a transformation array in the frequency domain;
[0157] Among them, the oil smoke generating area Ω after size normalization Nor A two-dimensional discrete Fourier transform is performed to convert it into the frequency domain. Of course, it can also be converted into the frequency domain according to other methods.
[0158] The transformation array acquisition unit 8 obtains the calculation formula corresponding to the transformation array as follows:
[0159]
[0160] Among them, Ω Nor represents the normalized oil smoke generation area, whose size is M×N, u and v are frequency variables in different directions, x and y are integers, and F(u,v) represents the transformation array;
[0161] The amplitude spectrum acquisition unit 9 is used to convert the transformation array into an amplitude spectrum; wherein the amplitude spectrum is used to characterize the amplitude surface of the amplitude in the two-dimensional frequency domain;
[0162] The amplitude spectrum acquisition unit 9 acquires the calculation formula corresponding to the amplitude spectrum as follows:
[0163]
[0164] Where |F(u,v)| represents the amplitude spectrum, R(u,v) and I(u,v) are the real and imaginary parts of |F(u,v)| respectively;
[0165] The high-frequency energy acquisition unit 10 is used to acquire the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area based on the amplitude spectrum.
[0166] Specifically, the high-frequency energy acquisition unit 10 is used to perform high-pass filtering on the amplitude spectrum using a preset ratio window to obtain the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area, that is, to obtain the high-frequency energy in the image by performing statistical calculations on the amplitude spectrum.
[0167] The high-frequency energy acquisition unit 10 performs high-pass filtering on the amplitude spectrum to obtain the corresponding calculation formula of high-frequency energy as follows:
[0168]
[0169] Among them, |F(u,v)|′ represents the high-frequency energy corresponding to the high-frequency area, Φ represents the preset proportional window, the size of Φ is αM×αN, and α is the low-frequency filter coefficient;
[0170] The above calculation formula |F(u,v)|′ only calculates the amplitude gain in the high-frequency region, and sets the low-frequency region to zero, that is, the amplitude spectrum is high-pass filtered through a preset proportional window Φ to filter out the amplitude spectrum in the low-frequency band.
[0171] In this embodiment, the image is transferred to the frequency domain for amplitude statistics, thereby avoiding the interference of color differences in different user environments on the determination of oil fume concentration, and effectively improving the accuracy and reliability of the oil fume concentration detection results.
[0172] The oil fume concentration determination module 4 of this embodiment includes an average amplitude gain calculation unit 11 and a target oil fume concentration determination unit 12 .
[0173] The average amplitude gain calculation unit 11 is used to calculate the average amplitude gain corresponding to the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area;
[0174] The average amplitude gain calculation unit 11 obtains the calculation formula corresponding to the average amplitude gain as follows:
[0175]
[0176] Wherein, M represents the average amplitude gain.
[0177] In this embodiment, the average amplitude gain M is introduced to effectively measure the oil fume concentration in the image, and effectively improve the accuracy and reliability of the oil fume concentration detection result.
[0178] The target fume concentration determination unit 12 is used to determine the target fume concentration in the current scene frame image according to the average amplitude gain.
[0179] Specifically, the target fume concentration determination unit 12 is used to compare the average amplitude gain and the fume concentration threshold and obtain a comparison result, and determine the target fume concentration in the current scene frame image according to the comparison result.
[0180] In addition, the detection system of this embodiment further includes a corresponding relationship preset module 13 and a range hood gear matching module 14 .
[0181] The corresponding relationship preset module 13 is used to preset the corresponding relationship between different oil fume concentrations and range hood gear positions;
[0182] The range hood gear matching module 14 is used to obtain a corresponding target range hood gear according to the target oil fume concentration, and adjust the working gear of the range hood according to the target range hood gear.
[0183] According to the pre-set correspondence between the oil fume concentration and the range hood gear, the range hood working gear is matched and automatically adjusted in real time according to the determined oil fume concentration to ensure the best smoke removal effect and the lowest energy consumption; it reduces the burden on users to operate the range hood, improves the intelligence level of range hood control, and enhances the user experience.
[0184] In this embodiment, the high-frequency energy of the oil fume image in the frequency domain is counted to determine the oil fume concentration in the current scene frame image, and the image is converted to the frequency domain for amplitude statistics, thereby avoiding the interference of color differences in different user environments on the judgment of oil fume concentration, effectively improving the accuracy and reliability of oil fume concentration detection, ensuring the intelligent level of range hood control, reducing the burden of user operation, and improving the user's usage experience; the corresponding average amplitude gain is introduced in the high-frequency area, and the average amplitude gain is compared with the oil fume concentration threshold to finally determine the oil fume concentration of the current range hood scene, thereby further improving the reliability of oil fume concentration detection.
[0185] Example 5
[0186] Figure 6 This 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 detecting the oil fume concentration in any one of Examples 1 or 2 when executing the program. Figure 6 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.
[0187] like Figure 6As 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).
[0188] The bus 33 includes a data bus, an address bus, and a control bus.
[0189] 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 .
[0190] 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.
[0191] 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 detecting the oil fume concentration in any one of Embodiments 1 or 2 of the present invention.
[0192] 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 6 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.
[0193] 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.
[0194] Example 6
[0195] 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 detecting oil fume concentration in any one of Embodiments 1 or 2 are implemented.
[0196] 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.
[0197] 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 detecting oil fume concentration in any one of Examples 1 or 2.
[0198] 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.
[0199] 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 detecting oil fume concentration, characterized in that: The detection method comprises: Get the current scene frame image corresponding to the smoke stove scene; Identifying a fume generating area in the current scene frame image; Calculating the high-frequency energy of the oil smoke generating area in the frequency domain; wherein the high-frequency energy is used to characterize the edge information corresponding to the oil smoke; Determining a target oil smoke concentration in the current scene frame image according to the high-frequency energy; The step of calculating the high-frequency energy of the oil smoke generating area in the frequency domain comprises: Performing size normalization processing on the oil smoke generating area; Converting the oil smoke generating area after size normalization to the frequency domain to obtain a transformation array in the frequency domain; Converting the transformation array into an amplitude spectrum; wherein the amplitude spectrum is used to characterize an amplitude surface of the amplitude in a two-dimensional frequency domain; The high-frequency energy corresponding to the oil fume generation area in the high-frequency area is obtained based on the amplitude spectrum; and the step of determining the target oil fume concentration in the current scene frame image according to the high-frequency energy includes: Calculate and obtain the average amplitude gain corresponding to the high-frequency energy in the high-frequency region of the oil smoke generation area; Determining the target oil fume concentration in the current scene frame image according to the average amplitude gain; the step of determining the target oil fume concentration in the current scene frame image according to the average amplitude gain comprises: The average amplitude gain and the oil fume concentration threshold are compared to obtain a comparison result, and the target oil fume concentration in the current scene frame image is determined according to the comparison result.
2. The method for detecting oil fume concentration according to claim 1, characterized in that: The step of obtaining the high-frequency energy corresponding to the oil smoke generating area in the high-frequency area based on the amplitude spectrum includes: The amplitude spectrum is high-pass filtered using a preset proportional window to obtain the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area.
3. The method for detecting oil fume concentration according to claim 2, characterized in that: The calculation formula corresponding to the step of converting the oil smoke generation area after the size normalization process to the frequency domain to obtain the transformation array in the frequency domain is as follows: in, represents the oil smoke generating area after normalization, and its size is , and are frequency variables in different directions, Take the integer, represents the transformation array; The calculation formula corresponding to the step of converting the transformation array into an amplitude spectrum is as follows: in, represents the amplitude spectrum, , They are The real and imaginary parts of The calculation formula corresponding to the step of high-pass filtering the amplitude spectrum using a preset proportional window to obtain the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area is as follows: in, represents the high-frequency energy corresponding to the high-frequency region, represents the preset proportion window, Size , is the low frequency filter coefficient; The calculation formula corresponding to the step of calculating the average amplitude gain corresponding to the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area is as follows: in, represents the average amplitude gain.
4. The method for detecting oil fume concentration according to claim 1, characterized in that: The step of obtaining the current scene frame image corresponding to the smoke stove scene comprises: Collecting a cooking video frame image corresponding to the smoke stove scene, and using a current cooking video frame image as the current scene frame image corresponding to the smoke stove scene; The step of identifying the oil smoke generation area in the current scene frame image comprises: Performing grayscale conversion processing on the current scene frame image to obtain a corresponding grayscale image; A target detection algorithm is used to detect a pot area image of the area where the pot is located in the grayscale image, and the oil smoke generating area is determined according to the pot area image.
5. The method for detecting oil fume concentration according to any one of claims 1 to 4, characterized in that: The detection method further comprises: Preset the corresponding relationship between different oil smoke concentrations and range hood gears; After the step of determining the target oil smoke concentration in the current scene frame image according to the high-frequency energy, the following step is further included: The corresponding target range hood gear position is obtained according to the target oil fume concentration, and the working gear position of the range hood is adjusted according to the target range hood gear position.
6. A system for detecting oil fume concentration, characterized in that: The detection system comprises: The current scene frame image acquisition module is used to acquire the current scene frame image corresponding to the smoke stove scene; A fume generation area recognition module, used to recognize the fume generation area in the current scene frame image; A high-frequency energy calculation module, used to calculate the high-frequency energy of the oil smoke generating area in the frequency domain; wherein the high-frequency energy is used to characterize the edge information corresponding to the oil smoke; A fume concentration determination module, used to determine a target fume concentration in the current scene frame image according to the high-frequency energy; The high-frequency energy calculation module comprises: A normalization processing unit, used for performing size normalization processing on the oil smoke generating area; A transformation array acquisition unit, used for converting the oil smoke generating area after size normalization into a frequency domain to obtain a transformation array in the frequency domain; An amplitude spectrum acquisition unit, used to convert the transformation array into an amplitude spectrum; wherein the amplitude spectrum is used to characterize an amplitude surface of the amplitude in a two-dimensional frequency domain; A high-frequency energy acquisition unit, used for acquiring the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area based on the amplitude spectrum; The oil smoke concentration determination module comprises: An average amplitude gain calculation unit, used for calculating and obtaining an average amplitude gain corresponding to the high-frequency energy corresponding to the oil smoke generation area in the high-frequency area; a target fume concentration determination unit, configured to determine the target fume concentration in the current scene frame image according to the average amplitude gain; The target oil fume concentration determination unit is used to compare the average amplitude gain and the oil fume concentration threshold and obtain a comparison result, and determine the target oil fume concentration in the current scene frame image according to the comparison result.
7. 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 detecting the oil fume concentration according to any one of claims 1 to 5 is implemented.
8. 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 detecting oil smoke concentration according to any one of claims 1 to 5 are implemented.