Evaluation method of food cooking effect
By identifying the cooking effect of food images, and automatically evaluating the maturity and dry and wet characteristics of food, the accuracy and efficiency of food cooking effect evaluation in the prior art are solved, and efficient, accurate and low-cost evaluation results are achieved.
Patent Information
- Application Number
- CN202311357797.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2025-04-18
AI Technical Summary
The existing food cooking effect evaluation methods have problems such as poor objectivity, long time, high cost and low evaluation accuracy in manual judgment, and cannot meet the evaluation requirements of high efficiency, accuracy and low cost.
By obtaining images of food, cooking effect recognition is performed, and the maturity and dry and wet characteristics of the food are automatically determined, thereby evaluating the cooking effect of the food.
It realizes automated evaluation of food cooking effects, improves the accuracy and efficiency of evaluation, reduces costs, and meets the evaluation requirements of high efficiency, accuracy and low cost.
Smart Images

Figure CN119851263A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of food cooking, and in particular to a method for evaluating food cooking effect. Background Art
[0002] Currently, during or after the food is cooked, it is usually necessary to evaluate the cooking effect of the food so as to improve the cooking equipment according to the cooking effect of the food. Specifically, the food process testing process of the cooking equipment is usually that the nutrition engineer cooks the food according to the types of food that the air fryer can make. After cooking, the cooking effect of the food will be manually rated based on the appearance of the food. For example: 1. Weigh the food before and after baking to manually evaluate the maturity and water loss rate of the baked food; 2. Calculate the water content of the food through an infrared moisture meter.
[0003] However, this leads to a series of problems, such as: 1. Nutrition engineers cannot objectively judge the color, dryness and wetness of food; even if everyone understands the judgment rules, there are differences in the criteria and rules for judging the maturity of food and mature food in actual implementation, which will lead to unreliable data and further affect the nutrition engineers' review of cooking techniques and the updating of cooking equipment; 2. A set of rating processes usually takes about 30 minutes, resulting in low evaluation efficiency; 3. The existing price range of infrared moisture meters is usually 20,000 to 60,000 yuan, and the high cost of use makes its large-scale application and promotion more difficult.
[0004] In summary, the current evaluation of food cooking effects requires a lot of manual labor to complete, the accuracy of food cooking effect evaluation is low, it takes a long time, and the cost is high, which cannot meet the requirements of accurate, efficient, low-cost and sustainable food cooking effect evaluation. Summary of the invention
[0005] In order to solve the above technical problems, the present disclosure provides a method for evaluating food cooking effect.
[0006] A first aspect of the present disclosure provides a method for evaluating food cooking effect, comprising:
[0007] Acquire a food image of a target food;
[0008] Identify the cooking effect of food images to obtain the maturity and dryness characteristics of the target food;
[0009] Determine the cooking effect of target food based on doneness and dryness and moisture characteristics.
[0010] Optionally, the step of obtaining a food image of the target food includes:
[0011] A first image and a second image of a target food are acquired, wherein the first image is an RGB image of the target food, and the second image is a grayscale image of the target food.
[0012] Optionally, the cooking effect recognition of the food image is performed to obtain the maturity and dryness characteristics of the target food, including:
[0013] Performing maturity recognition based on the first image to obtain the maturity of the target food;
[0014] The dryness and wetness identification is performed based on the second image to obtain the dryness and wetness characteristics of the target food.
[0015] Optionally, the above-mentioned performing maturity recognition based on the first image to obtain the maturity of the target food includes:
[0016] Determining the maturity of the target food based on the color interval of each pixel in the first image;
[0017] Based on the second image, dryness and wetness recognition is performed to obtain dryness and wetness characteristics of the target food, including:
[0018] Based on the grayscale value of each pixel in the second image, the dryness and wetness characteristics of the target food are determined.
[0019] Optionally, the step of acquiring the first image of the target food includes:
[0020] Obtain the total RGB image of the area where the target food is located;
[0021] Perform HSV color conversion on the RGB total image to obtain the saturation component of each pixel in the RGB total image;
[0022] In the RGB total image, determine a target pixel point whose saturation component is in a preset saturation interval corresponding to a pixel point of the target food;
[0023] The area where the target pixel point is located in the RGB total image is extracted to obtain the first image of the target food.
[0024] Optionally, the step of acquiring the second image of the target food includes:
[0025] Acquire infrared images of target food;
[0026] The infrared image is converted into grayscale to obtain a second image of the target food.
[0027] Optionally, the determining of the maturity of the target food based on the color interval of each pixel in the first image includes:
[0028] Perform HSV color conversion on the first image to obtain the hue component, saturation component and lightness component of the target food;
[0029] Determine a target hue interval of the hue component, a target saturation interval of the saturation component, and a target brightness interval of the brightness component;
[0030] When the target saturation interval belongs to the preset saturation interval and the target brightness interval belongs to the preset brightness interval, based on the correspondence between the target hue interval and the maturity, the maturity corresponding to the target hue interval is determined as the maturity of the target food.
[0031] Optionally, the above-mentioned determining the dryness and wetness characteristics of the target food based on the gray value of each pixel in the second image includes:
[0032] Obtaining the grayscale value of each pixel in the second image;
[0033] Determine pixels in the second image whose grayscale values are greater than a preset dry-wet segmentation threshold as wet region pixels, and determine pixels in the second image whose grayscale values are less than or equal to the preset dry-wet segmentation threshold as dry region pixels;
[0034] Based on the first number of pixel points in the wet area and the second number of pixel points in the dry area, the dryness and wetness characteristics of the target food are determined.
[0035] Optionally, the determining of the wetness and dryness characteristics of the target food based on the first number of pixels in the wet area and the second number of pixels in the dry area includes:
[0036] Obtaining the total number of pixels in the second image;
[0037] Determine a ratio of a first number of wet area pixels to a total number of pixels as a first wet area ratio of the target food, and determine a ratio of a second number of dry area pixels to a total number of pixels as a first dry area ratio of the target food;
[0038] The first wet area ratio and the first dry area ratio are determined as the wet-dry characteristics of the target food.
[0039] Optionally, after determining the cooking effect of the target food based on the maturity and dryness and wetness characteristics, the method further includes:
[0040] Performing channel synthesis processing on the first image and the second image of the target food to obtain a four-channel image of the target food;
[0041] The four-channel image is determined as the cooking effect image of the target food.
[0042] Compared with the prior art, the technical solution provided by the present invention has the following advantages:
[0043] The present invention obtains a food image of a target food; identifies the cooking effect of the food image to obtain the maturity and dry-wet characteristics of the target food; and determines the cooking effect of the target food based on the maturity and dry-wet characteristics. The maturity and dry-wet characteristics of the food can be obtained through the food image, and the cooking effect of the food can be automatically evaluated. The food cooking effect evaluation can be automatically completed without human intervention. The food cooking effect evaluation has high accuracy, short time consumption, high efficiency, low cost, and is sustainable, and can meet the requirements for food cooking effect evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 is a flow chart of a method for evaluating food cooking effect provided by an embodiment of the present disclosure;
[0047] Figure 2 is a flow chart of another method for evaluating food cooking effect provided by an embodiment of the present disclosure;
[0048] Figure 3a is a structural schematic diagram of a light box top provided by an embodiment of the present disclosure;
[0049] Figure 3b is a structural schematic diagram of the front side of a light box provided by an embodiment of the present disclosure;
[0050] Figure 4 is a schematic diagram of a four-channel image of food provided by an embodiment of the present disclosure;
[0051] Figure 5 is a structural schematic diagram of a food cooking effect evaluation device provided by an embodiment of the present disclosure;
[0052] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0053] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0055] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0056] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0057] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0058] The food cooking effect evaluation method provided by the embodiment of the present disclosure can be performed by a cooking effect evaluation device, which can be understood as any device with processing and computing capabilities, and the device can include but is not limited to electronic devices such as cooking equipment, smart phones, laptops, tablet computers (PADs), digital TVs, desktop computers, etc.
[0059] In order to better understand the inventive concept of the embodiments of the present disclosure, the technical solutions of the embodiments of the present disclosure are described below in conjunction with exemplary embodiments.
[0060] Figure 1 is a flow chart of a method for evaluating food cooking effect provided by an embodiment of the present disclosure, such as Figure 1 As shown, the method for evaluating food cooking effect provided in this embodiment includes the following steps:
[0061] Step 110: Acquire a food image of the target food.
[0062] In the embodiment of the present disclosure, the cooking effect evaluation device can obtain food images of target food, wherein the target food may include food in the cooking process and food after cooking.
[0063] Step 120: Perform cooking effect recognition on the food image to obtain the maturity and dryness and wetness characteristics of the target food.
[0064] In the disclosed embodiment, after obtaining a food image of the target food, the cooking effect evaluation device may perform cooking effect recognition on the food image to obtain the maturity and dryness and wetness characteristics of the target food.
[0065] Among them, maturity can be understood as the degree of food cooked. Dry-wet characteristics can be understood as the characteristics of the water content of food, and dry-wet characteristics can be understood as the water content characteristics of food.
[0066] Step 130: Determine the cooking effect of the target food based on the maturity and dryness and wetness characteristics of the target food.
[0067] In the embodiment of the present disclosure, after obtaining the maturity and dryness and moisture characteristics of the target food, the cooking effect evaluation device can determine the cooking effect of the target food based on the maturity and dryness and moisture characteristics.
[0068] The disclosed embodiments obtain a food image of a target food; perform cooking effect recognition on the food image to obtain the maturity and dry-wet characteristics of the target food; and determine the cooking effect of the target food based on the maturity and dry-wet characteristics. The maturity and dry-wet characteristics of the food can be obtained through the food image, and the cooking effect of the food can be automatically evaluated. The food cooking effect evaluation can be automatically completed without human intervention. The food cooking effect evaluation has high accuracy, short time consumption, low cost and sustainability, and can meet the requirements for food cooking effect evaluation.
[0069] Figure 2 is a flow chart of a method for evaluating food cooking effect provided by an embodiment of the present disclosure, such as Figure 2 As shown, the method for evaluating food cooking effect provided in this embodiment includes the following steps:
[0070] Step 210: Acquire a first image and a second image of the target food, where the first image is an RGB image of the target food, and the second image is a grayscale image of the target food.
[0071] In the disclosed embodiment, the cooking effect evaluation device can obtain a first image and a second image of the target food, wherein the first image can be understood as an RGB image of the target food, and the second image can be understood as a grayscale image of the target food.
[0072] RGB is a color standard that obtains a variety of colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. RGB represents the colors of the three channels of red, green, and blue. This standard covers almost all colors that can be perceived by human vision.
[0073] A grayscale image can be understood as an image with only one sampled color per pixel. Such images are usually displayed as grayscale from the darkest black to the brightest white.
[0074] In some embodiments, the cooking effect evaluation device may obtain a first image of the target food captured by an RGB camera and an RGB fill light, wherein the image capture viewing angle range of the RGB camera includes the food range of the target food.
[0075] In some embodiments, the cooking effect evaluation device may obtain a grayscale image of the target food captured by a grayscale camera, wherein the image capture viewing angle range of the grayscale camera includes the food range of the target food.
[0076] In some embodiments, the cooking effect evaluation device can obtain an infrared image of the target food; perform grayscale conversion on the infrared image of the target food to obtain a second image of the target food. The specific grayscale conversion method can refer to the relevant technology and will not be described here. The infrared (IR) image can be understood as an image formed based on the infrared radiation difference of the food.
[0077] In a specific embodiment, the target food can be placed at the bottom of a light box, and an RGB camera and an RGB fill light, as well as an infrared camera and an infrared fill light are provided inside the light box. The RGB camera and the RGB fill light inside the light box can capture a first image of the target food inside the light box, and the infrared camera and the infrared fill light inside the light box can capture an infrared image of the target food inside the light box. The cooking effect evaluation device can obtain the first image of the target food inside the light box captured by the RGB camera and the RGB fill light inside the light box, as well as the infrared image of the target food inside the light box captured by the infrared camera and the infrared fill light inside the light box; the infrared image is converted into grayscale to obtain a second image of the target food.
[0078] Among them, the image acquisition viewing angle range of the RGB camera or the infrared camera includes the food range of the target food, the fill light range of the RGB fill light or the infrared fill light includes the food range of the target food, and the RGB fill light can be an LED light.
[0079] For example, the RGB camera and the infrared camera can be arranged at the top center of the light box; the RGB fill light can be arranged at the top center of the light box; the infrared fill light can include a first infrared fill light and a second infrared fill light, the first infrared fill light and the second infrared fill light are symmetrically arranged at the center of any two sides of the top of the light box, and the light emitting angles of the first infrared fill light and the second infrared fill light are determined based on the height of the light box and the bottom width of the light box. Figure 3a As shown, Figure 3a This is a structural schematic diagram of the top of a light box provided in an embodiment of the present invention, 310 is an RGB camera and an infrared camera, 320 is an RGB fill light, 310 and 320 are both located at the center of the top of the light box, 330 is a first infrared fill light, 340 is a second infrared fill light, 330 and 340 are symmetrically located at the center of the left and right sides of the top of the light box.
[0080] Among them, the luminous angles of the first infrared fill light and the second infrared fill light are determined based on the height of the light box and the bottom width of the light box. Specifically, the height of the light box and the bottom width of the light box can be obtained; based on the ratio of half the length of the bottom width to the height, the first angle between the first light boundary of the first infrared fill light and the side of the light box is determined; based on the ratio of the bottom width to the height, the second angle between the second light boundary of the first infrared fill light and the side of the light box is determined; the difference between the second angle and the first angle is determined as the first luminous angle of the first infrared fill light; based on the first luminous angle of the first infrared fill light and the symmetrical relationship between the second infrared fill light and the first infrared fill light, the second luminous angle of the second infrared fill light is determined.
[0081] For example, Figure 3b As shown, Figure 3b A structural schematic diagram of the front side of a light box provided in an embodiment of the present invention, wherein the height of the light box is h, the bottom width of the light box is 2s, the length of half the bottom width is s, and the ratio of half the length of the bottom width to the height is s / h. The tangent value of the first angle ∠A between the first light boundary c of the first infrared fill light 330 and the side surface of the light box is tan∠A=s / h. Based on the ratio of the bottom width to the height 2s / h, the tangent value of the second angle ∠B between the second light boundary d of the first infrared fill light 330 and the side surface of the light box is determined to be tan∠B=2s / h. The difference between the second angle ∠B of the first infrared fill light and the first angle ∠A is determined as the first light-emitting angle ∠C of the first infrared fill light 330. Based on the first light-emitting angle ∠C of the first infrared fill light 330 and the symmetrical relationship between the second infrared fill light 340 and the first infrared fill light 330, the second light-emitting angle ∠D of the second infrared fill light 340 is determined.
[0082] In some embodiments, obtaining a first image of a target food may include steps 2101-2104:
[0083] Step 2101: Obtain the RGB total image of the area where the target food is located.
[0084] In the embodiment of the present disclosure, the cooking effect evaluation device can obtain an RGB total image of the area where the target food is located through an RGB camera. The RGB total image may include the target food, the container containing the target food, and the background area.
[0085] Step 2102: Perform HSV color conversion on the RGB total image to obtain the saturation component of each pixel in the RGB total image.
[0086] In the disclosed embodiments, HSV (Hue, Saturation, Value) is a color space created by AR Smith in 1978 based on the intuitive characteristics of color, also known as the Hexcone Model. The HSV color model refers to a subset of visible light in the three-dimensional color space of H, S, and V, which contains all colors in a certain color domain. Compared with the RGB color space, the HSV color space is closer to people's perceptual experience of color, can intuitively express the hue, vividness, and brightness of the color, and is often used to segment objects of specified colors.
[0087] In HSV, the color of each pixel in an image is represented by the hue component (Hue, H for short), the saturation component (S for short) and the value component (V for short). HSV color conversion is to extract the hue component, saturation component and value component of each pixel in the image.
[0088] In the disclosed embodiment, the cooking effect evaluation device can perform HSV color conversion on the RGB total image of the area where the target food is located to obtain the saturation component of each pixel in the RGB total image.
[0089] Step 2103: In the RGB total image, determine the target pixel whose saturation component is in the preset saturation range corresponding to the pixel of the target food.
[0090] In the embodiment of the present disclosure, the cooking effect evaluation device pre-stores a preset saturation interval corresponding to the pixel points of the target food, wherein the preset saturation interval can be determined according to the range of the saturation component of the pixel points of the target food.
[0091] After obtaining the saturation component of each pixel in the RGB total image, the cooking effect evaluation device can determine, in the RGB total image, a target pixel whose saturation component is within a preset saturation range corresponding to the pixel of the target food.
[0092] Step 2104: extract the area where the target pixel point is located in the RGB total image to obtain a first image of the target food.
[0093] In the disclosed embodiment, the cooking effect evaluation device may extract the area where the target pixel point is located in the RGB total image to obtain a first image of the target food.
[0094] Step 220: Perform maturity recognition based on the first image to obtain the maturity of the target food.
[0095] In the disclosed embodiment, the cooking effect evaluation device may perform maturity recognition based on the first image of the target food to obtain the maturity of the target food.
[0096] In some embodiments, the maturity of the target food can be determined based on the color interval of each pixel in the first image, and the color interval can include a color interval consisting of a target hue interval of the hue component of each pixel in the image obtained after performing HSV color conversion on the image, a target saturation interval of the saturation component, and a target brightness interval of the brightness component. Specifically, steps 2201-2203 can be included:
[0097] Step 2201: Perform HSV color conversion on the first image to obtain the hue component, saturation component and lightness component of the target food.
[0098] In the disclosed embodiment, the cooking effect evaluation device may perform HSV color conversion on the first image of the target food to obtain the hue component, saturation component, and lightness component of the target food.
[0099] Step 2202: determine a target hue interval for the hue component of the target food, a target saturation interval for the saturation component, and a target brightness interval for the brightness component.
[0100] In the disclosed embodiment, the cooking effect evaluation device can determine the target hue interval of the hue component of the target food, the target saturation interval of the saturation component, and the target brightness interval of the brightness component.
[0101] Step 2203: When the target saturation interval belongs to the preset saturation interval and the target brightness interval belongs to the preset brightness interval, based on the correspondence between the target hue interval and maturity, the maturity corresponding to the target hue interval is determined as the maturity of the target food.
[0102] In the disclosed embodiment, the preset saturation interval can be understood as the saturation interval that the saturation component of the food must reach for the maturity assessment of the food, such as 24-255, which can be set as needed and is not limited here. The preset brightness interval can be understood as the brightness interval that the brightness component of the food must reach for the maturity assessment of the food, such as 50-255, which can be set as needed and is not limited here.
[0103] The cooking effect evaluation device pre-stores the correspondence between each hue interval and maturity. When the target saturation interval of the target food belongs to the preset saturation interval and the target brightness interval belongs to the preset brightness interval, the cooking effect evaluation device can determine the maturity corresponding to the target hue interval as the maturity of the target food based on the correspondence between the target hue interval and maturity.
[0104] For example, when the target food is French fries, the hue interval, saturation interval, and brightness interval corresponding to different degrees of maturity can be shown in Table 1:
[0105] Table 1
[0106] Hue range Saturation range Brightness range Maturity 15-63 24-255 50-255 All French Fries 05-21 24-255 50-255 Burnt French Fries 15-25 24-255 50-255 Overcooked French fries 24-39 24-255 50-255 Medium French fries 40-63 24-255 50-255 Uncooked French fries
[0107] Step 230: Perform dry-wet identification based on the second image to obtain dry-wet characteristics of the target food.
[0108] In the disclosed embodiment, the cooking effect evaluation device can perform dryness and wetness identification based on the second image of the target food to obtain the dryness and wetness characteristics of the target food.
[0109] In some embodiments, performing dry-wet identification based on the second image to obtain the dry-wet characteristics of the target food may include steps 2301-2304:
[0110] Step 2301: Obtain the grayscale value of each pixel in the second image.
[0111] In the disclosed embodiment, the cooking effect evaluation device may obtain the grayscale value of each pixel in the second image.
[0112] Step 2302: Determine pixels in the second image whose grayscale values are greater than a preset dry-wet segmentation threshold as wet area pixels, and determine pixels in the second image whose grayscale values are less than or equal to the preset dry-wet segmentation threshold as dry area pixels.
[0113] In the embodiment of the present disclosure, after obtaining the grayscale value of each pixel in the second image, the cooking effect evaluation device can determine the pixel points in the second image whose grayscale values are greater than the preset dry-wet segmentation threshold as wet area pixels, and determine the pixel points in the second image whose grayscale values are less than or equal to the preset dry-wet segmentation threshold as dry area pixels.
[0114] The preset dry-wet segmentation threshold can be set as needed and is not limited here. The preset dry-wet segmentation threshold can be determined in advance based on the grayscale histogram of the second image of the food. For example, in the grayscale histogram of the second image of the food, the continuous grayscale value ranges are 100-130, 160-180, and 180-200. After debugging, it is confirmed that the key threshold for segmenting dry food and wet food is around 180, and then the 160-180 interval is continuously dichotomized to confirm the key threshold, and finally the preset dry-wet segmentation threshold of the food is confirmed to be 173.
[0115] In some embodiments, all pixels in the second image whose grayscale values are greater than a preset dry-wet segmentation threshold can be changed into white pixels, and the white pixels are determined as wet area pixels; all pixels in the second image whose grayscale values are less than or equal to the preset dry-wet segmentation threshold can be changed into black pixels, and the black pixels are determined as dry area pixels.
[0116] Step 2303: Determine the wetness and dryness characteristics of the target food based on the first number of pixels in the wet area and the second number of pixels in the dry area in the second image.
[0117] In the embodiment of the present disclosure, the cooking effect evaluation device can determine the wet-dry characteristics of the target food based on the first number of wet area pixel points and the second number of dry area pixel points in the second image.
[0118] In some embodiments, the cooking effect evaluation device can obtain the total number of pixels in the second image, determine the ratio of a first number of wet area pixels in the second image to the total number of pixels in the second image as a first wet area ratio of the target food, and determine the ratio of a second number of dry area pixels in the second image to the total number of pixels in the second image as a first dry area ratio of the target food; and determine the first wet area ratio and the first dry area ratio as the dry and wet characteristics of the target food.
[0119] Optionally, after determining the ratio of the first number of wet area pixels to the total number of pixels as the first wet area ratio of the target food and determining the ratio of the second number of dry area pixels to the total number of pixels as the first dry area ratio of the target food, the cooking effect evaluation device may perform S11-S14:
[0120] S11. Turn over the target food N times, and obtain a second image of the target food after each turning, to obtain N second images, where N is a positive integer.
[0121] S12, performing dry-wet identification on at least one second image among the N second images to obtain at least one wet area ratio and at least one dry area ratio of the target food.
[0122] S13. Construct a wet area ratio set of the target food based on the first wet area ratio of the target food before turning over N times and at least one wet area ratio of the target food after turning over N times. Construct a dry area ratio set of the target food based on the first dry area ratio of the target food before turning over N times and at least one dry area ratio of the target food after turning over N times.
[0123] S14. Determine the wet-dry characteristics of the target food based on the wet region ratio set and the dry region ratio set.
[0124] Specifically, the maximum wet area ratio and the minimum wet area ratio in the wet area ratio set can be deleted, and the maximum dry area ratio and the minimum dry area ratio in the dry area ratio set can be deleted to obtain at least one remaining wet area ratio and at least one remaining dry area ratio; the average value of at least one remaining wet area ratio is calculated to obtain the wet area ratio of the target food, and the average value of at least one remaining dry area ratio is calculated to obtain the dry area ratio of the target food; the wet area ratio and the dry area ratio of the target food are determined as the wet-dry characteristics of the target food. In this way, the accuracy of the wet area ratio and the dry area ratio of the target food can be improved, thereby improving the accuracy of the wet-dry characteristics of the target food and improving the accuracy of the food cooking effect evaluation.
[0125] Step 240: Determine the cooking effect of the target food based on the maturity and dryness and wetness characteristics of the target food.
[0126] Therefore, the maturity and dryness and wetness characteristics of food can be obtained through food images, and the cooking effect of food can be automatically evaluated. The food cooking effect evaluation can be automatically completed without human participation. The food cooking effect evaluation has high accuracy, short time consumption, high efficiency, low cost, and sustainability, and can meet the requirements of food cooking effect evaluation.
[0127] In some embodiments of the present disclosure, after determining the cooking effect of the target food based on the maturity and dry and wet characteristics of the target food, the cooking effect evaluation device can perform channel synthesis processing on the first image and the second image of the target food to obtain a four-channel image of the target food; the four-channel image is determined as the cooking effect image of the target food. The specific synthesis process can refer to the relevant technology and will not be repeated here. The four-channel image of the target food can directly reflect the dry and wet areas of the target food. In some embodiments, the cooking effect evaluation device can display the cooking effect image of the target food on the display interface, so that the user can intuitively see the dry and wet areas of the target food.
[0128] For example, Figure 4 As shown, Figure 4 A schematic diagram of a four-channel image of food provided in an embodiment of the present disclosure. Figure 4In the image, the area with larger gray value is the wet area of the food, and the area with smaller gray value is the dry area of the food.
[0129] Figure 5 1 is a schematic diagram of a device for evaluating food cooking effects provided by an embodiment of the present disclosure. The device can be understood as the above-mentioned computer device or a part of the functional modules in the above-mentioned computer device. Figure 5 As shown, the food cooking effect evaluation device 500 includes:
[0130] An acquisition module 510 is used to acquire a food image of a target food;
[0131] The recognition module 520 is used to recognize the cooking effect of the food image and obtain the maturity and dryness and wetness characteristics of the target food;
[0132] The determination module 530 is used to determine the cooking effect of the target food based on the maturity and dryness and moisture characteristics.
[0133] Optionally, the acquisition module 510 includes:
[0134] The first acquisition submodule is used to acquire a first image and a second image of the target food, wherein the first image is an RGB image of the target food, and the second image is a grayscale image of the target food.
[0135] The identification module 520 includes:
[0136] A maturity recognition submodule, used to perform maturity recognition based on the first image to obtain the maturity of the target food;
[0137] The dry-wet identification submodule is used to perform dry-wet identification based on the second image to obtain the dry-wet characteristics of the target food.
[0138] Optionally, the maturity identification submodule includes:
[0139] a maturity determination unit, configured to determine the maturity of the target food based on the color interval of each pixel in the first image;
[0140] Optionally, the above-mentioned dry-wet identification submodule includes:
[0141] The dryness and wetness determination unit is used to determine the dryness and wetness characteristics of the target food based on the grayscale value of each pixel in the second image.
[0142] Optionally, the first acquisition submodule includes:
[0143] A first acquisition unit is used to acquire an RGB total image of the area where the target food is located;
[0144] The first color conversion unit is used to perform HSV color conversion on the RGB total image to obtain the saturation component of each pixel in the RGB total image;
[0145] A first determining unit is used to determine, in the RGB total image, a target pixel point whose saturation component is in a preset saturation range corresponding to a pixel point of the target food;
[0146] The extraction unit is used to extract the area where the target pixel point is located in the RGB total image to obtain a first image of the target food.
[0147] Optionally, the first acquisition submodule includes:
[0148] A second acquisition unit, used to acquire an infrared image of the target food;
[0149] The grayscale conversion unit is used to convert the infrared image into grayscale to obtain a second image of the target food.
[0150] Optionally, the maturity determination unit includes:
[0151] A color conversion subunit, used for performing HSV color conversion on the first image to obtain a hue component, a saturation component, and a lightness component of the target food;
[0152] A first determination subunit is used to determine a target hue interval of the hue component, a target saturation interval of the saturation component, and a target brightness interval of the brightness component;
[0153] The second determination subunit is used to determine the maturity corresponding to the target hue interval as the maturity of the target food based on the correspondence between the target hue interval and the maturity when the target saturation interval belongs to the preset saturation interval and the target brightness interval belongs to the preset brightness interval.
[0154] Optionally, the dryness and wetness determination unit includes:
[0155] An acquisition subunit, used to acquire the grayscale value of each pixel in the second image;
[0156] A third determination subunit is used to determine the pixel points in the second image whose grayscale value is greater than a preset dry-wet segmentation threshold as wet area pixel points, and determine the pixel points in the second image whose grayscale value is less than or equal to the preset dry-wet segmentation threshold as dry area pixel points;
[0157] The fourth determination subunit is used to determine the dryness and wetness characteristics of the target food based on the first number of pixel points in the wet area and the second number of pixel points in the dry area.
[0158] Optionally, the fourth determining subunit includes:
[0159] An acquisition component, used to acquire the total number of pixels in the second image;
[0160] A first determining component is used to determine a ratio of a first number of wet area pixels to a total number of pixels as a first wet area ratio of the target food, and to determine a ratio of a second number of dry area pixels to the total number of pixels as a first dry area ratio of the target food;
[0161] The second determining component is used to determine the first wet area ratio and the first dry area ratio as the dryness and wetness characteristics of the target food.
[0162] Optionally, the acquisition module 510 includes:
[0163] A synthesis submodule, used for performing channel synthesis processing on the first image and the second image of the target food to obtain a four-channel image of the target food;
[0164] The image determination submodule is used to determine the four-channel image as a cooking effect image of the target food.
[0165] The food cooking effect evaluation device provided in the embodiments of the present disclosure can implement the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.
[0166] The embodiments of the present disclosure also provide a computer device, which includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method of any of the above embodiments can be implemented, and its execution method and beneficial effects are similar and will not be repeated here.
[0167] Figure 6 is a schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure, such as Figure 6 As shown, the computer device 600 may include a processor 610 and a memory 620, wherein the memory 620 stores a computer program 621, and when the computer program 621 is executed by the processor 610, the method provided by any of the above embodiments can be implemented, and its execution method and beneficial effects are similar and will not be repeated here.
[0168] Of course, to simplify, Figure 6 Only some of the components related to the present invention in the computer device 600 are shown, and components such as a bus, an input / output interface, an input device, and an output device are omitted. In addition, according to specific application conditions, the computer device 600 may also include any other appropriate components.
[0169] An embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.
[0170] The above-mentioned computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0171] The computer program may be written in any combination of one or more programming languages to write program codes for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer device, partially on the user's device, as a separate software package, partially on the user's computer device and partially on a remote computer device, or entirely on a remote computer device or server.
[0172] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0173] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0174] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for evaluating food cooking effect, characterized in that: include: Acquire a food image of a target food; Performing cooking effect recognition on the food image to obtain the maturity and dryness and wetness characteristics of the target food; Based on the maturity and dryness and moisture characteristics, the cooking effect of the target food is determined.
2. The method according to claim 1, characterized in that The step of obtaining a food image of a target food comprises: A first image and a second image of the target food are acquired, wherein the first image is an RGB image of the target food, and the second image is a grayscale image of the target food.
3. The method according to claim 2, characterized in that The step of performing cooking effect recognition on the food image to obtain the maturity and dryness and wetness characteristics of the target food includes: Performing maturity recognition based on the first image to obtain the maturity of the target food; Dryness and wetness identification is performed based on the second image to obtain dryness and wetness characteristics of the target food.
4. The method according to claim 3, characterized in that The performing maturity recognition based on the first image to obtain the maturity of the target food includes: Determining the maturity of the target food based on the color interval of each pixel in the first image; The performing dry-wet identification based on the second image to obtain the dry-wet characteristics of the target food includes: Based on the grayscale value of each pixel in the second image, the dryness and wetness characteristics of the target food are determined.
5. The method according to claim 2, characterized in that: The acquiring the first image of the target food comprises: Acquire an RGB total image of the area where the target food is located; Performing HSV color conversion on the RGB total image to obtain a saturation component of each pixel in the RGB total image; In the RGB total image, determining a target pixel point whose saturation component is in a preset saturation interval corresponding to a pixel point of the target food; The area where the target pixel point is located in the RGB total image is extracted to obtain a first image of the target food.
6. The method according to claim 2, characterized in that The acquiring a second image of the target food comprises: Acquire an infrared image of the target food; The infrared image is converted into grayscale to obtain a second image of the target food.
7. The method according to claim 4, characterized in that The determining the maturity of the target food based on the color interval of each pixel in the first image includes: Performing HSV color conversion on the first image to obtain the hue component, saturation component and lightness component of the target food; Determining a target hue interval of the hue component, a target saturation interval of the saturation component, and a target brightness interval of the brightness component; When the target saturation interval belongs to a preset saturation interval and the target brightness interval belongs to a preset brightness interval, based on the correspondence between the target hue interval and maturity, the maturity corresponding to the target hue interval is determined as the maturity of the target food.
8. The method according to claim 4, characterized in that The determining the dryness and wetness characteristics of the target food based on the grayscale value of each pixel in the second image includes: Obtaining the grayscale value of each pixel in the second image; Determine pixels in the second image whose grayscale values are greater than a preset dry-wet segmentation threshold as wet region pixels, and determine pixels in the second image whose grayscale values are less than or equal to the preset dry-wet segmentation threshold as dry region pixels; Based on the first number of the wet area pixel points and the second number of the dry area pixel points, the dryness and wetness characteristics of the target food are determined.
9. The method according to claim 8, characterized in that The determining of the wetness and dryness characteristics of the target food based on the first number of pixels in the wet area and the second number of pixels in the dry area includes: Acquire the total number of pixels in the second image; Determine a ratio of a first number of pixels in the wet area to the total number of pixels as a first wet area ratio of the target food, and determine a ratio of a second number of pixels in the dry area to the total number of pixels as a first dry area ratio of the target food; The first wet area ratio and the first dry area ratio are determined as the wet-dry characteristics of the target food.
10. The method according to claim 2, characterized in that After determining the cooking effect of the target food based on the maturity and dryness and wetness characteristics, the method further includes: Performing channel synthesis processing on the first image and the second image of the target food to obtain a four-channel image of the target food; The four-channel image is determined as the cooking effect image of the target food.
Citation Information
Cited By
Dish cooking maturity grading method based on unsupervised learning
CN121456698A
A dish cooking maturity grading method based on unsupervised learning
CN121456698B