A food material positioning method and system based on infrared image recognition

CN122948971APending Publication Date: 2026-10-20SHENZHEN SHUYING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610927231.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-25
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

但是由于不同类型的食材和不同类型的烹饪装置之间差异,尤其是当食材形状不规则、放置位置偏移时,直接从复杂的红外图像中识别并分割出食材的具体区域存在较大困难,食材定位的结果存在较大的偏差和不准确

Benefits of technology

基于所述待调矩形区域形成遍历窗口,并基于所述遍历窗口对所述外包矩形进行遍历,得到若干遍历区域;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a method and system for locating food ingredients based on infrared image recognition, belonging to the field of image processing technology. The invention involves conducting a cooking test on a cooking device using a calibration medium, and acquiring infrared and color images of the calibration medium during the test. Next, a threshold segmentation algorithm is used to segment the infrared image of the medium, obtaining the media infrared segmentation region. Simultaneously, a color image segmentation model is used to segment the media color image, determining the media color segmentation region. A dual-light fusion matrix of the cooking device is constructed using the media infrared and color segmentation regions. The invention then acquires the color and infrared images of the current food ingredient in the cooking device, and identifies the food ingredient's position in the infrared food ingredient image using the dual-light fusion matrix and the color food ingredient image, thereby improving the accuracy of food ingredient location in the infrared image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and in particular relates to a method and system for locating food ingredients based on infrared image recognition. Background Technology

[0002] With the continuous development of IoT and AI technologies, more and more cooking appliances are evolving towards intelligent cooking. For example, microwave ovens and ovens dynamically adjust their heating strategies based on the characteristics of different ingredients and the cooking stage to achieve precise control over the cooking process. During cooking, the temperature of the ingredients is the most critical control parameter. Accurately monitoring the temperature not only ensures that the food is at its best in terms of taste and nutrition, but is also a fundamental requirement for achieving automated temperature control in cooking appliances.

[0003] Currently, food temperature monitoring in cooking appliances typically uses infrared cameras for non-contact temperature monitoring. This technology collects infrared radiation data from the food surface and converts it into temperature information, thus enabling real-time temperature feedback during the cooking process. However, in practical applications, the infrared images acquired by infrared cameras include food, utensils, inner walls, and other background objects. This necessitates food location within the infrared image for temperature monitoring. However, due to differences between different types of food and cooking appliances, especially when food is irregularly shaped or misaligned, directly identifying and segmenting specific areas of the food from complex infrared images presents significant challenges, leading to substantial deviations and inaccuracies in food location results. Summary of the Invention

[0004] The present invention aims to provide a method and system for locating food ingredients based on infrared image recognition, in order to solve the above-mentioned technical problems. By constructing a dual-light fusion matrix using the infrared image and color image of the cooking device, the food ingredient infrared image is identified using the dual-light fusion matrix and the food ingredient color image, thereby improving the accuracy of locating food ingredients in the infrared image.

[0005] To address the aforementioned technical problems, embodiments of the present invention provide a method for locating food ingredients based on infrared image recognition, comprising: A cooking test is conducted on a preset cooking device based on a preset calibration medium, and infrared and color images of the calibration medium are acquired during the cooking test. The medium infrared image is segmented according to a preset threshold segmentation algorithm to determine the medium infrared segmentation region of the medium infrared image; Obtain a color image segmentation model, segment the medium color image based on the color image segmentation model, and determine the medium color segmentation region of the medium color image; Based on the infrared segmentation region and the color segmentation region of the medium, a dual-light fusion matrix of the cooking device is constructed; The cooking device acquires color and infrared images of the ingredients currently in the cooking device, and identifies the infrared image of the ingredients based on the dual-light fusion matrix and the color image of the ingredients, thereby locating the position of the ingredients in the infrared image of the ingredients.

[0006] Understandably, compared to existing technologies, this invention performs cooking tests on the cooking device using a calibration medium, and acquires both infrared and color images of the calibration medium during the cooking test. Next, a threshold segmentation algorithm is used to segment the infrared image of the medium, obtaining the media infrared segmentation region. Simultaneously, a color image segmentation model is used to segment the media color image, determining the media color segmentation region. A dual-light fusion matrix of the cooking device is constructed using the media infrared and color segmentation regions, thereby establishing a spatial mapping relationship between the infrared and color images of the cooking device. Finally, the color and infrared images of the current food ingredient in the cooking device are acquired. Utilizing the spatial mapping relationship, the infrared image of the food ingredient is identified through the dual-light fusion matrix and the color food ingredient image, thereby locating the position of the food ingredient within the infrared food ingredient image. The position of the food in the infrared food image is mapped by color images of the food and a dual-light fusion matrix. The color images of the food have higher spatial resolution and color features, which can more accurately identify the shape and position of the food. This makes the position of the food in the infrared food image more accurate, avoiding the problem of difficulty in directly identifying and segmenting food areas from complex infrared images and inaccurate positioning due to irregular shapes or placement offsets of the food. This improves the accuracy of food positioning in infrared images.

[0007] As a preferred embodiment, the step of segmenting the medium infrared image according to a preset threshold segmentation algorithm to determine the medium infrared segmentation region of the medium infrared image includes: The infrared image of the medium is filtered and grayscaled to obtain a first infrared image of the medium corresponding to the infrared image of the medium. Traverse the grayscale value of each pixel in the infrared image of the first medium to determine several segmentation thresholds; The infrared image of the first medium is segmented based on each of the segmentation thresholds to determine the segmentation region corresponding to each of the segmentation thresholds. Construct the minimum bounding rectangle for each segmented region, and filter the minimum bounding rectangle based on the pre-acquired calibration medium prior conditions to determine the rectangular region to be adjusted in the infrared image of the medium. Fine-tuning is performed on the rectangular region to be adjusted in the medium infrared image to determine the medium infrared segmentation region of the medium infrared image.

[0008] In the above scheme, filtering the infrared image of the medium reduces noise interference and improves the quality of the first medium infrared image. Based on Otsu's method, an initial segmentation threshold is determined, and multiple first segmentation thresholds are generated. Segmentation using multiple first segmentation thresholds avoids over-segmentation or under-segmentation caused by a single threshold. Next, by constructing the minimum bounding rectangle of the segmented region and filtering based on prior conditions of the calibration medium, the region to be adjusted that best matches the calibration medium can be selected. Fine-tuning of this region allows the medium infrared segmentation region of the medium infrared image to more accurately represent the actual range of the calibration medium, thereby improving the accuracy of the subsequent dual-light fusion matrix and ultimately improving the accuracy of food location in the infrared image.

[0009] As a preferred embodiment, the step of fine-tuning the rectangular region to be adjusted in the medium infrared image to determine the medium infrared segmentation region of the medium infrared image includes: The boundary of the rectangular region to be adjusted in the infrared image of the medium is adjusted based on a preset pixel distance to form an outer rectangle of the rectangular region to be adjusted. A traversal window is formed based on the rectangular region to be adjusted, and the outer rectangle is traversed based on the traversal window to obtain several traversal regions. The infrared temperature accumulation value of all pixels in each traversed region is counted, and the traversed region is filtered based on the infrared temperature accumulation value to determine the medium infrared segmentation region of the medium infrared image.

[0010] In the above scheme, the boundary of the rectangular region to be adjusted is formed by adjusting the pixel distance to create an outer rectangle. A traversal window is used for local scanning, and the accumulated infrared temperature value of each pixel within the traversal region is calculated. Based on the accumulated infrared temperature value, the true calibration medium region in the infrared image of the medium is selected, ensuring that the infrared segmentation region of the medium accurately represents the calibration medium region. The accumulated infrared temperature value fully considers the distribution of temperature information in the infrared image of the medium. Filtering by the accumulated temperature value can more accurately find the region representing the calibration medium, avoiding inaccurate positioning due to image noise or other interference factors. This further optimizes the determination of the infrared segmentation region of the medium, thereby improving the accuracy of the subsequent dual-light fusion matrix and ultimately improving the accuracy of food location in the infrared image.

[0011] As a preferred embodiment, the step of obtaining a color image segmentation model, segmenting the medium color image based on the color image segmentation model, and determining the medium color segmentation region of the medium color image includes: Acquire the image segmentation model and several initial calibration medium training images; Each of the initial calibration medium training images is labeled to determine the label of each initial calibration medium training image; Extract the primary color of each initial calibration medium training image, adjust the primary color of each initial calibration medium training image to form a first calibration medium training image corresponding to each initial calibration medium image; The size of each first calibration medium training image is enlarged to obtain several second calibration medium training images, and feature extraction is performed on the second calibration medium training images to determine the image features of each second calibration medium training image; The label of each second calibration medium training image is determined based on the label of each of the initial calibration medium training images; Based on the labels and image features of each training image of the second calibration medium, the image segmentation model is trained to obtain a color image segmentation model. The medium color image is input into the color image segmentation model so that the color image segmentation model can segment the medium color image and determine the medium color segmentation region of the medium color image.

[0012] In the above scheme, by extracting the dominant color of each initial calibration medium training image and adjusting it, the number of samples is enhanced and expanded. This allows the first calibration medium training image to simulate color changes under different ingredients and cooking environments, improving the robustness and generalization ability of the color image segmentation model. Simultaneously, by enlarging the size of the first calibration medium training image before feature extraction, more specific detailed features can be captured, preventing overly small features from being ignored, thus improving the accuracy and comprehensiveness of image features. Labels are obtained through annotation processing, and the image segmentation model is trained using the labels and image features of the second calibration medium training image to obtain a color image segmentation model. This allows the color image segmentation model to accurately segment the medium's color image, thereby improving the accuracy of locating ingredients in infrared images.

[0013] As a preferred embodiment, constructing the dual-light fusion matrix of the cooking device based on the infrared segmentation region and the color segmentation region of the medium includes: Obtain the infrared vertex coordinate set of the infrared segmentation region of the medium and the color vertex coordinate set of the color segmentation region of the medium; Based on the infrared vertex coordinate set and the color vertex coordinate set, a scaling factor is generated between the infrared image of the medium and the color image of the medium; Based on the infrared vertex coordinate set and the color vertex coordinate set, the coordinate offset between the infrared image and the color image of the medium is calculated using the scaling factor. Based on the scaling factor and coordinate offset, the dual-light fusion matrix of the cooking device is constructed.

[0014] In the above scheme, by obtaining the infrared vertex coordinate set of the infrared segmentation region of the medium and the color vertex coordinate set of the color segmentation region of the medium, the scaling factor and coordinate offset between the infrared image and the color image of the medium are calculated. The scaling factor reflects the difference in resolution between the infrared image and the color image of the medium, and the coordinate offset compensates for the viewing angle deviation and position deviation. This allows the dual-light fusion matrix to accurately map the food region in the color image of the medium to the coordinate system of the infrared image of the medium. In the subsequent process, the dual-light fusion matrix can be used to identify the infrared image of the food, thereby locating the position of the food in the infrared food image. This avoids the problem of difficulty in directly identifying and segmenting the food region from complex infrared images and inaccurate positioning due to irregular food shape and placement offset, thus improving the accuracy of food positioning in infrared images.

[0015] As a preferred embodiment, the step of acquiring a color image and an infrared image of the current food ingredient in the cooking device, and identifying the infrared image of the food ingredient based on the dual-light fusion matrix and the color food ingredient image to locate the position of the food ingredient in the infrared food ingredient image, includes: Collect color and infrared images of the ingredients currently in the cooking device; The food color image is input into the color image segmentation model to determine the food color segmentation region of the food color image; Extract the color vertex coordinate set of the food ingredient in the color segmentation region, and map the color vertex coordinate set of the food ingredient based on the dual-light fusion matrix to obtain the infrared vertex coordinate set of the food ingredient; The position of the food ingredient in the infrared food ingredient image is located based on the infrared vertex coordinate set of the food ingredient.

[0016] In the above scheme, the food color image is segmented using a color image segmentation model, resulting in accurate food color segmentation regions. Next, the color vertex coordinate set of the food color segmentation regions is extracted, and this set is mapped using a dual-light fusion matrix to obtain the food infrared vertex coordinate set. This allows for the location of the food in the infrared food image. Because the food color image has higher spatial resolution and color features, it can more accurately identify the shape and position of the food, making the located food position in the infrared food image more accurate. This avoids the problems of difficulty in directly identifying and segmenting food regions from complex infrared images due to irregular food shapes or placement offsets, thus improving the accuracy of food location in infrared images.

[0017] As a preferred embodiment, the step of performing a cooking test on a preset cooking device based on a preset calibration medium, and acquiring infrared and color images of the calibration medium during the cooking test, includes: A cooking test is conducted on a preset cooking device based on a preset calibration medium, and the temperature of the calibration medium is monitored in real time during the cooking test. When the temperature of the calibration medium reaches a preset temperature threshold, an infrared image and a color image of the calibration medium are acquired.

[0018] In the above scheme, when the temperature of the calibration medium reaches a preset temperature threshold, the infrared image and color image of the calibration medium are acquired. The temperature threshold makes the edge of the calibration medium and the medium it contacts have a significant edge gradient distinction in the infrared image of the medium, reducing the segmentation error of the infrared image of the medium, thereby improving the accuracy of locating food in the infrared image.

[0019] Accordingly, this invention provides a food ingredient positioning system based on infrared image recognition, including: a cooking test module, an infrared image segmentation module, a color image segmentation module, a dual-light fusion matrix construction module, and a food ingredient positioning module; The cooking test module is used to perform cooking tests on a preset cooking device based on a preset calibration medium, and to collect infrared and color images of the calibration medium during the cooking test. The infrared image segmentation module is used to segment the medium infrared image according to a preset threshold segmentation algorithm to determine the medium infrared segmentation region of the medium infrared image. The color image segmentation module is used to obtain a color image segmentation model, segment the medium color image based on the color image segmentation model, and determine the medium color segmentation region of the medium color image; The dual-light fusion matrix construction module is used to construct the dual-light fusion matrix of the cooking device based on the infrared segmentation region and the color segmentation region of the medium. The ingredient positioning module is used to acquire color images and infrared images of the current ingredients in the cooking device, and to identify the infrared image of the ingredients based on the dual-light fusion matrix and the color ingredient image to locate the position of the ingredients in the infrared ingredient image.

[0020] As a preferred embodiment, the infrared image segmentation module includes: an infrared image segmentation unit; The infrared image segmentation unit is used to filter and grayscale the medium infrared image to obtain a first medium infrared image corresponding to the medium infrared image. Traverse the grayscale value of each pixel in the infrared image of the first medium to determine several segmentation thresholds; The infrared image of the first medium is segmented based on each of the segmentation thresholds to determine the segmentation region corresponding to each of the segmentation thresholds. Construct the minimum bounding rectangle for each segmented region, and filter the minimum bounding rectangle based on the pre-acquired calibration medium prior conditions to determine the rectangular region to be adjusted in the infrared image of the medium. Fine-tuning is performed on the rectangular region to be adjusted in the medium infrared image to determine the medium infrared segmentation region of the medium infrared image.

[0021] As a preferred embodiment, the infrared image segmentation unit includes: a region fine-tuning subunit; The region fine-tuning subunit is used to adjust the boundary of the rectangular region to be adjusted in the infrared image of the medium based on a preset pixel distance, forming an outer rectangle of the rectangular region to be adjusted. A traversal window is formed based on the rectangular region to be adjusted, and the outer rectangle is traversed based on the traversal window to obtain several traversal regions. The infrared temperature accumulation value of all pixels in each traversed region is counted, and the traversed region is filtered based on the infrared temperature accumulation value to determine the medium infrared segmentation region of the medium infrared image.

[0022] Understandably, compared to existing technologies, this system performs cooking tests on the cooking device using a calibration medium, and acquires both infrared and color images of the calibration medium during the cooking test. Next, a threshold segmentation algorithm is used to segment the infrared image of the medium, obtaining the segmented infrared regions. Simultaneously, a color image segmentation model is used to segment the color image of the medium, determining the segmented color regions. A dual-light fusion matrix of the cooking device is constructed using the infrared and color segmented regions, thereby establishing a spatial mapping relationship between the infrared and color images of the cooking device. Finally, the system acquires both the color and infrared images of the current food ingredient in the cooking device. Utilizing the spatial mapping relationship, the infrared image of the food ingredient is identified using the dual-light fusion matrix and the color food ingredient image, thereby locating the position of the food ingredient within the infrared food ingredient image. The position of the food in the infrared food image is mapped by color images of the food and a dual-light fusion matrix. The color images of the food have higher spatial resolution and color features, which can more accurately identify the shape and position of the food. This makes the position of the food in the infrared food image more accurate, avoiding the problem of difficulty in directly identifying and segmenting food areas from complex infrared images and inaccurate positioning due to irregular shapes or placement offsets of the food. This improves the accuracy of food positioning in infrared images. Attached Figure Description

[0023] Figure 1 A flowchart illustrating the steps of a food ingredient location method based on infrared image recognition, provided in an embodiment of the present invention; Figure 2 A schematic diagram showing the positions of a calibration medium and a cooking device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a food positioning system based on infrared image recognition, provided in an embodiment of the present invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] Example 1 Please refer to Figure 1 , Figure 1 The flowchart of a method for locating food ingredients based on infrared image recognition provided in an embodiment of the present invention includes steps S101 to S105.

[0026] Step S101: Perform a cooking test on the preset cooking device based on the preset calibration medium, and acquire the infrared image and color image of the calibration medium during the cooking test.

[0027] Step S102: Segment the medium infrared image according to a preset threshold segmentation algorithm to determine the medium infrared segmentation region of the medium infrared image.

[0028] Step S103: Obtain a color image segmentation model, segment the medium color image based on the color image segmentation model, and determine the medium color segmentation region of the medium color image.

[0029] Step S104: Based on the infrared segmentation region and the color segmentation region of the medium, construct the dual-light fusion matrix of the cooking device.

[0030] Step S105: Acquire color images and infrared images of the current ingredients in the cooking device, and identify the infrared image of the ingredients based on the dual-light fusion matrix and the color image of the ingredients to locate the position of the ingredients in the infrared image of the ingredients.

[0031] In this embodiment, the step of performing a cooking test on a preset cooking device based on a preset calibration medium, and acquiring infrared and color images of the calibration medium during the cooking test, includes: A cooking test is conducted on a preset cooking device based on a preset calibration medium, and the temperature of the calibration medium is monitored in real time during the cooking test. When the temperature of the calibration medium reaches a preset temperature threshold, an infrared image and a color image of the calibration medium are acquired.

[0032] In one alternative embodiment, please refer to Figure 2 , Figure 2 This is a schematic diagram showing the positions of a calibration medium and a cooking device according to an embodiment of the present invention; as shown. Figure 2 As shown, in this embodiment, the calibration medium 2 is set as a constant temperature plate, and the calibration medium 2 (constant temperature plate) is placed inside the cooking device 1. Since the edge of the calibration medium 2 (constant temperature plate) has temperature insulation properties at the contact point with the cooking device 1, it can prevent heat conduction from causing a smooth transition of the edge of the constant temperature plate in the infrared image, resulting in segmentation errors. In particular, the calibration medium 2 used in this embodiment is placed inside the cooking device 1 to simulate the cooking of food in the cooking device.

[0033] Next, the calibration medium is heated, that is, the cooking device is cooked using the calibration medium, and the temperature of the calibration medium is monitored in real time. When the temperature of the calibration medium reaches the preset temperature threshold (75 degrees in this embodiment; different calibration media have different temperature thresholds, which can be set according to actual needs), the infrared camera built into the cooking device is used to capture an infrared image of the medium, and the visible light camera built into the cooking device is used to capture a color image of the medium.

[0034] Specifically, the visible light camera used in this invention refers to an RGB (red, green, blue) camera. The temperature control plate used in this embodiment refers to a device capable of precisely controlling and maintaining its working surface at a set temperature.

[0035] In the above embodiments, when the temperature of the calibration medium reaches a preset temperature threshold, the infrared image and color image of the calibration medium are acquired. The temperature threshold makes the edge of the calibration medium and the medium it contacts have a significant edge gradient distinction in the infrared image of the medium, reducing the segmentation error of the infrared image of the medium, thereby improving the accuracy of locating food in the infrared image.

[0036] In this embodiment, the step of segmenting the medium infrared image according to a preset threshold segmentation algorithm to determine the medium infrared segmentation region of the medium infrared image includes: The infrared image of the medium is filtered and grayscaled to obtain a first infrared image of the medium corresponding to the infrared image of the medium. Traverse the grayscale value of each pixel in the infrared image of the first medium to determine several segmentation thresholds; The infrared image of the first medium is segmented based on each of the segmentation thresholds to determine the segmentation region corresponding to each of the segmentation thresholds. Construct the minimum bounding rectangle for each segmented region, and filter the minimum bounding rectangle based on the pre-acquired calibration medium prior conditions to determine the rectangular region to be adjusted in the infrared image of the medium. Fine-tuning is performed on the rectangular region to be adjusted in the medium infrared image to determine the medium infrared segmentation region of the medium infrared image.

[0037] In one optional embodiment, the median edge-preserving filter is used to filter the infrared image of the medium, followed by grayscale processing to obtain a first infrared image of the medium corresponding to the infrared image of the medium. Then, the grayscale value of each pixel in the first infrared image of the medium is traversed, and each grayscale value is used as a segmentation threshold. Next, the first infrared image of the medium is segmented using each segmentation threshold. If the grayscale value of a pixel in the first infrared image of the medium is greater than the segmentation threshold, the pixel is set as the foreground (white, value 255); otherwise, it is set as the background (black, value 0). Then, a contour search algorithm (such as OpenCV's findContours) is used to determine the segmentation region corresponding to each segmentation threshold. Next, the minimum bounding rectangle of each segmentation region is calculated. Since there are already relatively mature algorithms for calculating the minimum bounding rectangle, this embodiment will not elaborate on them here. Next, this embodiment sets the prior conditions for calibrating the medium as the width, height, and aspect ratio of the calibrated medium. The minimum bounding rectangle that is closest to the prior conditions of the calibrated medium is selected, and this minimum bounding rectangle is the rectangular region to be adjusted in the infrared image of the medium. Therefore, by selecting the smallest bounding rectangle that is closest to the prior conditions of the calibration medium, the region to be adjusted can be closest to the calibration medium, resulting in more accurate segmentation.

[0038] It should be noted that the Edge-Preserving Median Filter is a non-linear image processing technique. Its core objective is to effectively filter out image noise (such as salt and pepper noise) while preserving the clear edges and details in the original image to the greatest extent possible. Traditional median filtering is used to strongly denoise flat areas, while weak filtering or special processing strategies are used along the edge direction in edge areas to avoid blurring the edges.

[0039] In the above embodiments, filtering the infrared image of the medium can reduce noise interference and improve the quality of the first infrared image of the medium. Determining the initial segmentation threshold based on the Otsu method and generating multiple first segmentation thresholds, and performing segmentation using multiple first segmentation thresholds, can avoid over-segmentation or under-segmentation problems caused by a single threshold. Next, by constructing the minimum bounding rectangle of the segmented region and filtering based on the prior conditions of the calibration medium, the adjustment rectangle region that best matches the calibration medium can be selected. Then, by fine-tuning the adjustment rectangle region, the infrared segmentation region of the medium infrared image can more accurately represent the actual range of the calibration medium, thereby improving the accuracy of the subsequent dual-light fusion matrix and thus improving the accuracy of food location in the infrared image.

[0040] In this embodiment, the step of fine-tuning the rectangular region to be adjusted in the medium infrared image to determine the medium infrared segmentation region of the medium infrared image includes: The boundary of the rectangular region to be adjusted in the infrared image of the medium is adjusted based on a preset pixel distance to form an outer rectangle of the rectangular region to be adjusted. A traversal window is formed based on the rectangular region to be adjusted, and the outer rectangle is traversed based on the traversal window to obtain several traversal regions. The infrared temperature accumulation value of all pixels in each traversed region is counted, and the traversed region is filtered based on the infrared temperature accumulation value to determine the medium infrared segmentation region of the medium infrared image.

[0041] In an optional embodiment, the pixel distance is set to 2 pixels; the boundaries (i.e., the four sides) of the rectangle to be adjusted are extended by 2 pixels upwards, downwards, leftwards, and rightwards respectively, resulting in an outer rectangle of the rectangle to be adjusted; then, the size of the rectangle to be adjusted is used as the size of the traversal window, and the shape of the rectangle to be adjusted is used as the shape of the traversal window, thus forming a traversal window. Finally, the traversal window is used to traverse within the outer rectangle to obtain several traversal regions; the cumulative infrared temperature value of all pixels in each traversal region is counted (since it is an infrared image, the infrared temperature value of the pixels can be read directly from the infrared image); the traversal region with the largest cumulative infrared temperature value is the medium infrared segmentation region of the medium infrared image.

[0042] In the above embodiments, the boundary of the rectangular region to be adjusted is formed by adjusting the pixel distance to create an outer rectangle. A traversal window is used for local scanning, and the accumulated infrared temperature value of each pixel within the traversal region is calculated. Based on the accumulated infrared temperature value, the true calibration medium region in the infrared image of the medium is selected, ensuring that the infrared segmentation region of the medium accurately represents the calibration medium region. The accumulated infrared temperature value fully considers the distribution of temperature information in the infrared image of the medium. Filtering by the accumulated temperature value can more accurately find the region representing the calibration medium, avoiding inaccurate positioning due to image noise or other interference factors. This further optimizes the determination of the infrared segmentation region of the medium, thereby improving the accuracy of the subsequent dual-light fusion matrix and ultimately improving the accuracy of food location in the infrared image.

[0043] In this embodiment, obtaining a color image segmentation model, segmenting the medium color image based on the color image segmentation model, and determining the medium color segmentation region of the medium color image includes: Acquire the image segmentation model and several initial calibration medium training images; Each of the initial calibration medium training images is labeled to determine the label of each initial calibration medium training image; Extract the primary color of each initial calibration medium training image, adjust the primary color of each initial calibration medium training image to form a first calibration medium training image corresponding to each initial calibration medium image; The size of each first calibration medium training image is enlarged to obtain several second calibration medium training images, and feature extraction is performed on the second calibration medium training images to determine the image features of each second calibration medium training image; The label of each second calibration medium training image is determined based on the label of each of the initial calibration medium training images; Based on the labels and image features of each training image of the second calibration medium, the image segmentation model is trained to obtain a color image segmentation model. The medium color image is input into the color image segmentation model so that the color image segmentation model can segment the medium color image and determine the medium color segmentation region of the medium color image.

[0044] In one optional embodiment, the image segmentation model is set to the YOLOv8 model; then, several initial calibration medium training images are obtained, which are color images containing calibration media; next, the calibration media in the initial calibration medium training images are segmented and labeled to generate a label for each initial calibration medium training image; then, the dominant color of each initial calibration medium training image is extracted, which refers to the most representative color feature in the initial calibration medium training image. The extraction of the dominant color can be achieved using algorithms such as K-Means clustering algorithm, color histogram peak method, and median cut algorithm. After obtaining the primary color, adjustments can be made using algorithms such as Color Space Random Perturbation and Affine Color Transformation. This forms a first calibration medium training image corresponding to each initial calibration medium image. Next, the size of each first calibration medium training image is enlarged (e.g., from 640×640 to 960×960) to obtain a second calibration medium training image. Simultaneously, to further improve the training effect of the image segmentation model, this embodiment adds two 3*3 convolutional layers before the input layer of the image segmentation model to extract features from the second calibration medium training images, determining the image features of each second calibration medium training image. Finally, the labels of the initial calibration medium training images are used as the labels of the corresponding second calibration medium training images. Using the labels and image features of the second calibration medium training images, the image segmentation model is trained to obtain a color image segmentation model. Since there are already mature techniques for training the YOLOv8 model, this embodiment will not elaborate further. After obtaining the color image segmentation model, the medium color image is input into the color image segmentation model so that the color image segmentation model can segment the medium color image and determine the medium color segmentation region of the medium color image.

[0045] It's important to note that YOLOv8 (You Only Look Once v8) is a real-time object detection and computer vision model capable of simultaneously predicting the bounding boxes and class probabilities of multiple objects in an image during a single forward propagation. The YOLOv8 model supports various vision tasks, including object detection, instance segmentation, and pose estimation, and is widely used in fields requiring rapid and accurate object identification, such as autonomous driving, video surveillance, and industrial quality inspection.

[0046] In the above embodiments, by extracting the dominant color of each initial calibration medium training image and adjusting it, the number of samples is enhanced and expanded. This allows the first calibration medium training image to simulate color changes under different ingredients and cooking environments, improving the robustness and generalization ability of the color image segmentation model. Simultaneously, by enlarging the size of the first calibration medium training image before feature extraction, more specific detailed features can be captured, preventing overly small features from being ignored, thereby improving the accuracy and comprehensiveness of image features. Labels are obtained through annotation processing, and the image segmentation model is trained using the labels and image features of the second calibration medium training image to obtain a color image segmentation model. This enables the color image segmentation model to accurately segment the medium color image, thereby improving the accuracy of locating ingredients in infrared images.

[0047] In this embodiment, constructing the dual-light fusion matrix of the cooking device based on the infrared segmentation region and the color segmentation region of the medium includes: Obtain the infrared vertex coordinate set of the infrared segmentation region of the medium and the color vertex coordinate set of the color segmentation region of the medium; Based on the infrared vertex coordinate set and the color vertex coordinate set, a scaling factor is generated between the infrared image of the medium and the color image of the medium; Based on the infrared vertex coordinate set and the color vertex coordinate set, the coordinate offset between the infrared image and the color image of the medium is calculated using the scaling factor. Based on the scaling factor and coordinate offset, the dual-light fusion matrix of the cooking device is constructed.

[0048] In an optional embodiment, the infrared vertex coordinate set of the infrared segmentation region of the medium is obtained. and the color vertex coordinate set of the medium color segmentation region ; in, This refers to the coordinates of the top-left vertex of the infrared segmentation region of the medium. This refers to the coordinates of the upper right vertex of the infrared segmentation region of the medium. This refers to the coordinates of the lower left vertex of the infrared segmentation region of the medium. This refers to the coordinates of the lower right vertex of the infrared segmentation region of the medium. This refers to the coordinates of the top-left vertex of the color segmentation region of the medium. This refers to the coordinates of the upper right vertex of the color segmentation region of the medium. This refers to the coordinates of the lower left vertex of the color segmentation area of ​​the medium. This refers to the coordinates of the lower right vertex of the color segmentation area of ​​the medium; The calculation process for the scaling factor includes: and ;in, This represents the scaling factor in the X-axis direction between the infrared image and the color image of the medium. This represents the scaling factor in the Y-axis direction between the infrared image and the color image of the medium. The calculation process for coordinate offset includes: and ; This represents the coordinate offset in the X-axis direction between the infrared image and the color image of the medium. This represents the coordinate offset in the Y-axis direction between the infrared image and the color image of the medium. Therefore, the constructed two-light fusion matrix is ​​represented as .

[0049] In the above embodiments, by obtaining the infrared vertex coordinate set of the infrared segmentation region of the medium and the color vertex coordinate set of the color segmentation region of the medium, the scaling factor and coordinate offset between the infrared image and the color image of the medium are calculated. The scaling factor reflects the difference in resolution between the infrared image and the color image of the medium, and the coordinate offset compensates for the viewing angle deviation and position deviation. This allows the dual-light fusion matrix to accurately map the food region in the color image of the medium to the coordinate system of the infrared image of the medium. In the subsequent process, the dual-light fusion matrix can be used to identify the infrared image of the food, thereby locating the position of the food in the infrared food image. This avoids the problem of difficulty in directly identifying and segmenting the food region from complex infrared images and inaccurate positioning due to irregular food shape and placement offset, thus improving the accuracy of food positioning in infrared images.

[0050] In this embodiment, the step of acquiring a color image and an infrared image of the current food ingredient in the cooking device, and identifying the infrared image of the food ingredient based on the dual-light fusion matrix and the color food ingredient image to locate the position of the food ingredient in the infrared food ingredient image, includes: Collect color and infrared images of the ingredients currently in the cooking device; The food color image is input into the color image segmentation model to determine the food color segmentation region of the food color image; Extract the color vertex coordinate set of the food ingredient in the color segmentation region, and map the color vertex coordinate set of the food ingredient based on the dual-light fusion matrix to obtain the infrared vertex coordinate set of the food ingredient; The position of the food ingredient in the infrared food ingredient image is located based on the infrared vertex coordinate set of the food ingredient.

[0051] In one optional embodiment, a color image of the food is input into a color image segmentation model to obtain a color segmentation region of the food in the color image; then, the color vertex coordinate set of the food in the color segmentation region is extracted, and the coordinates of each vertex in the color vertex coordinate set are multiplied by the dual-light fusion matrix to obtain the infrared vertex coordinate set of the food; the position of the food in the infrared food image can be located by the coordinates of each vertex in the infrared vertex coordinate set of the food.

[0052] In the above embodiments, by segmenting the food color image using a color image segmentation model, accurate food color segmentation regions can be obtained. Next, the food color vertex coordinate set of the segmented regions is extracted, and this set is mapped using a dual-light fusion matrix to obtain the food infrared vertex coordinate set. This allows for the location of the food in the infrared food image. Since the food color image has higher spatial resolution and color features, it can more accurately identify the shape and position of the food, resulting in a more accurate location of the food in the infrared food image. This avoids the problem of difficulty in directly identifying and segmenting food regions from complex infrared images due to irregular food shapes or placement offsets, thus improving the accuracy of food location in infrared images.

[0053] This embodiment uses a calibration medium to conduct cooking tests on the cooking device, acquiring infrared and color images of the calibration medium during the test. Next, a threshold segmentation algorithm is used to segment the infrared image of the medium, obtaining the segmented infrared regions. Simultaneously, a color image segmentation model is used to segment the color image of the medium, determining the segmented color regions. A dual-light fusion matrix of the cooking device is constructed using the infrared and color segmented regions, establishing a spatial mapping relationship between the infrared and color images of the cooking device. Finally, color and infrared images of the current food ingredient in the cooking device are acquired. Using the spatial mapping relationship, the infrared image of the food ingredient is identified through the dual-light fusion matrix and the color food ingredient image, thereby locating the position of the food ingredient within the infrared food ingredient image. The position of the food in the infrared food image is mapped by color images of the food and a dual-light fusion matrix. The color images of the food have higher spatial resolution and color features, which can more accurately identify the shape and position of the food. This makes the position of the food in the infrared food image more accurate, avoiding the problem of difficulty in directly identifying and segmenting food areas from complex infrared images and inaccurate positioning due to irregular shapes or placement offsets of the food. This improves the accuracy of food positioning in infrared images.

[0054] Example 2 Please refer to Figure 3 , Figure 3A schematic diagram of a food ingredient positioning system based on infrared image recognition provided in an embodiment of the present invention includes: a cooking test module 201, an infrared image segmentation module 202, a color image segmentation module 203, a dual-light fusion matrix construction module 204, and a food ingredient positioning module 205; The cooking test module 201 is used to perform cooking tests on a preset cooking device based on a preset calibration medium, and to collect infrared and color images of the calibration medium during the cooking test. The infrared image segmentation module 202 is used to segment the medium infrared image according to a preset threshold segmentation algorithm to determine the medium infrared segmentation region of the medium infrared image. The color image segmentation module 203 is used to obtain a color image segmentation model, segment the medium color image based on the color image segmentation model, and determine the medium color segmentation region of the medium color image; The dual-light fusion matrix construction module 204 is used to construct the dual-light fusion matrix of the cooking device based on the infrared segmentation region and the color segmentation region of the medium. The ingredient positioning module 205 is used to acquire color images and infrared images of the current ingredients in the cooking device, and to identify the infrared image of the ingredients based on the dual-light fusion matrix and the color ingredient image to locate the position of the ingredients in the infrared ingredient image.

[0055] In this embodiment, the cooking test module 201 includes: a cooking test unit; The cooking test unit is used to perform cooking tests on a preset cooking device based on a preset calibration medium, and to monitor the temperature of the calibration medium in real time during the cooking test. When the temperature of the calibration medium reaches a preset temperature threshold, an infrared image and a color image of the calibration medium are acquired.

[0056] In this embodiment, the infrared image segmentation module 202 includes: an infrared image segmentation unit; The infrared image segmentation unit is used to filter and grayscale the medium infrared image to obtain a first medium infrared image corresponding to the medium infrared image. Traverse the grayscale value of each pixel in the infrared image of the first medium to determine several segmentation thresholds; The infrared image of the first medium is segmented based on each of the segmentation thresholds to determine the segmentation region corresponding to each of the segmentation thresholds. Construct the minimum bounding rectangle for each segmented region, and filter the minimum bounding rectangle based on the pre-acquired calibration medium prior conditions to determine the rectangular region to be adjusted in the infrared image of the medium. Fine-tuning is performed on the rectangular region to be adjusted in the medium infrared image to determine the medium infrared segmentation region of the medium infrared image.

[0057] In this embodiment, the infrared image segmentation unit includes: a region fine-tuning subunit; The region fine-tuning subunit is used to adjust the boundary of the rectangular region to be adjusted in the infrared image of the medium based on a preset pixel distance, forming an outer rectangle of the rectangular region to be adjusted. A traversal window is formed based on the rectangular region to be adjusted, and the outer rectangle is traversed based on the traversal window to obtain several traversal regions. The infrared temperature accumulation value of all pixels in each traversed region is counted, and the traversed region is filtered based on the infrared temperature accumulation value to determine the medium infrared segmentation region of the medium infrared image.

[0058] In this embodiment, the color image segmentation module 203 includes: a color image segmentation unit; The color image segmentation unit is used to acquire the image segmentation model and several initial calibration medium training images; Each of the initial calibration medium training images is labeled to determine the label of each initial calibration medium training image; Extract the primary color of each initial calibration medium training image, adjust the primary color of each initial calibration medium training image to form a first calibration medium training image corresponding to each initial calibration medium image; The size of each first calibration medium training image is enlarged to obtain several second calibration medium training images, and feature extraction is performed on the second calibration medium training images to determine the image features of each second calibration medium training image; The label of each second calibration medium training image is determined based on the label of each of the initial calibration medium training images; Based on the labels and image features of each training image of the second calibration medium, the image segmentation model is trained to obtain a color image segmentation model. The medium color image is input into the color image segmentation model so that the color image segmentation model can segment the medium color image and determine the medium color segmentation region of the medium color image.

[0059] In this embodiment, the dual-light fusion matrix construction module 204 includes: a dual-light fusion matrix construction unit; The dual-light fusion matrix construction unit is used to obtain the infrared vertex coordinate set of the infrared segmentation region of the medium and the color vertex coordinate set of the color segmentation region of the medium; Based on the infrared vertex coordinate set and the color vertex coordinate set, a scaling factor is generated between the infrared image of the medium and the color image of the medium; Based on the infrared vertex coordinate set and the color vertex coordinate set, the coordinate offset between the infrared image and the color image of the medium is calculated using the scaling factor. Based on the scaling factor and coordinate offset, the dual-light fusion matrix of the cooking device is constructed.

[0060] In this embodiment, the food ingredient positioning module 205 includes: a food ingredient positioning unit; The food positioning unit is used to acquire color images and infrared images of the food currently in the cooking device; The food color image is input into the color image segmentation model to determine the food color segmentation region of the food color image; Extract the color vertex coordinate set of the food ingredient in the color segmentation region, and map the color vertex coordinate set of the food ingredient based on the dual-light fusion matrix to obtain the infrared vertex coordinate set of the food ingredient; The position of the food ingredient in the infrared food ingredient image is located based on the infrared vertex coordinate set of the food ingredient.

[0061] This embodiment uses a calibration medium to conduct cooking tests on the cooking device, acquiring infrared and color images of the calibration medium during the test. Next, a threshold segmentation algorithm is used to segment the infrared image of the medium, obtaining the segmented infrared regions. Simultaneously, a color image segmentation model is used to segment the color image of the medium, determining the segmented color regions. A dual-light fusion matrix of the cooking device is constructed using the infrared and color segmented regions, establishing a spatial mapping relationship between the infrared and color images of the cooking device. Finally, color and infrared images of the current food ingredient in the cooking device are acquired. Using the spatial mapping relationship, the infrared image of the food ingredient is identified through the dual-light fusion matrix and the color food ingredient image, thereby locating the position of the food ingredient within the infrared food ingredient image. The position of the food in the infrared food image is mapped by color images of the food and a dual-light fusion matrix. The color images of the food have higher spatial resolution and color features, which can more accurately identify the shape and position of the food. This makes the position of the food in the infrared food image more accurate, avoiding the problem of difficulty in directly identifying and segmenting food areas from complex infrared images and inaccurate positioning due to irregular shapes or placement offsets of the food. This improves the accuracy of food positioning in infrared images.

[0062] In summary, this embodiment of the invention performs cooking tests on a cooking device using a calibration medium, and acquires infrared and color images of the calibration medium during the cooking test. Next, a threshold segmentation algorithm is used to segment the infrared image of the medium, obtaining the segmented infrared regions of the medium. Simultaneously, a color image segmentation model is used to segment the color image of the medium, determining the segmented color regions of the medium. A dual-light fusion matrix of the cooking device is constructed using the infrared and color segmented regions of the medium, thereby establishing a spatial mapping relationship between the infrared and color images of the cooking device. Finally, the color and infrared images of the current food ingredient in the cooking device are acquired. Using the spatial mapping relationship, the infrared image of the food ingredient is identified through the dual-light fusion matrix and the color food ingredient image, thereby locating the position of the food ingredient in the infrared food ingredient image. The position of the food in the infrared food image is mapped by color images of the food and a dual-light fusion matrix. The color images of the food have higher spatial resolution and color features, which can more accurately identify the shape and position of the food. This makes the position of the food in the infrared food image more accurate, avoiding the problem of difficulty in directly identifying and segmenting food areas from complex infrared images and inaccurate positioning due to irregular shapes or placement offsets of the food. This improves the accuracy of food positioning in infrared images.

[0063] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for locating food ingredients based on infrared image recognition, characterized in that, include: A cooking test is conducted on a preset cooking device based on a preset calibration medium, and infrared and color images of the calibration medium are acquired during the cooking test. The medium infrared image is segmented according to a preset threshold segmentation algorithm to determine the medium infrared segmentation region of the medium infrared image; Obtain a color image segmentation model, segment the medium color image based on the color image segmentation model, and determine the medium color segmentation region of the medium color image; Based on the infrared segmentation region and the color segmentation region of the medium, a dual-light fusion matrix of the cooking device is constructed; The cooking device acquires color and infrared images of the ingredients currently in the cooking device, and identifies the infrared image of the ingredients based on the dual-light fusion matrix and the color image of the ingredients, thereby locating the position of the ingredients in the infrared image of the ingredients.

2. The food ingredient positioning method based on infrared image recognition as described in claim 1, characterized in that, The step of segmenting the medium infrared image according to a preset threshold segmentation algorithm to determine the medium infrared segmentation region of the medium infrared image includes: The infrared image of the medium is filtered and grayscaled to obtain a first infrared image of the medium corresponding to the infrared image of the medium. Traverse the grayscale value of each pixel in the infrared image of the first medium to determine several segmentation thresholds; The infrared image of the first medium is segmented based on each of the segmentation thresholds to determine the segmentation region corresponding to each of the segmentation thresholds. Construct the minimum bounding rectangle for each segmented region, and filter the minimum bounding rectangle based on the pre-acquired calibration medium prior conditions to determine the rectangular region to be adjusted in the infrared image of the medium. Fine-tuning is performed on the rectangular region to be adjusted in the medium infrared image to determine the medium infrared segmentation region of the medium infrared image.

3. The food ingredient positioning method based on infrared image recognition as described in claim 2, characterized in that, The step of fine-tuning the rectangular region to be adjusted in the medium infrared image to determine the medium infrared segmentation region of the medium infrared image includes: The boundary of the rectangular region to be adjusted in the infrared image of the medium is adjusted based on a preset pixel distance to form an outer rectangle of the rectangular region to be adjusted. A traversal window is formed based on the rectangular region to be adjusted, and the outer rectangle is traversed based on the traversal window to obtain several traversal regions. The infrared temperature accumulation value of all pixels in each traversed region is counted, and the traversed region is filtered based on the infrared temperature accumulation value to determine the medium infrared segmentation region of the medium infrared image.

4. The food ingredient positioning method based on infrared image recognition as described in claim 1, characterized in that, The step of obtaining a color image segmentation model, segmenting the medium color image based on the color image segmentation model, and determining the medium color segmentation region of the medium color image includes: Acquire the image segmentation model and several initial calibration medium training images; Each of the initial calibration medium training images is labeled to determine the label of each initial calibration medium training image; Extract the primary color of each initial calibration medium training image, adjust the primary color of each initial calibration medium training image to form a first calibration medium training image corresponding to each initial calibration medium image; The size of each first calibration medium training image is enlarged to obtain several second calibration medium training images, and feature extraction is performed on the second calibration medium training images to determine the image features of each second calibration medium training image; The label of each second calibration medium training image is determined based on the label of each of the initial calibration medium training images; Based on the labels and image features of each training image of the second calibration medium, the image segmentation model is trained to obtain a color image segmentation model. The medium color image is input into the color image segmentation model so that the color image segmentation model can segment the medium color image and determine the medium color segmentation region of the medium color image.

5. The food ingredient positioning method based on infrared image recognition as described in claim 1, characterized in that, The construction of the dual-light fusion matrix of the cooking device based on the infrared segmentation region and the color segmentation region of the medium includes: Obtain the infrared vertex coordinate set of the infrared segmentation region of the medium and the color vertex coordinate set of the color segmentation region of the medium; Based on the infrared vertex coordinate set and the color vertex coordinate set, a scaling factor is generated between the infrared image of the medium and the color image of the medium; Based on the infrared vertex coordinate set and the color vertex coordinate set, the coordinate offset between the infrared image and the color image of the medium is calculated using the scaling factor. Based on the scaling factor and coordinate offset, the dual-light fusion matrix of the cooking device is constructed.

6. A method for locating food ingredients based on infrared image recognition as described in claim 1 or 5, characterized in that, The process of acquiring color and infrared images of the ingredients currently in the cooking device, and identifying the infrared image of the ingredients based on the dual-light fusion matrix and the color image, and locating the position of the ingredients in the infrared image, includes: Collect color and infrared images of the ingredients currently in the cooking device; The food color image is input into the color image segmentation model to determine the food color segmentation region of the food color image; Extract the color vertex coordinate set of the food ingredient in the color segmentation region, and map the color vertex coordinate set of the food ingredient based on the dual-light fusion matrix to obtain the infrared vertex coordinate set of the food ingredient; The position of the food ingredient in the infrared food ingredient image is located based on the infrared vertex coordinate set of the food ingredient.

7. The food ingredient positioning method based on infrared image recognition as described in claim 1, characterized in that, The cooking test of the preset cooking device based on the preset calibration medium, and the acquisition of infrared and color images of the calibration medium during the cooking test, includes: A cooking test is conducted on a preset cooking device based on a preset calibration medium, and the temperature of the calibration medium is monitored in real time during the cooking test. When the temperature of the calibration medium reaches a preset temperature threshold, an infrared image and a color image of the calibration medium are acquired.

8. A food ingredient positioning system based on infrared image recognition, characterized in that, include: The module includes a cooking test module, an infrared image segmentation module, a color image segmentation module, a dual-light fusion matrix construction module, and an ingredient positioning module. The cooking test module is used to perform cooking tests on a preset cooking device based on a preset calibration medium, and to collect infrared and color images of the calibration medium during the cooking test. The infrared image segmentation module is used to segment the medium infrared image according to a preset threshold segmentation algorithm to determine the medium infrared segmentation region of the medium infrared image. The color image segmentation module is used to obtain a color image segmentation model, segment the medium color image based on the color image segmentation model, and determine the medium color segmentation region of the medium color image; The dual-light fusion matrix construction module is used to construct the dual-light fusion matrix of the cooking device based on the infrared segmentation region and the color segmentation region of the medium. The ingredient positioning module is used to acquire color images and infrared images of the current ingredients in the cooking device, and to identify the infrared image of the ingredients based on the dual-light fusion matrix and the color ingredient image to locate the position of the ingredients in the infrared ingredient image.

9. A food ingredient positioning system based on infrared image recognition as described in claim 8, characterized in that, The infrared image segmentation module includes: an infrared image segmentation unit; The infrared image segmentation unit is used to filter and grayscale the medium infrared image to obtain a first medium infrared image corresponding to the medium infrared image. Traverse the grayscale value of each pixel in the infrared image of the first medium to determine several segmentation thresholds; The infrared image of the first medium is segmented based on each of the segmentation thresholds to determine the segmentation region corresponding to each of the segmentation thresholds. Construct the minimum bounding rectangle for each segmented region, and filter the minimum bounding rectangle based on the pre-acquired calibration medium prior conditions to determine the rectangular region to be adjusted in the infrared image of the medium. Fine-tuning is performed on the rectangular region to be adjusted in the medium infrared image to determine the medium infrared segmentation region of the medium infrared image.

10. A food ingredient positioning system based on infrared image recognition as described in claim 9, characterized in that, The infrared image segmentation unit includes: a region fine-tuning subunit; The region fine-tuning subunit is used to adjust the boundary of the rectangular region to be adjusted in the infrared image of the medium based on a preset pixel distance, forming an outer rectangle of the rectangular region to be adjusted. A traversal window is formed based on the rectangular region to be adjusted, and the outer rectangle is traversed based on the traversal window to obtain several traversal regions. The infrared temperature accumulation value of all pixels in each traversed region is counted, and the traversed region is filtered based on the infrared temperature accumulation value to determine the medium infrared segmentation region of the medium infrared image.