Disclosure of Invention
In order to solve the problems in the prior art, the present invention provides a food material determining method, a refrigerator and a storage medium.
To achieve one of the above objects, an embodiment of the present invention provides a method for determining food materials, including the following steps:
photographing the set area and carrying out image recognition to obtain an image recognition result;
acquiring the odor of the set area, and performing odor identification to obtain an odor identification result;
scanning the spectral data of the set area and carrying out spectral analysis to obtain a spectral identification result;
the image recognition result, the odor recognition result and the spectrum recognition result respectively comprise a plurality of kinds of information and the accuracy corresponding to each kind of information;
matching the image recognition result, the odor recognition result and the spectrum recognition result with corresponding weight proportions;
multiplying each accuracy of the image recognition result, the odor recognition result and the spectrum recognition result by a corresponding weight ratio to obtain a weight value, adding the weight values corresponding to the same type information, and judging the type information with the highest weight value as the type of the food material.
As a further improvement of an embodiment of the present invention, the method further comprises the steps of: the weight proportion is determined according to the type information and the accuracy in the corresponding identification device and identification result, and the higher the accuracy is, the higher the weight proportion is.
As a further improvement of an embodiment of the present invention, the method further comprises the steps of: and when all the category information of any identification result does not accord with the actual category, calibrating the equipment obtaining the identification result.
As a further improvement of an embodiment of the present invention, the method further comprises the steps of: and when all the accuracy rates of any identification result are lower than the lowest preset value, setting the weight proportion corresponding to the identification result as 0.
As a further improvement of an embodiment of the present invention, the method further comprises the steps of: and when the accuracy of any identification result is greater than the highest preset value, the type information corresponding to the accuracy is the type of the food material.
As a further improvement of an embodiment of the present invention, the actual type of the food material is determined, and a weight ratio of the type information corresponding to the accuracy rate to the actual type is increased.
As a further improvement of an embodiment of the present invention, the method further comprises the steps of:
and when any kind of information of the image recognition result and the spectrum recognition result does not accord with all kinds of information of the odor recognition result, exhausting the gas in the set area.
As a further improvement of an embodiment of the present invention, the method further comprises the steps of: and sealing the set area after the gas in the set area is discharged, and acquiring and identifying the odor information of the set area after a set time.
In order to achieve one of the above objects, an embodiment of the present invention provides a refrigerator, including a setting area, a memory and a processor, where the memory stores a computer program operable on the processor, the refrigerator further includes an image recognition unit, an odor recognition unit and a spectrum analysis unit, and the processor, when executing the computer program, can implement the steps in the food material determination method.
To achieve one of the above objects, an embodiment of the present invention provides a storage medium storing a computer program, which when executed by a processor can implement the steps of the food material determining method.
Compared with the prior art, the invention has the following beneficial effects: the food material information is accurately judged, the problem of inaccurate identification caused by factors such as food material stacking and complex smell is solved, each identification device grasps certain information about food materials, although the correct information and noise in the information grasped by the devices cannot be directly determined, the information grasped by various devices is integrated, the weight proportion of the devices with higher identification accuracy is increased, the characteristics of food are analyzed from multiple dimensions like a blind person and then summarized, the information of the food can be accurately judged, accurate information is provided for further analysis of the food materials, the intelligent degree of a refrigerator is higher, and the requirements of intelligent families are met.
Detailed Description
The present invention will be described in detail below with reference to specific embodiments shown in the drawings. These embodiments are not intended to limit the present invention, and structural, methodological, or functional changes made by those skilled in the art according to these embodiments are included in the scope of the present invention.
An embodiment of the invention provides a food material judging method, a refrigerator and a storage medium, wherein accurate information of food materials is obtained through analysis and comparison of multiple dimensions, so that the intelligent degree of the refrigerator is higher, and the requirements of intelligent families are met.
The food material judging method of the embodiment includes the following steps:
photographing the set area and carrying out image recognition to obtain an image recognition result;
acquiring the odor of the set area, and performing odor identification to obtain an odor identification result;
scanning the spectral data of the set area and carrying out spectral analysis to obtain a spectral identification result;
the image recognition result, the odor recognition result and the spectrum recognition result respectively comprise a plurality of kinds of information and the accuracy corresponding to each kind of information;
matching the image recognition result, the odor recognition result and the spectrum recognition result with corresponding weight proportions;
multiplying each accuracy of the image recognition result, the odor recognition result and the spectrum recognition result by a corresponding weight ratio to obtain a weight value, adding the weight values corresponding to the same type information, and judging the type information with the highest weight value as the type of the food material.
The image recognition can be realized through CCD recognition, and the food materials are photographed and analyzed;
the range of the odor generated by food is limited, and the odor generated by different types of food materials is very different, for example, fruits generate ethylene but not meat, so that an odor sensor capable of distinguishing several specific gases of common food materials can be arranged, when a certain odor gas is detected, for example, ethylene is detected, some food materials capable of generating ethylene gas in fruits are screened, and the range can be further narrowed according to other components and the concentration of the gas.
The spectrum scanning can adopt near infrared spectrum or high spectrum, the analysis technology of the spectra is mature, information of hydrogen-containing groups such as C-O, O-H, N-H, S-H, P-H and the like is recorded, the detection on different groups is very accurate, the method is very suitable for detecting organic matters, and qualitative and quantitative identification can be carried out on food. And analyzing the spectral data according to the spectral mathematical model to obtain the type information of the food materials, and establishing the spectral mathematical modeling, wherein the establishing of the spectral mathematical modeling comprises a plurality of stages of scanning, identifying and collecting data, identifying background information of the food, measuring chemical values of various substances and components in the food, removing abnormal values, selecting a proper spectral region, selecting a proper algorithm and parameters to perform modeling, checking and calibrating a model and the like, so that the spectral data can accurately correspond to the type information of the food materials through the spectral information.
The image recognition result, the odor recognition result and the spectrum recognition result can recognize various results, the accuracy of each recognition result is judged, the accuracy of each judgment is analyzed through multiple experiments, and the accuracy of the recognition equipment on the type information judged by the information can be judged according to the algorithm of classical probability.
Because each identification device can grasp part of information about food materials, on the basis that each identification device cannot be guaranteed to be completely accurate, and the situation that identification devices with different dimensions wrongly judge the same food material is rarely caused, the identification results with different dimensions are converted into weight values through weight proportion and then added, and the type of the food material can be accurately judged.
For example, assuming that all three devices detect possible foods including oranges and oranges, the image recognition result determines that the accuracy of the oranges is P1, the odor recognition result determines that the accuracy of the oranges is S1, the spectrum recognition result determines that the accuracy of the oranges is L1, and the weights of the oranges corresponding to the image recognition result, the odor recognition result, and the spectrum recognition result are P1, S1, and L1, respectively, the total weight value Q of the oranges is determinedOrangeP1 × P1+ S1 × S1+ L1 × L1; assuming that the image recognition result judges that the accuracy of the oranges is P2, the odor recognition result judges that the accuracy of the oranges is S2, the spectral recognition result judges that the accuracy of the oranges is L2, and the image recognition result, the odor recognition result and the spectral recognition resultThe weight of the orange corresponding to the result is p2, s2 and l2 respectively, and the weight is judged to be the total weight Q of the orangeOrangeP2 × P2+ S2 × S2+ L2 × L2; when the grapefruit is detected by the spectrum identification, the tomato is detected by the image identification, and Q is detected because other identification devices do not detect the grapefruit and the tomatoShaddockAnd QTomatoWill be low, comparing Q with a larger valueOrangeAnd QOrangeThe type of the food material can be judged according to the size of the food material.
If the accuracy of the orange is judged to be high by the odor identification result, S2> S1, certainly, the fact that the detection result is influenced by the large S2 when the actual result is the orange after S2> S1 does not need to be worried about, because the accuracy of the odor identification result after the orange is identified is high by the S2, the identification of the identification device pair is particularly accurate, and conversely, when the food material is not the orange, the S2 is low, namely the weight ratio of the food material is higher with higher detection accuracy, and if the object to be detected is other food material, the probability that the food material with high accuracy is still detected is smaller than the probability that the food material is detected.
Further, the weight proportion is determined according to the corresponding identification device, the category information in the identification result and the accuracy, and the higher the accuracy is, the higher the weight proportion is.
When the weight proportion corresponding to each recognition result is determined, the weight proportion can be obtained through multiple times of simulation through experiments. When the actual type of the food material is consistent with the judgment result of a certain identification device, or the identification device performs experiments, and when a certain food is put in, the identification result is always accurate, the identification result of the identification device on the type of the food is judged to be more reliable, the weight proportion of the identification device on the food material judgment is improved, and the accurate identification result can be better reflected in the total weight value.
Further, the method also comprises the following steps: and when all the category information of any identification result does not accord with the actual category, calibrating the equipment obtaining the identification result. The detection result of the identification device has no correctness, the identification device cannot reflect food materials in one dimension, and the identification device needs to be reset when a fault is judged to be identified.
Further, the method also comprises the following steps: and when all the accuracy rates of any identification result are lower than the lowest preset value, setting the weight proportion corresponding to the identification result as 0. When the accuracy of one identification device cannot be determined for all identification results and is lower than the minimum preset value, the minimum preset value can be tried for many times through experiments, and when the accuracy is lower than the minimum preset value, the identification results are mostly noise, so the result with low identification accuracy can be directly ignored by setting the weight ratio to be 0.
Further, the method also comprises the following steps: and when the accuracy of any identification result is greater than the highest preset value, the type information corresponding to the accuracy is the type of the food material.
The identification accuracy of the identification equipment for certain type of food materials is high, the identification equipment has higher certainty on the accuracy of the identification result, when the identification equipment is larger than the highest preset value to a certain degree, the identification result can be regarded as correct information of the food materials, correspondingly, if the accuracy of the food materials judged by the identification equipment is not high, the accuracy of the identification equipment for any identification result is not determined, the reliability of 50% of two identification accuracies can be added, the accuracy cannot be higher than that of one identification accuracy which is 100%, the highest preset value can be obtained by multiple trials of experiments, and when the accuracy is larger than the value, the result is affirmatively correct. Of course, the more accurate the result of the identification device determining a food material means that the more accurate the result of the identification device determining that the food material is not the result of the identification device is, that is, the food material is determined, and when the probability of the food material is determined to be low, the weight ratio can be set to 0 according to the above condition that the probability is high and the probability is low.
Further, the actual type of the food material is judged, the weight proportion of the type information corresponding to the accuracy rate and the actual type is improved, and the setting of the weight proportion is obtained through multiple times of experimental judgment.
Further, the method also comprises the following steps:
and when any kind of information of the image recognition result and the spectrum recognition result does not accord with all kinds of information of the odor recognition result, exhausting the gas in the set area.
Because image recognition and spectrum recognition are more accurate relative to odor recognition judgment, when the odor of the previous food is large and remains or the odor of the food in other spaces is transmitted, the odor recognition may be inaccurate, and when any kind of information of the image recognition result and the spectrum recognition result does not accord with all kinds of information of the odor recognition result, for example, the image recognition result is orange and orange, the spectrum recognition result is orange and grapefruit, and the kind of information of the odor recognition result is durian, and does not accord with any kind of information of the image recognition result and the spectrum recognition result, it is judged that the odor recognition result has a problem, the gas in the set area is discharged, and the air inside the set area can be blown out by a fan.
Further, the method also comprises the following steps: and stopping exhausting after exhausting the gas in the set area, and after a set time, acquiring and identifying the odor information of the set area again.
After the gas in the set area is exhausted, the exhaust is stopped, the set area is sealed, the other smells are prevented from entering, generally, the gas emitted by the food materials is released to the space and forms a certain concentration to be detected, a certain time is needed, a set time is set, when the set time is over, the gas in the food materials can be judged to reflect the stored food materials, and then the smells are judged.
Further, an embodiment of the present application further provides a refrigerator, which includes a setting area 4, a memory 6 and a processor 5, where the memory 6 stores a computer program that can be run on the processor 5, the refrigerator further includes an image recognition unit 1, an odor recognition unit 2 and a spectrum analysis unit 3, and when the processor 5 executes the computer program, any one of the steps of the food material determination method described above can be implemented, that is, the steps in any one of the technical solutions of the food material determination method described above can be implemented.
Further, an embodiment of the present application further provides a storage medium, which stores a computer program, and the computer program, when executed by the processor 5, can implement any one of the steps in the food material determining method, that is, implement the steps in any one of the technical solutions in the food material determining method.
Compared with the prior art, the embodiment has the following beneficial effects:
the food material information is accurately judged, the problem of inaccurate identification caused by factors such as food material stacking and complex smell is solved, each identification device grasps certain information about food materials, although the correct information and noise in the information grasped by the devices cannot be directly determined, the information grasped by various devices is integrated, the weight proportion of the devices with higher identification accuracy is increased, the characteristics of food are analyzed from multiple dimensions like a blind person and then summarized, the information of the food can be accurately judged, accurate information is provided for further analysis of the food materials, the intelligent degree of a refrigerator is higher, and the requirements of intelligent families are met.
The detailed description set forth above is merely a specific description of possible embodiments of the present invention and is not intended to limit the scope of the invention, which is intended to include within the scope of the invention equivalent embodiments or modifications that do not depart from the technical spirit of the present invention.