Dish identification system based on visual inspection
By calculating the tendency parameters of dish recognition and dividing the dish image categories and selecting appropriate recognition strategies, the image classification problem of different difficulty in dish recognition in the prior art is solved, and the reliability and efficiency of dish recognition are improved.
Patent Information
- Application Number
- CN202411473764.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the failure to effectively classify dishes images of different degrees of identification difficulty leads to low reliability and efficiency of dishes recognition.
The dish classification module calculates the dish recognition tendency parameter, divides the dish image categories, and selects the identification strategy based on the category. Identification strategies include matching the dish library based on the ingredient color values and outlines, or filtering the possible set of dishes based on the ingredient shape size and chromaticity values to match.
By classifying the dishes images and adopting different recognition strategies, the reliability and efficiency of dishes recognition are improved, ensuring that the recognition efficiency is improved while ensuring reliability.
Smart Images

Figure CN119478500A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a dish recognition system based on visual detection. Background Art
[0002] There are many kinds of dishes, and dish images may be affected by background interference and lighting changes, which may affect the accuracy of dish recognition. At the same time, dish images may contain many ingredients that are difficult to distinguish, which also affects the accuracy of dish recognition. Therefore, the dish recognition system needs to be able to accurately identify and classify various dishes to provide convenience for the catering industry and consumers.
[0003] Chinese patent announcement number: CN114613469A, discloses a method for generating a dish recognition model and a method for identifying dishes. The method for generating a dish recognition model includes: collecting training image information of multiple dishes; marking the dish information in the training image information, and generating a dish recognition model, wherein the dish information includes ingredient information and / or dish name information of each dish. By training and generating a dish recognition model, the model can be conveniently applied to recognize all the dish information contained in the image at one time, which can not only improve the recognition efficiency, but also facilitate the aggregation of information, so that users can quickly understand the dining situation by taking an image containing all the dishes, simplifying the input operation, and there is no need to repeatedly run the model, which helps to reduce the operating load.
[0004] However, there are still the following problems in the prior art:
[0005] In the prior art, since dish images have different degrees of recognition difficulty, dish images are not classified. Instead, images with different degrees of recognition difficulty are classified and different recognition strategies are adopted respectively, resulting in low reliability and efficiency of dish recognition. Summary of the invention
[0006] To this end, the present invention provides a dish recognition system based on visual detection to solve the problem of low reliability and efficiency of dish recognition due to failure to classify dish images, classifying images with different degrees of recognition difficulty, and adopting different recognition strategies respectively.
[0007] To achieve the above object, the present invention provides a dish recognition system based on visual detection, which includes:
[0008] A dish image storage module, used to store a number of dish images;
[0009] a dish classification module, connected to the dish image storage module, for obtaining the shape and size of each ingredient contained in the dish, the difference in chromaticity value of the ingredient, and extracting the outline of each ingredient for matching with the dish ingredient library to obtain the number of matches corresponding to each ingredient, calculating the dish recognition tendency parameter according to the shape and size of each ingredient, the difference in chromaticity value of the ingredient, and the number of matches, and classifying the dish image according to the dish recognition tendency parameter;
[0010] The dish recognition module is connected to each of the dish image storage modules and the dish classification module, and includes a recognition unit and a display unit.
[0011] The recognition unit is used to select a recognition strategy according to the category of the dish image, including:
[0012] Match the chromaticity value of each ingredient in the dish image and the outline of the ingredient with the dish library, and identify the dish corresponding to the dish image based on the matching result;
[0013] Or, screening a possible dish set in a dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient, obtaining the ingredients included in the possible dish set, matching the ingredients included in the possible dish set with the ingredients included in the dish image, and identifying the dish corresponding to the dish image;
[0014] The display unit is used to display the dish image corresponding to the dish.
[0015] Furthermore, the dish classification module obtains the shape and size of each ingredient contained in the dish according to the dish image.
[0016] Get the number of ingredients contained in the dish image;
[0017] Extract the outline of each ingredient, calculate the area contained in the outline of each ingredient and record it as the shape and size of the ingredient.
[0018] Furthermore, the dish classification module extracts the outline of each ingredient and matches it with the dish ingredient library to obtain the matching quantity corresponding to each ingredient.
[0019] Get the outline of each ingredient in the dish image;
[0020] Select the contour of each ingredient in the dish image and compare it with the contour of the ingredients in the dish ingredient library in turn for similarity;
[0021] If the similarity between the outline of the food in the dish image and the outline of the food in the dish food library is greater than a preset food outline similarity threshold, it is determined that the food in the dish image matches the food in the dish food library;
[0022] Get the matching number of each ingredient in the dish image.
[0023] Furthermore, the dish classification module calculates the dish recognition tendency parameter according to the shape and size of each ingredient, the difference in chromaticity value of the ingredient, and the matching quantity.
[0024] Obtain the average value of the shape and size of each ingredient, record the average value of the difference in chromaticity value of each ingredient as the ingredient chromaticity value difference, and obtain the average value of the matching quantity of each ingredient;
[0025] Determine the ratio of the average value of the shapes and sizes of each food ingredient to a preset food ingredient shape and size threshold as a first identification feature value;
[0026] Determine the ratio of the food color value difference to a preset food color value difference threshold as a second identification feature value;
[0027] Determine the ratio of a preset matching quantity threshold to an average matching quantity of each ingredient as a third identification feature value;
[0028] The first identification feature value, the second identification feature value and the third identification feature value are weightedly summed to obtain a dish identification tendency parameter.
[0029] Furthermore, the dish classification module divides the dish images into categories according to the dish recognition tendency parameter.
[0030] If the dish recognition tendency parameter is less than or equal to the preset dish recognition tendency parameter comparison threshold, the dish image category is determined to be an inaccurate recognition tendency category;
[0031] If the dish recognition tendency parameter is greater than a preset dish recognition tendency parameter comparison threshold, the dish image category is determined to be a precise recognition tendency category.
[0032] Furthermore, the recognition unit selects a recognition strategy according to the category of the dish image, wherein:
[0033] If the dish image category is a precise identification tendency category, the dish image is matched with the dish library according to the chromaticity value and outline of each ingredient, and the dish image is identified according to the matching result;
[0034] If the dish image category is a non-precise identification tendency category, the possible dish set is screened in the dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient, the ingredients included in the possible dish set are obtained, the ingredients included in the possible dish set are matched with the ingredients included in the dish image, and the dish corresponding to the dish image is identified.
[0035] Furthermore, the recognition unit matches the chromaticity value of each ingredient in the dish image and the outline of the ingredient with the dish library, and recognizes the dish corresponding to the dish image according to the matching result.
[0036] Get the chromaticity value and outline of each ingredient in the dish image;
[0037] Match the chromaticity value and outline of each ingredient with the chromaticity value and outline of each dish in the dish library in turn;
[0038] If the difference between the chromaticity value of each ingredient and the chromaticity value of the ingredient in the dish library is less than the preset ingredient chromaticity value difference threshold, and the similarity between the ingredient outline and the ingredient outline of the dish in the dish library is greater than the preset ingredient outline similarity threshold, then the dish in the dish library is identified as the dish corresponding to the dish image.
[0039] Furthermore, the recognition unit screens a possible set of dishes in the dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient.
[0040] Get the shape, size and chromaticity value of each ingredient in the dish image.
[0041] Match the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient with the shape and chromaticity value of each ingredient in the dish library in sequence;
[0042] If the first preset condition is met, the dishes in the dish library are filtered to be a possible set of dishes corresponding to the dish image;
[0043] The first preset condition is that the difference in shape and size between the dish image and the ingredients in the dish in the dish library is less than a preset ingredient shape difference comparison threshold, and the difference in chromaticity value of each ingredient in the dish image and the chromaticity value of each ingredient in the dish in the dish library is less than a preset ingredient chromaticity value difference comparison threshold.
[0044] Furthermore, the recognition unit matches the ingredients that may be included in the dish with the ingredients included in the dish image, and recognizes the dish corresponding to the dish image.
[0045] Obtain the texture of each ingredient contained in each dish in the possible set of dishes;
[0046] Sequentially matching the texture of each ingredient contained in each dish in the possible dish set in combination with the outline of each ingredient with the texture of each ingredient and the outline of each ingredient in the dish image;
[0047] If the second preset condition is met, the dish in the possible set of dishes is identified as the dish corresponding to the dish image;
[0048] The second preset condition is that the texture similarity between the ingredients in the possible dish set and the texture similarity between the ingredients in the dish image is greater than a preset texture similarity threshold, and the outline similarity between the ingredients in the possible dish set and the outline of the ingredients in the dish image is greater than a preset ingredient outline similarity threshold.
[0049] Furthermore, the display unit displays a dish image and dish image information, wherein the dish image information includes the dish and ingredients contained in the dish.
[0050] Compared with the prior art, the dish image storage module of the present invention stores a number of dish images, the dish classification module calculates dish recognition tendency parameters, divides dish images into categories, and the recognition unit selects a recognition strategy according to the dish image category, including matching the chromaticity value of each ingredient in the dish image and the outline of the ingredient with the dish library to identify the dish corresponding to the dish image, or screening the possible dish set in the dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient, obtaining the ingredients included in the possible dish set, matching the ingredients included in the possible dish set with the ingredients included in the dish image, identifying the dish corresponding to the dish image, and the display unit is used to display the dish corresponding to the dish image. The present invention classifies dish images and adopts different recognition strategies for each type of dish image, thereby improving recognition efficiency while ensuring reliability.
[0051] In particular, the dish classification module of the present invention calculates dish recognition tendency parameters according to the shape and size of each ingredient, the difference in chromaticity values of the ingredients, and the number of matches. The shape and size of the ingredients, the difference in chromaticity values of the ingredients, and the number of matches are important influencing factors affecting dish recognition. If the shape of the ingredient is small, it is more difficult to obtain the shape characteristics of the ingredient. If the difference in chromaticity values between the ingredients is small, it may be difficult to obtain the accurate number of ingredients. If the number of matches is large, it may be difficult to obtain dishes that correctly correspond to the ingredients in the dish image. By calculating the dish recognition tendency parameters, the degree of difficulty in recognizing the dishes and the ingredients contained in the dishes in the dish image can be characterized to a certain extent. By calculating the dish recognition tendency parameters, data support can be provided for subsequent recognition, thereby improving the reliability of dish recognition.
[0052] In particular, the recognition unit of the present invention matches the chromaticity values and contours of each ingredient in the dish image with the dish library, and identifies the dish corresponding to the dish image based on the matching result. When the dish image is relatively easy to identify, the chromaticity values and contours of each ingredient in the dish image can be directly matched with the dishes in the dish library, thereby ensuring high reliability while reducing computing power and improving recognition efficiency.
[0053] In particular, the recognition unit of the present invention screens a possible set of dishes in the dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient. When the dish image is difficult to accurately identify, there may be several dishes similar to the dish image. At this time, similar dishes in the dish library can be screened out according to the shape and size of each ingredient and the chromaticity value of each ingredient, so that similar dishes can be further analyzed to improve the reliability of dish recognition.
[0054] In particular, the recognition unit of the present invention obtains ingredients that may be included in a dish, matches the ingredients that may be included in the dish with the ingredients included in the dish image, and identifies the dish corresponding to the dish image. In actual situations, when the shape, size, chromaticity value and outline of the ingredients are relatively close, there may be great differences in the texture of the ingredients. In this case, the texture of the ingredients can be further obtained, and only the texture of the ingredients that may be included in the dish can be obtained. At this time, the reliability of dish recognition is improved while ensuring a small increase in computing power. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a structural diagram of a dish recognition system based on visual detection according to an embodiment of the invention;
[0056] Figure 2 This is a structural diagram of a dish identification module of an embodiment of the invention;
[0057] Figure 3 A logical decision diagram for classifying dish images according to dish recognition tendency parameters by a dish classification module of an embodiment of the invention;
[0058] Figure 4 This is a logical decision diagram for the recognition unit of the embodiment of the invention to screen possible sets of dishes in the dish library. DETAILED DESCRIPTION
[0059] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0060] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0061] It should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0062] See also Figures 1 to 4 As shown, Figure 1 This is a structural diagram of a dish recognition system based on visual detection according to an embodiment of the invention. Figure 2 This is a structural diagram of a dish identification module in an embodiment of the invention. Figure 3This is a logical decision diagram of the dish classification module of the embodiment of the invention for classifying dish images according to dish recognition tendency parameters. Figure 4 The logical decision diagram of the recognition unit of the embodiment of the invention to screen the possible set of dishes in the dish library, the dish recognition system based on visual detection of the present invention comprises:
[0063] A dish image storage module, used to store a number of dish images;
[0064] a dish classification module, connected to the dish image storage module, for obtaining the shape and size of each ingredient contained in the dish, the difference in chromaticity value of the ingredient, and extracting the outline of each ingredient for matching with the dish ingredient library to obtain the number of matches corresponding to each ingredient, calculating the dish recognition tendency parameter according to the shape and size of each ingredient, the difference in chromaticity value of the ingredient, and the number of matches, and classifying the dish image according to the dish recognition tendency parameter;
[0065] The dish recognition module is connected to each of the dish image storage modules and the dish classification module, and includes a recognition unit and a display unit.
[0066] The recognition unit is used to select a recognition strategy according to the category of the dish image, including:
[0067] Match the chromaticity value of each ingredient in the dish image and the outline of the ingredient with the dish library, and identify the dish corresponding to the dish image based on the matching result;
[0068] Or, screening a possible dish set in a dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient, obtaining the ingredients included in the possible dish set, matching the ingredients included in the possible dish set with the ingredients included in the dish image, and identifying the dish corresponding to the dish image;
[0069] The display unit is used to display the dish image corresponding to the dish.
[0070] Specifically, the present invention does not limit the specific structure of the dish image storage module, the dish classification module and the dish identification module. The dish image storage module can be a cloud storage space, and the dish classification module and the dish identification module can both be composed of logical components, and the logical components include field programmable components, computers or microprocessors in computers.
[0071] Specifically, the present invention does not limit the specific method of obtaining the shape and size of each ingredient contained in the dish according to the dish image, extracting the outline of each ingredient, the chromaticity value of the ingredient, performing similarity comparison of the outline of the ingredient, obtaining the texture of each ingredient contained in each dish that may be concentrated in the dish, and performing similarity comparison of the texture of the ingredient. In this embodiment, the image analysis software Matlab is used for image analysis.
[0072] Specifically, the dish library and dish ingredient library of the present invention include all dishes and ingredients included in the dish images.
[0073] Specifically, the dish classification module obtains the shape and size of each ingredient contained in the dish according to the dish image.
[0074] Get the number of ingredients contained in the dish image;
[0075] Extract the outline of each ingredient, calculate the area contained in the outline of each ingredient and record it as the shape and size of the ingredient.
[0076] It can be understood that, one of the ingredients is selected and its contour is obtained. For example, if the dish image includes three ingredients, only one of the three ingredients is obtained for contour extraction.
[0077] Specifically, the dish classification module extracts the outline of each ingredient and matches it with the dish ingredient library to obtain the matching quantity corresponding to each ingredient.
[0078] Get the outline of each ingredient in the dish image;
[0079] Select the contour of each ingredient in the dish image and compare it with the contour of the ingredients in the dish ingredient library in turn for similarity;
[0080] If the similarity between the outline of the food in the dish image and the outline of the food in the dish food library is greater than a preset food outline similarity threshold, it is determined that the food in the dish image matches the food in the dish food library;
[0081] Get the number of matches corresponding to each ingredient in the dish image.
[0082] In this embodiment, the preset food outline similarity threshold is selected within the range of [0.9, 0.95].
[0083] It is understandable that the dish ingredient library contains several ingredients, and there may be a number of ingredients with similar outlines to the ingredients in the dish image. If the number of ingredients with similar outlines is small, it is easier to recognize the dish image. If the number of ingredients with similar outlines is large, it is more difficult to recognize the dish image.
[0084] Specifically, the dish classification module calculates the dish recognition tendency parameter according to the shape and size of each ingredient, the difference in chromaticity value of the ingredient, and the number of matches.
[0085] Obtain the average value of the shape and size of each ingredient, record the average value of the difference in chromaticity value of each ingredient as the ingredient chromaticity value difference, and obtain the average value of the matching quantity of each ingredient;
[0086] Determine the ratio of the average value of the shapes and sizes of each food ingredient to a preset food ingredient shape and size threshold as a first identification feature value;
[0087] Determine the ratio of the food color value difference to a preset food color value difference threshold as a second identification feature value;
[0088] Determine the ratio of a preset matching quantity threshold to an average matching quantity of each ingredient as a third identification feature value;
[0089] The first identification feature value, the second identification feature value and the third identification feature value are weightedly summed to obtain a dish identification tendency parameter.
[0090] In this embodiment, the weight coefficient of the first identification feature value is 0.3, the weight coefficient of the second identification feature value is 0.3, and the weight coefficient of the third identification feature value is 0.4.
[0091] In this embodiment, the preset food shape size threshold is [2cm 2 , 5cm 2 ], the preset food chromaticity value difference threshold is selected in the range of [0.5, 0.8]. In this embodiment, the color difference formula is selected to calculate the difference in chromaticity values of each food, and the preset matching quantity threshold is selected in the range of [2, 4].
[0092] Specifically, the dish classification module of the present invention calculates the dish recognition tendency parameter according to the shape and size of each ingredient, the difference in chromaticity value of the ingredient and the number of matches. The shape and size of the ingredient, the difference in chromaticity value of the ingredient and the number of matches are important influencing factors affecting dish recognition. If the shape of the ingredient is small, it is difficult to obtain the shape characteristics of the ingredient. If the difference in chromaticity value between the ingredients is small, it may be difficult to obtain the accurate number of ingredients. If the number of matches is large, it may be difficult to obtain the dish that correctly corresponds to the ingredients in the dish image. By calculating the dish recognition tendency parameter, the degree of difficulty of identifying the dishes and the ingredients contained in the dishes in the dish image can be characterized to a certain extent. By calculating the dish recognition tendency parameter, data support can be provided for subsequent identification, thereby improving the reliability of dish identification.
[0093] Specifically, the dish classification module divides the dish images into categories according to the dish recognition tendency parameter.
[0094] If the dish recognition tendency parameter is less than or equal to the preset dish recognition tendency parameter comparison threshold, the dish image category is determined to be an inaccurate recognition tendency category;
[0095] If the dish recognition tendency parameter is greater than a preset dish recognition tendency parameter comparison threshold, the dish image category is determined to be a precise recognition tendency category.
[0096] In this embodiment, the preset dish identification tendency parameter comparison threshold is selected within the range of [0.9, 1.1].
[0097] Specifically, the recognition unit selects a recognition strategy according to the category of the dish image, wherein:
[0098] If the dish image category is a precise identification tendency category, the dish image is matched with the dish library according to the chromaticity value and outline of each ingredient, and the dish image is identified according to the matching result;
[0099] If the dish image category is a non-precise identification tendency category, the possible dish set is screened in the dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient, the ingredients included in the possible dish set are obtained, the ingredients included in the possible dish set are matched with the ingredients included in the dish image, and the dish corresponding to the dish image is identified.
[0100] Specifically, the recognition unit matches the chromaticity value of each ingredient in the dish image and the outline of the ingredient with the dish library, and recognizes the dish corresponding to the dish image according to the matching result.
[0101] Get the chromaticity value and outline of each ingredient in the dish image;
[0102] Match the chromaticity value and outline of each ingredient with the chromaticity value and outline of each dish in the dish library in turn;
[0103] If the difference between the chromaticity value of each ingredient and the chromaticity value of the ingredient in the dish library is less than the preset ingredient chromaticity value difference threshold, and the similarity between the ingredient outline and the ingredient outline of the dish in the dish library is greater than the preset ingredient outline similarity threshold, then the dish in the dish library is identified as the dish corresponding to the dish image.
[0104] In this embodiment, the preset food color value difference threshold is selected within the range of [0.5, 0.8], and the preset food outline similarity threshold is selected within the range of [0.9, 0.95].
[0105] Specifically, the recognition unit of the present invention matches the chromaticity values and contours of each ingredient in the dish image with the dish library, and identifies the dish corresponding to the dish image based on the matching result. When the dish image is relatively easy to identify, the chromaticity values and contours of each ingredient in the dish image can be directly matched with the dishes in the dish library, thereby ensuring high reliability while reducing computing power and improving recognition efficiency.
[0106] Specifically, the recognition unit selects a possible set of dishes in the dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient.
[0107] Get the shape, size and chromaticity value of each ingredient in the dish image.
[0108] Match the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient with the shape and chromaticity value of each ingredient in the dish library in sequence;
[0109] If the first preset condition is met, the dishes in the dish library are filtered to be a possible set of dishes corresponding to the dish image;
[0110] The first preset condition is that the difference in shape and size between the dish image and the ingredients in the dish in the dish library is less than a preset ingredient shape difference comparison threshold, and the difference in chromaticity value of each ingredient in the dish image and the chromaticity value of each ingredient in the dish in the dish library is less than a preset ingredient chromaticity value difference comparison threshold.
[0111] It is understandable that there may be several dishes in the dish library that are similar in shape and size as well as chromaticity value to the ingredients in the dish image, and the several dishes are a possible set of dishes for the dish image.
[0112] In this embodiment, the preset food shape difference comparison threshold is [0.5cm 2 , 1cm 2 ], and the preset food chromaticity value difference contrast threshold is selected in the range of [0.5, 0.8].
[0113] Specifically, the recognition unit of the present invention screens a possible set of dishes in the dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient. When the dish image is difficult to accurately identify, there may be several dishes similar to the dish image. At this time, similar dishes in the dish library can be screened out according to the shape and size of each ingredient and the chromaticity value of each ingredient, so that similar dishes can be further analyzed to improve the reliability of dish recognition.
[0114] Specifically, the recognition unit matches the ingredients that may be included in the dish with the ingredients included in the dish image, and recognizes the dish corresponding to the dish image.
[0115] Obtain the texture of each ingredient contained in each dish in the possible set of dishes;
[0116] Sequentially matching the texture of each ingredient contained in each dish in the possible dish set in combination with the outline of each ingredient with the texture of each ingredient and the outline of each ingredient in the dish image;
[0117] If the second preset condition is met, the dish in the possible set of dishes is identified as the dish corresponding to the dish image;
[0118] The second preset condition is that the texture similarity between the ingredients in the possible dish set and the texture similarity between the ingredients in the dish image is greater than a preset texture similarity threshold, and the outline similarity between the ingredients in the possible dish set and the outline of the ingredients in the dish image is greater than a preset ingredient outline similarity threshold.
[0119] In this embodiment, the preset texture similarity threshold is selected within the range of [0.9, 0.95], and the preset food outline similarity threshold is selected within the range of [0.9, 0.95].
[0120] Specifically, the recognition unit of the present invention obtains ingredients that may be included in a dish, matches the ingredients that may be included in the dish with the ingredients included in the dish image, and identifies the dish corresponding to the dish image. In actual situations, when the shape, size, chromaticity value and outline of the ingredients are relatively close, there may be great differences in the texture of the ingredients. At this time, the texture of the ingredients can be further obtained, and only the texture of the ingredients that may be included in the dish can be obtained. At this time, the reliability of dish recognition is improved while ensuring a small increase in computing power.
[0121] Specifically, the display unit displays a dish image and dish image information, wherein the dish image information includes the dish and ingredients included in the dish.
[0122] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A dish recognition system based on visual detection, characterized in that: include: A dish image storage module, used to store a number of dish images; a dish classification module, connected to the dish image storage module, for obtaining the shape and size of each ingredient contained in the dish, the difference in chromaticity value of the ingredient, and extracting the outline of each ingredient for matching with the dish ingredient library to obtain the number of matches corresponding to each ingredient, calculating the dish recognition tendency parameter according to the shape and size of each ingredient, the difference in chromaticity value of the ingredient, and the number of matches, and classifying the dish image according to the dish recognition tendency parameter; The dish recognition module is connected to each of the dish image storage modules and the dish classification module, and includes a recognition unit and a display unit. The recognition unit is used to select a recognition strategy according to the category of the dish image, including: Match the chromaticity value of each ingredient in the dish image and the outline of the ingredient with the dish library, and identify the dish corresponding to the dish image based on the matching result; Or, screening a possible dish set in a dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient, obtaining the ingredients included in the possible dish set, matching the ingredients included in the possible dish set with the ingredients included in the dish image, and identifying the dish corresponding to the dish image; The display unit is used to display the dish image corresponding to the dish.
2. The visual detection-based dish recognition system according to claim 1, characterized in that: The dish classification module obtains the shape and size of each ingredient contained in the dish according to the dish image. Get the number of ingredients contained in the dish image; Extract the outline of each ingredient, calculate the area contained in the outline of each ingredient and record it as the shape and size of the ingredient.
3. The visual detection-based dish recognition system according to claim 1, characterized in that: The dish classification module extracts the outline of each ingredient and matches it with the dish ingredient library to obtain the matching quantity corresponding to each ingredient. Get the outline of each ingredient in the dish image; Select the contour of each ingredient in the dish image and compare it with the contour of the ingredients in the dish ingredient library in turn for similarity; If the similarity between the outline of the food in the dish image and the outline of the food in the dish food library is greater than a preset food outline similarity threshold, it is determined that the food in the dish image matches the food in the dish food library; Get the matching number of each ingredient in the dish image.
4. The visual detection-based dish recognition system according to claim 1, characterized in that: The dish classification module calculates the dish identification tendency parameter according to the shape and size of each ingredient, the difference in chromaticity value of the ingredient, and the matching quantity. Obtain the average value of the shape and size of each ingredient, record the average value of the difference in chromaticity value of each ingredient as the ingredient chromaticity value difference, and obtain the average value of the matching quantity of each ingredient; Determine the ratio of the average value of the shapes and sizes of each food ingredient to a preset food ingredient shape and size threshold as a first identification feature value; Determine the ratio of the food color value difference to a preset food color value difference threshold as a second identification feature value; Determine the ratio of a preset matching quantity threshold to an average matching quantity of each ingredient as a third identification feature value; The first identification feature value, the second identification feature value and the third identification feature value are weightedly summed to obtain a dish identification tendency parameter.
5. The visual detection-based dish recognition system according to claim 4, characterized in that: The dish classification module classifies the dish images into categories according to the dish recognition tendency parameter. If the dish recognition tendency parameter is less than or equal to the preset dish recognition tendency parameter comparison threshold, the dish image category is determined to be an inaccurate recognition tendency category; If the dish recognition tendency parameter is greater than a preset dish recognition tendency parameter comparison threshold, the dish image category is determined to be a precise recognition tendency category.
6. The visual detection-based dish recognition system according to claim 5, characterized in that: The recognition unit selects a recognition strategy according to the category of the dish image, wherein: If the dish image category is a precise identification tendency category, the dish image is matched with the dish library according to the chromaticity value and outline of each ingredient, and the dish image is identified according to the matching result; If the dish image category is a non-precise identification tendency category, the possible dish set is screened in the dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient, the ingredients included in the possible dish set are obtained, the ingredients included in the possible dish set are matched with the ingredients included in the dish image, and the dish corresponding to the dish image is identified.
7. The visual detection-based dish recognition system according to claim 1, characterized in that: The recognition unit matches the chromaticity value of each ingredient in the dish image and the outline of the ingredient with the dish library, and recognizes the dish corresponding to the dish image according to the matching result. Get the chromaticity value and outline of each ingredient in the dish image; Match the chromaticity value and outline of each ingredient with the chromaticity value and outline of each dish in the dish library in turn; If the difference between the chromaticity value of each ingredient and the chromaticity value of the ingredient in the dish library is less than the preset ingredient chromaticity value difference threshold, and the similarity between the ingredient outline and the ingredient outline of the dish in the dish library is greater than the preset ingredient outline similarity threshold, then the dish in the dish library is identified as the dish corresponding to the dish image.
8. The visual detection-based dish recognition system according to claim 1, characterized in that: The recognition unit selects a possible set of dishes in the dish library according to the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient. Get the shape, size and chromaticity value of each ingredient in the dish image. Match the shape and size of each ingredient in the dish image and the chromaticity value of each ingredient with the shape and chromaticity value of each ingredient in the dish library in sequence; If the first preset condition is met, the dishes in the dish library are filtered to be a possible set of dishes corresponding to the dish image; The first preset condition is that the difference in shape and size between the dish image and the ingredients in the dish in the dish library is less than a preset ingredient shape difference comparison threshold, and the difference in chromaticity value of each ingredient in the dish image and the chromaticity value of each ingredient in the dish in the dish library is less than a preset ingredient chromaticity value difference comparison threshold.
9. The visual detection-based dish recognition system according to claim 1, characterized in that: The recognition unit matches the ingredients that may be included in the dish with the ingredients included in the dish image, and recognizes the dish corresponding to the dish image. Obtain the texture of each ingredient contained in each dish in the possible set of dishes; Sequentially matching the texture of each ingredient contained in each dish in the possible dish set in combination with the outline of each ingredient with the texture of each ingredient and the outline of each ingredient in the dish image; If the second preset condition is met, the dish in the possible set of dishes is identified as the dish corresponding to the dish image; The second preset condition is that the texture similarity between the ingredients in the possible dish set and the texture similarity between the ingredients in the dish image is greater than a preset texture similarity threshold, and the outline similarity between the ingredients in the possible dish set and the outline of the ingredients in the dish image is greater than a preset ingredient outline similarity threshold.
10. The visual detection-based dish recognition system according to claim 1, characterized in that: The display unit displays a dish image and dish image information, wherein the dish image information includes the dish and ingredients included in the dish.
Citation Information
Patent Citations
Dish identification model generation method and dish identification method
CN114613469A