[go: up one dir, main page]

TWI774088B - Food content identifying method and food content identifying system - Google Patents

Food content identifying method and food content identifying system Download PDF

Info

Publication number
TWI774088B
TWI774088B TW109136048A TW109136048A TWI774088B TW I774088 B TWI774088 B TW I774088B TW 109136048 A TW109136048 A TW 109136048A TW 109136048 A TW109136048 A TW 109136048A TW I774088 B TWI774088 B TW I774088B
Authority
TW
Taiwan
Prior art keywords
food
image
distance
data processing
processing module
Prior art date
Application number
TW109136048A
Other languages
Chinese (zh)
Other versions
TW202217651A (en
Inventor
張致良
王小文
Original Assignee
技嘉科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 技嘉科技股份有限公司 filed Critical 技嘉科技股份有限公司
Priority to TW109136048A priority Critical patent/TWI774088B/en
Publication of TW202217651A publication Critical patent/TW202217651A/en
Application granted granted Critical
Publication of TWI774088B publication Critical patent/TWI774088B/en

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)
  • General Preparation And Processing Of Foods (AREA)
  • Confectionery (AREA)

Abstract

A food identifying system is adapted to perform a food identifying method. The method includes obtaining plural distance values on a detecting area to generate a distance distribution, and capturing an image to be analyzed including the detecting area; mapping the distance distribution to the image to be analyzed; setting a distance threshold and defining a part, in the image to be analyzed, in which each of the distance values is smaller than the distance threshold as a section to be identified; performing image identification to the section to be identified to identify a food in the section; and obtaining the volume of the food according to distance distribution.

Description

餐飲內容識別方法以及餐飲內容識別系統Catering Content Recognition Method and Catering Content Recognition System

本發明有關於餐飲內容的自動識別,特別是關於一種餐飲內容識別方法以及其餐飲內容識別系統。 The invention relates to automatic identification of catering content, in particular to a catering content identification method and a catering content identification system.

在需要快速記錄取用餐飲內容的場合,例如自助式取餐的計價、個人飲食內容管理,往往需要人工辨識並記錄食物的種類、重量,以進一步彙整成其餘的關連資訊,例如餐飲價格、餐飲營養組成。 In the occasions where it is necessary to quickly record the content of catering, such as the pricing of self-service catering, and the management of personal food content, it is often necessary to manually identify and record the type and weight of food, so as to further aggregate other related information, such as catering prices, catering Nutritional composition.

先前技術提出幾種自動識別食物並以量取重量的技術方案。多種技術方案之一是以對應的容器盛裝不同食物,容器上設置機器可判讀標籤,例如條碼、RFID,以供讀取機器快速判讀,透過標籤判讀得到食物種類,並以電子秤等裝置進行重量的量測,藉以區分食物種類以及食物重量。此一方法需要設置相對複雜的設備,同時,食物也必須事先放置於正確的容器中,需要較複雜的前置作業流程。 The prior art proposes several technical solutions for automatically recognizing food and taking its weight. One of the various technical solutions is to store different foods in corresponding containers. Machine-readable labels, such as barcodes and RFID, are installed on the containers, so that the reading machine can quickly interpret them. The types of food can be read through the labels and weighed by electronic scales and other devices. measurement to distinguish food types and food weights. This method requires relatively complicated equipment, and at the same time, the food must be placed in the correct container in advance, which requires a relatively complicated pre-operation process.

另一種技術方案是以影像識別方式分辨食物以及判讀食物體積,再利用食物體積與食物資訊換算食物重量。影像識別需要在完整的待分析影像中排除非屬於食物的部份,而需要較高的運算資源進行影像處理以及影像識別,處理效能受限於硬體效能。而判讀食物體積也依賴影像 識別,透過影像識別分析食物體積帶來了額外的運算負載。同時,為了避免判讀錯誤,食物的三維形狀也受到限制,導致了需要額外的前置作業流程進行食物的處理。 Another technical solution is to use image recognition to distinguish food and interpret food volume, and then use food volume and food information to convert food weight. Image recognition needs to exclude parts that do not belong to food in the complete image to be analyzed, and requires high computing resources for image processing and image recognition, and the processing performance is limited by hardware performance. And interpreting food volume also relies on images Recognition, analyzing food volume through image recognition brings additional computational load. At the same time, in order to avoid misinterpretation, the three-dimensional shape of the food is also limited, resulting in the need for additional pre-processing procedures for food processing.

先前技術中的自動識別食物並以量取重量的技術方案存在著需要設置相對複雜的設備、需要較高的運算資源、或增加額外處理食物的額外前置作業流程的問題。 The technical solution of automatically recognizing food and taking weight in the prior art has the problems of setting up relatively complex equipment, requiring high computing resources, or adding additional pre-processing procedures for additional food processing.

基於上述技術問題,本發明提出一種餐飲內容識別方法,包含:取得一偵測區域上的多個距離值,以產生一距離分佈,並擷取包含偵測區域之一待分析影像;將距離分佈映射至待分析影像;設定一門檻距離,以在待分析影像中定義各距離值小於門檻距離的部份作為至少一待辨識區塊;對至少一待辨識區塊進行影像辨識,識別位於待辨識區塊的一食物的種類;以及依據距離分佈,取得食物的體積。 Based on the above technical problems, the present invention proposes a method for recognizing food and beverage content, comprising: obtaining a plurality of distance values on a detection area to generate a distance distribution, and capturing an image to be analyzed including the detection area; mapping to the image to be analyzed; setting a threshold distance to define a portion of the image to be analyzed whose distance value is smaller than the threshold distance as at least one block to be identified; performing image recognition on at least one block to be identified, and identifying the part located in the image to be identified A type of food in the block; and according to the distance distribution, obtain the volume of the food.

在至少一實施例中,於取得多個距離值之前,持續擷取待分析影像,分析待分析影像是否包含偵測區域。 In at least one embodiment, before obtaining a plurality of distance values, the image to be analyzed is continuously captured, and it is analyzed whether the image to be analyzed includes a detection area.

在至少一實施例中,擷取待分析影像包含以一影像擷取裝置擷取待分析影像,且影像擷取裝置與偵測區域的一表面之間具有一實際基準距離值,門檻距離小於或等於實際基準距離值。 In at least one embodiment, capturing the image to be analyzed includes capturing the image to be analyzed with an image capturing device, and there is an actual reference distance value between the image capturing device and a surface of the detection area, and the threshold distance is less than or Equal to the actual base distance value.

在至少一實施例中,偵測區域的長度以及寬度在待分析影像內佔據的像素數分別為Xn×Yn,且影像擷取裝置與偵測區域的表面之間具有一預設基準距離值,偵測區域於預設基準距離值下的一實際長度以及 一實際寬度在待分析影像內佔據的像素數分別是L×W,實際基準距離值與預設基準距離值之間的關係為:z0'=z0×(L/Xn);或是z0'=z0×(W/Yn);其中,z0為預設基準距離值,z0’為實際基準距離值。 In at least one embodiment, the number of pixels occupied by the length and width of the detection area in the image to be analyzed are respectively Xn×Yn, and there is a predetermined reference distance value between the image capturing device and the surface of the detection area, an actual length of the detection area under the preset reference distance value, and The number of pixels occupied by an actual width in the image to be analyzed is L×W respectively, and the relationship between the actual reference distance value and the preset reference distance value is: z0'=z0×(L/Xn); or z0'= z0×(W/Yn); wherein, z0 is the preset reference distance value, and z0' is the actual reference distance value.

在至少一實施例中,餐飲內容識別方法更包含判斷每一距離值是否介於一距離上限值以及一距離下限值之間的範圍區間;若任一距離值超出距離上限值以及距離下限值的範圍區間,重新取得多個距離值以及重新擷取待分析影像。 In at least one embodiment, the method for identifying food and beverage content further includes determining whether each distance value is within a range between an upper distance value and a lower distance value; if any distance value exceeds the upper distance value and the distance The range interval of the lower limit value, re-acquiring multiple distance values and re-acquiring the image to be analyzed.

在至少一實施例中,餐飲內容識別方法更包含依據距離分佈以及至少一標準容器資訊,識別至少一待辨識區塊是否符合一正確放置的標準容器。 In at least one embodiment, the method for identifying food and beverage content further includes identifying whether at least one block to be identified conforms to a correctly placed standard container according to the distance distribution and at least one standard container information.

在至少一實施例中,識別位於待辨識區塊的食物的種類的步驟包含:載入至少一食物資訊;其中,至少一食物資訊至少包含食物的種類以及一樣本影像;比對待辨識區塊的影像以及樣本影像是否相近似,以於待辨識區塊識別出食物的種類。 In at least one embodiment, the step of identifying the type of food located in the block to be identified includes: loading at least one piece of food information; wherein the at least one piece of food information at least includes the type of food and a sample image; Whether the image and the sample image are similar, so that the type of food can be identified in the block to be identified.

在至少一實施例中,餐飲內容識別方法,更包含:載入至少一食物資訊;其中,至少一食物資訊更包含食物的食物密度;以及將食物密度乘以食物的體積以得到食物的重量。 In at least one embodiment, the food content identification method further includes: loading at least one food information; wherein the at least one food information further includes food density of the food; and multiplying the food density by the volume of the food to obtain the weight of the food.

在至少一實施例中,餐飲內容識別方法,更包含:載入至少一食物資訊;其中,至少一食物資訊還包含營養成分、單位重量價格;以及以營養成分乘以食物的重量,以得到食物的一營養組成;以單位重量價 格乘以食物的重量,以得到食物的價格;以及關連食物的種類、重量、營養組成以及價格於一用餐者,並上傳至一管理平台。 In at least one embodiment, the method for identifying food and beverage content further includes: loading at least one piece of food information; wherein, the at least one food information further includes nutritional components, price per unit weight; and multiplying the nutritional components by the weight of the food to obtain the food A nutritional composition of ; price per unit weight The grid is multiplied by the weight of the food to obtain the price of the food; and the type, weight, nutritional composition and price of the food are associated with a diner and uploaded to a management platform.

在至少一實施例中,餐飲內容識別方法更包含分析至少一待辨識區塊是否符合正確擺放的一標準容器;當至少一待辨識區塊不符合正確擺放的標準容器,產生一錯誤提示。 In at least one embodiment, the method for recognizing food and beverage content further includes analyzing whether at least one block to be identified conforms to a correctly placed standard container; when at least one block to be identified does not conform to a correctly placed standard container, an error message is generated .

本發明還提出一種餐飲內容識別系統,包含一三維掃瞄器、一影像擷取裝置以及一資料處理模組。 The present invention also provides a food and beverage content recognition system, which includes a three-dimensional scanner, an image capture device and a data processing module.

三維掃瞄器用以取得一偵測區域上的多個距離值,以產生一距離分佈。影像擷取裝置用以擷取偵測區域之一待分析影像。資料處理模組電性連接於三維掃瞄器以及影像擷取裝置;其中,資料處理模組將距離分佈映射至待分析影像;資料處理模組並設定一門檻距離,以在待分析影像中定義各距離值小於門檻距離的部份作為至少一待辨識區塊;且資料處理模組對至少一待辨識區塊進行影像辨識,識別位於至少一待辨識區塊的一食物的種類,並依據距離分佈,取得食物的體積。 The three-dimensional scanner is used to obtain a plurality of distance values on a detection area to generate a distance distribution. The image capturing device is used for capturing an image to be analyzed in the detection area. The data processing module is electrically connected to the 3D scanner and the image capture device; wherein, the data processing module maps the distance distribution to the image to be analyzed; the data processing module sets a threshold distance to be defined in the image to be analyzed The portion of each distance value smaller than the threshold distance is used as at least one block to be identified; and the data processing module performs image recognition on the at least one block to be identified, and identifies a type of food located in the at least one block to be identified, and the distance distribution to obtain the volume of the food.

在至少一實施例中,於取得多個距離值之前,影像擷取裝置持續擷取待分析影像,且資料處理模組分析待分析影像是否包含偵測區域。 In at least one embodiment, before obtaining a plurality of distance values, the image capturing device continuously captures the image to be analyzed, and the data processing module analyzes whether the image to be analyzed includes the detection area.

在至少一實施例中,影像擷取裝置與偵測區域的一表面之間具有一實際基準距離值,門檻距離小於或等於實際基準距離值。 In at least one embodiment, there is an actual reference distance between the image capturing device and a surface of the detection area, and the threshold distance is less than or equal to the actual reference distance.

在至少一實施例中,偵測區域的長度以及寬度在待分析影像內佔據的像素數分別為Xn×Yn,且影像擷取裝置與偵測區域的表面之間具有一預設基準距離值,偵測區域於預設基準距離值下的一實際長度以及 一實際寬度在待分析影像內佔據的像素數分別是L×W,實際基準距離值與預設基準距離值之間的關係為:z0'=z0×(L/Xn);或是z0'=z0×(W/Yn);其中,z0為預設基準距離值,z0’為實際基準距離值。 In at least one embodiment, the number of pixels occupied by the length and width of the detection area in the image to be analyzed are respectively Xn×Yn, and there is a predetermined reference distance value between the image capturing device and the surface of the detection area, an actual length of the detection area under the preset reference distance value, and The number of pixels occupied by an actual width in the image to be analyzed is L×W respectively, and the relationship between the actual reference distance value and the preset reference distance value is: z0'=z0×(L/Xn); or z0'= z0×(W/Yn); wherein, z0 is the preset reference distance value, and z0' is the actual reference distance value.

在至少一實施例中,資料處理模組判斷每一距離值是否介於一距離上限值以及一距離下限值之間的範圍區間;若任一距離值超出距離上限值以及距離下限值的範圍區間,以三維掃瞄器以及影像擷取裝置重新取得多個距離值以及重新擷取待分析影像。 In at least one embodiment, the data processing module determines whether each distance value is within a range interval between a distance upper limit value and a distance lower limit value; if any distance value exceeds the distance upper limit value and the distance lower limit The range interval of the value is obtained by using the 3D scanner and the image capturing device to re-acquire a plurality of distance values and re-capture the image to be analyzed.

在至少一實施例中,資料處理模組由載入至少一標準容器資訊,並依據距離分佈以及至少一標準容器資訊,識別至少一待辨識區塊是否符合一正確放置的標準容器。 In at least one embodiment, the data processing module loads at least one standard container information, and identifies whether at least one block to be identified conforms to a correctly placed standard container according to the distance distribution and the at least one standard container information.

在至少一實施例中,資料處理模組載入食物的種類以及一樣本影像,並比對待辨識區塊的影像以及樣本影像是否相近似,以於待辨識區塊識別出食物的種類。 In at least one embodiment, the data processing module loads the type of food and a sample image, and compares the image of the block to be identified and the sample image to determine whether the image of the block to be identified is similar, so as to identify the type of food in the block to be identified.

在至少一實施例中,資料處理模組載入食物的食物密度,並將食物密度乘以食物的體積以得到食物的重量。 In at least one embodiment, the data processing module loads the food density of the food, and multiplies the food density by the volume of the food to obtain the weight of the food.

在至少一實施例中,資料處理模組載入營養成分、單位重量價格,以營養成分乘以食物的重量以得到食物的一營養組成,並以單位重量價格乘以食物的重量以得到食物的價格;且資料處理模組關連食物的種類、重量、營養組成以及價格於一用餐者,並上傳至一管理平台。 In at least one embodiment, the data processing module loads the nutrients and the price per unit weight, multiplies the nutrients by the weight of the food to obtain a nutritional composition of the food, and multiplies the price per unit weight by the weight of the food to obtain the weight of the food. price; and the data processing module relates the type, weight, nutritional composition and price of food to a diner, and uploads it to a management platform.

在至少一實施例中,資料處理模組分析至少一待辨識區塊是否符合正確擺放的一標準容器;當至少一待辨識區塊不符合正確擺放的標準容器,產生一錯誤提示。 In at least one embodiment, the data processing module analyzes whether the at least one block to be identified conforms to a correctly placed standard container; when the at least one block to be identified does not conform to the correctly placed standard container, an error message is generated.

本發明透過三維掃瞄以及影像擷取的結合,由擷取的影像以及三維掃瞄資訊的對應關係,在待分析影像中的偵測區域標記出標準容器所佔有的區域,而僅對標準容器所對應的待辨識區塊進行影像辨識,取代對整個待分析影像進行影像辨識,以判斷食物的種類。因此,本發明可以降低進行影像識別所需要的運算負載,而可加速識別食物過程。同時,透過標準容器的應用,三維掃瞄所取得的距離分佈可以用於有效地且相對精確地計算食物的體積,配合食物資訊之關連,即可快速地分析完整餐飲的資訊,藉以結合用餐者識別資訊進行後端管理。 Through the combination of 3D scanning and image capture, the present invention marks the area occupied by the standard container in the detection area in the image to be analyzed based on the corresponding relationship between the captured image and the 3D scanning information, while only the standard container is detected. Image recognition is performed on the corresponding block to be recognized, instead of performing image recognition on the entire image to be analyzed, so as to determine the type of food. Therefore, the present invention can reduce the computing load required for image recognition, and can speed up the food recognition process. At the same time, through the application of standard containers, the distance distribution obtained by 3D scanning can be used to effectively and relatively accurately calculate the volume of food. With the correlation of food information, the information of the complete meal can be quickly analyzed, so as to combine the diners. Identify information for back-end management.

100:餐飲內容識別系統 100: Catering Content Recognition System

110:三維掃瞄器 110: 3D Scanner

120:影像擷取裝置 120: Image capture device

130:資料處理模組 130:Data processing module

140:支架 140: Bracket

150:容器資料庫 150: Container Repository

160:食物資料庫 160: Food Database

200:食物 200: Food

301,302,303:標準容器 301, 302, 303: Standard Containers

304:非標準容器 304: Non-standard container

400:管理平台 400: Management Platform

A,A’:偵測區域 A,A': detection area

B:待辨識區塊 B: block to be identified

C:待分析影像 C: Image to be analyzed

D:間隔距離 D: separation distance

L:偵測區域A的實際長度 L: Actual length of detection area A

Xn:偵測區域A’的長度 Xn: length of detection area A'

W:偵測區域A的實際寬度 W: Actual width of detection area A

Yn:偵測區域A’的寬度 Yn: Width of detection area A'

P:距離分佈 P: distance distribution

S:放置台 S: Placement table

X:長度方向 X: length direction

Y:寬度方向 Y: width direction

Z:高度方向 Z: height direction

△a:網格區域面積 △a: area of grid area

h:網格高度 h: grid height

z(x,y):距離值 z(x,y): distance value

zmax:門檻距離 zmax: threshold distance

z0:預設基準距離值 z0: preset reference distance value

z0’:實際基準距離值 z0’: Actual reference distance value

Step 112~Step 170:步驟 Step 112~Step 170: Steps

圖1是本發明實施例的餐飲內容識別系統的側面示意圖。 FIG. 1 is a schematic side view of a food and beverage content recognition system according to an embodiment of the present invention.

圖2是本發明實施例的餐飲內容識別系統的俯視示意圖。 FIG. 2 is a schematic top view of a food and beverage content recognition system according to an embodiment of the present invention.

圖3是本發明實施例的餐飲內容識別系統的系統方塊圖。 3 is a system block diagram of a food and beverage content identification system according to an embodiment of the present invention.

圖4是本發明實施例中,映射距離至待分析影像的示意圖。 FIG. 4 is a schematic diagram of mapping distances to images to be analyzed according to an embodiment of the present invention.

圖5是本發明實施例中,校正多個距離值的示意圖。 FIG. 5 is a schematic diagram of correcting a plurality of distance values in an embodiment of the present invention.

圖6是本發明實施例的餐飲內容識別方法的流程圖(一)。 FIG. 6 is a flowchart (1) of a method for recognizing food and beverage content according to an embodiment of the present invention.

圖7是本發明實施例的餐飲內容識別方法中,依據距離門檻定義至少一待辨識區塊的示意圖。 7 is a schematic diagram of defining at least one block to be identified according to a distance threshold in the method for identifying food and beverage content according to an embodiment of the present invention.

圖8是本發明實施例的餐飲內容識別方法中,食物資料庫中的資訊對照表。 FIG. 8 is an information comparison table in a food database in the method for identifying food and beverage content according to an embodiment of the present invention.

圖9是本發明實施例的餐飲內容識別方法中,依據距離分佈取得食物的體積的示意圖。 FIG. 9 is a schematic diagram of obtaining the volume of food according to the distance distribution in the method for recognizing food and beverage content according to an embodiment of the present invention.

圖10是本發明實施例的餐飲內容識別方法的流程圖(二)。 FIG. 10 is a flowchart (2) of a method for recognizing food and beverage content according to an embodiment of the present invention.

圖11是本發明實施例的餐飲內容識別方法的流程圖(三)。 FIG. 11 is a flowchart (3) of a method for recognizing food and beverage content according to an embodiment of the present invention.

圖12是本發明實施例的餐飲內容識別方法的流程圖(四)。 FIG. 12 is a flowchart (4) of a method for recognizing food and beverage content according to an embodiment of the present invention.

圖13是本發明實施例的餐飲內容識別方法中,識別偵測區域的示意圖。 FIG. 13 is a schematic diagram of a recognition detection area in the method for recognizing food and beverage content according to an embodiment of the present invention.

圖14是本發明實施例的餐飲內容識別方法中,定義至少一待辨識區塊的示意圖。 14 is a schematic diagram of defining at least one block to be identified in the method for identifying food and beverage content according to an embodiment of the present invention.

圖15是本發明實施例的餐飲內容識別方法中,分析至少一待辨識區塊是否符合正確擺放的一標準容器的示意圖。 15 is a schematic diagram of analyzing whether at least one block to be identified conforms to a correctly placed standard container in the method for identifying food and beverage content according to an embodiment of the present invention.

以下說明使用的術語「模組」可以是指專用積體電路(ASIC)、電子電路、微處理器,執行一個或多個軟體或韌體程式的晶片、電路設計。模組被配置為執行各種演算法、變換和/或邏輯處理以生成一或多個訊號。當模組以軟體實現時,模組可以作為晶片、電路設計可讀取的程式碼而透過程式碼執行實現於記憶體中。 The term "module" used in the following description may refer to an application specific integrated circuit (ASIC), electronic circuit, microprocessor, chip or circuit design that executes one or more software or firmware programs. The modules are configured to perform various algorithms, transformations and/or logical processing to generate one or more signals. When the module is implemented in software, the module can be implemented in a memory as a code readable by a chip or circuit design through code execution.

如圖1、圖2以及圖3所示,為本發明實施例所揭露的一種餐飲內容識別系統100,用以執行一餐飲內容識別方法,識別位於一偵測區域A中的至少一食物200的種類。餐飲內容識別系統100包含三維掃瞄器110、影像擷取裝置120以及資料處理模組130。 As shown in FIG. 1 , FIG. 2 , and FIG. 3 , a food and beverage content recognition system 100 disclosed in an embodiment of the present invention is used to execute a food and beverage content recognition method, and to recognize at least one food 200 located in a detection area A. type. The food content recognition system 100 includes a 3D scanner 110 , an image capture device 120 and a data processing module 130 .

如圖1、圖2以及圖3所示,三維掃瞄器110以及影像擷取裝置120設置於一支架140上,並且三維掃瞄器110以及影像擷取裝置120朝向放置台S,而偵測區域A位於放置台S。 As shown in FIG. 1 , FIG. 2 and FIG. 3 , the 3D scanner 110 and the image capture device 120 are disposed on a bracket 140 , and the 3D scanner 110 and the image capture device 120 face the placing table S to detect The area A is located on the placement table S.

如圖1、圖2、圖3以及圖4所示,三維掃瞄器110用於對於偵測區域A進行三維掃瞄,取得偵測區域A上的多個偵測點的多個距離值z(x,y),以產生一距離分佈。距離分佈,亦即些距離值z(x,y)以及於偵測區域A對應的位置,形成一點雲(point cloud),可呈現偵測區域A的起伏狀態,藉以供資料處理模組130判斷偵測區域A上是否有擺設物件,並且可用於分析物件的三維形態。三維掃瞄器110可以是但不限於深度攝影相機(Stereo Camera)、飛行測距(Time of Flight,TOF)攝影相機、光達、或其他的光學、聲學測距裝置,只要可以偵測多個深度值即可。 As shown in FIG. 1 , FIG. 2 , FIG. 3 and FIG. 4 , the three-dimensional scanner 110 is configured to perform three-dimensional scanning on the detection area A, and obtain multiple distance values z of multiple detection points on the detection area A (x,y) to produce a distance distribution. The distance distribution, that is, the distance values z(x, y) and the position corresponding to the detection area A, form a point cloud, which can show the fluctuation state of the detection area A, so as to be judged by the data processing module 130 Detects whether there is a decoration object in the area A, and can be used to analyze the three-dimensional shape of the object. The 3D scanner 110 can be, but is not limited to, a Stereo Camera, a Time of Flight (TOF) camera, a LiDAR, or other optical and acoustic ranging devices, as long as it can detect multiple depth value.

如圖1、圖2、圖3以及圖4所示,影像擷取裝置120用以擷取包含偵測區域A的一待分析影像C。於一具體實施例中,影像擷取裝置120是RGB彩色攝影機,而可擷取彩色的待分析影像C,以利執行影像分析。影像擷取裝置120不限定為彩色攝影機,不排除是單色攝影機,使待分析影像C為單色(黑白)影像。 As shown in FIG. 1 , FIG. 2 , FIG. 3 and FIG. 4 , the image capturing device 120 is used for capturing an image C to be analyzed including the detection area A. As shown in FIG. In a specific embodiment, the image capture device 120 is an RGB color camera, and can capture a color image C to be analyzed for performing image analysis. The image capturing device 120 is not limited to a color camera, and a monochrome camera is not excluded, so that the image C to be analyzed is a monochrome (black and white) image.

如圖1、圖2、圖3以及圖4所示,資料處理模組130電性連接於三維掃瞄器110以及影像擷取裝置120,用以接收距離分佈以及待分析影像C。架設於支架140上的三維掃瞄器110以及影像擷取裝置120大致上位於相同高度(相對於偵測區域A),但於水平方向上會間隔一間隔距離D。 As shown in FIG. 1 , FIG. 2 , FIG. 3 and FIG. 4 , the data processing module 130 is electrically connected to the 3D scanner 110 and the image capturing device 120 for receiving the distance distribution and the image C to be analyzed. The 3D scanner 110 and the image capturing device 120 mounted on the bracket 140 are located at approximately the same height (relative to the detection area A), but are separated by a distance D in the horizontal direction.

如圖4所示,資料處理模組130可以依據間隔距離D,對距離分佈以及待分析影像C的平面座標關係進行平移(Shift),映射(Mapping)距離分佈P至待分析影像C。 As shown in FIG. 4 , the data processing module 130 can shift (Shift) the distance distribution and the plane coordinate relationship of the image C to be analyzed according to the separation distance D, and map the distance distribution P to the image C to be analyzed.

如圖5所示,此外,資料處理模組130也利用偵測區域A於待分析影像C的像素資訊與偵測區域A的實際尺寸,校正距離值z(x,y)的基準面,亦即取得影像擷取裝置120至偵測區域A的表面的實際基準距離值z0’。 As shown in FIG. 5 , in addition, the data processing module 130 also uses the pixel information of the detection area A in the image C to be analyzed and the actual size of the detection area A to correct the reference plane of the distance value z(x, y), and also That is, the actual reference distance value z0' from the image capturing device 120 to the surface of the detection area A is obtained.

一般而言,偵測區域A通常為矩型,而有固定的長度以及寬度。例如,本發明實施例以餐盤的表面作為偵測區域A。標準化的餐盤會有固定的長度以及寬度。 Generally speaking, the detection area A is usually rectangular and has a fixed length and width. For example, in the embodiment of the present invention, the surface of the dinner plate is used as the detection area A. Standardized plates have fixed lengths and widths.

如圖5所示,在標準作業狀態下,餐盤平穩地擺設在一平台上,使得偵測區域A的表面至影像擷取裝置120之間具有一預設基準距離值z0。此時,在長度方向X以及寬度方向Y上,偵測區域A的實際長度以及實際寬度在待分析影像C內佔據的像素數分別是L×W。 As shown in FIG. 5 , in a standard operating state, the dinner plate is stably placed on a platform so that there is a predetermined reference distance z0 between the surface of the detection area A and the image capturing device 120 . At this time, in the length direction X and the width direction Y, the actual length and actual width of the detection area A occupy the number of pixels in the image C to be analyzed, which are L×W respectively.

實際操作本發明的餐飲內容識別系統100時,使用者可能不會將餐盤完整平放在平台上,也許是手拖著餐盤在某個高度。此時,偵測區域A的平面至影像擷取裝置120之間的距離將會縮小,而使得預設基準距離值z0不適用,導致後續的門檻距離zmax設定錯誤,影響後續的判斷以及計算作業。 When actually operating the food and beverage content recognition system 100 of the present invention, the user may not place the food plate completely flat on the platform, but may drag the food plate to a certain height by hand. At this time, the distance between the plane of the detection area A and the image capture device 120 will be reduced, so that the preset reference distance value z0 is not applicable, resulting in an incorrect setting of the subsequent threshold distance zmax, which affects subsequent judgment and calculation operations. .

如圖5所示,當餐盤被提高而位於較高的高度時,作為偵測區域A’的平面至影像擷取裝置120之間的距離會縮小成為實際基準距離值z0’。此時,資料處理模組130所擷取的待分析影像C中,偵測區域A’會 放大,而使得偵測區域A’的長度以及寬度在待分析影像C內佔據的像素數分別改變為Xn×Yn。 As shown in FIG. 5 , when the dinner plate is raised to a higher height, the distance between the plane serving as the detection area A' and the image capturing device 120 is reduced to the actual reference distance value z0'. At this time, in the image C to be analyzed captured by the data processing module 130, the detection area A' will be Zoom in, so that the length and width of the detection area A' occupy the number of pixels in the image C to be analyzed to be changed to Xn × Yn respectively.

在此種情況下,原先儲存於資料處理模組130中的預設基準距離值z0不適用,而需要取得實際基準距離值z0’。此時,實際基準距離值z0’與預設基準距離值z0之間的關係為可利用像素數比例表示如下:z0'=z0×(L/Xn);或是z0'=z0×(W/Yn)。 In this case, the preset reference distance value z0 originally stored in the data processing module 130 is not applicable, and the actual reference distance value z0' needs to be obtained. At this time, the relationship between the actual reference distance value z0' and the preset reference distance value z0 is represented by the ratio of the number of available pixels as follows: z0'=z0×(L/Xn); or z0'=z0×(W/ Yn).

如圖2以及圖3所示,不同的食物200分別以不同的標準容器301,302,303裝填,標準容器301,302,303的開口朝向偵測區域A的上方,以使得三維掃瞄器110以及影像擷取裝置120可以偵測標準容器301,302,303的內部的狀況。此外,每一標準容器301,302,303都具有環繞內部空間側壁,使得標準容器301,302,303在偵測區域A中形成一個高於偵測區域A的環狀區域。具體而言,資料處理模組130可內建或連接於一容器資料庫150,容器資料庫150中儲存有標準容器301,302,303的資訊,例如開口的面積與形狀、側壁厚度、容置空間的截面積大小。理想的標準容器301,302,303中,容置空間的截面積較佳地是於高度方向Z上維持一致,如柱狀,而可有利於後續的分析與計算。但不排除容置空間呈現倒置的錐狀,亦即由開口至底部截面積係呈現漸縮,前述的截面積與高度之間的關係只要預先儲存於容器資料庫150,而可快速地經由查表或公式運算取得即可。 As shown in FIG. 2 and FIG. 3 , different foods 200 are filled in different standard containers 301 , 302 , and 303 respectively, and the openings of the standard containers 301 , 302 , and 303 face the top of the detection area A, so that the three-dimensional scanner 110 and the image capture device 120 can detect The condition inside the standard containers 301, 302, 303 is measured. In addition, each standard container 301, 302, 303 has a side wall surrounding the inner space, so that the standard container 301, 302, 303 forms an annular area in the detection area A higher than the detection area A. Specifically, the data processing module 130 can be built in or connected to a container database 150, and the container database 150 stores the information of the standard containers 301, 302, 303, such as the area and shape of the opening, the thickness of the side wall, and the cross-sectional area of the accommodating space size. In ideal standard containers 301 , 302 , and 303 , the cross-sectional area of the accommodating space is preferably kept consistent in the height direction Z, such as a column shape, which is beneficial for subsequent analysis and calculation. However, it does not rule out that the accommodating space presents an inverted cone shape, that is, the cross-sectional area from the opening to the bottom is tapered. Table or formula operation can be obtained.

一般而言,例如在自助取餐的場合,用餐者是將所要取用的食物200連同其標準容器301,302,303放置在一餐盤上。因此,偵測區域 A可以設定為位於一餐盤的表面。透過顏色的差異化設定,可以讓餐盤的表面(即偵測區域A)與環境形成對比,而有利於標示出偵測區域A。同時,標準化的餐盤也可以讓偵測區域A具有固定的長度(L)以及寬度(W)。 Generally speaking, for example, in the case of self-service, the diners place the food 200 to be taken together with its standard containers 301, 302, 303 on a plate. Therefore, the detection area A can be set to be located on the surface of a plate. Through the differentiated setting of colors, the surface of the plate (ie, the detection area A) can be contrasted with the environment, which is beneficial to mark the detection area A. At the same time, the standardized plate can also make the detection area A have a fixed length (L) and width (W).

以下說明本發明實施例所揭露的餐飲內容識別方法。 The following describes the catering content identification method disclosed in the embodiments of the present invention.

如圖1、圖2、圖4以及圖6所示,首先,資料處理模組130啟動並控制三維掃瞄器110以及影像擷取裝置120進行工作。依據資料處理模組130的控制,三維掃瞄器110對於偵測區域A進行三維掃瞄,取得偵測區域A上的多個距離值z(x,y),以產生距離分佈P,如步驟Step 112所示。而影像擷取裝置120擷取包含偵測區域A之一待分析影像C,如步驟Step 114所示。前述步驟Step 112以及步驟Step 114可以同時執行,也可以是依序執行。 As shown in FIG. 1 , FIG. 2 , FIG. 4 and FIG. 6 , first, the data processing module 130 starts and controls the 3D scanner 110 and the image capturing device 120 to work. According to the control of the data processing module 130, the three-dimensional scanner 110 performs three-dimensional scanning on the detection area A, and obtains a plurality of distance values z(x, y) on the detection area A, so as to generate the distance distribution P, as shown in the step shown in Step 112. The image capturing device 120 captures an image C to be analyzed including the detection area A, as shown in Step 114 . The aforementioned steps Step 112 and Step 114 may be performed simultaneously, or may be performed sequentially.

如圖4以及圖6所示,接著,資料處理模組130映射距離分佈P至待分析影像C,如步驟Step 120所示。此一映射步驟,係用以使得每一距離值z(x,y)在待分析影像C上都有一個或一組對應的像素,亦即,每一距離值z(x,y)在待分析影像C上具有一個對應的座標值(x,y)。 As shown in FIG. 4 and FIG. 6 , next, the data processing module 130 maps the distance distribution P to the image C to be analyzed, as shown in Step 120 . This mapping step is used to make each distance value z(x,y) have one or a group of corresponding pixels on the image C to be analyzed, that is, each distance value z(x,y) is in the image C to be analyzed. The analysis image C has a corresponding coordinate value (x, y).

如圖6以及圖7所示,資料處理模組130中設定有一門檻距離zmax。依據此一門檻距離zmax,資料處理模組130在待分析影像C中定義各距離值z(x,y)小於門檻距離zmax的部分作為一或多個待辨識區塊B,如步驟Step 130所示。 As shown in FIG. 6 and FIG. 7 , a threshold distance zmax is set in the data processing module 130 . According to the threshold distance zmax, the data processing module 130 defines the part of each distance value z(x, y) smaller than the threshold distance zmax in the image C to be analyzed as one or more blocks B to be identified, as shown in Step 130 . Show.

如圖7所示,門檻距離zmax可以是設定為落在偵測區域A的表面,也就是將實際基準距離值z0’設定為門檻距離zmax,或是設定一略 小於實際基準距離值z0’的數值作為門檻距離zmax。每一標準容器301,302,303都具有環繞其內部空間的側壁,使得標準容器301,302,303在偵測區域A中形成一個高於偵測區域A表面的環狀區域;即使是空標準容器301,302,303中內部空間的底部,也會因為標準容器301,302,303的實體厚度而高於偵測區域A表面;因此,只要高度高於零,亦即對應距離值z(x,y)小於門檻距離zmax的像素,都可以視為標準容器301,302,303所涵蓋的區域。因此,資料處理模組130可以將待分析影像C中相關像素佔有的部份分離出來作為待辨識區塊B,取代對整個待分析影像C進行分析。 As shown in Fig. 7, the threshold distance zmax can be set to fall on the surface of the detection area A, that is, the actual reference distance value z0' is set as the threshold distance zmax, or set slightly A value smaller than the actual reference distance value z0' is used as the threshold distance zmax. Each standard container 301, 302, 303 has a side wall surrounding its inner space, so that the standard container 301, 302, 303 forms an annular area in the detection area A higher than the surface of the detection area A; even the bottom of the inner space in the empty standard container 301, 302, 303, It is also higher than the surface of the detection area A because of the physical thickness of the standard containers 301, 302, 303; therefore, as long as the height is higher than zero, that is, the pixels whose corresponding distance value z(x,y) is less than the threshold distance zmax can be regarded as standard containers Areas covered by 301, 302, 303. Therefore, the data processing module 130 can separate the portion occupied by the relevant pixels in the image C to be analyzed as the block B to be identified, instead of analyzing the entire image C to be analyzed.

如圖6以及圖7所示,接著,資料處理模組130對待辨識區塊B進行影像辨識,識別位於待辨識區塊B的一食物200的種類,如步驟Step 140所示。 As shown in FIG. 6 and FIG. 7 , the data processing module 130 then performs image recognition on the to-be-identified block B to identify the type of a food 200 located in the to-be-identified block B, as shown in Step 140 .

如圖6以及圖7所示於步驟Step 130中,資料處理模組130已經將可能放置餐飲的待辨識區塊B分割出來,而排除無關於食物200以及無關於標準容器301,302,303的像素區域。因此,在步驟Step 140中,資料處理模組130只需要對待辨識區塊B進行影像辨識而不需對整個待分析影像C進行影像辨識,資料處理模組130所需要耗損的運算資源較少,而可加速影像辨識效率,並且有效降低辨識錯誤的機率。 As shown in FIG. 6 and FIG. 7 , in Step 130 , the data processing module 130 has segmented the to-be-identified block B where food and beverages may be placed, and excludes the pixel areas not related to the food 200 and the standard containers 301 , 302 , and 303 . Therefore, in step Step 140, the data processing module 130 only needs to perform image recognition on the block B to be identified, but does not need to perform image recognition on the entire image C to be analyzed, and the data processing module 130 needs to consume less computing resources. The efficiency of image recognition can be accelerated, and the probability of recognition errors can be effectively reduced.

如圖3以及圖8所示,資料處理模組130內建或外接一食物資料庫160。食物資料庫160中儲存有多筆食物資訊。食物資訊包含食物200的種類、樣本影像、食物密度、營養成分、單位重量價格(例如元/100克)等資訊。經由比對待辨識區塊B的影像以及樣本影像是否相近似,資料處理模組130可於待辨識區塊B識別出食物200的種類。 As shown in FIG. 3 and FIG. 8 , the data processing module 130 has a built-in or externally connected food database 160 . The food database 160 stores multiple pieces of food information. The food information includes information such as the type of food 200 , sample images, food density, nutritional content, price per unit weight (eg, RMB/100 grams). The data processing module 130 can identify the type of the food 200 in the to-be-identified block B by comparing the image of the to-be-identified block B and the sample image.

如圖6所示,依據待辨識區塊B中的距離分佈P,資料處理模組130取得食物200的體積,如步驟Step 150所示。 As shown in FIG. 6 , according to the distance distribution P in the block B to be identified, the data processing module 130 obtains the volume of the food 200 , as shown in Step 150 .

如圖9所示,取得食物200的體積的具體實施例說明如下。待辨識區塊B可被切割為多個網格區域,每一網格區域對應一個距離值z(x,y)。依據標準容器資訊以及偵測區域A表面(即餐盤表面)之實際基準距離值z0’,資料處理模組130可換算出每一網格區域中,食物相對於標準容器301,302,303內部空間的底部的網格高度h。網格高度h乘以網格區域面積△a,即為網格區域中的局部食物200的體積。 As shown in FIG. 9 , a specific embodiment of obtaining the volume of the food 200 is described as follows. The block B to be identified can be divided into a plurality of grid regions, and each grid region corresponds to a distance value z(x, y). According to the standard container information and the actual reference distance value z0' of the surface of the detection area A (that is, the surface of the plate), the data processing module 130 can convert the distance of the food relative to the bottom of the internal space of the standard container 301, 302, 303 in each grid area. grid height h. The grid height h multiplied by the grid area area Δa is the volume of the local food 200 in the grid area.

最後資料處理模組130加總所有網格區域中的食物200的體積,即為標準容器301,302,303中的食物200的體積,如圖中所示的斜線部分。如前所述,容置空間的截面積較佳地是於高度方向Z上維持一致,如柱狀,而可有利於後續的分析與計算。但不排除容置空間呈現倒置的錐狀;此時,依據標準容器資訊,網格高度h可以依據斜面狀況修正,如圖9中位於邊緣的網格高度h被扣除斜面的平均高度。標準容器資訊可包含標準容器301,302,303以及容置空間的三維型態,因此,網格高度h可以依據三維型態修正,藉以得到正確的食物200的體積。前述圖5以及對應說明所述取得實際基準距離值z0’,就是要避免錯誤地採用預設基準距離值z0,而導致網格高度h被錯誤地增加致使食物200的體積計算錯誤。 Finally, the data processing module 130 adds up the volume of the food 200 in all the grid areas, which is the volume of the food 200 in the standard containers 301 , 302 , and 303 , as shown by the oblique lines in the figure. As mentioned above, the cross-sectional area of the accommodating space is preferably kept consistent in the height direction Z, such as a columnar shape, which is beneficial for subsequent analysis and calculation. However, it is not ruled out that the accommodating space presents an inverted cone shape; at this time, according to the standard container information, the grid height h can be corrected according to the slope condition. As shown in Figure 9, the grid height h at the edge is deducted from the average height of the slope. The standard container information can include the standard containers 301 , 302 , 303 and the three-dimensional shape of the accommodating space. Therefore, the grid height h can be corrected according to the three-dimensional shape, so as to obtain the correct volume of the food 200 . The obtaining of the actual reference distance value z0' described in the aforementioned FIG. 5 and the corresponding description is to avoid wrongly adopting the preset reference distance value z0, resulting in an erroneous increase of the grid height h and an error in the calculation of the volume of the food 200.

如圖6以及圖8所示,最後,依據食物資料庫160載入的食物資訊,以及食物200的體積計算食物200的重量,如步驟Step 160所示。如前所述,食物資訊還包含食物密度、營養成分、單位重量價格等資訊,因此資料處理模組130將食物密度乘以食物200的體積就可以得到食物200 的重量。此外,成分組成中的營養成分分別乘以重量,就可以得到食物200的營養組成。同樣地,單位重量價格乘以重量可以得到食物200的價格。 As shown in FIG. 6 and FIG. 8 , finally, the weight of the food 200 is calculated according to the food information loaded in the food database 160 and the volume of the food 200 , as shown in Step 160 . As mentioned above, the food information also includes information such as food density, nutritional composition, price per unit weight, etc. Therefore, the data processing module 130 multiplies the food density by the volume of the food 200 to obtain the food 200 the weight of. In addition, the nutritional composition of the food 200 can be obtained by multiplying the nutritional components in the composition by the weight, respectively. Likewise, multiply the price per unit weight by the weight to get the price of the food 200.

前述的用餐資訊,包含食物200的種類、重量、營養組成以及價格等,可關連於特定用餐者。資料處理模組130關連用餐者識別資訊以及餐飲內容,並上傳至一管理平台400,以進行用餐者的飲食管理或是餐飲費用管理,如步驟Step 170所示。特定用餐者的識別方式,可以是生物特徵辨識、讀取RFID、輸入帳號密碼等,用餐者的識別可於餐飲內容識別方法執行之前進行,且可以是在步驟Step 160之後進行。 The aforementioned meal information, including the type, weight, nutritional composition, and price of the food 200 , can be associated with a specific diner. The data processing module 130 associates the diner identification information and the catering content, and uploads it to a management platform 400 for catering management or catering expense management of the diners, as shown in Step 170 . The identification method of the specific diners may be biometric identification, reading RFID, inputting account passwords, etc. The identification of the diners may be performed before the execution of the method for identifying the meal content, and may be performed after Step 160 .

前述的餐飲內容識別方法係於理想狀態下進行。於實際應用場合,可能遭遇不同問題需要解決,以下進一步說明前述餐飲內容識別方法的變化例。 The above-mentioned method for recognizing food and beverage content is performed under ideal conditions. In practical applications, different problems may be encountered that need to be solved, and the following further describes the variation of the foregoing method for recognizing food and beverage content.

如圖10、圖11以及圖12所示,首先,餐飲內容識別方法的開始,可以是手動啟動,也可以是自動啟動。於自動啟動的場合,資料處理模組130啟動並控制三維掃瞄器110以及影像擷取裝置120進行工作,持續對放置台S進行偵測。影像擷取裝置120持續擷取待分析影像C,並且資料處理模組130持續分析待分析影像C是否包含偵測區域A,步驟Step 116所示。當偵測到待分析影像C包含偵測區域A,資料處理模組130便執行映射距離分佈P至待分析影像C,如步驟Step 120所示,並且繼續執行步驟Step 130。 As shown in FIG. 10 , FIG. 11 , and FIG. 12 , first, the start of the method for recognizing food and beverage content may be started manually or automatically. In the case of automatic activation, the data processing module 130 activates and controls the 3D scanner 110 and the image capturing device 120 to work, and continuously detects the placement table S. The image capturing device 120 continuously captures the image C to be analyzed, and the data processing module 130 continues to analyze whether the image C to be analyzed includes the detection area A, as shown in Step 116 . When it is detected that the image C to be analyzed includes the detection area A, the data processing module 130 executes the mapping of the distance distribution P to the image C to be analyzed, as shown in step Step 120 , and proceeds to step 130 .

如圖13所示,偵測區域A為餐盤的表面,於俯視狀態下具有固定的形狀以及特定顏色。因此,資料處理模組130可以依據形狀以及顏色,判斷偵測區域A(即餐盤)是否出現在放置台S,而自動啟動後續辨 識程序。 As shown in FIG. 13 , the detection area A is the surface of the dinner plate, and has a fixed shape and a specific color in a plan view. Therefore, the data processing module 130 can determine whether the detection area A (ie the dinner plate) is present on the placing table S according to the shape and color, and automatically start the subsequent identification know the program.

如圖5以及圖10所示,接著,資料處理模組130利用分析偵測區域A的影像中的像素資訊與偵測區域A的實際尺寸,以取得實際基準距離值z0’,如步驟Step 122所示。實際基準距離值z0’與預設基準距離值z0之間的關係為可利用像素數比例表示如下:z0'=z0×(L/Xn);或是z0'=z0×(W/Yn)。 As shown in FIG. 5 and FIG. 10 , then, the data processing module 130 obtains the actual reference distance value z0 ′ by analyzing the pixel information in the image of the detection area A and the actual size of the detection area A, as in Step 122 shown. The relationship between the actual reference distance value z0' and the preset reference distance value z0 is expressed by the ratio of the number of available pixels as follows: z0'=z0×(L/Xn); or z0'=z0×(W/Yn).

如圖10所示,資料處理模組130依據實際基準距離值z0’分析距離值z(x,y)的分佈是否合理,如步驟Step 124所示。例如,依據餐盤厚度、標準容器301,302,303高度、食物可能的填裝量,每一距離值z(x,y)應介於一距離上限值以及一距離下限值之間的範圍區間,若距離值z(x,y)其中之一超出距離上限值以及距離下限值的範圍區間,則距離值z(x,y)為不合理,而需重新執行步驟Step 112以及Step 114。 As shown in FIG. 10, the data processing module 130 analyzes whether the distribution of the distance value z(x, y) is reasonable according to the actual reference distance value z0', as shown in Step 124. For example, according to the thickness of the plate, the height of the standard container 301, 302, 303, and the possible filling amount of food, each distance value z(x, y) should be within a range between an upper distance value and a lower distance value. If If one of the distance values z(x, y) exceeds the range of the distance upper limit value and the distance lower limit value, the distance value z(x, y) is unreasonable, and steps 112 and 114 need to be performed again.

於步驟Step 130找出的一或多個待辨識區塊B,即有可能是標準容器301,302,303。標準容器301,302,303的開口朝向偵測區域A的上方,而有固定的俯視形狀。 The one or more to-be-identified blocks B found in Step 130 may be standard containers 301 , 302 and 303 . The openings of the standard containers 301 , 302 and 303 face the upper part of the detection area A, and have a fixed top view shape.

如圖14所示,此時,資料處理模組130可以依據步驟Step 116中所識別出的偵測區域A,去除待分析影像C中一或多個待辨識區塊B以外的部份,以作為後續影像之用。 As shown in FIG. 14 , at this time, the data processing module 130 can remove the parts other than the one or more to-be-identified blocks B in the image C to be analyzed according to the detection area A identified in Step 116 , so as to as a follow-up image.

如圖11所示,資料處理模組130由容器資料庫150載入標準容器301,302,303的資訊,例如開口的面積與形狀,分析待辨識區塊B是否符合標準容器301,302,303的開口的面積與形狀,以判斷每一待辨識區 塊B是否對應於正確擺放的標準容器301,302,303,如步驟Step 132所示。 As shown in FIG. 11 , the data processing module 130 loads the information of the standard containers 301 , 302 , 303 from the container database 150 , such as the area and shape of the opening, and analyzes whether the block B to be identified conforms to the area and shape of the opening of the standard container 301 , 302 , and 303 , so as to Determine each to-be-identified area Whether block B corresponds to correctly placed standard containers 301, 302, 303, as shown in Step 132.

如圖15所示,錯誤的擺放方式包含:標準容器301,302,303之間互相干涉交疊,使等標準容器301,302,303被共同定義為單一待辨識區塊B,導致俯視型態不符合任一標準容器301,302,303的開口形狀;標準容器301,302,303傾倒,導致俯視型態不符合任一標準容器301,302,303的開口形狀;標準容器301,302,303的放置超出偵測區域A,而導致位於偵測區域A的部份之形狀不符合標準容器301,302,303的開口形狀;或是,放置於偵測區域A的為錯誤的非標準容器304。 As shown in FIG. 15 , the wrong arrangement includes: the standard containers 301 , 302 , and 303 interfere and overlap each other, so that the standard containers 301 , 302 , and 303 are jointly defined as a single block B to be identified, resulting in that the top view shape does not conform to any of the standard containers 301 , 302 , and 303 . the opening shape of the standard container 301, 302, 303 is overturned, resulting in a top view that does not conform to the opening shape of any of the standard containers 301, 302, 303; the standard container 301, 302, 303 is placed beyond the detection area A, so that the shape of the part located in the detection area A does not meet the standard The shape of the opening of the containers 301, 302, 303; or, the wrong non-standard container 304 placed in the detection area A.

如圖11以及圖15所示,當一或多個待辨識區塊B不符合任一標準容器301,302,303的開口形狀,資料處理模組130判斷至少一待辨識區塊B所對應於標準容器301,302,303未正確擺放,則資料處理模組130產生一錯誤提示,並驅動一顯示裝置或一警示裝置發出錯誤提示,如步驟Step 134所示。 As shown in FIG. 11 and FIG. 15 , when one or more blocks B to be identified do not conform to the opening shape of any standard container 301 , 302 , 303 , the data processing module 130 determines that at least one block B to be identified corresponds to the standard container 301 , 302 , 303 is not If it is placed correctly, the data processing module 130 generates an error prompt, and drives a display device or a warning device to issue an error prompt, as shown in Step 134 .

如圖11所示,若每一待辨識區塊B對應於正確擺放的標準容器301,302,303,資料處理模組130執行步驟Step 140,識別位於待辨識區塊B的一食物200的種類。當成功識別食物200的種類,則持續進行食物200的體積以及重量的計算,如步驟Step 142、Step 150、Step 160,並且基於用餐者的識別,關連用餐者識別資訊以及餐飲內容,上傳資料至管理平台400,如步驟Step 170所示。 As shown in FIG. 11 , if each block B to be identified corresponds to correctly placed standard containers 301 , 302 , 303 , the data processing module 130 executes Step 140 to identify the type of a food 200 located in the block B to be identified. When the type of the food 200 is successfully identified, the volume and weight of the food 200 are continuously calculated, such as Step 142, Step 150, Step 160, and based on the identification of the diners, the identification information of the diners and the content of the meal are associated, and the data is uploaded to The management platform 400 is shown in step Step 170 .

如圖11以及圖12所示,部分的食物200,可能是以特定的標準容器301,302,303承裝,因此,若步驟Step 142中判斷無法辨識食物200的種類,則資料處理模組130分析是否可依據標準容器資訊,由標準容器 301,302,303的種類判斷食物200的種類,如步驟Step 144所示。若可由標準容器301,302,303的種類判斷食物200的種類,則資料處理模組130繼續執行步驟Step 150、Step 160。若無法由標準容器301,302,303的種類判斷食物200的種類,則資料處理模組130執行步驟Step 134,產生錯誤提示。步驟Step 134也可以省略,於步驟Step 142中判斷無法辨識食物200的種類時,資料處理模組130就直接執行步驟Step 134。 As shown in FIG. 11 and FIG. 12 , some of the food 200 may be contained in specific standard containers 301 , 302 and 303 . Therefore, if it is determined in Step 142 that the type of the food 200 cannot be identified, the data processing module 130 analyzes whether it can be based on Standard Container Information, by Standard Container The types of 301, 302, and 303 determine the type of the food 200, as shown in Step 144. If the type of the food 200 can be determined by the types of the standard containers 301 , 302 and 303 , the data processing module 130 continues to execute Step 150 and Step 160 . If the type of the food 200 cannot be determined from the types of the standard containers 301 , 302 and 303 , the data processing module 130 executes Step 134 to generate an error message. Step Step 134 can also be omitted. When it is determined in Step 142 that the type of the food 200 cannot be identified, the data processing module 130 directly executes Step 134.

本發明透過三維掃瞄以及影像擷取的結合,由擷取的影像以及三維掃瞄資訊的對應關係,在待分析影像中的偵測區域標記出標準容器所佔有的區域,而僅對標準容器所對應的待辨識區塊進行影像辨識,取代對整個待分析影像進行影像辨識,以判斷食物的種類。因此,本發明可以降低進行影像識別所需要的運算負載,而可加速識別食物過程。同時,透過標準容器的應用,三維掃瞄所取得的距離分佈可以用於有效地且相對精確地計算食物的體積,配合食物資訊之關連,即可快速地分析完整餐飲的資訊,藉以結合用餐者識別資訊進行後端管理。 Through the combination of 3D scanning and image capture, the present invention marks the area occupied by the standard container in the detection area in the image to be analyzed based on the corresponding relationship between the captured image and the 3D scanning information, while only the standard container is detected. Image recognition is performed on the corresponding block to be recognized, instead of performing image recognition on the entire image to be analyzed, so as to determine the type of food. Therefore, the present invention can reduce the computing load required for image recognition, and can speed up the food recognition process. At the same time, through the application of standard containers, the distance distribution obtained by 3D scanning can be used to effectively and relatively accurately calculate the volume of food. With the correlation of food information, the information of the complete meal can be quickly analyzed, so as to combine the diners. Identify information for back-end management.

Step 112~160:步驟 Step 112~160: Steps

Claims (16)

一種餐飲內容識別方法,包含:透過一三維掃瞄器取得一偵測區域上的多個距離值,以產生一距離分佈,並以一影像擷取裝置擷取包含該偵測區域之一待分析影像;一資料處理模組將該距離分佈映射至該待分析影像;該資料處理模組設定一門檻距離,以在該待分析影像中定義各該距離值小於該門檻距離的部份作為至少一待辨識區塊;該資料處理模組對該至少一待辨識區塊進行影像辨識,識別位於該待辨識區塊的一食物的種類;以及該資料處理模組依據該距離分佈,取得該食物的體積;其中,該影像擷取裝置與該偵測區域的一表面之間具有一實際基準距離值,該門檻距離小於或等於該實際基準距離值;其中,該偵測區域的一長度以及一寬度在該待分析影像內佔據的像素數分別為Xn×Yn,且該影像擷取裝置與該偵測區域的該表面之間具有一預設基準距離值,該偵測區域於該預設基準距離值下的一實際長度以及一實際寬度在該待分析影像內佔據的像素數分別是L×W,該實際基準距離值與該預設基準距離值之間的關係為:z0'=z0×(L/Xn);或是z0'=z0×(W/Yn);其中,z0為該預設基準距離值,z0’為該實際基準距離值。 A method for recognizing food and beverage content, comprising: obtaining a plurality of distance values on a detection area through a three-dimensional scanner to generate a distance distribution, and using an image capture device to capture a to-be-analyzed area including the detection area image; a data processing module maps the distance distribution to the image to be analyzed; the data processing module sets a threshold distance to define each part of the image to be analyzed whose distance value is smaller than the threshold distance as at least one block to be identified; the data processing module performs image recognition on the at least one block to be identified to identify a type of food located in the block to be identified; and the data processing module obtains the information of the food according to the distance distribution volume; wherein, there is an actual reference distance value between the image capture device and a surface of the detection area, the threshold distance is less than or equal to the actual reference distance value; wherein, a length and a width of the detection area The number of pixels occupied in the image to be analyzed is Xn×Yn respectively, and there is a predetermined reference distance between the image capturing device and the surface of the detection area, and the detection area is at the predetermined reference distance The number of pixels occupied by an actual length and an actual width in the image to be analyzed are L×W respectively, and the relationship between the actual reference distance value and the preset reference distance value is: z0′=z0×( L/Xn); or z0'=z0×(W/Yn); wherein, z0 is the preset reference distance value, and z0' is the actual reference distance value. 如請求項1所述的餐飲內容識別方法,其中,於取得該多個距離值之前,該影像擷取裝置持續擷取該待分析影像,該資料處理模組 分析該待分析影像是否包含該偵測區域。 The method for recognizing food and beverage content according to claim 1, wherein, before obtaining the plurality of distance values, the image capturing device continues to capture the image to be analyzed, and the data processing module Analyze whether the image to be analyzed includes the detection area. 如請求項1所述的餐飲內容識別方法,更包含該資料處理模組判斷每一該距離值是否介於一距離上限值以及一距離下限值之間的範圍區間;若任一該距離值超出該距離上限值以及該距離下限值的範圍區間,重新取得該多個距離值以及重新擷取該待分析影像。 The food and beverage content identification method according to claim 1, further comprising the data processing module judging whether each distance value is within a range between a distance upper limit value and a distance lower limit value; if any of the distance values When the value exceeds the upper limit value of the distance and the lower limit value of the distance, the plurality of distance values are retrieved and the image to be analyzed is retrieved again. 如請求項1所述的餐飲內容識別方法,更包含該資料處理模組依據該距離分佈以及至少一標準容器資訊,識別該至少一待辨識區塊是否符合一正確放置的標準容器。 The food and beverage content identification method according to claim 1, further comprising the data processing module identifying whether the at least one block to be identified conforms to a correctly placed standard container according to the distance distribution and at least one standard container information. 如請求項1所述的餐飲內容識別方法,其中,識別位於該待辨識區塊的該食物的種類的步驟包含:該資料處理模組載入至少一食物資訊;其中,該至少一食物資訊至少包含該食物的種類以及一樣本影像;以及該資料處理模組比對該待辨識區塊的影像以及該樣本影像是否相近似,以於該待辨識區塊識別出該食物的種類。 The food and beverage content identification method according to claim 1, wherein the step of identifying the type of the food located in the to-be-identified block comprises: the data processing module loads at least one piece of food information; wherein the at least one piece of food information at least Including the type of the food and a sample image; and the data processing module compares the image of the block to be identified and the sample image whether the image is similar, so as to identify the type of the food in the block to be identified. 如請求項5所述的餐飲內容識別方法,更包含:該資料處理模組載入該至少一食物資訊;其中,該至少一食物資訊更包含該食物的食物密度;以及該資料處理模組將該食物密度乘以該食物的體積以得到該食物的重量。 The method for identifying food and beverage content according to claim 5, further comprising: loading the at least one food information by the data processing module; wherein the at least one food information further includes the food density of the food; and the data processing module will The density of the food is multiplied by the volume of the food to obtain the weight of the food. 如請求項6所述的餐飲內容識別方法,更包含:該資料處理模組載入該至少一食物資訊;其中,該至少一食物資訊還包含一營養成分、一單位重量價格; 該資料處理模組以該營養成分乘以該食物的重量,以得到該食物的一營養組成;該資料處理模組以該單位重量價格乘以該食物的重量,以得到該食物的價格;以及該資料處理模組關連該食物的種類、重量、營養組成以及價格於一用餐者,並上傳至一管理平台。 The food and beverage content identification method according to claim 6, further comprising: loading the at least one food information by the data processing module; wherein, the at least one food information further includes a nutritional ingredient and a unit weight price; The data processing module multiplies the nutrient composition by the weight of the food to obtain a nutritional composition of the food; the data processing module multiplies the unit weight price by the weight of the food to obtain the price of the food; and The data processing module relates the type, weight, nutritional composition and price of the food to a diner, and uploads it to a management platform. 如請求項1所述的餐飲內容識別方法,更包含該資料處理模組分析該至少一待辨識區塊是否符合正確擺放的一標準容器;當該至少一待辨識區塊不符合正確擺放的該標準容器,產生一錯誤提示。 The method for recognizing food and beverage content according to claim 1, further comprising the data processing module analyzing whether the at least one block to be identified conforms to a standard container for correct placement; when the at least one block to be identified does not conform to the correct placement of the standard container, an error message is generated. 一種餐飲內容識別系統,包含:一三維掃瞄器,用以取得一偵測區域上的多個距離值,以產生一距離分佈;一影像擷取裝置,用以擷取該偵測區域之一待分析影像;以及一資料處理模組,電性連接於該三維掃瞄器以及該影像擷取裝置;其中,該資料處理模組將該距離分佈映射至該待分析影像;該資料處理模組並設定一門檻距離,以在該待分析影像中定義各該距離值小於該門檻距離的部份作為至少一待辨識區塊;且該資料處理模組對該至少一待辨識區塊進行影像辨識,識別位於該至少一待辨識區塊的一食物的種類,並依據該距離分佈,取得該食物的體積;其中,該影像擷取裝置與該偵測區域的一表面之間具有一實際基準距離值,該門檻距離小於或等於該實際基準距離值; 其中,該偵測區域的一長度以及一寬度在該待分析影像內佔據的像素數分別為Xn×Yn,且該影像擷取裝置與該偵測區域的該表面之間具有一預設基準距離值,該偵測區域於該預設基準距離值下的一實際長度以及一實際寬度在該待分析影像內佔據的像素數分別是L×W,該實際基準距離值與該預設基準距離值之間的關係為:z0'=z0×(L/Xn);或是z0'=z0×(W/Yn);其中,z0為該預設基準距離值,z0’為該實際基準距離值。 A food and beverage content recognition system, comprising: a three-dimensional scanner for acquiring a plurality of distance values on a detection area to generate a distance distribution; an image capture device for capturing one of the detection areas an image to be analyzed; and a data processing module electrically connected to the 3D scanner and the image capture device; wherein the data processing module maps the distance distribution to the image to be analyzed; the data processing module and set a threshold distance, so as to define each part of the image to be analyzed whose distance value is smaller than the threshold distance as at least one block to be recognized; and the data processing module performs image recognition on the at least one block to be recognized , identify the type of a food located in the at least one block to be identified, and obtain the volume of the food according to the distance distribution; wherein, there is an actual reference distance between the image capturing device and a surface of the detection area value, the threshold distance is less than or equal to the actual reference distance value; Wherein, the number of pixels occupied by a length and a width of the detection area in the image to be analyzed are Xn×Yn respectively, and there is a predetermined reference distance between the image capture device and the surface of the detection area value, the number of pixels occupied by an actual length and an actual width of the detection area under the preset reference distance value in the image to be analyzed are L×W respectively, the actual reference distance value and the preset reference distance value The relationship between them is: z0'=z0×(L/Xn); or z0'=z0×(W/Yn); wherein, z0 is the preset reference distance value, and z0' is the actual reference distance value. 如請求項9所述的餐飲內容識別系統,其中,於取得該多個距離值之前,該影像擷取裝置持續擷取該待分析影像,且該資料處理模組分析該待分析影像是否包含該偵測區域。 The food and beverage content recognition system according to claim 9, wherein, before obtaining the plurality of distance values, the image capture device continues to capture the image to be analyzed, and the data processing module analyzes whether the image to be analyzed includes the image to be analyzed detection area. 如請求項9所述的餐飲內容識別系統,其中,該資料處理模組判斷每一該距離值是否介於一距離上限值以及一距離下限值之間的範圍區間;若任一該距離值超出該距離上限值以及該距離下限值的範圍區間,以該三維掃瞄器以及該影像擷取裝置重新取得該多個距離值以及重新擷取該待分析影像。 The food and beverage content identification system according to claim 9, wherein the data processing module determines whether each distance value is within a range between a distance upper limit value and a distance lower limit value; In the range interval where the value exceeds the upper limit value of the distance and the lower limit value of the distance, the 3D scanner and the image capturing device re-acquire the plurality of distance values and re-capture the to-be-analyzed image. 如請求項9所述的餐飲內容識別系統,其中,該資料處理模組由載入至少一標準容器資訊,並依據該距離分佈以及該至少一標準容器資訊,識別該至少一待辨識區塊是否符合一正確放置的標準容器。 The food and beverage content identification system according to claim 9, wherein the data processing module loads at least one standard container information, and identifies whether the at least one block to be identified is based on the distance distribution and the at least one standard container information Complies with a properly placed standard container. 如請求項9所述的餐飲內容識別系統,其中,該資料處理模組載入該食物的種類以及一樣本影像,並比對該待辨識區塊的影像以及該樣本影像是否相近似,以於該待辨識區塊識別出該食物的種類。 The food and beverage content identification system according to claim 9, wherein the data processing module loads the type of the food and a sample image, and compares the image of the block to be identified and the sample image to determine whether they are similar to The to-be-identified block identifies the type of the food. 如請求項13所述的餐飲內容識別系統,其中,該資料處理模組載入該食物的食物密度,並將該食物密度乘以該食物的體積以得到該食物的重量。 The food and beverage content identification system of claim 13, wherein the data processing module loads the food density of the food, and multiplies the food density by the volume of the food to obtain the weight of the food. 如請求項14所述的餐飲內容識別系統,其中,該資料處理模組載入營養成分、單位重量價格,以該營養成分乘以該食物的重量以得到該食物的一營養組成,並以該單位重量價格乘以該食物的重量以得到該食物的價格;且該資料處理模組關連該食物的種類、重量、營養組成以及價格於一用餐者,並上傳至一管理平台。 The food and beverage content identification system as claimed in claim 14, wherein the data processing module loads nutritional ingredients and price per unit weight, multiplies the nutritional ingredients by the weight of the food to obtain a nutritional composition of the food, and uses the The price per unit weight is multiplied by the weight of the food to obtain the price of the food; and the data processing module relates the type, weight, nutritional composition and price of the food to a diner, and uploads it to a management platform. 如請求項9所述的餐飲內容識別系統,其中,該資料處理模組分析該至少一待辨識區塊是否符合正確擺放的一標準容器;當該至少一待辨識區塊不符合正確擺放的該標準容器,產生一錯誤提示。 The food and beverage content identification system according to claim 9, wherein the data processing module analyzes whether the at least one block to be identified conforms to a standard container that is correctly placed; when the at least one block to be identified does not conform to the correct placement of the standard container, an error message is generated.
TW109136048A 2020-10-16 2020-10-16 Food content identifying method and food content identifying system TWI774088B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109136048A TWI774088B (en) 2020-10-16 2020-10-16 Food content identifying method and food content identifying system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109136048A TWI774088B (en) 2020-10-16 2020-10-16 Food content identifying method and food content identifying system

Publications (2)

Publication Number Publication Date
TW202217651A TW202217651A (en) 2022-05-01
TWI774088B true TWI774088B (en) 2022-08-11

Family

ID=82558815

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109136048A TWI774088B (en) 2020-10-16 2020-10-16 Food content identifying method and food content identifying system

Country Status (1)

Country Link
TW (1) TWI774088B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8345930B2 (en) * 2010-01-22 2013-01-01 Sri International Method for computing food volume in a method for analyzing food
CN107873101A (en) * 2014-11-21 2018-04-03 克里斯多夫·M·马蒂 Imaging systems for object recognition and evaluation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8345930B2 (en) * 2010-01-22 2013-01-01 Sri International Method for computing food volume in a method for analyzing food
CN107873101A (en) * 2014-11-21 2018-04-03 克里斯多夫·M·马蒂 Imaging systems for object recognition and evaluation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
譯著 林華煒、廖珗洲,使用短距深度攝影機之用餐估算方法的研究,2017年,朝陽科技大學資訊工程系,https://hdl.handle.net/11296/qt8t6d *
譯著 林華煒、廖珗洲,使用短距深度攝影機之用餐估算方法的研究,2017年,朝陽科技大學資訊工程系,https://hdl.handle.net/11296/qt8t6d。

Also Published As

Publication number Publication date
TW202217651A (en) 2022-05-01

Similar Documents

Publication Publication Date Title
US11551453B2 (en) Method and apparatus for shelf feature and object placement detection from shelf images
CN109064509B (en) Method, apparatus and system for identifying food volume and food calorie
US20240020333A1 (en) System and method for selecting an item from a plurality of identified items based on a similarity value
US12524890B2 (en) System and method for detecting a trigger event for identification of an item
US12536674B2 (en) System and method for identifying unmoved items on a platform during item identification
US20240029276A1 (en) System and method for identifying moved items on a platform during item identification
US8792715B2 (en) System and method for forms classification by line-art alignment
US20240029405A1 (en) System and method for selecting an item from a plurality of identified items by filtering out back images of the items
US20240029277A1 (en) System and method for camera re-calibration based on an updated homography
US20240020858A1 (en) System and method for search space reduction for identifying an item
US20250024163A1 (en) Imaging device for identifying an item
US20240020978A1 (en) System and method for space search reduction in identifying items from images via item height
US20130101205A1 (en) Label detecting system, apparatus and method thereof
US20240020859A1 (en) System and method for identifying an item based on interaction history of a user
US20240020993A1 (en) System and method for item identification using container-based classification
US20220262088A1 (en) Image recognition system, image recognition method, and storage medium
US20250024160A1 (en) Lighting for an imaging device
US20200175318A1 (en) Medicine inspection support device, image processing device, image processing method, and program
CN108447056A (en) Power distribution cabinet circular pressing plate state identification method based on geometric properties clustering
CN107679479A (en) A kind of objective full-filling recognition methods based on morphological image process
KR102547130B1 (en) Method for measuring volume of postal object
US20190333004A1 (en) Processing system, processing method, and non-transitory storage medium
TWI774088B (en) Food content identifying method and food content identifying system
JP2019096162A (en) Inventory detection program, inventory detection method and inventory detection apparatus
CN114445614A (en) Catering Content Recognition Method and Catering Content Recognition System