Food placing position indication method and device, equipment and storage medium
Through image processing technology, the outline information of food and trays is extracted, the offset distance and angle are calculated, and the placement guidance is provided, which solves the impact of food placement position on cooking effect, and achieves uniform heating and quality improvement of food.
Patent Information
- Application Number
- CN202411801784.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-02-07
AI Technical Summary
When cooking food in a steamed oven, the placement of the food has a significant impact on the cooking effect. In the prior art, users rely on visual judgment or experience, and there are problems with strong subjectivity and large errors, resulting in poor food quality.
By obtaining the images to be processed, extracting the outline information of the food and the tray, calculating the offset distance and the offset angle, providing guidance results to correct the placement of the food.
It realizes objectively and accurately judging the deviation of food from the center in the steaming oven tray, improves the cooking effect, ensures that the food is heated evenly, and improves the quality of the food.
Smart Images

Figure CN119399280A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of image processing technology, and in particular to a method, device, equipment and storage medium for indicating the location of food. Background Art
[0002] Among modern kitchen equipment, steam ovens are widely popular for their high efficiency, energy saving and multifunctionality. However, when using a steam oven to cook food, the placement of the food has a significant impact on the cooking effect. In particular, when the food deviates from the center of the steam oven tray, it may cause uneven heating of the food, affecting the taste and quality of the food. In the prior art, users usually use visual judgment or experience to place food, but this method has high requirements on users, has strong subjectivity, and has large errors in the placement of food, which can easily lead to poor quality of steamed and baked food and poor cooking results. Therefore, how to objectively and accurately judge the degree to which the food deviates from the center in the steam oven tray has become a key issue in improving cooking results. Summary of the invention
[0003] The purpose of the present invention is to at least provide a method, device, equipment and storage medium for indicating the position of food, which can at least solve the problem of how to objectively and accurately judge the degree to which food deviates from the center in the steam oven tray to improve the cooking effect, and at least can achieve the correction of the position of food in the tray based on accurate guidance results, so that the food can be cooked in the accurate predetermined position, thereby improving the quality of the food and achieving better cooking effect.
[0004] To solve the above technical problems, at least one embodiment of the present application provides a method for indicating the position of food, comprising: obtaining an image to be processed, wherein the image to be processed includes food and a tray; obtaining food contour information and tray contour information based on the image to be processed, wherein the food contour information is coordinate information based on an image coordinate system, and the tray contour information is coordinate information based on a tray coordinate system; obtaining an offset distance and an offset angle based on the food contour information and the tray contour information, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray; obtaining a guidance result based on the offset distance and the offset angle, wherein the guidance result is used to correct the placement position of the food in the tray.
[0005] At least one embodiment of the present application also provides a device for indicating the placement position of food, comprising: a first acquisition module, used to acquire an image to be processed, wherein the image to be processed includes food and a tray; a second acquisition module, used to acquire food contour information and tray contour information based on the image to be processed, wherein the food contour information is coordinate information based on an image coordinate system, and the tray contour information is coordinate information based on a tray coordinate system; a third acquisition module, used to acquire an offset distance and an offset angle based on the food contour information and the tray contour information, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray; a fourth acquisition module, used to acquire a guidance result based on the offset distance and the offset angle, wherein the guidance result is used to correct the placement position of the food in the tray.
[0006] At least one embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method of indicating the food placement position.
[0007] At least one embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned method for indicating the food placement position when executed by a processor.
[0008] The embodiment of the present application provides a method for indicating the placement of food, which includes obtaining an image to be processed, wherein the image to be processed includes food and a tray; obtaining food contour information and tray contour information based on the image to be processed, wherein the food contour information is coordinate information based on an image coordinate system, and the tray contour information is coordinate information based on a tray coordinate system; obtaining an offset distance and an offset angle based on the food contour information and the tray contour information, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray; obtaining a guidance result based on the offset distance and the offset angle, wherein the guidance result is used to correct the placement of the food in the tray. By performing image processing on the image to be processed and calculating the spatial position of the contour information of the food and the tray, the offset angle and offset distance of the food deviating from the center of the tray are determined, thereby giving a guidance result, and the placement of the food in the tray is corrected based on the guidance result so that the food is placed in the center of the tray. The food is heated evenly, which improves the cooking effect. When the user places the food not in the center of the tray, the food can be corrected in the tray based on the method proposed in this solution. Therefore, it is not necessary to rely on the user's experience or visual judgment to determine the exact location of the food, and the food can be adjusted to the center of the tray. The degree of deviation of the food from the center in the steam oven tray (offset distance and offset angle) is objectively and accurately judged, which improves the cooking effect.
[0009] In some optional embodiments, the obtaining of the offset distance and the offset angle based on the food outline information and the tray outline information includes: determining the center point of the food based on the food outline information, and determining the center point of the tray based on the tray outline information; processing the center point of the food and the center point of the tray based on the Euclidean distance formula to obtain the offset distance; processing the center point of the food and the center point of the tray based on the inverse tangent function to obtain the offset angle. Based on the formula calculation, the accurate offset distance and offset angle are obtained.
[0010] In some optional embodiments, the determining the center point of the food based on the food outline information and the determining the center point of the tray based on the tray outline information include: processing the food outline information based on a centroid calculation formula to obtain the center point of the food; processing the tray outline information based on a centroid calculation formula to obtain the center point of the tray. Based on the centroid calculation formula, accurate food center points and tray center points are obtained, so that subsequent processing based on the tray center point and food center point can obtain more accurate processing results.
[0011] In some optional embodiments, the obtaining of the image to be processed includes: obtaining an initial image, wherein the initial image includes the food and the tray; preprocessing the initial image to obtain the image to be processed, wherein the preprocessing includes denoising, contrast enhancement, color correction, image cropping, image scaling, etc. The obtained initial image is preprocessed to obtain an image to be processed of appropriate size and clearness, so that subsequent processing can be quickly performed based on the image to be processed to obtain a guidance result, thereby improving the efficiency of obtaining the guidance result.
[0012] In some optional embodiments, the pallet coordinate system is a three-dimensional coordinate system established based on a preset size and a preset shape of the pallet, and the image coordinate system is a two-dimensional coordinate system established based on the image to be processed. Based on the established coordinate system, the relationship between the relevant coordinates of the pallet and the two-dimensional coordinate system can be clearly determined.
[0013] In some optional embodiments, when the tray is a multi-layer tray and food is placed on each layer of the tray, the coordinate system corresponding to a layer of the multi-layer tray is used as the tray coordinate system. When multiple trays correspond to multiple coordinate systems, a standard tray coordinate system is determined, and the offset distance and offset angle can be clearly determined to be the offset relationship between the food and the tray corresponding to the standard tray coordinate system, so that the guidance result obtained is clearer.
[0014] In some optional embodiments, the obtaining of the guidance result based on the offset distance and the offset angle includes: determining the angle value and angle direction of the center of the food deviating from the center of the tray based on the offset angle; and shifting the food in the opposite direction of the angle direction by the angle value and moving the offset distance as the guidance result. Providing multiple ways to display the guidance results provides users with multiple choices, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0016] Figure 1 is a flowchart of a method for indicating the location of food provided by an embodiment of the present application; Figure 2 is a schematic diagram of a process for obtaining food placement locations provided by an embodiment of the present application; Figure 3 is a schematic diagram of a food placement indication device provided by another embodiment of the present application; Figure 4 It is a schematic diagram of the structure of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION
[0017] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0018] Among modern kitchen equipment, steam ovens are widely popular for their high efficiency, energy saving and multifunctionality. However, when using a steam oven to cook food, the placement of the food has a significant impact on the cooking effect. In particular, when the food deviates from the center of the steam oven tray, it may cause uneven heating, affecting the taste and quality of the food. Traditionally, users often rely on visual judgment or experience to place food, but this method has the problems of strong subjectivity and large errors. Therefore, how to objectively and accurately judge the degree of deviation of the food from the center in the steam oven tray has become the key to improving the cooking effect.
[0019] In order to solve the above-mentioned technical problem of how to objectively and accurately judge the degree to which food deviates from the center in the steam oven tray to improve the cooking effect, the present invention proposes a method for indicating the food placement position. The implementation details of the method for indicating the food placement position of this embodiment are specifically described below. The following content is only the implementation details provided for easy understanding and is not necessary for implementing this solution.
[0020] Embodiment 1: The food placement indication method of this embodiment can be applied to electronic devices with communication, computing and data storage capabilities, for example, it can be applied to servers. The specific process can be as follows: Figure 1 As shown, it includes steps 101 to 104: Step 101: Acquire an image to be processed, wherein the image to be processed includes food and a tray.
[0021] Specifically, the initial image can be collected based on the image acquisition system in the server. In order to collect a clear initial image and ensure that the subsequent guidance results based on the initial image are more accurate, a high-resolution, low-distortion camera can be selected.
[0022] In some examples, in order to obtain the accurate positional relationship between the food and the tray, the camera should be installed inside the steam oven or in a position that can fully cover the tray area to ensure that the camera can capture the initial image of the complete tray and the complete food.
[0023] In some examples, in order to adapt to shooting requirements under different lighting conditions, the camera can automatically adjust parameters such as exposure and white balance based on different lighting conditions, so as to capture the initial image with shooting parameters suitable for the current lighting conditions, thereby obtaining a clearer initial image.
[0024] In some examples, acquiring the image to be processed includes: acquiring an initial image, wherein the initial image includes the food and the tray; preprocessing the initial image to obtain the image to be processed, wherein the preprocessing includes denoising, contrast enhancement, color correction, image cropping, and image scaling.
[0025] Exemplarily, an initial image is obtained, the initial image includes sweet potatoes and tray A, the initial image is denoised, color corrected and contrast enhanced, the size of the initial image is processed to a standard size, and an image to be processed is obtained, wherein the image to be processed includes sweet potatoes and tray A. The standard size is the size of an image that can be accepted by subsequent processing.
[0026] Specifically, the collected initial image can be preprocessed based on the image preprocessing module in the server. The image quality can be improved through processes such as denoising, contrast enhancement and color correction. The processing effect of image recognition or other image processing based on images of better quality is better, and better image processing results can be obtained. Therefore, obtaining images of better quality can ensure the smooth progress of subsequent processing.
[0027] Specifically, in order to ensure that the acquired image can be subsequently processed, the size of the initial image is cropped and scaled to obtain an image size that matches the subsequent processing (for example, an image size that matches the instance segmentation algorithm) so that the image can be processed smoothly.
[0028] Step 102: acquiring food contour information and tray contour information based on the image to be processed, wherein the food contour information is coordinate information based on an image coordinate system, and the tray contour information is coordinate information based on a tray coordinate system.
[0029] Specifically, the food outline information refers to the coordinate information of the food outline, wherein the food outline information includes a plurality of coordinate information, and the outline of the food is depicted by points corresponding to the plurality of coordinate information.
[0030] Using the above example, the contour information corresponding to the contour of the sweet potato in the image to be processed is obtained, and the contour information corresponding to the contour of the tray A is obtained.
[0031] Specifically, the image coordinate system is a coordinate system established based on the image to be processed taken by a camera.
[0032] Specifically, the steam oven may have multiple layers, and trays may be placed on different layers. Therefore, it is not convenient to establish a tray coordinate system based on the tray, and thus determine the food contour information based on the tray coordinate system. The image coordinate system is a coordinate system established based on the image to be processed taken by the camera, so the image to be processed is fixed, and the image coordinate system established based on the image to be processed is also fixed. Based on the image coordinate system, it is more convenient to determine the food contour information, and there is no need to establish different coordinate systems according to trays on different layers.
[0033] Specifically, the tray contour information refers to coordinate information of the contour of a tray on which food can be placed, wherein the tray contour information includes a plurality of coordinate information, and the contour of the tray is depicted by points corresponding to the plurality of coordinate information.
[0034] In some examples, the image to be processed can be processed based on an instance segmentation algorithm in deep learning to obtain contour information of the food and contour information of the tray.
[0035] Specifically, the real segmentation algorithm can extract and classify the processed image, and perform image segmentation, extract the characteristic information of food, and classify it as food, and automatically identify the food area to determine the food contour information corresponding to the food area. Similarly, the characteristic information of the tray can be extracted, classified as a tray, and the tray area can be automatically identified to determine the tray contour information corresponding to the tray area.
[0036] Specifically, for the relevant content of the strength segmentation algorithm in the deep learning, please refer to the prior art, and no further details will be given here.
[0037] In summary, through deep learning and other advanced image recognition technologies, the processed image can be recognized with high precision, and the food contour information of the food in the steam oven tray and the tray contour information of the tray in the steam oven can be recognized. Moreover, the obtained food contour information and tray contour information are relatively accurate and relatively fast. The efficiency of obtaining accurate guidance results is improved, and the cooking effect and efficiency are improved.
[0038] In some examples, the tray coordinate system is a three-dimensional coordinate system established based on a preset size and a preset shape of the tray, and the image coordinate system is a two-dimensional coordinate system established based on the image to be processed.
[0039] In some examples, when the tray is a multi-layer tray and food is placed on each layer of the tray, a coordinate system corresponding to a layer of the tray in the multi-layer tray is used as the tray coordinate system.
[0040] Specifically, when obtaining multiple layers of trays with food placed on them and there is no occlusion of the food on different layers, a standard tray coordinate system can be established for a certain layer of trays, and the offset distance and offset angle between each layer of food and the tray on that layer can be calculated respectively. Specifically, for each of the multiple trays on which food is placed, and for each of the multiple trays on which food is placed, the image to be processed is obtained, wherein the image to be processed includes the food on the tray and the tray; based on the image to be processed, food contour information and tray contour information are obtained, wherein the food contour information is coordinate information based on the image coordinate system, and the tray contour information is coordinate information based on the tray coordinate system; based on the food contour information and the tray contour information, an offset distance and an offset angle are obtained, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray; based on the offset distance and the offset angle, a guidance result is obtained, wherein the guidance result is used to correct the placement position of the food in the tray.
[0041] Among them, the pallet coordinate system is a standard pallet coordinate system, which is based on the coordinate system of a pallet among multiple pallets. The contour information of the pallet corresponding to the pallet coordinate system determines the offset distance and offset angle between the pallet and the food on the pallet or the food on other pallets.
[0042] In some examples, when the tray is a multi-layer tray, and food is placed on each layer of the tray, the multi-layer trays can be taken as a set, and the offset distances and offset angles of the food placed on different trays can be calculated respectively. Specifically, for each of the multiple trays on which food is placed, an image to be processed is obtained, wherein the image to be processed includes the food on the tray and the tray; based on the image to be processed, food contour information and tray contour information are obtained, wherein the food contour information is coordinate information based on an image coordinate system, and the tray contour information is coordinate information based on a tray coordinate system, and the tray coordinate system is a coordinate system established based on the tray; based on the food contour information and the tray contour information, an offset distance and an offset angle are obtained, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray; based on the offset distance and the offset angle, a guidance result is obtained, wherein the guidance result is used to correct the placement position of the food in the tray.
[0043] Step 103, obtaining an offset distance and an offset angle based on the food contour information and the tray contour information, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray.
[0044] In some examples, obtaining the offset distance and the offset angle based on the food contour information and the tray contour information includes: determining the center point of the food based on the food contour information, and determining the center point of the tray based on the tray contour information; processing the center point of the food and the center point of the tray based on the Euclidean distance formula to obtain the offset distance; processing the center point of the food and the center point of the tray based on the inverse tangent function to obtain the offset angle.
[0045] Continuing with the above example, the center point of the sweet potato is determined to be (a, b) based on the sweet potato contour information, and the center point of tray A is determined to be (c, d) based on the tray contour information.
[0046] Specifically, the meaning of the Euclidean distance formula may be referred to in the prior art.
[0047] Specifically, the center point of the food and the center point of the tray are processed based on the Euclidean distance formula to obtain an offset distance, which can be specifically expressed as the following formula:
[0048] Wherein, the food center point is , the center point of the tray is , the offset distance is d.
[0049] Specifically, the meaning of the inverse tangent function may be referred to in the prior art.
[0050] Using the above example, the offset distance of the sweet potato on tray A is:
[0051] Specifically, the center point of the food and the center point of the tray are processed based on the inverse tangent function to obtain an offset angle, which can be specifically expressed as the following formula:
[0052] in, is the offset angle, and the center point of the food is , the center point of the tray is .
[0053] Specifically, the relevant contents about the inverse tangent function can be found in the prior art, and will not be elaborated here. Using the above example, the offset angle of the sweet potato on tray A is:
[0054] In some examples, determining the center point of the food based on the food contour information and determining the center point of the tray based on the tray contour information includes: processing the food contour information based on a centroid calculation formula to obtain the center point of the food; processing the tray contour information based on a centroid calculation formula to obtain the center point of the tray.
[0055] Specifically, the meaning of the centroid calculation formula can be found in the prior art.
[0056] Specifically, the food contour information is processed based on the centroid calculation formula to obtain the center point of the food, which can be specifically expressed as the following formula:
[0057]
[0058] Wherein, the food center point is , (xi, yi) are the coordinates of each point on the food contour, is the ordinate of the center point of the food, (xi, yi) is the coordinate information in the food outline information, xi is the horizontal coordinate of each coordinate in the food outline information, yi is the ordinate of each coordinate in the food outline information, n is the number of coordinate information in the food outline information, and n is the number of points on the food outline.
[0059] Using the above example, the sweet potato contour information has three coordinates (x1, y2), (x2, y2) and (x3, y3). The center point of the sweet potato is:
[0060] Where xi is equal to x1, x2, and x3.
[0061]
[0062] Among them, yi is equal to y1, y2 and y3.
[0063] Specifically, the pallet contour information is processed based on the centroid calculation formula to obtain the pallet center point, which can be specifically expressed as the following formula:
[0064]
[0065] The center point of the tray is , (xi, yi) are the coordinates of each point on the pallet contour, is the ordinate of the center point of the pallet, (xi, yi) is the coordinate information in the pallet contour information, xi is the abscissa of the coordinates in the pallet contour information, yi is the ordinate of the coordinates in the pallet contour information, n is the number of coordinate information in the pallet contour information, and n is the number of points on the pallet contour.
[0066] Using the above example, the pallet outline information has three coordinates (x4, y4), (x5, y5) and (x6, y6). The center point of the sweet potato is:
[0067] Among them, xi is equal to x4, x5 and x6.
[0068]
[0069] Among them, yi is equal to y4, y5 and y6.
[0070] Specifically, in order to quickly obtain the offset angle and offset distance, a spatial position calculation model can be constructed based on the size and shape of the tray. The model can receive food contour information and tray contour information as input, and output the offset angle and offset distance by calculating the distance and direction angle between the center of the food contour and the center of the tray. For how to construct the spatial position calculation model, please refer to the relevant content of the training model in the prior art, and no further details will be given here.
[0071] Exemplarily, the food contour information and the tray contour information are used as inputs of the spatial position calculation model, and after being processed by the spatial position calculation model, the offset angle and the offset distance can be directly output.
[0072] In summary, the offset distance and offset angle can be quickly and accurately calculated based on the spatial position calculation model, and the degree to which the food deviates from the center of the tray can be quickly and accurately determined.
[0073] In addition, in order to save computing resources, if the food outline is a regular outline, the center of the food can be determined by obtaining the center based on the regular graphic corresponding to the regular outline. Similarly, if the tray outline is a regular outline, the center of the tray can be obtained by obtaining the center based on the regular graphic corresponding to the regular outline.
[0074] For example, if the food outline is a square, the center of the food is determined directly based on the method of obtaining the center of the square, that is, the center is a point at half the length and width of the square, so that the point is determined as the center of the food. If the tray outline is a rectangle, the center of the tray is determined directly based on the method of obtaining the center of the rectangle, that is, the center is a point at half the length and width of the rectangle, so that the point is determined as the center of the tray. For other methods of obtaining the center of regular shapes, please refer to the prior art, which will not be described in detail here, but only as an example.
[0075] Step 104: obtaining a guidance result based on the offset distance and the offset angle, wherein the guidance result is used to correct the placement position of the food in the tray.
[0076] In some embodiments, the guidance result obtained based on the offset distance and the offset angle includes: determining the angle value and angle direction of the center of the food deviating from the center of the tray based on the offset angle; offsetting the food in the opposite direction of the angle direction by the angle value, and moving the offset distance as a schematic diagram, text description or text explanation as a guidance result.
[0077] Specifically, the offset angle itself indicates the angle away from the center, so the angle direction and angle value can be determined based on the offset angle. The offset angle is the angle obtained by the counterclockwise direction and the positive direction of the x-axis, so (0, 180] (excluding 0 and including 180) degrees indicates that the food is below the center of the tray, (180, 360] (excluding 180 and including 360) degrees indicates that the food is above the center of the tray, (0, 90] (excluding 0 and including 90) degrees and (270, 360] (excluding 270 and including 360) degrees indicate that the food is to the right of the center of the tray, and (90, 270] (excluding 90 and including 270) degrees indicates that the food is to the left of the center of the tray. The combination of left and right and up and down is deduced by analogy.
[0078] Exemplarily, if the offset distance is 0 and the offset angle is 0 degrees, it means that the food is in the center of the tray; if the offset distance is 2 centimeters and the offset angle is 360 degrees, it means that the food is biased to the upper right side of the center of the tray. Then, an instruction diagram, text description, or text explanation of moving the food 2 centimeters in a direction offset 360 degrees to the lower left is used as a guidance result. If the offset distance is 5 centimeters and the offset angle is 60 degrees, it means that the food is on the lower right side of the center of the tray, and an instruction diagram, text description, or text explanation of moving the food 5 centimeters in a direction offset 60 degrees to the upper left is used as a guidance result. If the offset distance is 1 centimeter and the offset angle is 270 degrees, it means that the food is on the upper left side of the center of the tray, and an instruction diagram, text description, or text explanation of moving the food 1 centimeter in a direction offset 270 degrees to the lower right is used as a guidance result. If the offset distance is 1.5 cm and the offset angle is 245 degrees, it means that the food is biased towards the upper left side of the center of the tray, then an instruction diagram or text description or text explanation of moving the food 1.5 cm to the upper right side 245 degrees is used as the guidance result.
[0079] Specifically, the guidance results can be displayed to users through a graphical interface on the display screen (such as a dashboard, heat map, etc.) or a mobile phone APP push message. Users can adjust the position of food according to the guidance results until the best cooking effect is achieved.
[0080] Specifically, the heating strategy of the steam oven can also be automatically adjusted according to the offset distance and the offset angle, such as adjusting the heating power, starting rotary heating, etc., to further optimize the cooking process.
[0081] Specifically, the larger the offset distance, the farther the food deviates from the center of the tray, and the offset angle indicates the direction in which the food deviates from the center of the tray. The offset distance and offset angle of the food can be quantified into specific values or levels, and feedback can be given to the user in the form of graphics, text or sound. The user can adjust the food placement according to the feedback results to achieve precise cooking.
[0082] Exemplarily, the food offset level is divided into 5 levels. In the first level, the offset distance is not greater than one tenth of the length of the tray on which the food is placed; in the second level, the offset distance is greater than or equal to one tenth of the length of the tray on which the food is placed, and less than two tenths of the length of the tray on which the food is placed; in the third level, the offset distance is greater than or equal to two tenths of the length of the tray on which the food is placed, and less than three tenths of the length of the tray on which the food is placed; in the second level, the offset distance is greater than or equal to three tenths of the length of the tray on which the food is placed, and less than four tenths of the length of the tray on which the food is placed; in the third level, the offset distance is greater than or equal to four tenths of the length of the tray on which the food is placed, and less than five tenths of the length of the tray on which the food is placed. The higher the level, the greater the degree of deviation of the food from the center of the tray. The level can be set according to actual needs, such as setting 2 levels, 3 levels, 4 levels or 10 levels. The level division rules can also be set according to actual needs, and can be based on the offset distance and the length of the tray, or based on a preset value, or a value of other meanings as the division level.
[0083] To understand the implementation process of this solution, please refer to Figure 2 : Figure 2 The data acquisition unit, the preprocessing unit, the image recognition and contour extraction unit, the offset calculation unit and the feedback display unit may be located in the server.
[0084] The data acquisition unit acquires an initial image, and the preprocessing unit preprocesses the initial image to obtain an image to be processed. The image to be processed is processed based on the image recognition and contour extraction unit to obtain food contour information corresponding to the food and tray contour information corresponding to the tray. Specifically, the image recognition and contour extraction unit extracts and classifies features of the preprocessed image based on the instance segmentation algorithm in deep learning to obtain food features and food categories, tray features and tray categories, and inputs the food features and food categories, tray features and tray categories into the trained model to automatically identify the food area and tray area, and accurately extract the food contour information and tray contour information.
[0085] Then, based on the offset calculation unit, the food contour information and the tray contour information are processed to obtain the offset distance and the offset angle, wherein the offset calculation unit can determine the center point of the food based on the food contour information, and determine the center point of the tray based on the tray contour information, thereby determining the offset distance and the offset angle between the center point of the food and the center point of the tray. Based on the offset distance and the offset angle, the guidance result is obtained, wherein the guidance result can be a picture, or text or sound, which can be selected based on the user. If the user can receive the picture, the guidance result is sent to the feedback display unit in the form of an indication picture for display. If the user needs to receive the text, the guidance result is sent to the feedback display unit in the form of text for display. If the user needs to send and receive by voice, the guidance result is sent to the feedback display unit in the form of voice for display, so that the user can adjust the placement of the food based on the displayed guidance result, so that the food is placed in the correct position for cooking, and the food is prevented from being placed in a position offset from the center of the tray (wrong position) to cause uneven heating of the food and poor cooking effect.
[0086] In summary, this embodiment obtains an image to be processed, wherein the image to be processed includes food and a tray; obtains food contour information and tray contour information based on the image to be processed, wherein the food contour information is coordinate information based on an image coordinate system, and the tray contour information is coordinate information based on a tray coordinate system; obtains an offset distance and an offset angle based on the food contour information and the tray contour information, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray; obtains a guidance result based on the offset distance and the offset angle, wherein the guidance result is used to correct the placement position of the food in the tray.
[0087] By processing the image to be processed and calculating the spatial position of the contour information of the food and the tray, the offset angle and offset distance of the food from the center of the tray are determined, and a guidance result is given. Based on the guidance result, the position of the food in the tray is corrected so that the food is placed in the center of the tray. The food is heated evenly and the cooking effect is improved. When the user places the food not in the center of the tray, the position of the food in the tray can be corrected based on the method proposed in this solution. Therefore, there is no need to rely on the user's experience or visual judgment to determine the exact position of the food, and the food can be adjusted to the center of the tray. The degree of deviation of the food from the center (offset distance and offset angle) in the steam oven tray is objectively and accurately judged, which improves the cooking effect.
[0088] In addition, image recognition technology can be used to obtain the position information of food in the tray, and combined with the spatial position calculation model, the degree of deviation of the food from the center can be accurately determined. The placement of food can be adjusted efficiently and quickly, improving the cooking effect and cooking efficiency. At the same time, the heating strategy of the steam oven can be automatically adjusted based on the degree of deviation of the food from the center in the steam oven tray, such as adjusting the heating power, starting rotary heating, etc., to further optimize the cooking process. For example, it can be applied to the intelligent control of the steam oven to realize functions such as automatic adjustment of the heating strategy and optimization of the cooking process, further improving the convenience and intelligence level of cooking.
[0089] Embodiment 2: Another embodiment of the present application relates to a device for indicating the position of food. The implementation details of the device for indicating the position of food in this embodiment are described in detail below. The following content is only provided for the convenience of understanding the implementation details and is not necessary for implementing this solution. The schematic diagram of the device for indicating the position of food in this embodiment can be as follows: Figure 3 As shown, it includes a first acquisition module 201 , a second acquisition module 202 , a third acquisition module 203 and a third acquisition module 204 .
[0090] The first acquisition module 201 is used to acquire an image to be processed, wherein the image to be processed includes food and a tray.
[0091] The second acquisition module 202 is used to acquire food contour information and tray contour information based on the image to be processed, wherein the food contour information is coordinate information based on an image coordinate system, and the tray contour information is coordinate information based on a tray coordinate system.
[0092] The third acquisition module 203 is used to acquire an offset distance and an offset angle based on the food contour information and the tray contour information, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray.
[0093] The fourth acquisition module 204 is used to acquire based on the offset distance and the offset angle, wherein the offset is used to correct the placement position of the food in the tray.
[0094] The device is used to obtain an offset distance and an offset angle based on the food contour information and the tray contour information, and is specifically used to: determine a center point of the food based on the food contour information, and determine a center point of the tray based on the tray contour information; process the center point of the food and the center point of the tray based on a Euclidean distance formula to obtain an offset distance; and process the center point of the food and the center point of the tray based on an inverse tangent function to obtain an offset angle.
[0095] The device is used to determine the center point of the food based on the food contour information and to determine the center point of the tray based on the tray contour information. Specifically, it is used to: process the food contour information based on a centroid calculation formula to obtain the center point of the food; process the tray contour information based on a centroid calculation formula to obtain the center point of the tray.
[0096] The device is used to obtain the image to be processed, specifically to: obtain an initial image, wherein the initial image includes the food and the tray; preprocess the initial image to obtain the image to be processed, wherein the preprocessing includes denoising, contrast enhancement, color correction, image cropping, image scaling and other processing.
[0097] In the device, the tray coordinate system is a three-dimensional coordinate system established based on a preset size and a preset shape of the tray, and the image coordinate system is a two-dimensional coordinate system established based on the image to be processed.
[0098] In the device, when the tray is a multi-layer tray and food is placed on each layer of the tray, the coordinate system corresponding to a certain layer of the multi-layer tray is used as the tray coordinate system.
[0099] The device is used to obtain, based on the offset distance and the offset angle, specifically for: determining the angle value and angle direction of the center of the food deviating from the center of the tray based on the offset angle; and moving the food in the opposite direction of the angle direction by offsetting the angle value and then moving the offset distance as a schematic diagram, text description or text explanation.
[0100] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0101] Embodiment three: Another embodiment of the present application relates to an electronic device, such as Figure 4 As shown, it includes: at least one processor 901; and a memory 902 that is communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions that can be executed by the at least one processor 901, and the instructions are executed by the at least one processor 901 so that the at least one processor 901 can execute the method for indicating the food placement position in the above-mentioned embodiments.
[0102] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0103] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0104] Embodiment 4: Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0105] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.
[0106] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A method for indicating the location of food, characterized in that: include: Acquire an image to be processed, wherein the image to be processed includes food and a tray; Acquire food contour information and tray contour information based on the image to be processed, wherein the food contour information is coordinate information based on an image coordinate system, and the tray contour information is coordinate information based on a tray coordinate system; Acquire an offset distance and an offset angle based on the food contour information and the tray contour information, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray; obtaining a guidance result based on the offset distance and the offset angle, wherein the guidance result is used to correct the placement position of the food in the tray, Processing the food contour information based on a centroid calculation formula to obtain a food center point; The pallet contour information is processed based on a centroid calculation formula to obtain the pallet center point.
2. The method for indicating the food placement position according to claim 1, characterized in that: The acquiring the offset distance and the offset angle based on the food contour information and the tray contour information comprises: determining a center point of the food based on the food contour information, and determining a center point of the tray based on the tray contour information; Processing the center point of the food and the center point of the tray based on the Euclidean distance formula to obtain an offset distance; The center point of the food and the center point of the tray are processed based on an inverse tangent function to obtain an offset angle.
3. The method for indicating the food placement position according to claim 1, characterized in that: The step of obtaining the image to be processed comprises: Acquire an initial image, wherein the initial image includes the food and the tray; The initial image is preprocessed to obtain an image to be processed, wherein the preprocessing includes at least one of denoising, contrast enhancement, color correction, image cropping and image scaling.
4. The method for indicating the food placement position according to claim 1, characterized in that: The pallet coordinate system is a three-dimensional coordinate system established based on a preset size and a preset shape of the pallet, and the image coordinate system is a two-dimensional coordinate system established based on the image to be processed.
5. The method for indicating the food placement position according to claim 4, characterized in that: When the tray is a multi-layer tray and food is placed on each layer of the tray, the coordinate system corresponding to a layer of the tray in the multi-layer tray is used as the tray coordinate system.
6. The method for indicating the food placement position according to any one of claims 1 to 5, characterized in that: The obtaining of the guidance result based on the offset distance and the offset angle includes: Based on the offset angle, determining an angle value and an angle direction of the center of the food deviating from the center of the tray; A schematic diagram, text description or text explanation of moving the food by the offset distance after offsetting the food in the opposite direction of the angle direction is used as a guidance result.
7. A device for indicating the position of food, characterized in that: include: A first acquisition module is used to acquire an image to be processed, wherein the image to be processed includes food and a tray; A second acquisition module, used for acquiring food contour information and tray contour information based on the image to be processed, wherein the food contour information is coordinate information based on an image coordinate system, and the tray contour information is coordinate information based on a tray coordinate system; a third acquisition module, configured to acquire an offset distance and an offset angle based on the food outline information and the tray outline information, wherein the offset distance refers to the distance between the center of the food and the center of the tray, and the offset angle refers to the angle at which the center of the food deviates from the center of the tray; A fourth acquisition module is used to acquire a guidance result based on the offset distance and the offset angle, wherein the guidance result is used to correct the placement position of the food in the tray.
8. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for indicating the food placement position as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for indicating the food placement position according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Image processing method and system for CCD image positioning
CN119625070A
An image processing method and system for CCD image positioning
CN119625070B