JPH0989539A - Testing device for fruit and vegetable - Google Patents

Testing device for fruit and vegetable

Info

Publication number
JPH0989539A
JPH0989539A JP7240391A JP24039195A JPH0989539A JP H0989539 A JPH0989539 A JP H0989539A JP 7240391 A JP7240391 A JP 7240391A JP 24039195 A JP24039195 A JP 24039195A JP H0989539 A JPH0989539 A JP H0989539A
Authority
JP
Japan
Prior art keywords
color
scanning
value
test
image data
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.)
Granted
Application number
JP7240391A
Other languages
Japanese (ja)
Other versions
JP2696166B2 (en
Inventor
Masahiko Chiba
昌彦 千葉
Takeshi Tenma
毅 天間
Norimitsu Hanamatsu
憲光 花松
Fujitoshi Shinoki
藤敏 篠木
Tomoyuki Kudo
朋幸 工藤
Shunichi Mikami
俊一 三上
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.)
AOMORI PREF GOV
TOWA DENKI KOGYO KK
Aomori Prefecture
Original Assignee
AOMORI PREF GOV
TOWA DENKI KOGYO KK
Aomori Prefecture
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 AOMORI PREF GOV, TOWA DENKI KOGYO KK, Aomori Prefecture filed Critical AOMORI PREF GOV
Priority to JP7240391A priority Critical patent/JP2696166B2/en
Publication of JPH0989539A publication Critical patent/JPH0989539A/en
Application granted granted Critical
Publication of JP2696166B2 publication Critical patent/JP2696166B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To accurate test even when a subject for testing has portions where illumination undergoes total reflections by calculating an area using the coordinates of the contour of the subject for testing. SOLUTION: A subject T for testing is scanned by a scan means 13 in two directions from the right and left of the direction of X-axis in the order of scanning lines, and its coordinates are stored in a coordinate storage means 18 as the contour points of the subject T for testing. After the scans are complete, the area within the contour Ta of the subject T for testing is calculated by a size data calculation means 19 from the coordinates stored in the coordinate storage means 18, and this area value is used as data regarding size. The photographed part of the subject T for testing is thus recognized. In this case, since the area is calculated from the coordinates of the contour Ta, even if the subject T for testing has portions called highlights Tb produced by light, where illumination undergoes total reflections, these highlights Tb are also involved in calculation of the area for the correctness of the area value.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、カラーカメラを用
いて撮像した青果物、例えばりんご等の農産物の大きさ
検定及び色検定を行なうための青果物の検定装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for testing fruits and vegetables for carrying out size inspection and color inspection of fruits and vegetables such as apples imaged by a color camera.

【0002】[0002]

【従来の技術】従来、この種の検定装置としては、例え
ば、青果物の検定対象物をカラー撮像し、この撮像した
画像の赤,緑,青の各成分強度データを画素毎に記憶
し、この記憶結果に基づいて検定対象物の大きさ及び色
に係るデータを算出するようにしたものがある。この従
来の検定装置においては、大きさを求める際には、撮像
した画像を全走査し、対象物を赤成分画像、緑成分画像
または青成分画像のいずれか一つの画像あるいは明度画
像から二値化等の手段を用いて対象物を抽出し、画素数
を計数するようにしている。
2. Description of the Related Art Conventionally, as a test device of this type, for example, an object to be tested for fruits and vegetables is imaged in color, and red, green, and blue component intensity data of the imaged image are stored for each pixel. There is one that calculates data relating to the size and color of the test object based on the storage result. In this conventional verification device, when obtaining the size, all the captured images are scanned, and the object is binary image from any one of the red component image, the green component image, and the blue component image or the brightness image. The object is extracted by using a means such as conversion, and the number of pixels is counted.

【0003】また、色に係るデータを算出する際には、
撮像した画像を全走査し、各画素毎に赤、緑、青の色成
分の和で得られる明度と、各成分がその画素の明度に対
する比率で得られる色度を用い、画像全体にわたりその
色度によって対象物かどうかを判別し、対象物を構成す
る画素について平均値を求めるようにしていた。
When calculating color data,
The entire image is scanned, and the brightness obtained for each pixel by the sum of the red, green, and blue color components, and the chromaticity obtained by the ratio of each component to the brightness of that pixel Whether or not the object is the object is discriminated by the degree, and the average value of the pixels forming the object is calculated.

【0004】[0004]

【発明が解決しようとする課題】ところで、上記の従来
の検定装置にあって、大きさを求める際には、検定対象
物にハイライトといわれる照明が全反射する部分につい
ては、抽出を行なうことができないので、実際の面積よ
りも小さく測定してしまい、正確な検定ができないとい
う問題があった。また、大きさ及び色に係るデータを、
夫々、画像の全走査により求めるようにしているので、
全走査を2度行なわなければならないことになり、それ
だけ、時間がかかってしまい、迅速な判定ができなくな
るという問題があった。
By the way, in the above-described conventional inspection apparatus, when the size is obtained, extraction is performed for the portion where the illumination called the highlight is totally reflected on the inspection object. Therefore, there is a problem that an accurate test cannot be performed because the measurement is made smaller than the actual area. In addition, size and color data,
Since each is obtained by scanning the entire image,
All the scans have to be performed twice, which takes time, and there is a problem that quick determination cannot be performed.

【0005】本発明は、上記の問題点に鑑みて為された
もので、大きさを正確に求めることができるようにする
とともに、全走査を2度行なわなくても大きさ及び色に
係るデータを求めることができるようにし検定の時間短
縮を図って効率を向上させる検定装置を提供することを
目的とする。
The present invention has been made in view of the above problems, and makes it possible to accurately determine the size, and to perform data related to the size and color without performing the entire scanning twice. It is an object of the present invention to provide an assay device capable of obtaining the above-mentioned value, shortening the assay time, and improving the efficiency.

【0006】[0006]

【課題を解決するための手段】このような目的を達成す
るため、本発明の青果物の検定装置は、青果物の検定対
象物をカラー撮像する撮像器と、該撮像器が撮像した画
像の赤,緑,青の各成分強度データを画素毎に記憶する
画像データ記憶手段とを備え、該画像データ記憶手段が
記憶した画像データに基づいて検定対象物の撮像した部
位の大きさ及び色に係るデータを算出する青果物の検定
装置において、上記画像を検定対象物の輪郭線の外から
内へ向けて走査線毎に走査する走査手段と、該走査手段
の走査により画像データ記憶手段が記憶した画素毎の
赤,緑,青の各成分強度の内必要な強度を上記の走査順
に読出す画像データ読出し手段と、該画像データ読出し
手段が読出した強度の所定の関係に係る画素毎の検定値
を上記の読出し順に演算する検定値演算手段と、該検定
値演算手段が演算した検定値と予め定めた基準値とを上
記の演算順に比較する比較手段と、該比較手段の比較に
より検定値が基準値に対して所定の関係であるとき上記
走査手段の走査を当該走査線について停止して次の走査
線の走査に移行させる走査停止移行手段と、該走査停止
移行手段が停止した走査線の当該停止位置の座標を読取
って検定対象物の輪郭点として記憶する座標記憶手段
と、該座標記憶手段が記憶した座標から検定対象物の輪
郭線内の面積を算出しこの面積値を大きさに係るデータ
とする大きさデータ算出手段と、上記座標記憶手段が記
憶した座標から検定対象物の輪郭線の内側のみについて
再走査して検定対象物の色に係るデータを算出する色デ
ータ算出手段とを備えた構成としている。
In order to achieve such an object, an apparatus for assaying fruits and vegetables according to the present invention includes an imager for color-imaging an object to be inspected for fruits and vegetables, a red image picked up by the imager, Image data storage means for storing each component intensity data of green and blue for each pixel, and data relating to the size and color of the imaged part of the test object based on the image data stored in the image data storage means In the verification apparatus for fruits and vegetables for calculating, the scanning means scans the image for each scanning line from the outside to the inside of the contour line of the test object, and for each pixel stored in the image data storage means by the scanning of the scanning means. Of the red, green, and blue component intensities, the image data reading means for reading out the required intensity in the above scanning order, and the test value for each pixel relating to the predetermined relationship of the intensities read by the image data reading means In order of reading A test value calculating means for calculating, a comparing means for comparing the test value calculated by the test value calculating means with a predetermined reference value in the order of the above calculation, and a test value by the comparison of the comparing means with respect to the reference value. Scan stop transition means for stopping the scan of the scanning means for the scan line and shifting to the scan of the next scan line when there is a predetermined relationship, and the coordinates of the stop position of the scan line stopped by the scan stop transition means. And a coordinate storage means for reading and storing the contour points of the test object, and an area within the contour line of the test object calculated from the coordinates stored in the coordinate storage means, and the area value is used as data relating to the size. And a color data calculating means for rescanning only the inside of the contour line of the test object from the coordinates stored in the coordinate storage means to calculate data relating to the color of the test object. Are

【0007】そして、必要に応じ、上記色データ算出手
段を、上記座標記憶手段が記憶した座標から検定対象物
の輪郭線の内側のみについて再走査する再走査手段と、
該再走査手段の走査により上記画像データ記憶手段が記
憶した画素毎の赤,緑,青の各成分強度の内必要な強度
を上記の走査順に読出す色画像データ読出し手段と、該
色画像データ読出し手段が読出した強度の所定の関係に
係る画素毎の色検定値を上記の読出し順に演算する色検
定値演算手段と、該色検定値演算手段が演算した色検定
値と予め定めた色基準値とを上記の演算順に比較する色
値比較手段と、該色値比較手段の比較により色検定値が
色基準値に対して所定の関係であるときの画素数を累計
してこの累計値を算出する画素数累計手段とを備えて構
成している。
Rescanning means for rescanning only the inside of the contour line of the test object from the coordinates stored in the coordinate storage means, if necessary,
Color image data read-out means for reading out the necessary intensities of the red, green, and blue component intensities for each pixel stored in the image data storage means by the rescanning means, and the color image data. A color test value calculating means for calculating the color test value for each pixel relating to a predetermined relationship of the intensity read by the reading means in the order of reading, a color test value calculated by the color test value calculating means, and a predetermined color reference. The value is compared with the color value comparison means in the order of the above calculation, and the number of pixels when the color test value has a predetermined relationship with the color reference value by the comparison of the color value comparison means And a pixel number accumulating means for calculating.

【0008】[0008]

【発明の実施の形態】以下、添付図面に基づいて本発明
の実施の形態に係る青果物の検定装置について説明す
る。この検定装置は、青果物としてリンゴを連続的に検
定する装置である。図1及び図2に示す本発明の実施の
形態に係る青果物の検定装置において、1は青果物とし
てのリンゴの検定対象物Tを搬送するベルトコンベアで
あって、進行方向に沿って等間隔で列設され検定対象物
Tであるリンゴをその芯の軸線が垂直になり樹木への接
続側を上にして保持する複数のホルダ2を有している。
BEST MODE FOR CARRYING OUT THE INVENTION A vegetable and fruit testing device according to an embodiment of the present invention will be described below with reference to the accompanying drawings. This test device is a device for continuously testing apples as fruits and vegetables. In the fruit and vegetable inspection device according to the embodiment of the present invention shown in FIGS. 1 and 2, 1 is a belt conveyor that conveys an inspection object T of apples as fruits and vegetables, which are arranged at equal intervals along the traveling direction. There is provided a plurality of holders 2 for holding an apple, which is an object T to be inspected, which has the axis of its core vertical and the connection side to the tree is up.

【0009】3はベルトコンベア1の搬送途上に設けら
れホルダ2に保持された検定対象物Tを真上からカラー
撮像するCCDカメラ等の撮像器である。4は検定対象
物Tを斜め上から照らすライトである。上記の撮像器3
及びライト4は遮光ボックス5内に設けられている。こ
の遮光ボックス5は、検定しようとする検定対象物Tを
覆って上記ライト4以外の光線を遮断するものである。
遮光ボックス5の出入口には検定対象物Tが通過可能な
例えばすだれ状部(図示せず)が設けられている。6は
タイミングセンサであって、検定対象物Tが撮像器3の
撮像位置に位置したとき撮像器3に撮像を行なわせるた
めのものである。
Reference numeral 3 is an image pickup device such as a CCD camera which is provided on the way of conveyance of the belt conveyer 1 and color-images the test object T held by the holder 2 from directly above. Reference numeral 4 is a light that illuminates the test object T from diagonally above. Imager 3 above
The light 4 and the light 4 are provided in the light shielding box 5. The light shielding box 5 covers the test object T to be tested and blocks light rays other than the light 4.
At the entrance and exit of the light shielding box 5, for example, a comb-shaped portion (not shown) through which the test object T can pass is provided. A timing sensor 6 is for causing the image pickup device 3 to take an image when the test object T is located at the image pickup position of the image pickup device 3.

【0010】10はCPU等の機能を搭載した制御部、
11は画像等の各種データを表示するCRT等の表示部
である。制御部10において、図1に示すように、12
は撮像器3が撮像した画像の赤成分強度(R),緑成分
強度(G),青成分強度(B)の各成分強度データを画
素毎に記憶する画像データ記憶手段である。また、画像
は、例えば、縦512画素×横512画素の離散的な画
像としている。13は上記画像を検定対象物Tの輪郭線
Taの外から内へ向けて走査線毎に走査する走査手段で
あり、例えば、画像の境界から2方向もしくは4方向に
走査する。2方向の場合には、図1においてX軸方向の
左側からと右側からの2方向であり、4方向の場合に
は、上記のX方向の2方向と、Y軸方向の上側からと下
側からの2方向との4方向となる。この例では、X軸方
向の左側からと右側からの2方向(順走査及び逆走査)
に走査する場合で説明する。
Reference numeral 10 denotes a control unit having functions such as a CPU,
Reference numeral 11 denotes a display unit such as a CRT that displays various data such as images. In the control unit 10, as shown in FIG.
Is an image data storage means for storing, for each pixel, component intensity data of red component intensity (R), green component intensity (G), and blue component intensity (B) of the image captured by the image pickup device 3. The image is a discrete image of 512 pixels in the vertical direction and 512 pixels in the horizontal direction, for example. Reference numeral 13 denotes a scanning unit that scans the above-mentioned image for each scanning line from the outside to the inside of the contour line Ta of the test object T, and, for example, scans in two or four directions from the boundary of the image. In the case of two directions, there are two directions from the left side and the right side in the X-axis direction in FIG. 1, and in the case of four directions, the above-mentioned two directions in the X direction and the upper side and the lower side in the Y-axis direction. There are 4 directions, 2 directions from. In this example, two directions from the left and right in the X-axis direction (forward scan and reverse scan)
The case of scanning in will be described.

【0011】14は走査手段13の走査により画像デー
タ記憶手段12が記憶した画素毎の赤,緑,青の各成分
強度の内必要な強度を上記の走査順に読出す画像データ
読出し手段、15は画像データ読出し手段14が読出し
た強度の所定の関係に係る画素毎の検定値Mを上記の読
出し順に演算する検定値演算手段である。画素毎の検定
値M(M1 〜Mi 〜Mn ,ここでnは全画素数)は、例
えば、赤、緑、青の各々の成分のうち2つの成分の比率
としている。例えば、各画素の赤成分の強度R(R1
i 〜Rn )と緑成分の強度G(G1 〜Gi 〜Gn )の
比(R/G)を用いる(Mi =Ri /Gi )。従って、
画像データ読出し手段14は赤成分の強度R(R1 〜R
i 〜Rn )と緑成分の強度G(G1 〜Gi 〜Gn )を読
出してくる。
Reference numeral 14 is an image data reading means for reading out necessary intensities of red, green, and blue component intensities for each pixel stored in the image data storage means 12 by the scanning of the scanning means 13, and 15 is an image data reading means. It is a verification value calculation means for calculating a verification value M for each pixel relating to a predetermined intensity relationship read out by the image data reading means 14 in the above-mentioned reading order. The test value M (M 1 to M i to M n , where n is the total number of pixels) for each pixel is, for example, the ratio of two components of each of red, green, and blue components. For example, the intensity R (R 1 ~
The ratio (R / G) of R i to R n ) and the intensity G (G 1 to G i to G n ) of the green component is used (M i = R i / G i ). Therefore,
The image data reading means 14 controls the intensity R (R 1 to R) of the red component.
i to R n ) and the green component intensity G (G 1 to G i to G n ) are read out.

【0012】16は検定値演算手段15が演算した検定
値Mi と予め定めた基準値M0 とを上記の演算順に比較
する比較手段である。基準値M0 は、例えば、赤成分の
基準強度R0 と緑成分の基準強度G0 との比(R0 /G
0 )を用いる。実施例としては、例えば、M0 =R0
0 =2.7としている。17は比較手段16の比較に
より検定値Mが基準値M0 に対して所定の関係であると
き上記走査手段13の走査を当該走査線について停止し
て次の走査線の走査に移行させる走査停止移行手段であ
る。所定の関係は以下のように定めている。検定値Mi
<M0 のときは、検定対象物Tが存在しないとして次の
画素に走査を進める。検定値Mi ≧M0 のときは、検定
対象物Tが存在したとして、当該走査線について停止し
て次の走査線の走査に移行させる。
Reference numeral 16 is a comparison means for comparing the test value M i calculated by the test value calculation means 15 with a predetermined reference value M 0 in the above calculation order. The reference value M 0 is, for example, the ratio (R 0 / G) of the reference intensity R 0 of the red component and the reference intensity G 0 of the green component.
0 ) is used. As an example, for example, M 0 = R 0 /
G 0 = 2.7. Reference numeral 17 denotes a scanning stop for stopping the scanning of the scanning unit 13 for the scanning line and shifting to the scanning of the next scanning line when the verification value M has a predetermined relationship with the reference value M 0 by the comparison of the comparison unit 16. It is a means of transition. The predetermined relationship is defined as follows. Test value M i
When <M 0 , it is determined that the test object T does not exist, and scanning is advanced to the next pixel. When the test value M i ≧ M 0 , it is determined that the test object T is present, and the scan line is stopped and the scan of the next scan line is started.

【0013】18は走査停止移行手段17が停止した走
査線の当該停止位置の座標を読取って検定対象物Tの輪
郭点として記憶する座標記憶手段である。即ち、X軸方
向の左側から走査したときの輪郭点の座標fL (X,
Y)とX軸方向の右側から走査したときの輪郭点の座標
R (X,Y)とを記憶する。19は座標記憶手段18
が記憶した座標から検定対象物Tの輪郭線Ta内の面積
を算出しこの面積値を大きさに係るデータとする大きさ
データ算出手段である。面積Sは、以下の式によって求
められる。 S=ΣΔ|fL (X)−fR (X)| 即ち、面積Sは、輪郭線Ta内の画素数となる。
Reference numeral 18 is a coordinate storage means for reading the coordinates of the stop position of the scanning line stopped by the scanning stop transition means 17 and storing the coordinates as the contour points of the test object T. That is, the coordinates f L (X,
Y) and the coordinates f R (X, Y) of the contour point when scanned from the right side in the X-axis direction are stored. Reference numeral 19 is a coordinate storage means 18.
Is a size data calculating means for calculating the area within the contour line Ta of the test object T from the stored coordinates and using the area value as the data related to the size. The area S is calculated by the following formula. S = ΣΔ | f L (X) −f R (X) | That is, the area S is the number of pixels in the contour line Ta.

【0014】20は座標記憶手段18が記憶した座標か
ら検定対象物Tの輪郭線Taの内側のみについて再走査
して検定対象物Tの色に係るデータを算出する色データ
算出手段である。この色データ算出手段20において、
21は上記座標記憶手段18が記憶した座標から検定対
象物Tの輪郭線Taの内側のみについて再走査する再走
査手段である。この再走査は順方向のみ行なう。22は
再走査手段21の走査により上記画像データ記憶手段1
2が記憶した画素毎の赤,緑,青の各成分強度の内必要
な強度を上記の走査順に読出す色画像データ読出し手段
である。
Reference numeral 20 is a color data calculation means for rescanning only the inside of the contour line Ta of the test object T from the coordinates stored in the coordinate storage means 18 to calculate data relating to the color of the test object T. In this color data calculation means 20,
Reference numeral 21 is a rescanning means for rescanning only the inside of the contour line Ta of the test object T from the coordinates stored in the coordinate storage means 18. This rescan is performed only in the forward direction. Reference numeral 22 denotes the image data storage means 1 which is scanned by the rescanning means 21.
2 is a color image data reading means for reading out the necessary intensities of the red, green, and blue component intensities stored for each pixel in the scanning order.

【0015】23は色画像データ読出し手段22が読出
した強度の所定の関係に係る画素毎の色検定値Cを上記
の読出し順に演算する色検定値演算手段である。色検定
値C(C1 〜Ci 〜Cn ,ここでnは全画素数)は、例
えば、赤、緑、青の各々の成分のうち2つの成分の比率
としている。例えば、上記と同様に各画素の赤成分の強
度R(R1 〜Ri 〜Rn )と緑成分の強度G(G1 〜G
i 〜Gn)の比(R/G)を用いる(Ci =Ri /G
i )。従って、色画像データ読出し手段22は赤成分の
強度R(R1 〜Ri 〜Rn )と緑成分の強度G(G1
i 〜Gn )を読出してくる。
Reference numeral 23 is a color test value calculation means for calculating the color test value C for each pixel relating to a predetermined intensity relationship read by the color image data read means 22 in the above-mentioned reading order. The color test value C (C 1 to C i to C n , where n is the total number of pixels) is, for example, the ratio of two components of red, green, and blue components. For example, similar to the above, the intensity R (R 1 to R i to R n ) of the red component and the intensity G (G 1 to G) of the green component of each pixel.
Using the ratio (R / G) of i to G n (C i = R i / G
i ). Therefore, the color image data reading means 22 causes the intensity R (R 1 to R i to R n ) of the red component and the intensity G (G 1 to R n ) of the green component.
G i to G n ) are read out.

【0016】24は色検定値演算手段23が演算した色
検定値Ci と予め定めた色基準値C0 とを上記の演算順
に比較する色値比較手段である。色基準値C0 は、例え
ば、上記と同様に、赤成分の基準強度R0 と緑成分の基
準強度G0 との比(R0 /G0 )を用いる。実施例とし
ては、例えば、上記と同様に、C0 =R0 /G0 =2.
7としている。
Reference numeral 24 is a color value comparison means for comparing the color test value C i calculated by the color test value calculation means 23 with a predetermined color reference value C 0 in the above calculation order. As the color reference value C 0 , for example, the ratio (R 0 / G 0 ) of the reference intensity R 0 of the red component and the reference intensity G 0 of the green component is used, as in the above. As an example, for example, as in the above, C 0 = R 0 / G 0 = 2.
7 is set.

【0017】25は色値比較手段24の比較により色検
定値Cが色基準値に対して所定の関係であるときの画素
数を累計してこの累計値Nを算出する画素数累計手段で
ある。所定の関係は以下のように定めている。色検定値
i <C0 のときは、色が悪いとして累計しない。色検
定値Ci ≧C0 のときは、色が良いとして累計し、その
累計値Nを算出する。26は色に係るデータとする色判
別データ演算手段であり、上記面積Sと累計値Nとの比
をとり、色の判別値H(H=N/S)を演算する。Hが
大きいほど色のつき具合が良いと判別できる。
Reference numeral 25 is a pixel number accumulating means for accumulating the number of pixels when the color test value C has a predetermined relationship with the color reference value by the comparison of the color value comparing means 24 and calculating the accumulated value N. . The predetermined relationship is defined as follows. When the color test value C i <C 0 , the color is bad and the colors are not accumulated. When the color test value C i ≧ C 0 , it is determined that the color is good, and the cumulative total value N is calculated. Reference numeral 26 is a color discrimination data calculation means for making data relating to color, and calculates the color discrimination value H (H = N / S) by taking the ratio of the area S and the cumulative value N. It can be determined that the larger H is, the better the color is.

【0018】次に、本発明の実施の形態に係る青果物の
検定装置の作用について、図3及び図4に示すフローチ
ャートを用いて説明する。図2に示すように、青果物と
してのリンゴの検定対象物Tはベルトコンベア1のホル
ダ2に保持されて順次搬送される。そして、遮光ボック
ス5の撮像器3の真下にくると、ライト4の照明下にお
いて、撮像器3により撮像される(3−1)。そして、
画像データ記憶手段12にこの撮像画像の赤,緑,青の
各成分強度データが画素毎に記憶される(3−2)。
Next, the operation of the apparatus for testing fruits and vegetables according to the embodiment of the present invention will be described with reference to the flow charts shown in FIGS. 3 and 4. As shown in FIG. 2, an inspection object T of apples as fruits and vegetables is held by a holder 2 of a belt conveyor 1 and sequentially conveyed. Then, when it comes directly below the image pickup device 3 of the light shielding box 5, the image pickup device 3 takes an image under the illumination of the light 4 (3-1). And
The red, green, and blue component intensity data of this captured image are stored in the image data storage means 12 for each pixel (3-2).

【0019】この状態で、走査手段13によってX軸方
向の左側からと右側からの2方向(順走査及び逆走査)
の走査が走査線順に行なわれる(3−3〜3−1N)。
この過程において、1つの画素の走査により画像データ
記憶手段12が記憶した画素毎の赤,緑,青の各成分強
度の内必要な強度(赤成分の強度R及び緑成分の強度
G)が読出され(3−4)、検定値演算手段15によっ
て検定値M(Mi=Ri /Gi )が演算され(3−
5)、比較手段16によって検定値演算手段15が演算
した検定値Mi と予め定めた基準値M0 とが比較される
(3−6)。
In this state, the scanning means 13 performs two directions from the left side and the right side in the X-axis direction (forward scanning and reverse scanning).
Scanning is performed in the order of scanning lines (3-3 to 3-1N).
In this process, one pixel is scanned to read out the necessary intensities (red component intensity R and green component intensity G) among the red, green, and blue component intensities stored in the image data storage means 12 for each pixel. (3-4), and the test value calculation means 15 calculates the test value M (M i = R i / G i ) (3
5) The comparison means 16 compares the test value M i calculated by the test value calculation means 15 with the predetermined reference value M 0 (3-6).

【0020】そして、走査停止移行手段17において、
検定値Mi がMi <M0 のときは(3−7N)、検定対
象物Tが存在しないとして次の画素に走査を進める(3
−3〜3−7N)。検定値Mi ≧M0 のときは(3−7
Y)、検定対象物Tが存在したとして、当該走査線につ
いて停止して次の走査線の走査に移行させる(3−
8)。この場合、次の走査線に移行するので、全走査を
行わなくても良く、その分高速化が図られる。そして、
座標記憶手段18によって、X軸方向の左側から走査し
たときの座標fL (X,Y)とX軸方向の右側から走査
したときの座標fR (X,Y)とが記憶される(3−
9)。このようにして、X軸方向の左側からと右側から
の2方向(順走査及び逆走査)の走査が走査線順に行な
われ、各走査線に対応した座標が記憶される(3−
9)。
Then, in the scan stop transition means 17,
When the test value M i is M i <M 0 (3-7N), it is determined that the test object T does not exist, and scanning is advanced to the next pixel (3
-3 to 3-7N). If the test value M i ≧ M 0 (3-7
Y), assuming that the test object T is present, the scanning line is stopped and the scanning of the next scanning line is started (3-).
8). In this case, since the process moves to the next scanning line, it is not necessary to perform all the scanning, and the speed can be increased accordingly. And
The coordinate storage means 18 stores the coordinates f L (X, Y) when scanned from the left side in the X-axis direction and the coordinates f R (X, Y) when scanned from the right side in the X-axis direction (3 −
9). In this manner, scanning in two directions (forward scanning and reverse scanning) from the left side and the right side in the X-axis direction is performed in the scanning line order, and the coordinates corresponding to each scanning line are stored (3-
9).

【0021】次に、全走査が終了すると(3−10
Y)、大きさデータ算出手段19によって、座標記憶手
段18が記憶した座標から検定対象物Tの輪郭線Ta内
の面積を算出しこの面積値を大きさに係るデータとする
(3−11)。これにより、検定対象物Tの撮像した部
位の大きさを認知することができる。この場合、輪郭線
Taの座標によって面積を算出しているので、ライト4
によって検定対象物TにハイライトTbといわれる照明
が全反射する部分があっても、このハイライトTb部分
も面積計算に入れられるので、従来のようにハイライト
Tb部分が抽出されない場合に比較して、実際の面積と
略同等の値となり、そのため、面積値が正確になるので
正確な検定を行なうことができるようになる。
Next, when all the scans are completed (3-10
Y), the size data calculation unit 19 calculates the area within the contour line Ta of the test object T from the coordinates stored in the coordinate storage unit 18, and the area value is used as the size-related data (3-11). . Thereby, the size of the imaged part of the test object T can be recognized. In this case, since the area is calculated by the coordinates of the contour line Ta, the light 4
Even if there is a portion of the test object T that is called the highlight Tb where the illumination is totally reflected, this highlight Tb portion is also included in the area calculation. Therefore, as compared with the conventional case where the highlight Tb portion is not extracted, As a result, the value becomes approximately the same as the actual area, and the area value becomes accurate, so that an accurate test can be performed.

【0022】次に、色データ算出手段20によって、検
定対象物Tの色に係るデータが算出される。この色デー
タ算出手段20においては、図4に示すように、先ず、
再走査手段21によって、座標記憶手段18が記憶した
座標から検定対象物Tの輪郭線Taの内側のみについて
再走査が行なわれる(4−1)。この再走査は順方向の
み行なわれる(4−1〜4−7N)。この場合、輪郭線
Taの内側のみの走査になるので、輪郭線Taの外側に
ついては走査を行なわなくても良く、そのため、全走査
を行なわなくても良いことから、それだけ、高速化が図
られる。
Next, the color data calculating means 20 calculates data relating to the color of the test object T. In the color data calculation means 20, as shown in FIG.
The rescanning means 21 rescans only the inside of the contour line Ta of the test object T from the coordinates stored in the coordinate storage means 18 (4-1). This rescanning is performed only in the forward direction (4-1 to 4-7N). In this case, since scanning is performed only inside the contour line Ta, it is not necessary to perform scanning outside the contour line Ta. Therefore, it is not necessary to perform all scanning, so that the speed can be increased accordingly. .

【0023】この走査の過程において、色画像データ読
出し手段22により、1つの画素の走査により画像デー
タ記憶手段12が記憶した画素毎の赤,緑,青の各成分
強度の内必要な強度(赤成分の強度R及び緑成分の強度
G)が読出され(4−2)、色検定値演算手段23によ
って検定値M(Ci =Ri /Gi )が演算され(4−
3)、色値比較手段24によって色検定値演算手段23
が演算した検定値Ci と予め定めた基準値C0 とが比較
される(4−4)。そして、画素数累計手段25におい
て、色検定値Ci <C0 のときは、色が悪いとして画素
の累計をしない。色検定値Ci ≧C0 のときは、色が良
いとして画素の累計し、その累計値Nを算出する(4−
6)。
In the course of this scanning, the color image data reading means 22 scans one pixel to scan the one pixel, and the necessary intensity (red, red, green, blue) of each component intensity stored in the image data storage means 12 for each pixel. The intensity R of the component and the intensity G of the green component are read (4-2), and the test value M (C i = R i / G i ) is calculated by the color test value calculating means 23 (4-).
3), the color value comparison means 24 causes the color test value calculation means 23
The test value C i calculated by is compared with a predetermined reference value C 0 (4-4). Then, in the pixel number accumulating means 25, when the color test value C i <C 0 , it is determined that the color is bad and the pixels are not accumulated. When the color test value C i ≧ C 0 , it is determined that the color is good, the pixels are accumulated, and the accumulated value N is calculated (4-
6).

【0024】その後、全走査が終了すると(4−7
Y)、色判別データ演算手段26によって、上記の面積
Sと累計値Nとの比が計算され、色の判別値H(H=N
/S)が算出される(4−8)。これにより、検定対象
物Tの撮像した部位の色の度合いを認知することができ
る。即ち、色の判別値Hが大きいほど色のつき具合が良
いと判別できる。
After that, when all the scans are completed (4-7
Y), the ratio of the area S and the cumulative value N is calculated by the color discrimination data calculation means 26, and the color discrimination value H (H = N) is calculated.
/ S) is calculated (4-8). As a result, the degree of color of the imaged portion of the test object T can be recognized. That is, it can be determined that the greater the color discrimination value H, the better the color fit.

【0025】尚、上記実施の態様において、走査手段1
3の走査を画像の境界から2方向にしたが、Y軸方向の
上側からと下側からの2方向からも走査する4方向の走
査としても良く、適宜変更して差し支えない。また、検
定値M,色検定値C,基準値M0 及び色基準値C0 は、
赤及び緑成分の比の設定に限らず、どのように設定して
も良く、適宜変更して差し支えない。また、基準値の値
も適宜変更して差し支えない。更に、上記の実施の態様
においては、青果物としてリンゴを用いた例で説明した
が、必ずしもこれに限定されるものではなく、他の果物
や野菜等どのような種類の青果物にでも本発明を適用で
きることは勿論である。
In the above embodiment, the scanning means 1
Although the scanning of 3 is performed in two directions from the boundary of the image, it may be performed in four directions of scanning from two directions from the upper side and the lower side in the Y-axis direction, and may be appropriately changed. Further, the test value M, the color test value C, the reference value M 0, and the color reference value C 0 are
Not limited to the setting of the ratio of the red and green components, it may be set in any manner and may be changed appropriately. Further, the reference value may be changed as appropriate. Further, in the above embodiment, an example using apples as fruits and vegetables has been described, but the present invention is not limited to this, and the present invention is applied to any kind of fruits and vegetables such as other fruits and vegetables. Of course you can.

【0026】[0026]

【発明の効果】以上説明したように、本発明の青果物の
検定装置によれば、大きさに係るデータの算出において
は、検定対象物の輪郭線の座標によって面積を算出する
ので、検定対象物にハイライトといわれる照明が全反射
する部分があっても、このハイライト部分を含めて面積
計算に入れることができ、従来のようにハイライト部分
が抽出されない場合に比較して、実際の面積と略同等の
値となり、そのため、面積値が正確になるので正確な検
定を行なうことができるという効果がある。また、色に
係るデータの算出においては、検定対象物の輪郭線の内
側のみについて再走査を行なうので、輪郭線の外側につ
いては走査を行なわなくても良く、そのため、全走査を
行なわなくても良いことから、それだけ、高速化を図る
ことができ、大幅に検定の時間短縮を図ることができる
という効果がある。更に、大きさ及び色に係るデータの
算出においては、両者ともに、画像データ記憶手段が記
憶した画素毎の赤,緑,青の各成分強度という同一のフ
ァクタを用いて行なうので、それだけ、計算効率が良
く、この点でも、高速化を図ることができる。
As described above, according to the inspection apparatus for fruits and vegetables of the present invention, in calculating the data relating to the size, the area is calculated by the coordinates of the contour line of the inspection object, and therefore the inspection object. Even if there is a part where the illumination is totally reflected in the area, it can be included in the area calculation including this highlight part, and the actual area compared to the case where the highlight part is not extracted as in the past And the area value becomes accurate, so that an accurate test can be performed. Further, in the calculation of the color-related data, re-scanning is performed only on the inside of the contour line of the test object, so that it is not necessary to perform scanning on the outside of the contour line. Since it is good, there is an effect that the speed can be increased and the time required for the verification can be significantly shortened. Further, both the size and the color data are calculated by using the same factor of the red, green, and blue component intensities of each pixel stored in the image data storage means. It is good, and also in this respect, it is possible to increase the speed.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施の形態に係る青果物の検定装置の
要部を示すブロック図である。
FIG. 1 is a block diagram showing a main part of an apparatus for testing fruits and vegetables according to an embodiment of the present invention.

【図2】本発明の実施の形態に係る青果物の検定装置を
示す全体図である。
FIG. 2 is an overall view showing a vegetable and fruit testing device according to an embodiment of the present invention.

【図3】本発明の実施の形態に係る青果物の検定装置の
動作工程を示すフローチャート図である。
FIG. 3 is a flow chart diagram showing operation steps of the fruit and vegetable inspection apparatus according to the embodiment of the present invention.

【図4】本発明の実施の形態に係る青果物の検定装置の
動作工程を示すフローチャート図である。
FIG. 4 is a flow chart diagram showing operation steps of the fruit and vegetable inspection apparatus according to the embodiment of the present invention.

【符号の説明】[Explanation of symbols]

T 検定対象物 Ta 輪郭線 Tb ハイライト 1 コンベア 2 ホルダ 3 撮像器 4 ライト 5 遮光ボックス 6 タイミングセンサ 10 制御部 11 表示部 12 画像データ記憶手段 13 走査手段 14 画像データ読出し手段 15 検定値演算手段 16 比較手段 17 走査停止移行手段 18 座標記憶手段 19 大きさデータ算出手段 20 色データ算出手段 21 再走査手段 22 色画像データ読出し手段 23 色検定値演算手段 24 色値比較手段 25 画素数累計手段 26 色判別データ演算手段 M(M0 〜Mi 〜Mn ) 検定値 R(R1 〜Ri 〜Rn ) 赤成分強度 G(G1 〜Gi 〜Gn ) 緑成分強度 B 青成分強度 M0 基準値 S 面積 C (C1 〜Ci 〜Cn )色検定値 C0 色基準値 H 色の判別値T Test object Ta Contour line Tb Highlight 1 Conveyor 2 Holder 3 Imager 4 Light 5 Light-blocking box 6 Timing sensor 10 Control unit 11 Display unit 12 Image data storage unit 13 Scanning unit 14 Image data reading unit 15 Test value calculating unit 16 Comparison means 17 Scan stop transition means 18 Coordinate storage means 19 Size data calculation means 20 Color data calculation means 21 Rescanning means 22 Color image data reading means 23 Color test value calculation means 24 Color value comparison means 25 Pixel accumulation means 26 colors Discrimination data calculation means M (M 0 to M i to M n ) Test value R (R 1 to R i to R n ) Red component intensity G (G 1 to G i to G n ) Green component intensity B Blue component intensity M 0 reference value S area C (C 1 to C i to C n ) color test value C 0 color reference value H color discrimination value

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06T 7/60 G06F 15/70 355 (72)発明者 花松 憲光 青森県青森市大字八ツ役字芦谷202の4 青森県産業技術開発センター内 (72)発明者 篠木 藤敏 青森県青森市大字八ツ役字芦谷202の4 青森県産業技術開発センター内 (72)発明者 工藤 朋幸 青森県弘前市大字金属町5番地1 東和電 機工業株式会社内 (72)発明者 三上 俊一 青森県弘前市大字金属町5番地1 東和電 機工業株式会社内─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification number Internal reference number FI Technical display location G06T 7/60 G06F 15/70 355 (72) Inventor Norimitsu Hanamatsu Aomori City, Aomori 8 Role Ashiya 202-4, Aomori Prefecture Industrial Technology Development Center (72) Inventor Fujitoshi Shino Aomori-shi, Aomori-city Yatsutsu Role Ashiya 202-4, Aomori Industrial Technology Development Center (72) Inventor Tomoyuki Kudo Aomori Prefecture Towa Denki Kogyo Co., Ltd., 1-5 Oita-Metalcho, Hirosaki-shi (72) Inventor Shunichi Mikami 5-5 Ohta-Metal-cho, Hirosaki City, Aomori Prefecture Towa Denki Co., Ltd

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 青果物の検定対象物をカラー撮像する撮
像器と、該撮像器が撮像した画像の赤,緑,青の各成分
強度データを画素毎に記憶する画像データ記憶手段とを
備え、該画像データ記憶手段が記憶した画像データに基
づいて検定対象物の撮像した部位の大きさ及び色に係る
データを算出する青果物の検定装置において、 上記画像を検定対象物の輪郭線の外から内へ向けて走査
線毎に走査する走査手段と、 該走査手段の走査により画像データ記憶手段が記憶した
画素毎の赤,緑,青の各成分強度の内必要な強度を上記
の走査順に読出す画像データ読出し手段と、 該画像データ読出し手段が読出した強度の所定の関係に
係る画素毎の検定値を上記の読出し順に演算する検定値
演算手段と、 該検定値演算手段が演算した検定値と予め定めた基準値
とを上記の演算順に比較する比較手段と、 該比較手段の比較により検定値が基準値に対して所定の
関係であるとき上記走査手段の走査を当該走査線につい
て停止して次の走査線の走査に移行させる走査停止移行
手段と、 該走査停止移行手段が停止した走査線の当該停止位置の
座標を読取って検定対象物の輪郭点として記憶する座標
記憶手段と、 該座標記憶手段が記憶した座標から検定対象物の輪郭線
内の面積を算出しこの面積値を大きさに係るデータとす
る大きさデータ算出手段と、 上記座標記憶手段が記憶した座標から検定対象物の輪郭
線の内側のみについて再走査して検定対象物の色に係る
データを算出する色データ算出手段と、を備えたことを
特徴とする青果物の検定装置。
1. An image pickup device for color-picking up an image of an object to be tested for fruits and vegetables, and image data storage means for storing, for each pixel, red, green, and blue component intensity data of an image picked up by the image pickup device. In a fruit and vegetable test apparatus for calculating data relating to the size and color of a part of a test object imaged based on the image data stored in the image data storage means, the image is obtained from outside the contour line of the test object. Scanning means for scanning each scanning line toward, and necessary intensity among the red, green, and blue component intensities of each pixel stored in the image data storage means by the scanning of the scanning means is read in the above scanning order. An image data read-out means, a test value calculation means for calculating a test value for each pixel relating to a predetermined intensity relationship read by the image data read-out order in the reading order, and a test value calculated by the test value calculation means. Predetermined Comparing means for comparing the quasi-value with the above-mentioned calculation order, and when the comparison value of the comparing means has a predetermined relationship with the reference value, the scanning of the scanning means is stopped for the scanning line and the next scanning is performed. Scanning stop transition means for shifting to line scanning, coordinate storage means for reading the coordinates of the stop position of the scanning line stopped by the scanning stop transition means, and storing the coordinates as contour points of the test object, and the coordinate storage means. A size data calculating means for calculating the area in the contour line of the test object from the stored coordinates and using the area value as data relating to the size, and the contour line of the test object from the coordinates stored in the coordinate storage means. And a color data calculating unit that rescans only the inside to calculate data related to the color of the test object.
【請求項2】 上記色データ算出手段を、上記座標記憶
手段が記憶した座標から検定対象物の輪郭線の内側のみ
について再走査する再走査手段と、 該再走査手段の走査により上記画像データ記憶手段が記
憶した画素毎の赤,緑,青の各成分強度の内必要な強度
を上記の走査順に読出す色画像データ読出し手段と、 該色画像データ読出し手段が読出した強度の所定の関係
に係る画素毎の色検定値を上記の読出し順に演算する色
検定値演算手段と、 該色検定値演算手段が演算した色検定値と予め定めた色
基準値とを上記の演算順に比較する色値比較手段と、 該色値比較手段の比較により色検定値が色基準値に対し
て所定の関係であるときの画素数を累計してこの累計値
を算出する画素数累計手段と、を備えて構成したことを
特徴とする請求項1記載の青果物の検定装置。
2. Rescanning means for rescanning the color data calculating means only from the coordinates stored in the coordinate storage means only inside the contour line of the test object, and the image data storage by scanning of the rescanning means. There is a predetermined relationship between the color image data read-out means for reading out the necessary intensities of the red, green, and blue component intensities for each pixel stored in the means in the above-described scanning order and the intensity read out by the color image data read-out means. A color test value calculation means for calculating the color test value for each pixel in the above-mentioned reading order, and a color value for comparing the color test value calculated by the color test value calculation means with a predetermined color reference value in the above calculation order. Comparing means, and a pixel number accumulating means for accumulating the number of pixels when the color test value has a predetermined relationship with the color reference value by the comparison of the color value comparing means to calculate the accumulated value. It is constituted, It is characterized by the above-mentioned. Test apparatus of the placing of fruits and vegetables.
JP7240391A 1995-09-20 1995-09-20 Fruit and vegetable testing device Expired - Fee Related JP2696166B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7240391A JP2696166B2 (en) 1995-09-20 1995-09-20 Fruit and vegetable testing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7240391A JP2696166B2 (en) 1995-09-20 1995-09-20 Fruit and vegetable testing device

Publications (2)

Publication Number Publication Date
JPH0989539A true JPH0989539A (en) 1997-04-04
JP2696166B2 JP2696166B2 (en) 1998-01-14

Family

ID=17058790

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7240391A Expired - Fee Related JP2696166B2 (en) 1995-09-20 1995-09-20 Fruit and vegetable testing device

Country Status (1)

Country Link
JP (1) JP2696166B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000146832A (en) * 1998-11-12 2000-05-26 Maasland Nv Method for determining presence of specified material in milk and device for executing this method
ES2401624R1 (en) * 2011-10-03 2013-06-21 Univ Huelva PORTABLE DEVICE FOR THE RECOGNITION OF THE MATURITY OF FRUITS

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000146832A (en) * 1998-11-12 2000-05-26 Maasland Nv Method for determining presence of specified material in milk and device for executing this method
ES2401624R1 (en) * 2011-10-03 2013-06-21 Univ Huelva PORTABLE DEVICE FOR THE RECOGNITION OF THE MATURITY OF FRUITS

Also Published As

Publication number Publication date
JP2696166B2 (en) 1998-01-14

Similar Documents

Publication Publication Date Title
JP6348289B2 (en) Inspection apparatus and inspection method
CN201765193U (en) Object checking system
JPH07159337A (en) Fault inspection method for semiconductor element
US20040217261A1 (en) Device for counting stacked products
US5245424A (en) Defect detection method
EP0870274A1 (en) Inspection system for exterior article surfaces
JPH0989539A (en) Testing device for fruit and vegetable
JPH09318547A (en) Appearance inspection method and apparatus for farm product
JP2710527B2 (en) Inspection equipment for periodic patterns
KR101012626B1 (en) Method and apparatus for defective pixel detection based on the human visual system
JP3001079B2 (en) Printed character inspection method and printed character inspection device
JPH04364449A (en) Fruit defect detecting apparatus
JPH0560537A (en) Through-hole inspection device
JP2621690B2 (en) Printing defect inspection equipment
JPH11175727A (en) Inspection method and device therefor
JPH08166380A (en) Automatic bruise detector for vegitable and fruit
JP2876999B2 (en) Printing defect inspection equipment
JP2756738B2 (en) Apparatus for visual inspection of semiconductor devices
JPH08189901A (en) Testing device using picture signal
JPH0682390A (en) Method and apparatus for inspecting surface defect
JPH04147002A (en) Inspecting apparatus of surface of fruit and vegetable
JP3412732B2 (en) Defect inspection method and apparatus
JP2529505B2 (en) Wiring pattern inspection device
JPH0749569Y2 (en) Egg counting device
JPH05272945A (en) Apparatus for inspecting bent part of lead

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R370 Written measure of declining of transfer procedure

Free format text: JAPANESE INTERMEDIATE CODE: R370