【発明の詳細な説明】[Detailed description of the invention]
この発明は、四角な形状なした物品等を基準値と比較し
、その大きさ、及び形状を判別する物品等の判別装置に
関するものである。 ゛例えば、油揚で℃・なり寿司を
作るとき、油揚の外形寸法が不揃いであったり、外形寸
法が基準値にあっても形状が異常であると、いなり寿司
として出来上がったとき大きさ、形に不揃いが生じ、著
しく商品価値を低下させるととkなる。そのため、現状
では人間が目Sにより大よその選別を行なっているが、
油揚の製造が機械化されているときは、その製造スピー
ドが早く適格な選別が困難であった。
この発明は、かふる点Kかんがみなされたもので、油揚
のように四角な形状をした被判別物を移送過程で撮影し
、その撮影11vf#祈しThe present invention relates to an article discriminating device that compares square-shaped articles with reference values and determines their size and shape.゛For example, when making ℃・narizushi using deep-fried tofu, if the outer dimensions of the fried tofu are irregular, or if the outer dimensions are within standard values but the shape is abnormal, the size and shape of the finished inari-zushi may vary. If irregularities occur and the product value is significantly reduced. Therefore, at present, humans generally perform selection using their eyes S.
When the production of fried tofu was mechanized, the production speed was so fast that it was difficult to properly sort the tofu. This invention is based on the Kafuru point K, in which a rectangular shaped object like fried tofu is photographed during the transportation process, and the
【被判別物の寸法、形状をデ
ータとして抽出し、選別のための判別を高速で行うこと
ができる形状判別装置を提供するものである。
以下、この発−の−実施例として油揚の寸法。
及びその形状を判別する方法及び装置について述べる。
〆1図〜第3図はこの発明による寸法、及び形状の判別
方法を説明する図画で、第illは四角の辺の寸法算出
法、第2IIIは辺のわん1度の算出法。
第3図は直角度の算出法をそれぞれ図示したものである
。
まず、館46!IIK示すように移送されている油揚U
v一枚ずつテレビカメラ1で撮像する。撮倫画は後述す
るデータ解析装置2に送られ、油揚の外形をデータとし
て抽出する。抽出すべきデータは、撮僚画面上KXY座
標系を設定して油揚の撮像外形を複数の点でサンプリン
グし、これらの座標を求めたものである。
例えば、算1図に示すよ5に撮像された油揚の外形を辺
A1辺B2辺C9辺りで示し、辺り上の複数のサンプリ
ング点P1〜P、の座標YPt(Xtsys)〜P、
(スm−7m)とし文末める。この場合、油揚の四隅は
通常丸みな持っているため、その部分・、 b、 ee
dの辺上にある点はサンプリングしない方がよいが、
物品によっては(四隅の形状が重要な場合)サンプリン
グしてもよい0次にサンプリング点P1〜P、の重心座
標P−(xaa ya )を求める。こへでいう重心座
標Pd(xar ya )は、のように計算される。
辺Aの重心座標P@ (X@y Ya )e辺Bの重心
座標Pb (”h # )’11 ) e辺Cの重心座
標P、(x、、y−も、重心座標P−と同様な計算によ
ってそれぞれの辺上りサンプリング点集金から求められ
る。
このような重心座標の概念を導入すると、辺(A、B、
C,D)K凸凹があり直線でない場合もサンプリングさ
れた点集合から近似的に直線と仮定したとぎの中心座標
が求まる。
すると、油揚の平均的なたて寸法とよと寸法は相対する
辺の重心座標間の距離として求めることができるので−
Pa−h間の距離ねとs P、−p−間の距離!、を算
出すれば、油揚の外形な四角形とした場合の平均的な外
形寸法とすることができる。
したがって、上述した外形寸法’I、’!を基準寸法規
格と比較すれば、その偏差値から油揚の寸法が規格内に
あるか、規格外にあるかを判別でき、さらkその大小に
ついても選別することができる。
次に、油揚の外形異常の判別を行う。
m2rlAKオイテ、Pa # P、、 # P、 #
pHは前述した辺A9辺B1辺C2辺りの重心座標で
あり、l、。
l、はPa−3間、及びP、−P−間な結んだ線分であ
る。ところで、油揚の場合は正常形のものは正方形、或
いは長方形に近い形のものとするから前記線分嶋と!、
の交点の座標vP、としたとき、次の第(2)式な満足
するものを正常形とし、満足しないものを異常形と判別
することができる。
ここで、Kは辺(A、B、C,D)のわん白皮の許容値
を示す定数で、Kが0に近い糧、辺が直線Krx−・こ
とを示している・
第3図は前述した判別において基準寸法にある場合でも
、油揚の四角形状として不適当なものを判別するため、
四隅の直角度を判別する一つの手法を示したもので、前
記線分1.と!、の交点P。
で形成される/p、 p、 P−の角度を算出し、19
0°−l Pa Pa P41≦0 ・・・・・・・・
・・・・ (3)の演算を行う。この算(3)式で定数
θは前記にと同様に規格の許容値を示したもので、θが
Oに近し・程、隅角が直角に近いということができる。
以上述べた3種類の判別規準を満たしている油揚を、規
準の寸法及び形状にあるものとして使用すれば、商品と
して揃ったものが提供できる。しかし、規準に外れる油
揚についても、許容値θ。
KV満足している同一形状にあるものはその外形寸法で
選別すれば、一応商品とし【揃ったものが提供できるの
で、第4図で示すようにデータ解析装置2の、出力で動
作する選別装置3によって、エアノズルN1. N、の
パルプを制御し、油揚な大。
中、小に選別するようkしてもよい。
次に、前述した油揚の外形を複数の点でサンプリングし
、その座標をメモリに書き込むための画情処理装置の一
実施例をfs5図〜第7図で説明する。
第5図はTVカメラ1がキャッチした油揚の撮影IFを
示したもので、TVIiWSの左上隅なXY座標の原点
0とし、カメラの水平走査方向をX軸、[1直走査方向
’tY軸とする。
第6図において、11はTV左カメラ12は前記TV左
カメラ1の映倫出力から水平・垂直同期パルスを分離す
る同期分離回路、13は水平同期パルスを計数するカウ
ンタで垂直同期パルスによって0にリセットされる。1
4はX@の座標を計測するためのりpツクパルスを出力
する発振器、15.16は前記発振器14の出力を計数
する第】、及び第2のカウンタで水平同期パルスによっ
てリセットされる。17は映像信号の明暗を2億信号(
H,L)とするレベル検出器で比較器、又はシュミット
回路で構成される。18は微分回路、1@はマイクルブ
ーセッサ21.メモリ200Å出力インタフェース回路
を示す。
つづいて、その動作を第7図の波形図と共に説明する。
まず、第5図においてKMで示す!に番目の水平期間に
形成されるTVカメラ11の映倫信号は、第7図のyw
傷信号示される。このYt傷信号水平同期パルスHlは
同期分離回路12によって分離され、カウンタ13でに
番目のパルスとして針数される。(この計数値がY座標
の値Ytを与える)前記水平同期パルスH0は第1のカ
ウンタ15゜及び第2のカウンタ16のリセット信号に
使用されているので、この点から前記第1.第2のカウ
ンタ15,16はりpツク信号CKの計数をスタートす
る。レベル検出器1Tの出力波形り、は油揚の外形を示
す映倫信号Yfの点Y1でHレベル。
点Y、でLレベルになるので、この出力波形り。
を微分する微分回路18にはP、なる立上りエラ9パル
スとP、なる立下りエツジパルスが発生する。したがっ
て、この立上りエツジパルスPrが入出力インタ7工−
ス回WI119を介してマイクロプロセッサ21に入力
されたときりpツク信号CKtカウントしている第1の
カウンタ15の計数値XI、及びカウンタ13の計数値
ガをメモリ20に書き込み、立下りエツジパルスP、が
入出力インタフよ1回路111Y介してマイクロプロセ
ッサ21に入力されたとき、同様に第2のカウンタ16
の計数値Xl、及びカウンタ13の計数値Ytt’メモ
l720に書き込むように制御すれば、Y、波形で示さ
れる油揚の外形位置Y、、Y、のXY座標がそれぞれ”
++ Ft)”we yg)として/4す2゜K格納さ
れる。以下、同様に第に+1番目以降の水平期間にも同
様な動作でメモt+20に油揚の外形位置tXY座標と
して記録して行く。このよう圧して一画面分の油揚の外
形座標がメモリ2oに格納されると、垂直同期パルスに
よってカウンタ13がリセットされ、次に移送されて来
る油揚の撮倭に備える。このときメモリ201C書き込
まれて(・る油揚の外形位Ilv示すサンプル値(x−
y)は、1イクロプロセツサ21によって前述した第f
tl、 (21,(31式の演算を行い、その結果を選
別制御回路22&C出力する。メモ1J201c書き込
まれたXY座標な示すデータは、Y座標の最大値y□8
を記録した時の座標を’Yct”c)e 最小値yIl
、I。
を記録したときの座標”Yas X、)、 X座標の最
大値X□8を記録したときの座標@(x4.Ya)e最
小値Xm1eV記録しタトきの座1[’l (Xb e
7b )とすると、前記各座標は油揚の角Co a
s do bの座lliを示していることになる。し
たがって、X < x@ @ Y < ’fbの座標
は辺aのサンプル点x < xc e y < yh
の座標は辺すのサンプル点x > Xs * Y >
7dの座標は辺dのサンプル点x > Xc #
Y > 1−の座標は辺Cのサンプル点な示すことにな
り、メモリ20に記録されているデータから任意の辺の
サンプル点のデータな抽出することができ、前記した館
(1)式の重心座標(P、。
Pb # Pep Pi )の算出ができる0重心
座標(P、。
八e Ppm Pd)が算出されると線分11とl、は
簡皐に一次方稿式で表現でき、交点P、の座1[(x、
。
ye)も求めることができる。したがって、形状の判別
を行う前記第(2)式 # (3)式の演算もマイクロ
プロセッサ21で容易に演算処理することができる。
このようにしてマイク−プロセッサ21で演算された結
果は、前述したように選別装置3に出力され、形状の適
否1寸法の大きさに応じて選別するものである。
以上、四角形状の物品として油揚の場合について詳述し
たが、四角形状のものは油揚にか工わらず、他の物品で
もよ℃・ことはいうまでもなし・。さらに物品の外形を
サンプルする手段も第5図〜第7図の実施例に限定され
るものではない。
以上説明したように、この発明は、四角形状の判定に重
心座標という概念を導入し、その座標点ン利用して物品
の寸法及び形状を基準値と比較するよう罠したので、筒
車な演算機能で形状の判別ができ、それだけ判別速度を
向上させることができるとt・う利点な有するものであ
る。[This invention provides a shape discriminating device that can extract the dimensions and shapes of objects to be discriminated as data and perform discrimination for sorting at high speed. Below, as an example of this development, the dimensions of fried tofu are shown. A method and apparatus for determining the shape of the object and its shape will be described. Figures 1 to 3 are drawings for explaining the method for determining dimensions and shapes according to the present invention, in which the figure 111 shows a method for calculating the side dimensions of a square, and the figure 2 III shows a method for calculating the 1 degree of a side. FIG. 3 illustrates each method for calculating the squareness. First, Hall 46! Aburaage U being transferred as shown in IIK
v images are taken one by one with the television camera 1. The captured image is sent to a data analysis device 2, which will be described later, and the external shape of the fried tofu is extracted as data. The data to be extracted is obtained by setting a KXY coordinate system on the photographer's screen, sampling the imaged outline of the fried tofu at a plurality of points, and determining these coordinates. For example, as shown in Figure 1, the outer shape of the fried tofu imaged in Figure 5 is shown around side A1, side B2, and side C9, and the coordinates of multiple sampling points P1 to P on the area are YPt(Xtsys) to P,
(Sm-7m) and end the sentence. In this case, the four corners of fried tofu are usually rounded, so those parts... b, ee
It is better not to sample points on the edge of d, but
Depending on the article (if the shape of the four corners is important), the centroid coordinates P-(xaa ya ) of the zero-order sampling points P1 to P, which may be sampled, are determined. The center of gravity coordinate Pd(xarya) here is calculated as follows. Coordinates of the center of gravity of side A P@ (X@y Ya)e Coordinates of the center of gravity of side B Pb ("h #)'11) It is obtained from the collection of sampling points on each edge by a calculation. When we introduce the concept of the center of gravity coordinates, the edges (A, B,
C, D) Even if there are irregularities and the line is not a straight line, the center coordinates of the line, which is approximately assumed to be a straight line, can be determined from the sampled point set. Then, the average vertical and horizontal dimensions of the fried tofu can be found as the distance between the barycentric coordinates of the opposing sides, so −
Distance between Pa-h and s Distance between P, -p-! By calculating , it is possible to determine the average external dimensions of the fried tofu if it is a rectangular external shape. Therefore, the external dimensions 'I,' mentioned above! By comparing the tofu with the standard size standard, it can be determined from the deviation value whether the size of the fried tofu is within the standard or outside the standard, and it is also possible to sort out its size. Next, an abnormality in the external shape of the fried tofu is determined. m2rlAK Oite, Pa #P,, #P, #
The pH is the center of gravity coordinates of the aforementioned sides A9, B1, and C2, and is l. l is a line segment connecting Pa-3, P, -P-. By the way, in the case of deep-fried tofu, the normal shape is square or close to rectangular, so the above-mentioned line island! ,
When the coordinates of the intersection point are vP, those that satisfy the following equation (2) can be determined to be normal forms, and those that do not satisfy the following equation (2) can be determined to be abnormal forms. Here, K is a constant indicating the permissible value of dog skin on the sides (A, B, C, D), which indicates that K is close to 0 and the side is a straight line Krx-. In order to determine if the square shape of fried tofu is inappropriate even if it is within the standard size in the above-mentioned determination,
This shows one method for determining the squareness of the four corners. and! , the intersection point P. Calculate the angle of /p, p, P- formed by 19
0°-l Pa Pa P41≦0・・・・・・・・・
... Perform the calculation in (3). In this equation (3), the constant θ indicates the standard tolerance value as described above, and it can be said that the closer θ is to O, the closer the corner angle is to a right angle. If fried tofu that satisfies the above-mentioned three types of discrimination criteria is used as having the dimensions and shape of the criteria, a complete product can be provided. However, even for fried tofu that does not meet the standards, the allowable value θ is set. Items with the same shape that satisfy the KV can be sorted by their external dimensions, and then they can be treated as products. 3, air nozzle N1. Control the pulp of N, and fry tofu. You may also choose to sort into medium and small. Next, an embodiment of the image processing device for sampling the external shape of the fried tofu at a plurality of points and writing the coordinates into the memory will be described with reference to FIGS. FS5 to 7. Figure 5 shows the photographing IF of the fried tofu caught by the TV camera 1. The origin of the XY coordinates is 0, which is the upper left corner of the TVIiWS, and the horizontal scanning direction of the camera is the X axis, and the horizontal scanning direction is the do. In FIG. 6, 11 is a sync separation circuit that separates horizontal and vertical sync pulses from the video output of the TV left camera 1, and 13 is a counter that counts horizontal sync pulses, which is reset to 0 by the vertical sync pulse. be done. 1
4 is an oscillator that outputs a multiplier pulse for measuring the coordinate of X@, 15.16 is a counter that counts the output of the oscillator 14, and a second counter that is reset by a horizontal synchronizing pulse. 17 uses 200 million signals (
A level detector (H, L) consisting of a comparator or a Schmitt circuit. 18 is a differential circuit, 1@ is a microbussessor 21. A memory 200A output interface circuit is shown. Next, the operation will be explained with reference to the waveform diagram in FIG. 7. First, in Fig. 5, it is indicated by KM! The video signal of the TV camera 11 formed in the second horizontal period is yw in FIG.
Scratch signal is indicated. This Yt flaw signal horizontal synchronization pulse Hl is separated by a synchronization separation circuit 12 and counted by a counter 13 as the th pulse. (This count value gives the Y coordinate value Yt) The horizontal synchronizing pulse H0 is used as a reset signal for the first counter 15° and the second counter 16, so from this point, the first... The second counters 15 and 16 start counting the p-clock signal CK. The output waveform of the level detector 1T is at H level at point Y1 of the Eirin signal Yf, which indicates the outer shape of the fried tofu. Since it becomes L level at point Y, this output waveform is obtained. The differentiating circuit 18 that differentiates 9 pulses with a rising edge of P and a falling edge pulse with P. Therefore, this rising edge pulse Pr
When input to the microprocessor 21 via the switch WI119, the count value XI of the first counter 15 which is counting the threshold signal CKt and the count value of the counter 13 are written into the memory 20, and the falling edge pulse P, When input to the microprocessor 21 via the input/output interface 1 circuit 111Y, the second counter 16
If the count value Xl of the counter 13 and the count value Ytt' of the counter 13 are controlled to be written in the memory 1720, the XY coordinates of the external position Y, , Y, of the fried tofu indicated by the waveform Y, respectively.
++Ft)"we yg)/4s2°K is stored. Hereafter, the same operation is performed for the +1st and subsequent horizontal periods, and the outer shape position of the fried tofu is recorded as the tXY coordinates in the memo t+20. When the external coordinates of the fried tofu for one screen are stored in the memory 2o in this way, the counter 13 is reset by the vertical synchronization pulse and is prepared for photographing the next fried tofu.At this time, the data written in the memory 201C The sample value (x-
y) is the above-mentioned f-th
tl, (21, (Calculate equation 31 and output the result to the sorting control circuit 22&C.Memo 1J201c written XY coordinate data indicates the maximum value of Y coordinate y□8
The coordinates when recorded are 'Yct'c)e Minimum value yIl
,I. Coordinates when recording ``Yas X,), coordinates when recording maximum value of X□8 of
7b), each of the above coordinates is the angle of aburaage Co a
This indicates the locus of s do b. Therefore, the coordinates of X < x @ @ Y <'fb are the sample points of side a
The coordinates of is the sample point x > Xs * Y >
The coordinates of 7d are the sample point x of side d > Xc #
The coordinates of Y > 1- indicate the sample point of side C, and the data of the sample point of any side can be extracted from the data recorded in the memory 20, and the above equation (1) can be obtained. The centroid coordinates (P,. Pb # Pep Pi ) can be calculated. Once the centroid coordinates (P,. 8e Ppm Pd) have been calculated, the line segments 11 and l can be easily expressed in a linear quadratic formula, Locus 1 of the intersection P, [(x,
. ye) can also be found. Therefore, the microprocessor 21 can easily perform calculations of the equations (2) and (3) for determining the shape. The results calculated by the microphone processor 21 in this manner are output to the sorting device 3 as described above, and are sorted according to the suitability of the shape and the size of the dimensions. Above, we have described in detail the case of fried tofu as a square-shaped item, but it goes without saying that the square-shaped item can be used not only for fried tofu but also for other items. Furthermore, the means for sampling the external shape of the article is not limited to the embodiments shown in FIGS. 5 to 7. As explained above, this invention introduces the concept of barycentric coordinates to determine the rectangular shape, and uses the coordinate points to compare the dimensions and shape of the article with reference values, so it is easy to perform hourly calculations. It has the advantage that the shape can be discriminated by the function and the discrimination speed can be improved accordingly.
【図面の簡単な説明】[Brief explanation of drawings]
第1図〜第3図は四角形状の判別基準を説明する図、第
4図はこの発明が利用できる物品の選別装置の概略図、
第5図〜第7図は図形データを抽出するこの発明の一実
施例を示すもので、第5図は撮倫図、第6図は図形デー
タ抽出回路のプpツク図、#E7図は第6図の各部波形
図である。
図中、1はTVカメラ、2は図形処理装置、3は選別装
置を示す。
第4図
第5図
第6図
第7図
一一一一一 にH−一一一(に+1)H−11FIGS. 1 to 3 are diagrams illustrating the square-shaped discrimination criteria, and FIG. 4 is a schematic diagram of an article sorting device to which this invention can be used.
Figures 5 to 7 show an embodiment of the present invention for extracting graphic data. Figure 5 is a photographic diagram, Figure 6 is a block diagram of a graphic data extraction circuit, and Figure #E7 is a diagram of a graphic data extraction circuit. 7 is a waveform diagram of each part in FIG. 6. FIG. In the figure, 1 is a TV camera, 2 is a graphic processing device, and 3 is a sorting device. Figure 4 Figure 5 Figure 6 Figure 7 Figure 7