JP2015052906A - Image processor and program - Google Patents

Image processor and program Download PDF

Info

Publication number
JP2015052906A
JP2015052906A JP2013185295A JP2013185295A JP2015052906A JP 2015052906 A JP2015052906 A JP 2015052906A JP 2013185295 A JP2013185295 A JP 2013185295A JP 2013185295 A JP2013185295 A JP 2013185295A JP 2015052906 A JP2015052906 A JP 2015052906A
Authority
JP
Japan
Prior art keywords
image
unit
measurement target
pixels
measurement
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2013185295A
Other languages
Japanese (ja)
Inventor
崇行 澤田
Takayuki Sawada
崇行 澤田
浩基 梅澤
Hiromoto Umezawa
浩基 梅澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba TEC Corp
Original Assignee
Toshiba TEC Corp
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 Toshiba TEC Corp filed Critical Toshiba TEC Corp
Priority to JP2013185295A priority Critical patent/JP2015052906A/en
Publication of JP2015052906A publication Critical patent/JP2015052906A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processor and program capable of acquiring a quantity from an object image.SOLUTION: The image processor cuts out a measurement target image V1 as an image of measurement target from a digital image. The image processor cuts out a unit element image V2 as a measurement unit from a digital image. The number of measurement target pixels P1 in the image of measurement target is calculated. The number of unit element pixels P2 in the unit element image V2 is calculated. The number of measurement target pixels P1 is divided by the number of unit element pixels P2 (P1/P2). An estimation value of the measurement target is calculated based on the division result and a conversion chart.

Description

この発明の実施形態は、対象のオブジェクト画像から量を取得できる画像処理装置およびプログラムに関する。   Embodiments described herein relate generally to an image processing apparatus and a program that can acquire an amount from a target object image.

従来、画像処理装置を用いたスマートフォンなどのカメラで食事の写真を撮影して、栄養摂取記録を行う用途において、摂取量を取得するには、写真撮影とは別に計量または手動で記録するか、料理と共に写った食器等の大きさと比較するといった方法が知られている。   Conventionally, in applications that take pictures of meals with a camera such as a smartphone using an image processing device and record nutrition intake, in order to acquire the intake, weighed or recorded manually separately from photography, A method of comparing with the size of tableware and the like taken with a dish is known.

しかし、摂取量の取得は、計量などユーザにとって非常に煩わしいものがある。特に手動で記録する場合、食器の大きさ情報が別途必要となり、さらに煩わしさが増してしまう、という課題があった。   However, obtaining the intake amount is very troublesome for the user such as weighing. In particular, when manually recording, there is a problem that table size information is required separately, which further increases annoyance.

特開2012−112855号公報JP 2012-112855 A

この発明が解決しようとする課題は、対象のオブジェクト画像から量を取得できる画像処理装置およびプログラムを提供することである。   The problem to be solved by the present invention is to provide an image processing apparatus and program capable of acquiring an amount from a target object image.

実施形態の画像処理装置は、デジタル画像から計量対象オブジェクトに相当する計量対象画像を切り出す計量対象切出部と、前記デジタル画像から計量単位となるオブジェクトに相当する単位要素画像を切り出す単位要素切出部と、前記計量対象画像の画素数を算出する計量対象画素数算出部と、前記単位要素画像の画素数を算出する単位要素画素数算出部と、前記計量対象画像の画素数を前記単位要素画像の画素数で除算する除算部と、前記除算部による除算結果に基づいて、前記計量対象オブジェクトの推定量を算出するオブジェクト量推定部と、を備えた。   An image processing apparatus according to an embodiment includes a measurement target cutout unit that cuts out a measurement target image corresponding to a measurement target object from a digital image, and a unit element cutout that cuts out a unit element image corresponding to an object serving as a measurement unit from the digital image. A measurement target pixel number calculation unit that calculates the number of pixels of the measurement target image, a unit element pixel number calculation unit that calculates the number of pixels of the unit element image, and the number of pixels of the measurement target image as the unit element. A division unit that divides by the number of pixels of the image; and an object amount estimation unit that calculates an estimation amount of the measurement target object based on a division result by the division unit.

また、実施形態のプログラムは、対象のオブジェクト画像から量を取得する画像処理装置をコンピュータによって制御するプログラムであって、デジタル画像から計量対象オブジェクトに相当する計量対象画像を切り出す計量対象切出部と、前記デジタル画像から計量単位となるオブジェクトに相当する単位要素画像を切り出す単位要素切出部と、前記計量対象画像の画素数を算出する計量対象画素数算出部と、前記単位要素画像の画素数を算出する単位要素画素数算出部と、前記計量対象画像の画素数を前記単位要素画像の画素数で除算する除算部と、前記除算部による除算結果に基づいて、前記計量対象オブジェクトの推定量を算出するオブジェクト量推定部と、として機能させる。   The program according to the embodiment is a program for controlling an image processing apparatus that acquires an amount from a target object image by a computer, and includes a measurement target extraction unit that extracts a measurement target image corresponding to the measurement target object from a digital image. A unit element cutout unit that cuts out a unit element image corresponding to an object as a measurement unit from the digital image, a measurement target pixel number calculation unit that calculates the number of pixels of the measurement target image, and the number of pixels of the unit element image A unit element pixel number calculation unit that calculates the number of pixels of the measurement target image, a division unit that divides the number of pixels of the measurement target image by the number of pixels of the unit element image, and an estimation amount of the measurement target object based on a division result by the division unit And function as an object amount estimation unit for calculating.

この実施形態の画像処理装置にかかるハードウェアの基本構成を示す図である。It is a figure which shows the basic composition of the hardware concerning the image processing apparatus of this embodiment. この実施形態の機能ブロック図である。It is a functional block diagram of this embodiment. 計量対象を切り出す前の画像を示す図である。It is a figure which shows the image before cutting out a measuring object. 切り出した計量対象の画像を示す図である。It is a figure which shows the image of the measurement object cut out. 換算表の例について説明するための図である。It is a figure for demonstrating the example of a conversion table. 計量対象のオブジェクト量を推定する処理例について説明するためのフローチャートである。It is a flowchart for demonstrating the process example which estimates the object amount of measurement object.

以下、実施形態について、図面を参照しながら詳細に説明する。   Hereinafter, embodiments will be described in detail with reference to the drawings.

この実施形態の画像処理装置にかかるハードウェア構成を図1に示す。画像処理装置は、制御部11と記憶部12とユーザI/F(インターフェース)13と通信・入出力I/F14とから構成され、各部は互いにデータ、アドレス、制御信号を伝達するバスラインBUSを介して接続されている。   A hardware configuration according to the image processing apparatus of this embodiment is shown in FIG. The image processing apparatus includes a control unit 11, a storage unit 12, a user I / F (interface) 13, and a communication / input / output I / F 14. Each unit transmits a bus line BUS for transmitting data, addresses, and control signals to each other. Connected through.

制御部11は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)などによるコンピュータ構成を備えている。   The control unit 11 has a computer configuration such as a central processing unit (CPU), a read only memory (ROM), and a random access memory (RAM).

記憶部12は、HDD(Hard Disk Drive)やSSD(Solid State Drive)などの記憶装置である。記憶部25は、制御部21により実行される制御プログラムなどを予め記憶している。   The storage unit 12 is a storage device such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive). The storage unit 25 stores a control program executed by the control unit 21 in advance.

ユーザI/F13は、ディスプレーおよび制御部11に連結し、入力設定などを行うインターフェースである。通信・入出力I/F14は、カメラなどで取り込んだ画像データやデータなどを入力したり、他の端末との通信を行ったりするインターフェースである。   The user I / F 13 is an interface that is connected to the display and control unit 11 and performs input settings. The communication / input / output I / F 14 is an interface for inputting image data or data captured by a camera or the like or for communicating with other terminals.

図1に示すハードウェアの機能ブロック構成を図2に示す。機能ブロックは、計量対象切出部21、単位要素切出部22、計量対象画素数算出部23、単位要素画素数算出部24、除算部25、オブジェクト種類識別部26、換算表供給部27、それにオブジェクト量推定部28から実現される。これら各部の動作は、制御部11により駆動制御される。   FIG. 2 shows a functional block configuration of the hardware shown in FIG. The functional blocks include a measurement target cutout unit 21, a unit element cutout unit 22, a measurement target pixel number calculation unit 23, a unit element pixel number calculation unit 24, a division unit 25, an object type identification unit 26, a conversion table supply unit 27, In addition, this is realized by the object amount estimation unit 28. The operations of these units are driven and controlled by the control unit 11.

計量対象切出部21は、入力端子INに入力されるデジタル画像から計量対象領域を特定する。デジタル画像は、例えば図示しないデジタルカメラで取得する。計量対象領域を計量対象画像として切り出し、計量対象画素数算出部23とオブジェクト種類識別部26にそれぞれ供給する。計量対象領域を切り出すためのルールは、ユーザI/F(インターフェース)等を通してあらかじめ設定しておく。あるいは特開2012−242908などに記載された周知の画像認識技術等により入力画像から自動的に抽出するようにしてもよい。   The measurement target cutout unit 21 specifies a measurement target region from the digital image input to the input terminal IN. For example, the digital image is acquired by a digital camera (not shown). The measurement target area is cut out as a measurement target image and supplied to the measurement target pixel number calculation unit 23 and the object type identification unit 26, respectively. Rules for cutting out the measurement target area are set in advance through a user I / F (interface) or the like. Or you may make it extract automatically from an input image by the known image recognition technique etc. which were described in Unexamined-Japanese-Patent No. 2012-242908.

図3は、計量対象切出部21に入力され、計量対象が切り出される前の画像例を示す。計量対象切出部21は、トレーに乗った例えば「ご飯」の量をはかりたい場合は、「ご飯」の部分を切り出す。図3から切り出されたご飯の画像を図4に示す。計量対象切出部21で切り出されたご飯の画像は、計量対象画像V1として出力する。ご飯の全体の画像である計量対象画像V1は、オブジェクト種類識別部26に供給される。また、計量対象画像V1は、計量対象画素数算出部23に供給される。   FIG. 3 shows an example of an image before being input to the measurement target cutting unit 21 and cutting out the measurement target. The weighing object cutting unit 21 cuts out the “rice” portion, for example, when measuring the amount of “rice” on the tray. The image of the rice cut out from FIG. 3 is shown in FIG. The rice image cut out by the weighing object cutting unit 21 is output as the weighing object image V1. The measurement target image V1 that is the entire image of the rice is supplied to the object type identification unit 26. Further, the measurement target image V <b> 1 is supplied to the measurement target pixel number calculation unit 23.

単位要素切出部22は、入力端子INに供給される入力画像から単位要素領域を特定し、この領域を単位要素画像V2として切り出し、単位要素画素数算出部24に供給する。ここでの単位要素切出部22の切り出しの例は、ご飯1粒分を切り出し、これを単位要素画像V2として出力する。   The unit element cutout unit 22 identifies a unit element region from the input image supplied to the input terminal IN, cuts out this region as a unit element image V2, and supplies it to the unit element pixel number calculation unit 24. The example of the cutout of the unit element cutout part 22 here cuts out one grain of rice and outputs this as a unit element image V2.

ご飯1粒分からどのようにして量がわかるかについて説明する。例えば、味噌汁を構成する画素数、トンカツを構成する画素の数が、ご飯1粒分の画素の数に対して何倍あるかという情報に基づいている。ご飯1粒分の画素に対して何倍であるであるかがわかると、味噌汁、トンカツが何グラムかがわかる。汁ものの画素数がご飯1粒分の画素数に対して何倍だから何グラムの汁である、という換算表をあらかじめ用意しておけば可能である。トンカツの場合も同様に、画素数がご飯1粒分の何倍であるからトンカツは何グラムであるが、その換算表をあらかじめ用意しておくことでわかる。   How to understand the amount from one grain of rice will be explained. For example, it is based on information indicating how many times the number of pixels constituting miso soup and the number of pixels constituting tonkatsu are larger than the number of pixels for one grain of rice. If you know how many times it is compared to the pixel for one grain of rice, you can see how many grams of miso soup and tonkatsu. It is possible to prepare in advance a conversion table that indicates how many grams of soup is because the number of pixels of soup is several times the number of pixels for one grain of rice. Similarly, in the case of tonkatsu, the number of pixels is several times that of one grain of rice, so how many grams of tonkatsu is, but it can be understood by preparing a conversion table in advance.

単位要素の切り出しルールは、ユーザI/F等を通してあらかじめ設定しておくか、上記公報に記載された周知の画像認識技術等により入力画像から自動的に抽出するようにしてもよい。または、ユーザ設定と自動抽出との併用により切り出しを行ってもよい。例えば、入力画像として食事写真を扱う場合は、単位要素としてご飯1粒を用いることができる。その場合の単位要素画像は、ご飯1粒だけが写った画像となる。   Unit element cut-out rules may be set in advance through a user I / F or the like, or may be automatically extracted from an input image by a known image recognition technique described in the above publication. Or you may cut out by combined use with a user setting and automatic extraction. For example, when a meal photo is handled as an input image, one grain of rice can be used as a unit element. In this case, the unit element image is an image in which only one grain of rice is shown.

単位要素の切り出しルールとして、あらかじめご飯粒を使うよう設定しておいた場合、ご飯粒の検出は、上記公報などの画像認識技術を用いて、まずご飯領域を探索し、得られたご飯領域に対して輪郭抽出処理でご飯粒の輪郭を抽出することで行う。この様子を図5に示す。抽出されたご飯粒の輪郭群から、代表的な1粒を選定することで、単位要素画素P2としてのご飯1粒の単位要素画像V2を切り出す。   If the unit element cut-out rule is set to use rice grains in advance, the rice grains are detected by first searching for the rice area using image recognition technology such as the above-mentioned gazette. On the other hand, it is performed by extracting the contour of the rice grain by the contour extraction process. This is shown in FIG. By selecting one representative grain from the extracted outline group of rice grains, the unit element image V2 of one rice grain as the unit element pixel P2 is cut out.

計量対象画素数算出部23は、計量対象画像V1の画素数をカウントする。すなわち、計量対象画像Vlの情報からその領域には何画素あるかを計算する。これにより、計量対象画像V1の計量対象画素数P1が判明する。計量対象画素数算出部23の出力からは、計量対象画素数P1の情報を除算部25に供給する。   The measurement target pixel number calculation unit 23 counts the number of pixels of the measurement target image V1. That is, the number of pixels in the area is calculated from the information of the measurement target image Vl. Thereby, the measurement target pixel number P1 of the measurement target image V1 is determined. From the output of the measurement target pixel number calculation unit 23, information on the measurement target pixel number P1 is supplied to the division unit 25.

単位要素画素数算出部24には、単位要素切出し部22で切り出されたご飯1粒分が単位要素画像V2として供給される。単位要素画素数算出部24は、単位要素画像V2の画素数、すなわち単位要素画素数P2を算出し、除算部25に供給する。   The unit element pixel count calculation unit 24 is supplied with one grain of rice cut by the unit element cutting unit 22 as a unit element image V2. The unit element pixel number calculation unit 24 calculates the number of pixels of the unit element image V2, that is, the unit element pixel number P2, and supplies it to the division unit 25.

除算部25は、計量対象画素数P1を単位要素画素数P2で除算することにより、画素数比(P1/P2)を求め、オブジェクト量推定部28に供給する。P1/P2を求めると、何単位分の画素数かが判明する。除算部25から出力される答えは、画素数比として、オブジェクト推定部28に供給される。   The division unit 25 calculates the pixel number ratio (P1 / P2) by dividing the measurement target pixel number P1 by the unit element pixel number P2, and supplies the pixel ratio to the object amount estimation unit 28. When P1 / P2 is obtained, the number of pixels corresponding to the unit can be determined. The answer output from the division unit 25 is supplied to the object estimation unit 28 as a pixel number ratio.

一方、オブジェクト種類識別部26では、切り出した図4の画像が供給されると、計量画像V1は盛り付けられたご飯の画像であることを識別する。味噌汁ではなく、トンカツでもなく、ご飯である、ということが出力される。   On the other hand, when the cutout image shown in FIG. 4 is supplied, the object type identification unit 26 identifies that the weighing image V1 is an image of cooked rice. It is output that it is rice, not miso soup, not tonkatsu.

オブジェクト種類識別部26は、計量対象画像中のオブジェクトの種類および必要に応じてオブジェクトが配置(盛り付け等)された状況を識別することにより、オブジェクト種別情報Ioを生成し、換算表供給部27に供給する。オブジェクトの種類の識別方法としては、上記の公報等の画像認識技術を適用してもよい。   The object type identification unit 26 generates the object type information Io by identifying the type of the object in the measurement target image and the situation in which the object is arranged (arranged or the like) as necessary, and sends it to the conversion table supply unit 27. Supply. As a method for identifying the type of object, an image recognition technique such as the above publication may be applied.

盛り付けられた状態であるかは、例えばご飯のテンプレート画像、トンカツのテンプレート画像、味噌汁のテンプレート画像を用意しておく。そして計量対象画像V1とテンプレート画像とを比較することにより、差の最も少ないテンプレートが計量対象画像V1にマッチした画像であると想定する。なお、業務用の場合のテンプレート画像は、例えばメニューに対応して用意しておく必要がある。   For example, a template image of rice, a template image of tonkatsu, and a template image of miso soup are prepared in advance. Then, by comparing the measurement target image V1 and the template image, it is assumed that the template with the smallest difference is an image that matches the measurement target image V1. Note that a template image for business use needs to be prepared corresponding to a menu, for example.

このように、計量対象画像V1に対してマッチングをとることによって、計量対象のオブジェクトを特定し、識別することが可能となる。この場合のオブジェクト種類識別部26から出力されるオブジェクト種別情報としては、料理の名前ということになる。   In this way, by matching the measurement target image V1, it is possible to identify and identify the measurement target object. In this case, the object type information output from the object type identification unit 26 is the name of a dish.

料理名が判明すると、換算表があれば、オブジェクトの量がわかる。そこで、オブジェクト種類識別部26から出力されるオブジェクト識別情報Ioは、換算用供給部27に供給される。   If the dish name is known, the amount of the object can be known if there is a conversion table. Therefore, the object identification information Io output from the object type identification unit 26 is supplied to the conversion supply unit 27.

換算用供給部27には、オブジェクト識別情報Ioに基づいて、あらかじめ用意しておいた、複数種類の換算表から例えば図5に示す換算表を選択し、オブジェクト量推定部28に供給する。   The conversion supply unit 27 selects, for example, the conversion table shown in FIG. 5 from a plurality of types of conversion tables prepared in advance based on the object identification information Io, and supplies the conversion table to the object amount estimation unit 28.

ここで換算表とは、画素数比と求めたいオブジェクト量とを対応させた表である。その例を図5に示す。換算表が必要な理由は、例えば、ご飯茶碗に盛り付けられたご飯の量を求めたい場合、入力画像から知り得るのは、盛り付けられたご飯の表面積(正確には画面に射影された面積)だけであり、ご飯の表面積と食器の形状とにもとづく、ご飯の体積(質量)の推定が必要となるからである。   Here, the conversion table is a table in which the pixel number ratio is associated with the object amount to be obtained. An example is shown in FIG. The reason why a conversion table is necessary is, for example, when you want to find the amount of rice served in a rice bowl, you can know only the surface area of the served rice (exactly the area projected on the screen) from the input image. This is because it is necessary to estimate the volume (mass) of the rice based on the surface area of the rice and the shape of the tableware.

換算表は、盛り付けられたご飯の表面積を相対的に表した画素数比から質量を求めるためのルックアップテーブルである。換算表は、オブジェクトの種類や盛り付けられた状況に応じてその内容が異なる。同じ盛り付け表面積でも、盛られた食器が皿とお椀とでは量が異なるからである。よって、換算表は、想定されるオブジェクトの種類や盛り付け状況の数だけ保有していることが望ましい。   The conversion table is a look-up table for obtaining mass from the ratio of the number of pixels that relatively represents the surface area of the cooked rice. The content of the conversion table varies depending on the type of object and the situation in which it is arranged. This is because even with the same serving surface area, the amount of tableware served differs between the plate and the bowl. Therefore, it is desirable to have as many conversion tables as possible for the number of types of objects and arrangements assumed.

オブジェクト量推定部28は、選択され供給された換算表を参照することにより、供給された画素数比から、オブジェクトの量を算出する。   The object amount estimation unit 28 calculates the amount of the object from the supplied pixel number ratio by referring to the selected and supplied conversion table.

図5に示す換算表の例では、ご飯1粒に対する画素数比を10000〜18500倍を500倍刻みとしている。それぞれの画素数比に対し、例えば画素数比10000倍の場合の計量推定値は、100gとなる。別の例として画素数比14000倍の計量推定値の場合は、165.7gとなる。   In the example of the conversion table shown in FIG. 5, the pixel number ratio for one grain of rice is 10000 to 18500 times in increments of 500. For each pixel number ratio, for example, the estimated metric value when the pixel number ratio is 10,000 times is 100 g. As another example, in the case of a metric estimated value with a pixel number ratio of 14000, the amount is 165.7 g.

当然のことながら、画素数比は、図5に示すように500倍刻みの切りのいい倍率ばかりとは限らない。半端な値が入力された場合は、補間を行う。例えば、10250という倍率の画素数比が入力された場合は、10000倍と10500倍のちょうど中間である。従って、この場合の計量推定値は、103.8gとなる。これがオブジェクト推定部28の機能である。   As a matter of course, the ratio of the number of pixels is not limited to a good magnification at every 500 times as shown in FIG. If an odd value is input, interpolation is performed. For example, when a pixel number ratio of 10250 is input, it is exactly between 10000 times and 10500 times. Accordingly, the estimated metric value in this case is 103.8 g. This is the function of the object estimation unit 28.

このような処理を行うことによって、最終的にオブジェクト推定量、この例では盛り付け量の推定値がオブジェクト推定部28から出力される。   By performing such processing, the object estimation amount, in this example, the estimated value of the arrangement amount is finally output from the object estimation unit 28.

以上が1つの計量対象に対して行われる処理である。図3の例で言うと、量をはかりたい対象が大まかに「ご飯」、「味噌汁」、「トンカツ」、「野菜」、「サラダ」の5種類がある。   The above is a process performed with respect to one measurement object. In the example of FIG. 3, there are roughly five types of objects to be weighed: “rice”, “miso soup”, “tonkatsu”, “vegetables”, and “salad”.

それぞれの量をはかるという想定シーンで説明する。上記説明でご飯の計量推定値については説明した。全く同じようにして、「味噌汁」の量をはかるには、入力画像から味噌汁の部分の画像を切り出し、ご飯と同様の処理を行う。もちろん単位要素については、先ほどと同じようにご飯1粒の情報があればこと済むので、単位要素については、ご飯と同じである。「トンカツ」、「野菜」、「サラダ」についても同様である。   The explanation is based on an assumed scene in which each amount is measured. In the above description, the estimated value of rice has been described. To measure the amount of “miso soup” in exactly the same way, the image of the miso soup portion is cut out from the input image and the same process as for rice is performed. Of course, the unit element is the same as the rice because it is sufficient if there is information on one grain of rice as before. The same applies to “tonkatsu”, “vegetables” and “salad”.

図6に示すフローチャートを参照し、入力画像中の計量対象のオブジェクト量を推定する処理についてさらに説明する。   With reference to the flowchart shown in FIG. 6, the process for estimating the object amount to be measured in the input image will be further described.

カメラ等により捉えたオブジェクトの入力画像を、入力端子INから取得する(ACT1)。   An input image of an object captured by a camera or the like is acquired from the input terminal IN (ACT1).

取得した入力画像から単位要素領域を特定し、この領域を単位要素画像V2として切り出す(ACT2)。   A unit element region is specified from the acquired input image, and this region is cut out as a unit element image V2 (ACT2).

次に、切り出された単位要素画像V2の単位要素画素数P2を算出する(ACT3)。なお、ACT3では、ご飯の1粒分の画素数を算出した。味噌汁の場合は、入力画像から味噌汁画像を切り出し同様の処理を行う。この場合の単位要素画素数P2は、ご飯と同様にご飯1粒分の画素数を用いる。   Next, the number P2 of unit element pixels of the cut unit element image V2 is calculated (ACT3). In ACT3, the number of pixels for one grain of rice was calculated. In the case of miso soup, a miso soup image is cut out from the input image and the same processing is performed. In this case, as the number of unit element pixels P2, the number of pixels for one grain of rice is used as in the case of rice.

入力画像から計量対象オブジェクト領域を特定し、該領域を計量対象画像V1として切り出す(ACT4)。ここで、切り出される領域は1個とは限らず、切り出された領域の数Nを保持する。   A measurement target object region is specified from the input image, and the region is cut out as a measurement target image V1 (ACT4). Here, the number of areas to be cut out is not limited to one, and the number N of cut out areas is held.

次に、ループカウンタiを[0]に初期化する(ACT5)。   Next, the loop counter i is initialized to [0] (ACT5).

N個のうち、第(i+1)番目の計量対象画像V1を注目対象とする(ACT6)。なお、ACT7以降の説明中に記述される「計量対象画像」は、第(i+1)番目の計量対象画像を指すものとする。   Of the N images, the (i + 1) -th measurement target image V1 is set as a target of attention (ACT6). Note that the “measurement target image” described in the description after ACT 7 indicates the (i + 1) th measurement target image.

ACT7において、計量対象画像V1の計量対象画素数P1を算出する。   In ACT7, the measurement target pixel number P1 of the measurement target image V1 is calculated.

そして、計量対象画素数P1を単位要素画素数P2で除算することにより、注目中の計量対象画像に関する画素数比(P1/P2)を求める(ACT8)。   Then, by dividing the measurement target pixel number P1 by the unit element pixel number P2, a pixel number ratio (P1 / P2) relating to the target measurement target image is obtained (ACT8).

計量対象画像V1が表すオブジェクトの種類を識別することにより、オブジェクト種別情報Ioを生成する(ACT9)。   By identifying the type of object represented by the measurement target image V1, object type information Io is generated (ACT9).

オブジェクト種別情報Ioに基づいて、あらかじめ格納それたこのオブジェクト種別に対応する、換算表を選択する(ACT10)。   Based on the object type information Io, a conversion table corresponding to this object type stored in advance is selected (ACT 10).

次に、選択された例えば図5に示す換算表を参照することにより、画素数比(P1/P2)に基づいて、オブジェクトの量を算出する(ACT11)。   Next, by referring to the selected conversion table shown in FIG. 5, for example, the amount of the object is calculated based on the pixel number ratio (P1 / P2) (ACT11).

ループカウンタiを1だけインクリメントする処理を行う(ACT12)。   A process of incrementing the loop counter i by 1 is performed (ACT12).

そして、判断ブロックで、ループカウンタiがN未満か否かを判定する(ACT13)。ACT13において、iがN未満の場合(Yes)は、ACT6に戻り、ACT13までを繰り返す。他方、ACT13において、iがN未満でない場合(No)は、処理を終了する。   Then, in the determination block, it is determined whether or not the loop counter i is less than N (ACT 13). In ACT13, when i is less than N (Yes), the process returns to ACT6 and repeats up to ACT13. On the other hand, in ACT13, when i is not less than N (No), the process ends.

以下、入力画像の例として食事画像を取り上げ、盛り付けられた料理の量を推定する具体的な処理について、図6のフローチャートに沿って説明する。この説明で取り上げる食事画像例を、図3を用いる。図3の画像は、トレー上にご飯、汁物、主菜などが配置された内容となっている。   Hereinafter, a specific process of taking a meal image as an example of an input image and estimating the amount of dishes arranged will be described with reference to the flowchart of FIG. FIG. 3 is used as an example of a meal image taken up in this description. The image in FIG. 3 shows the contents in which rice, soup, main dishes, etc. are arranged on the tray.

ACT12に単位要素画像V1としてご飯1粒の画像を切り出す。ACT13では、ご飯1粒画像の画素数を算出する。ACT14では、料理の領域を計量対象画像V2として切り出す。図3の画像の場合は、ご飯、汁物、主菜(揚げ物)、副菜1(生野菜)、副菜2(和え物)といった5個の領域が抽出される。   An image of one grain of rice is cut out as a unit element image V1 in ACT12. In ACT13, the number of pixels of one rice grain image is calculated. In ACT 14, the cooking area is cut out as the measurement target image V2. In the case of the image of FIG. 3, five regions such as rice, soup, main dish (fried food), side dish 1 (raw vegetables), side dish 2 (warmed dishes) are extracted.

そこで、領域数Nの値として[5]を保持する。図3の画像において、どの料理の領域が第何番目の計量対象画像となるかは、ACT14のアルゴリズムに依存する。この例のアルゴリズムは、次の(1)〜(5)の結果が得られたものとする。   Therefore, [5] is held as the value of the number N of regions. In the image of FIG. 3, which cooking region is the first measurement target image depends on the algorithm of ACT 14. The algorithm of this example assumes that the following results (1) to (5) are obtained.

(1) 第1番目の計量対象画像: ご飯
(2) 第2番目の計量対象画像: 汁物
(3) 第3番目の計量対象画像: 主菜(揚げ物)
(4) 第4番目の計量対象画像: 副菜1(生野菜)
(5) 第5番目の計量対象画像: 副菜2(和え物)
例えば、第1番目の計量対象画像V1であるご飯部分の画像は、図4のようになっている。
(1) First measurement target image: rice (2) Second measurement target image: soup (3) Third measurement target image: main dish (fried food)
(4) Fourth measurement target image: side dish 1 (raw vegetables)
(5) Fifth measurement object image: side dish 2 (sauce)
For example, the image of the rice portion which is the first measurement target image V1 is as shown in FIG.

ACT6からACT11までの一連の処理は、領域数Nが5であるから、カウンタi(整数)が0から4までの5回繰り返される。各回の処理内容は、次の通りである。   The series of processing from ACT6 to ACT11 is repeated five times from 0 to 4 as the counter i (integer) because the number of areas N is 5. The contents of each process are as follows.

i=0のとき
ACT6では、第1番目の計量対象画像すなわちご飯部分の画像を注目対象とする。
When i = 0 In ACT6, the first weighing target image, that is, the image of the rice portion is set as the target of attention.

ACT7では、ご飯部分の画像の画素数P1を算出する。   In ACT7, the pixel number P1 of the image of the rice portion is calculated.

ACT8では、ご飯部分の画像の画素数P1を、ご飯1粒画像の画素数P2で除算することにより、ご飯部分についての画素数比(P1/P2)を求める。   In ACT8, the pixel number ratio (P1 / P2) for the rice portion is obtained by dividing the number of pixels P1 of the image of the rice portion by the number of pixels P2 of the rice grain image.

ACT9では、「ご飯茶碗に盛り付けられたご飯」を表すオブジェクト種別情報Ioを生成する。   In ACT 9, object type information Io representing “rice served in a rice bowl” is generated.

ACT10では、「ご飯茶碗に盛り付けられたご飯」に対応する換算表を選択する。   In ACT10, a conversion table corresponding to “rice served in a rice bowl” is selected.

ACT11では、選択された換算表を参照することにより、画素数比に基づいて、入力画像の一部であるご飯部分の画像に写っている「ご飯茶碗に盛り付けられたご飯」の量を出力する。   In ACT11, by referring to the selected conversion table, based on the pixel number ratio, the amount of “rice served in the rice bowl” that is reflected in the image of the rice portion that is a part of the input image is output. .

i=1のとき
ACT6では、第2番目の計量対象画像V1、すなわち汁物部分の画像を注目対象とする。
When i = 1 In ACT6, the second measurement target image V1, that is, the image of the soup portion is the target of attention.

ACT7では、汁物部分の画像の画素数P1を算出する。   In ACT7, the pixel number P1 of the image of the soup portion is calculated.

ACT8では、汁物部分の画像の画素数P1を、ご飯1粒画像の画素数P2で除算することにより、汁物部分についての画素数比(P1/P2)を求める。   In ACT8, the pixel number ratio (P1 / P2) for the soup portion is obtained by dividing the pixel number P1 of the image of the soup portion by the pixel number P2 of the one grain image of rice.

ACT9では、「お椀に盛り付けられた味噌汁」を表すオブジェクト種別情報Ioを生成する。   In ACT 9, object type information Io representing “miso soup arranged in the bowl” is generated.

ACT10では、「お椀に盛り付けられた味噌汁」に対応する換算表を選択する。   In ACT 10, a conversion table corresponding to “miso soup arranged in the bowl” is selected.

ACT11では、選択された換算表を参照することにより、画素数比(P1/P2)に基づいて、入力画像の一部である汁物部分に写っている「お椀に盛り付けられた味噌汁」の量を出力する。   In ACT11, by referring to the selected conversion table, based on the pixel number ratio (P1 / P2), the amount of “miso soup placed in the bowl” reflected in the soup portion that is a part of the input image is calculated. Output.

i=2のとき
ACT6では、第3番目の計量対象画像V1、すなわち主菜(揚げ物)部分の画像を注目対象とする。
When i = 2 In ACT6, the third weighing target image V1, that is, the image of the main dish (fried food) portion is set as the target of attention.

ACT7では、主菜(揚げ物)部分の画像の画素数P1を算出する。   In ACT7, the pixel number P1 of the image of the main dish (fried food) part is calculated.

ACT8では、主菜(揚げ物)部分の画像の画素数P1を、ご飯1粒画像の画素数P2で除算することにより、主菜(揚げ物)部分についての画素数比を求める。   In ACT8, the pixel number ratio for the main dish (fried food) portion is obtained by dividing the pixel number P1 of the image of the main dish (fried food) portion by the pixel number P2 of the one grain image of rice.

ACT9では、「皿に盛り付けられたトンカツ」を表すオブジェクト種別情報Ioを生成する。   In ACT 9, object type information Io representing “tonkatsu arranged on a plate” is generated.

ACT10では、「皿に盛り付けられたトンカツ」に対応する換算表を選択する。   In ACT10, a conversion table corresponding to “tonkatsu arranged on a plate” is selected.

ACT11では、選択された換算表を参照することにより、画素数比(P1/P2)に基づいて、入力画像の一部である主菜(揚げ物)部分に写っている「皿に盛り付けられたトンカツ」の量を出力する。   In ACT11, by referring to the selected conversion table, based on the pixel number ratio (P1 / P2), the “tonkatsu on the plate” shown in the main dish (fried food) portion which is a part of the input image. Is output.

i=3のとき
ACT6では、第4番目の計量対象画像V1、すなわち副菜1(生野菜)部分の画像を注目対象とする。
When i = 3 In ACT6, the fourth measurement target image V1, that is, the image of the side dish 1 (raw vegetable) portion is the target of attention.

ACT7では、副菜1(生野菜)部分の画像の画素数P1を算出する。   In ACT7, the pixel number P1 of the image of the side dish 1 (raw vegetable) part is calculated.

ACT8では、副菜1(生野菜)部分の画像の画素数P1を、ご飯1粒画像の画素数P2で除算することにより、副菜1(生野菜)部分についての画素数比(P1/P2)を求める。   In ACT8, the pixel number ratio (P1 / P2) for the side dish 1 (raw vegetable) part is obtained by dividing the pixel number P1 of the side dish 1 (raw vegetable) part by the pixel number P2 of the rice 1 grain image. )

ACT9では、「皿に盛り付けられた千切りキャベツ」を表すオブジェクト種別情報Ioを生成する。   In ACT 9, object type information Io representing “chopped cabbage on the plate” is generated.

ACT10では、「皿に盛り付けられた千切りキャベツ」に対応する換算表を選択する。   In ACT 10, a conversion table corresponding to “chopped cabbage on the plate” is selected.

ACT11では、選択された換算表を参照することにより、画素数比(P1/P2)に基づいて、入力画像(入力画像の一部である副菜1(生野菜)部分の画像)に写っている「皿に盛り付けられた千切りキャベツ」の量を出力する。   In ACT11, by referring to the selected conversion table, based on the pixel number ratio (P1 / P2), it is reflected in the input image (the image of the side dish 1 (raw vegetables) part which is a part of the input image). The amount of “chopped cabbage on the plate” is output.

i=4のとき
ACT6では、第5番目の計量対象画像V1すなわち副菜2(和え物)部分の画像を注目対象とする。
When i = 4 In ACT 6, the fifth measurement target image V 1, that is, the image of the side dish 2 (sauce product) portion is set as the target of attention.

ACT7では、副菜2(和え物)部分の画像の画素数P1を算出する。   In ACT7, the number of pixels P1 of the image of the side dish 2 (sauce) portion is calculated.

ACT8では、副菜2(和え物)部分の画像の画素数P1を、ご飯1粒画像の画素数P2で除算することにより、副菜2(和え物)部分についての画素数比(P1/P2)を求める。   In ACT8, the pixel number ratio (P1 / P2) for the side dish 2 (sauce product) part is obtained by dividing the pixel number P1 of the side dish 2 (sauce product) part by the pixel number P2 of the rice 1 grain image. Ask.

ACT9では、「皿に盛り付けられたポテトサラダ」を表すオブジェクト種別情報Ioを生成する。   In ACT 9, object type information Io representing “a potato salad on a plate” is generated.

ACT10では、「皿に盛り付けられたポテトサラダ」に対応する換算表を選択する。   In ACT 10, a conversion table corresponding to “a potato salad on a plate” is selected.

ACT11では、選択された換算表を参照することにより、画素数比(P1/P2)に基づいて、入力画像の一部である副菜2(和え物)部分に写っている「皿に盛り付けられたポテトサラダ」の量を出力する。   In ACT11, by referring to the selected conversion table, based on the pixel number ratio (P1 / P2), the side dish 2 (sauce product) that is a part of the input image is displayed on the plate. The amount of “potato salad” is output.

以上のようにして、図3の入力画像に写されている食事の、全品目の量が取得される。   As described above, the amount of all items of the meal shown in the input image of FIG. 3 is acquired.

この実施形態では、食事画像だけから食事摂取量が取得できるため、食事記録が簡単になり、食事管理システムの使い勝手が向上する。   In this embodiment, since the meal intake can be acquired from only the meal image, meal recording is simplified, and usability of the meal management system is improved.

上記の実施形態では、食事の記録例を挙げたが、これに限るものではない。例えば、店舗における量り売り商品の簡易的な計量決済法として応用できる。上記での単位要素画像V1は、ご飯1粒分とした。量り売りの商品が例えば豆類であった場合は、基準となる豆の1粒分の画素数とこの画素数に対する換算表をあらかじめ格納しておく。そして、オペレータが豆類を選択することにより、豆類の分量を推定することが可能となる。   In the above embodiment, an example of recording a meal is given, but the present invention is not limited to this. For example, the present invention can be applied as a simple weighing method for measuring and selling products in stores. The unit element image V1 described above is for one grain of rice. If the product sold by weight is, for example, beans, the number of pixels of one bean serving as a reference and a conversion table for this number of pixels are stored in advance. Then, the amount of beans can be estimated by the operator selecting the beans.

豆類以外にも、小さく数量の多い電子部品や機械部品などのようなものの分量を推定することにも利用可能である。   In addition to beans, it can also be used to estimate the quantity of things such as small and large quantities of electronic parts and machine parts.

いくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、組み合わせ、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments have been described, these embodiments have been presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, combinations, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

21 計量対象切出部
22 単位要素切出部
23 計量対象画素数算出部
24 単位要素画素数算出部
25 除算部
26 オブジェクト種類識別部
27 換算表供給部
28 オブジェクト量推定部
21 Measurement target cutout unit 22 Unit element cutout unit 23 Measurement target pixel number calculation unit 24 Unit element pixel number calculation unit 25 Division unit 26 Object type identification unit 27 Conversion table supply unit 28 Object amount estimation unit

Claims (6)

デジタル画像から計量対象オブジェクトに相当する計量対象画像を切り出す計量対象切出部と、
前記デジタル画像から計量単位となるオブジェクトに相当する単位要素画像を切り出す単位要素切出部と、
前記計量対象画像の画素数を算出する計量対象画素数算出部と、
前記単位要素画像の画素数を算出する単位要素画素数算出部と、
前記計量対象画像の画素数を前記単位要素画像の画素数で除算する除算部と、
前記除算部による除算結果に基づいて、前記計量対象オブジェクトの推定量を算出するオブジェクト量推定部と、を備えた画像処理装置。
A measurement target cutout unit that cuts out a measurement target image corresponding to the measurement target object from the digital image;
A unit element cutout unit for cutting out a unit element image corresponding to an object as a unit of measurement from the digital image;
A measurement target pixel number calculating unit for calculating the number of pixels of the measurement target image;
A unit element pixel number calculation unit for calculating the number of pixels of the unit element image;
A division unit for dividing the number of pixels of the measurement target image by the number of pixels of the unit element image;
An image processing apparatus comprising: an object amount estimating unit that calculates an estimated amount of the measurement target object based on a division result by the dividing unit.
前記単位要素切出部の計量単位は、計量対象に基づきあらかじめ記憶された複数の計量単位から選択可能とした、請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the unit of measurement of the unit element cutout unit is selectable from a plurality of units of measurement stored in advance based on a measurement target. 前記オブジェクト量推定部は、前記計量対象切出部で切り出された計量対象画像のオブジェクトの種類を識別するオブジェクト識別情報に基づき、あらかじめ用意された換算表から量を推定した、請求項1記載の画像処理装置。   The said object amount estimation part estimated the quantity from the conversion table prepared beforehand based on the object identification information which identifies the kind of object of the measurement object image cut out by the said measurement object cutting part. Image processing device. 前記オブジェクト識別情報は、前記計量対象画像に対応のオブジェクト識別情報を入力するか、前記計量対象画像を画像認識することにより取得した、請求項3記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the object identification information is acquired by inputting object identification information corresponding to the measurement target image or by recognizing the measurement target image. 前記オブジェクト量推定部は、前記計量対象切出部で切り出された計量対象オブジェクトの数だけ繰り返し推定した、請求項1〜4のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the object amount estimation unit repeatedly estimates the number of measurement target objects extracted by the measurement target extraction unit. 対象のオブジェクト画像から量を取得する画像処理装置をコンピュータによって制御するプログラムであって、
デジタル画像から計量対象オブジェクトに相当する計量対象画像を切り出す計量対象切出部と、
前記デジタル画像から計量単位となるオブジェクトに相当する単位要素画像を切り出す単位要素切出部と、
前記計量対象画像の画素数を算出する計量対象画素数算出部と、
前記単位要素画像の画素数を算出する単位要素画素数算出部と、
前記計量対象画像の画素数を前記単位要素画像の画素数で除算する除算部と、
前記除算部による除算結果に基づいて、前記計量対象オブジェクトの推定量を算出するオブジェクト量推定部と、として機能させるプログラム。
A program for controlling, by a computer, an image processing apparatus that acquires an amount from a target object image,
A measurement target cutout unit that cuts out a measurement target image corresponding to the measurement target object from the digital image;
A unit element cutout unit for cutting out a unit element image corresponding to an object as a unit of measurement from the digital image;
A measurement target pixel number calculating unit for calculating the number of pixels of the measurement target image;
A unit element pixel number calculation unit for calculating the number of pixels of the unit element image;
A division unit for dividing the number of pixels of the measurement target image by the number of pixels of the unit element image;
A program that functions as an object amount estimation unit that calculates an estimation amount of the measurement target object based on a division result by the division unit.
JP2013185295A 2013-09-06 2013-09-06 Image processor and program Pending JP2015052906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013185295A JP2015052906A (en) 2013-09-06 2013-09-06 Image processor and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013185295A JP2015052906A (en) 2013-09-06 2013-09-06 Image processor and program

Publications (1)

Publication Number Publication Date
JP2015052906A true JP2015052906A (en) 2015-03-19

Family

ID=52701896

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013185295A Pending JP2015052906A (en) 2013-09-06 2013-09-06 Image processor and program

Country Status (1)

Country Link
JP (1) JP2015052906A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005017190A (en) * 2003-06-27 2005-01-20 Yamamoto Co Ltd Apparatus for determining state of granular specimen
JP2008217702A (en) * 2007-03-07 2008-09-18 Fujifilm Corp Photographing device and photographing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005017190A (en) * 2003-06-27 2005-01-20 Yamamoto Co Ltd Apparatus for determining state of granular specimen
JP2008217702A (en) * 2007-03-07 2008-09-18 Fujifilm Corp Photographing device and photographing method

Similar Documents

Publication Publication Date Title
US10441112B1 (en) Food preparation system and method using a scale that allows and stores modifications to recipes based on a measured change to one of its ingredients
US9576034B2 (en) Recipe presentation system and recipe presentation method
US9165398B2 (en) Analysis of food items captured in digital images
US11823042B2 (en) System for measuring food weight
US9703928B2 (en) Information processing apparatus, method, and computer-readable storage medium for generating food item images
US20160247118A1 (en) Methods and systems for accessing inventory using smart containers
US9424495B1 (en) Digital food imaging analysis: system and method to analyze food consumption
US20140095479A1 (en) Device, method, and system for recipe recommendation and recipe ingredient management
US20140074830A1 (en) Device for presenting recipe and method for presenting recipe
CN108073906B (en) Method and device for detecting nutrient components of dishes, cooking utensil and readable storage medium
JP6177068B2 (en) Store system
CN112053428A (en) Method and device for identifying nutritional information contained in food
US9524409B1 (en) Food storage container tag system and method
JP6416429B1 (en) Information processing apparatus, information processing method, information processing program, and content distribution system
JP2024038478A (en) Cooking area estimation device
EP3848870A1 (en) Nutritional value calculation of a dish
JP2015052906A (en) Image processor and program
JP2021128388A (en) Data generation device, learned model generation device, weighing machine and data generation method
CN110348298A (en) The determination method, device and equipment of food product production information
JP2018049584A (en) Meal size estimation program, meal size estimation method, and meal size estimation apparatus
JP6429344B1 (en) Information processing system, information processing method, and information processing program
WO2018008686A1 (en) Management system for managing nutritional component in meal
CN113631070B (en) Method and system for determining cooking time
US20180068585A1 (en) Apparatus and method for estimating actual dietary content of meal of user
EP3725193A1 (en) A method for determining a cooking time and a system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150729

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150804

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151001

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20151027