JPS62250981A - Selector - Google Patents

Selector

Info

Publication number
JPS62250981A
JPS62250981A JP9612286A JP9612286A JPS62250981A JP S62250981 A JPS62250981 A JP S62250981A JP 9612286 A JP9612286 A JP 9612286A JP 9612286 A JP9612286 A JP 9612286A JP S62250981 A JPS62250981 A JP S62250981A
Authority
JP
Japan
Prior art keywords
inspected
pixel
cpu
color tone
pixels
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
JP9612286A
Other languages
Japanese (ja)
Other versions
JPH0366953B2 (en
Inventor
英樹 内田
浩一 皆川
花沢 一之
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.)
Niigata Engineering Co Ltd
Original Assignee
Niigata Engineering Co Ltd
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 Niigata Engineering Co Ltd filed Critical Niigata Engineering Co Ltd
Priority to JP9612286A priority Critical patent/JPS62250981A/en
Publication of JPS62250981A publication Critical patent/JPS62250981A/en
Publication of JPH0366953B2 publication Critical patent/JPH0366953B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Sorting Of Articles (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、ぶどうの果実のように、複数の被検査体が
重なり合って位置するものの選別を自動的に行うことの
できる選別装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a sorting device that can automatically sort objects such as grapes in which a plurality of objects to be inspected overlap each other.

[発明の背景] 現在、ぶどう選果場では一般に、検査員が目視により選
果評定を行っている。すなわち、検査員は、色標本によ
ってぶどうの色を評定し、これに粒の大きさ、房の形状
等の評定を加味して各等級に選別している。
[Background of the Invention] Currently, in grape sorting plants, inspectors generally perform fruit sorting and evaluation visually. That is, the inspector evaluates the color of the grapes using a color sample, and then sorts the grapes into each grade based on evaluations of the size of the grapes, the shape of the bunch, etc.

[発明が解決しようとする問題点コ ところで、ぶどうの最盛期には一日に約−万箱もの検査
をしなければならないため、上述した従来の選別方法で
は、検査員の疲労等の体調および検査員の個人差のため
に検査のばらつきが生じてしまう、 この発明は、このような背景の下になされたもので、ぶ
どうの果実などのように重なり合って位置する被検査体
の選別を、評価結果にばらつきがなく、自動的に行うこ
とのできる選別装置を提供することを目的とする。
[Problems to be Solved by the Invention] By the way, during the peak grape season, approximately 10,000 boxes of grapes must be inspected per day, so the conventional sorting method described above does not allow for the physical condition of the inspectors such as fatigue. Inspection variations occur due to individual differences among inspectors.This invention was made against this background. It is an object of the present invention to provide a sorting device that can perform automatic sorting without variations in evaluation results.

[問題点を解決するための手段] 上記問題点を解決するためにこの発明は、ぶどうの果実
のように重なり合って位置する複数の被検査体を撮像す
る撮像手段と、前記撮像手段の出力から前記各被検査体
の輪郭を抽出する抽出手段と、前記輪郭から前記被検査
体の大きさおよびそのばらつきを判定する形状判定手段
と、前記被検査体に光を照射し反射光から前記被検査体
の色調に対応する信号を得る色差計と、前記色差計の出
力により前記被検査体の色調を判定する色調判定手段と
を具備し、前記形状判定手段と前記色調判定手段との出
力に基づいて前記被検査体の選別を行うことを要旨とす
る。
[Means for Solving the Problems] In order to solve the above-mentioned problems, the present invention provides an imaging means for imaging a plurality of objects to be inspected that are positioned one on top of the other like the fruits of a grape; extracting means for extracting the outline of each of the objects to be inspected; shape determining means for determining the size of the object to be inspected and its variation from the outline; comprising a color difference meter that obtains a signal corresponding to the color tone of the body; and a color tone determination means for determining the color tone of the object to be inspected based on the output of the color difference meter, and based on the outputs of the shape determination means and the color tone determination means. The gist is to select the objects to be inspected.

また、ぶどうの房の茎のように前記被検査体に混在する
物体を前記撮像手段の出力から抽出し、抽出した物体と
前記被検査体との混在比率を出力する物体判定手段を有
し、前記形状判定手段と色調判定手段と物体判定手段と
の出力に基づいて前記被検査体の選別を行うことを特徴
とする。
Further, it has an object determining means for extracting an object mixed in the object to be inspected, such as a stem of a bunch of grapes, from the output of the imaging means and outputting a mixing ratio of the extracted object and the object to be inspected, The object to be inspected is selected based on the outputs of the shape determining means, color tone determining means, and object determining means.

[作用 ] 上記構成によれば、被検査体の外観形状、および色調を
、予め定めた評価基準と比較することにより、ぶどう等
の被検査体の品質を客観的、かつ自動的に決定すること
ができる。特に、被検査体が重なりあっているような場
合でも、個々の被検査体の輪郭を抽出して判定するので
的確な判定が可能となる。
[Function] According to the above configuration, the quality of the object to be inspected, such as grapes, can be determined objectively and automatically by comparing the external shape and color tone of the object to be inspected with predetermined evaluation criteria. Can be done. In particular, even when the objects to be inspected overlap each other, the contours of each object to be inspected are extracted and judged, making it possible to make accurate judgments.

また、ぶどうの房の茎のように被検査体に混在する物体
と被検査体との混在比率を求め、上記形状および色調に
、この混在比率を併用して被検査体の品質を決定するか
ら、より正確な品質決定が可能となる。
In addition, the quality of the inspected object is determined by determining the mixing ratio of the object mixed with the object being inspected, such as the stem of a bunch of grapes, and using this mixing ratio in conjunction with the shape and color mentioned above. , enabling more accurate quality determination.

[実施例] 以下、図面を参照して、本発明の詳細な説明する。[Example] Hereinafter, the present invention will be described in detail with reference to the drawings.

第1図はこの発明の一実施例による選別装置の全体構成
を示す平面図である。図において、!はL字状に曲折し
たコンベアである。コンベア1は、段ボール箱に収容さ
れて搬入されてくるぶどうを次々と搬送する。
FIG. 1 is a plan view showing the overall configuration of a sorting device according to an embodiment of the present invention. In the figure! is a conveyor bent in an L shape. The conveyor 1 sequentially transports grapes that are housed in cardboard boxes and carried in.

このコンベアlの行路途中には、各種装置が配設されて
いる。まず、段ボール箱に付されたバーコードを読み取
るバーコードリーダ2が設けられ、生産者コードや箱の
種別(1,2,4,8kg)が読み取られる。また、バ
ーコードリーダ2の下流には暗室3が設けられ、この中
に、ぶどうの撮像を行うCCDカメラ4と、色差計5と
か設置されている。なお、これらの詳細は後述する。
Various devices are disposed along the path of the conveyor I. First, a barcode reader 2 is provided to read the barcode attached to the cardboard box, and the manufacturer code and box type (1, 2, 4, 8 kg) are read. Further, a darkroom 3 is provided downstream of the barcode reader 2, and a CCD camera 4 for taking images of grapes and a color difference meter 5 are installed in this darkroom 3. Note that these details will be described later.

コンベア1の更に下流には、スタンプ装置6、選別機構
7が設置されている。スタンプ装置6は、段ボール箱に
等級表示を押すもの、選別機構7は、ぶどうの品質に応
じて一秀、二番、その他等に選別するものである。なお
、この選別に先立って、予め設定されたスイッチによっ
て、4kgの箱とそれ以外の箱とに分離され、4 kg
の箱は対向機8aによって自動対向された後選別を受け
、他の箱は別経路8bを通って上記選別を受けるように
なっている。選別された4kgの箱は、梱包機9によっ
て梱包され出荷される。また、それ以外の箱は、人手に
よって梱包されて出荷される。なお、図中、10はコン
ピュータ制御装置分電盤、+1.12゜13.14.1
5はそれぞれ、段ボール箱の搬入作業員、蓋開は作業員
、蓋閉じ作業員、4kg以外の箱の梱包作業員、4kg
箱の出荷作業員である。
Further downstream of the conveyor 1, a stamp device 6 and a sorting mechanism 7 are installed. The stamp device 6 is used to stamp a grade indication on the cardboard box, and the sorting mechanism 7 is used to sort grapes into first-class, second-class, other, etc. depending on the quality. In addition, prior to this sorting, the 4 kg boxes and other boxes are separated by a preset switch.
The boxes are automatically faced by the opposing machine 8a and then subjected to sorting, while the other boxes pass through a separate route 8b and undergo the above sorting. The sorted 4 kg boxes are packed by a packing machine 9 and shipped. Other boxes are manually packed and shipped. In addition, in the figure, 10 is a computer-controlled device distribution board, +1.12°13.14.1
5 is a worker carrying in cardboard boxes, a worker opening the lid, a worker closing the lid, a worker packing boxes other than 4kg, and a worker carrying 4kg.
He is a worker shipping boxes.

第2図は、第1図の各部を制御する制御装置の全体構成
を示すブロック図である。図において、20は画像処理
装置、30は入出力装置制御装置、40は管理コンピュ
ータである。
FIG. 2 is a block diagram showing the overall configuration of a control device that controls each part of FIG. 1. In the figure, 20 is an image processing device, 30 is an input/output device control device, and 40 is a management computer.

画像処理装置20は、CCDカメラ4の出力信号を赤、
緑、青の3色の信号R、G 、Bに分離する変換器4a
の出力信号を変換、記憶し、これらに一定の処理を施す
ものである。すなわち、画1安処理装置20は、上記n
 、G 、I3信号をディジタル信号に変換し、画像デ
ータとして出力するA/D変換器21R,21G、21
13と、この画像データを記憶するフレームメモリ22
11.22G、22Bと、画像データに後述する処理を
施すCPU23と、CPU23のプログラムや処理に必
要な基礎データを記憶するROM24と、CPU23の
作業エリア等からなるRAM25とから構成される。
The image processing device 20 converts the output signal of the CCD camera 4 into red,
Converter 4a that separates green and blue three color signals R, G, and B
It converts and stores the output signals of , and performs certain processing on them. That is, the image quality processing device 20 performs the above n
, G, and A/D converters 21R, 21G, and 21 that convert the I3 signal into a digital signal and output it as image data.
13, and a frame memory 22 that stores this image data.
11, 22G and 22B, a CPU 23 that performs processing to be described later on image data, a ROM 24 that stores basic data necessary for programs and processing of the CPU 23, and a RAM 25 that is a work area for the CPU 23 and the like.

次に、入出力装置制御装置30は、コンベアlに沿って
配置された各入出力装置を制御するものである。すなわ
ち、バーコードリーダ2からの信号を取り込み、ディジ
タルデータに変換して記憶するバーコードリーグインタ
ーフェイス31と、色差計5から出力されるアナログ信
号を取り込み、ディジタル信号に変換して記憶する色差
計インターフェイス32と、管理コンピュータ40との
信号のやり取りを制御する管理コンピュータインターフ
ェイス33と、画像処理装置20との信号のやり取りを
制御する画像処理装置インターフェイス34と、ライン
制御を行うライン制御インターフェイス35と、このラ
イン制御インターフェイス35に接続された人力接点群
36、出力接点群37、および上記各部に電源供給する
電源部38とから構成されている。
Next, the input/output device control device 30 controls each input/output device arranged along the conveyor 1. That is, a barcode league interface 31 that takes in a signal from the barcode reader 2, converts it into digital data, and stores it, and a color difference meter interface that takes in an analog signal output from the color difference meter 5, converts it into a digital signal, and stores it. 32, a management computer interface 33 that controls the exchange of signals with the management computer 40, an image processing device interface 34 that controls the exchange of signals with the image processing device 20, a line control interface 35 that performs line control, and It is composed of a manual contact group 36 connected to the line control interface 35, an output contact group 37, and a power supply section 38 that supplies power to each of the above sections.

そして、上記各インターフェイス31〜35は、各符号
に添え字aを付したCPUと、添え字すを付したROM
と、添え字Cを付したR A Mとからなっている。例
えば、バーコードリーグインターフェイス31は、CP
U31aと、ROM31bと、RAM31cとから構成
される。
Each of the above-mentioned interfaces 31 to 35 includes a CPU with a suffix a attached to each reference numeral, and a ROM with a suffix suffix attached to each reference numeral.
and RAM with the subscript C. For example, the barcode league interface 31
It is composed of U31a, ROM31b, and RAM31c.

ここで、これらのインターフェイス31〜35のCPU
31a〜35aはシステムバス39.aによって相互に
接続されて信号の授受を行うととらに、CPU31a、
33a、34aは、それぞれバーコードリーダ2、管理
コンピュータ40、画像処理用CPU23とR5−23
2規格による通信を行う。
Here, the CPUs of these interfaces 31 to 35
31a to 35a are system buses 39. The CPU 31a,
33a and 34a are a barcode reader 2, a management computer 40, an image processing CPU 23, and an R5-23, respectively.
Communication is performed using two standards.

また、CPU32aは色差計5からのアナログ信号をデ
ィジタル信号に変換するA/D変換機能と、N個のディ
ジタル信号の加算平均をとる機能とを持っている。更に
、CPU35aは、ライン各所に配置された近接スイッ
チから、入力接点群36を介して送られてくる信号を処
理するとと乙に、ライン制御信号を形成し、出力接点群
37を通して出力する機能を有している。該出力接点群
37は、リレー等のスイッチング素子からなり、シーケ
ンスバス39bを介してCPU35aに接続され、コン
ベア!、CCDカメラ4、色差計5の移動制御および選
別機構7の制御を行うものである。なお、CCDカメラ
4および色差計5は、パルス指令によって駆動される3
軸ロボツトにより、x、y。
Further, the CPU 32a has an A/D conversion function of converting an analog signal from the color difference meter 5 into a digital signal, and a function of taking an average of N digital signals. Furthermore, the CPU 35a has a function of processing signals sent through the input contact group 36 from the proximity switches arranged at various locations on the line, and then forming a line control signal and outputting it through the output contact group 37. have. The output contact group 37 consists of switching elements such as relays, is connected to the CPU 35a via a sequence bus 39b, and is connected to the conveyor! , CCD camera 4, color difference meter 5, and sorting mechanism 7. Note that the CCD camera 4 and the color difference meter 5 are driven by a pulse command.
x, y by axis robot.

Z各方向に移動できるようになっている。It can be moved in each Z direction.

上記管理コンピュータ40は、画像処理装置20および
色差計用CPU32aからの処理結果によって、ぶどう
の等級を決定する。また、この決定結果を、通信用CP
U33aを介してライン制御用CPU35aへ送り、選
別機構7に選別を命じる。更に、各生産者について等級
毎の出荷個数を集計し、出荷の実績表を作成する。
The management computer 40 determines the grade of grapes based on the processing results from the image processing device 20 and the color difference meter CPU 32a. In addition, this decision result is applied to the communication CP
It is sent to the line control CPU 35a via U33a, and instructs the sorting mechanism 7 to sort. Furthermore, the number of shipments for each grade for each producer is totaled, and a shipment performance table is created.

第3図は、画像処理装置20内のメモリの構成を示すメ
モリマツプである。図において、DRAM領域25aは
システムプログラム用の領域である。このDRAM領域
25aの次には、処理プログラム用のRAM領域125
bおよびRAM領域■25cと、フレームメモリ22R
,22G、22Bがとられている。さらに次の領域には
、空き領域を置いて、システムを立ちあげるためのRO
M領域25dとf10制御のためのI10領域25eと
が確保されている。
FIG. 3 is a memory map showing the configuration of memory within the image processing device 20. As shown in FIG. In the figure, a DRAM area 25a is an area for system programs. Next to this DRAM area 25a is a RAM area 125 for processing programs.
b, RAM area ■25c, and frame memory 22R
, 22G, and 22B are taken. Furthermore, in the next area, place a free area and use RO to start up the system.
An M area 25d and an I10 area 25e for f10 control are secured.

第4図は、色差計5の構成を示すブロック図である。図
において、51は分光部である。分光r′!l<51は
、白色光を発光する発光素子52と、発光素子52から
出た光を集光するレンズ53と、3つのフィルタ54 
B、54 fl、54 Yにより、レンズ53から出た
光を青、赤、黄の3色に分光部ろ回転ディスク54とか
らなり、回転ディスク54は一定の速度(例えば、60
0 rpm)で回転するようになっている。従って、回
転ディスク54を通過した青、赤、黄の単色光は、一定
の周期で逐次ぶどう55に照射される。なお、回転ディ
スク54の所定位置にはスタートマーク54aが設けら
れている。
FIG. 4 is a block diagram showing the configuration of the color difference meter 5. In the figure, 51 is a spectroscopic section. Spectral r′! l<51 means that the light emitting element 52 emits white light, the lens 53 that collects the light emitted from the light emitting element 52, and the three filters 54.
B, 54 fl, and 54 Y, the light emitted from the lens 53 is split into three colors of blue, red, and yellow.
It rotates at 0 rpm). Therefore, the monochromatic lights of blue, red, and yellow that have passed through the rotating disk 54 are sequentially irradiated onto the grapes 55 at a constant period. Note that a start mark 54a is provided at a predetermined position on the rotating disk 54.

ぶどう55で反射した光は、受光素子56に受光され、
電気信号に変換されて増幅器57に供給される。増幅器
57は受光素子56の出力電圧を増幅してCPU32a
(第2図も参照)に供給する。
The light reflected by the grapes 55 is received by the light receiving element 56,
It is converted into an electrical signal and supplied to the amplifier 57. The amplifier 57 amplifies the output voltage of the light receiving element 56 and sends it to the CPU 32a.
(see also Figure 2).

CPU32aはこれをA/D変換して12ビツトのディ
ジタルデータ化し、後述する処理を施してぶどう55の
色を数値化する。なお、受光素子56は各色に対して平
坦な特性を持つ素子である。
The CPU 32a converts this into 12-bit digital data by A/D conversion, and performs processing to be described later to convert the color of the grapes 55 into numerical values. Note that the light receiving element 56 is an element having flat characteristics for each color.

第5図は、色差計5の出力を示すものであり、同図(a
)はスタートマーク54aによるスタート信号を示し、
同図(b)は増幅器57から出力された色信号を示す。
FIG. 5 shows the output of the color difference meter 5, and the figure (a
) indicates a start signal by the start mark 54a,
FIG. 5B shows the color signal output from the amplifier 57.

この図から分かるように、スタート信号についで、青B
、赤R1黄Yの3色の色信号が逐次出力され、これらが
CPU32aへ供給される。なお、スタートマーク54
aは図示しない受光素子によって検出され、CPU32
aへ供給されるようになっている。
As you can see from this diagram, after the start signal, the blue B
, red R1 yellow Y are sequentially output, and these are supplied to the CPU 32a. In addition, start mark 54
a is detected by a light receiving element (not shown), and the CPU 32
It is designed to be supplied to a.

次に、本実施例の動作を説明する。Next, the operation of this embodiment will be explained.

第6図は、人間の作業を主とするもの、画像処理とライ
ン制御を主とするもの、管理コンピュータ40の処理を
主とするものの3つに大別して、本実施例の全体動作を
示したフローチャートである。
FIG. 6 shows the overall operation of this embodiment, roughly divided into three types: one mainly for human work, one mainly for image processing and line control, and one mainly for the processing of the management computer 40. It is a flowchart.

まず、ぶどうを収納した段ボール箱が、作業口!lによ
って搬入されると(ステップSt)、これがコンベアl
によって搬送され、バーコードリーダ2の箇所を通過す
る。この際、段ボール箱に記載されたバーコードがバー
コードリーダ2によって読み取られる(ステップS2)
。このバーコードは、選果場コード、生産者コード、箱
種別、およびぶどうの房の大きさ等の情報を含んでおり
、読み取られたバーコードは、バーコードリーダ2から
、第2図のCPU31a、CPU33aを介して、管理
コンピュータ40に送られる。管理コンピュータ40は
読み込みが正常になされたか否かを判定しくステップS
3)、正常のときはステップS4に進み、否のときには
CPU33aを介してライン制御用CPU35aヘライ
ン停止命令を送り、CPU35aはコンベアlを停止す
る(ステップS7)。コンベアlが停止されると、人手
による復旧処理および再投入が行なわれ(ステップS8
〜9)、コンベアlが再起動される。
First, the cardboard box containing the grapes becomes a work opening! When carried in by conveyor l (step St), this conveyor l
and passes through the barcode reader 2. At this time, the barcode written on the cardboard box is read by the barcode reader 2 (step S2)
. This barcode includes information such as the fruit sorting facility code, producer code, box type, and grape bunch size, and the read barcode is sent from the barcode reader 2 to the CPU 31a in FIG. , are sent to the management computer 40 via the CPU 33a. In step S, the management computer 40 determines whether or not the reading has been performed normally.
3) If normal, proceed to step S4; if not, send a line stop command to the line control CPU 35a via the CPU 33a, and the CPU 35a stops the conveyor I (step S7). When the conveyor l is stopped, manual recovery processing and reinjection are performed (step S8).
~9), conveyor l is restarted.

管理コンピュータ40は、ステップS4において、生産
者が登録されたマスターファイルを検索し、選果場コー
ド、生産者コード、箱種別等が正しいものか否かをチェ
ックし、正規に登録されたバーコードであったときには
(ステップS5)、ステップS6において、選果場、生
産者コード、箱種別および房の大きさを記録し、待ち状
態に入る。
In step S4, the management computer 40 searches the master file in which the producer is registered, checks whether the fruit sorting facility code, producer code, box type, etc. If so (step S5), the fruit sorting place, producer code, box type, and bunch size are recorded in step S6, and the process enters a waiting state.

このとき制御はステップSi1へ進む。一方、バーコー
ドが正規のものでなかったときは、管理コンピュータ4
0からCPU33aを介して、ライン停止命令がCPU
35aに送られ、CPU35aはコンベアlを停止する
(ステップS7)。コンベア1が停止されると、人手に
より復旧処理および再投入が行なわれ(ステップ88〜
9)、コンベア!が再起動される。
At this time, control proceeds to step Si1. On the other hand, if the barcode is not genuine, the management computer 4
0 through the CPU 33a, the line stop command is sent to the CPU 33a.
35a, and the CPU 35a stops the conveyor I (step S7). When the conveyor 1 is stopped, recovery processing and reinjection are performed manually (steps 88 to 8).
9), conveyor! will be restarted.

さて、ステップSllでは、作業員12による蓋開けが
行なわれる。この後、CODカメラ4によるぶどうの撮
像がなされ、この画像データが画像処理装置20へ転送
される。この画像データによって、画像処理装置20は
、ぶどうの粒の直径測定(ステップ512)と茎露出割
合の測定(ステップS 13)とを実行する。次に、色
差計5によってぶどうの色調が検出され、この検出結果
がCPU32aによってディジタルデータに変換され、
該ディジタルデータに基づいて色調測定が行なわれる(
ステップ514)。なお、これらの処理については後で
詳述する。
Now, in step Sll, the operator 12 opens the lid. Thereafter, the COD camera 4 images the grapes, and this image data is transferred to the image processing device 20. Based on this image data, the image processing device 20 measures the diameter of the grape grain (step 512) and measures the stem exposure ratio (step S13). Next, the color tone of the grapes is detected by the color difference meter 5, and this detection result is converted into digital data by the CPU 32a.
Color tone measurement is performed based on the digital data (
Step 514). Note that these processes will be detailed later.

上記処理結果は、画像処理装置20のCI) U 23
および色調測定用CPU32aから管理コンピュータ4
0に通信用CPO33aを介して供給される。管理コン
ピュータ40は上記処理結果をマスターファイルのデー
タと照合して等級を決定しくステップ515)、生産者
毎に実績データとして記録する(ステップS 16)。
The above processing result is the CI of the image processing device 20) U 23
and the management computer 4 from the color tone measurement CPU 32a.
0 via the communication CPO 33a. The management computer 40 compares the above processing results with the data in the master file to determine the grade (step 515), and records it as performance data for each producer (step S16).

実績データが得られると管理コンピュータ40は、通信
用CPU33aを通してライン制御用CPU35aに等
扱指示を送る(ステップS 17)。ライン制御用CP
U35aは、スタンプ装置6を作動させ、該当段ボール
箱に等級スタンプを押させる(ステップ518)。
When the performance data is obtained, the management computer 40 sends an instruction to handle the line to the line control CPU 35a through the communication CPU 33a (step S17). CP for line control
U35a operates the stamp device 6 to stamp the grade stamp on the corresponding cardboard box (step 518).

等級スタンプが押された後、作業員13により蓋閉じが
行なわる(ステップ521)。また、4kg箱とそれ以
外の箱(1kg、2kg、8kg箱)との判別がなされ
(ステップ522)、4kg箱は対向機8aで自動対画
された後(ステップ523)、また、他の箱は別経路8
bを経て選別機構7に至り、ここで選果される(ステッ
プ524)。そして、ステップS25で梱包され、ステ
ップS26で出荷される。
After the grade stamp is stamped, the operator 13 closes the lid (step 521). Also, a distinction is made between 4 kg boxes and other boxes (1 kg, 2 kg, 8 kg boxes) (step 522), and after the 4 kg boxes are automatically imaged by the opposing machine 8a (step 523), other boxes are Another route 8
b, the fruit reaches the sorting mechanism 7, where it is sorted (step 524). Then, it is packed in step S25 and shipped in step S26.

なお、上述した4kg箱と他の箱との区別は、コンベア
lを駆動する前に、手動で切換設定されたスイッチによ
って行なわれる。そして、例えば、4kgに設定したと
きには、4 kgの箱だけを搬入する。
Note that the above-mentioned 4 kg boxes are distinguished from other boxes by a manually set switch before driving the conveyor I. For example, if the weight is set to 4 kg, only 4 kg boxes are carried in.

次に、第7図は、画像処理装置20による画像処理の概
要を示すフローチャートであり、これは第6図のステッ
プS12〜!4に相当するものである。
Next, FIG. 7 is a flowchart showing an overview of image processing by the image processing device 20, and this includes steps S12 to ! of FIG. 6. This corresponds to 4.

この場合、段ボール箱がCODカメラ4に接近すると、
これが近接センサによって検出され、第2図の入力接点
36→ライン制御用CPU35a→通信用CPU34a
→画像処理用CPU23という経路で測定指令が出力さ
れる。この指令を検出すると(ステップ5I131)、
CPU23は、前処理(ステップ5B2)、ぶどうの果
実の直径算出(ステップ5n3)、ぶどうの房の茎の露
出割合算出(ステップ5B4)を行い、演算結果を管理
コンピュータ40へ送信する(ステップ5B5)。
In this case, when the cardboard box approaches the COD camera 4,
This is detected by the proximity sensor, and the input contact 36 in Fig. 2 → line control CPU 35a → communication CPU 34a
→A measurement command is output through the image processing CPU 23. When this command is detected (step 5I131),
The CPU 23 performs pre-processing (step 5B2), calculates the diameter of the grape fruit (step 5n3), calculates the exposure ratio of the stem of the grape bunch (step 5B4), and sends the calculation results to the management computer 40 (step 5B5). .

以下、上記各処理について説明する。Each of the above processes will be explained below.

第8図および第9図は、上記前処理を説明するための図
である。この前処理は、CODカメラ4によって撮像さ
れたぶどうの房の画像から各果実の輪郭を抽出するもの
である。この場合、果実の輪郭は真円に近く、周囲より
一段と明るくなっている。なお、CODカメラ4の画素
数は512×512であり、各画素の輝度がθ〜255
すなわち8ビツトで表現される。また、撮像されたぶど
うの画像は、各フレームメモリ22R〜22Bに各色毎
に格納される。
FIG. 8 and FIG. 9 are diagrams for explaining the above preprocessing. This preprocessing is to extract the outline of each fruit from the image of the bunch of grapes captured by the COD camera 4. In this case, the outline of the fruit is close to a perfect circle and is much brighter than its surroundings. The number of pixels of the COD camera 4 is 512 x 512, and the brightness of each pixel is θ~255.
That is, it is expressed in 8 bits. Further, the captured grape images are stored in each frame memory 22R to 22B for each color.

前処理が開始されると、画像処理用CPU23は以下の
処理を行う。まず、第8図のステップSPIにおいて、
フレームメモリ22Rおよび22Bの各画素について、
その論理和をとり、その結果をRAM領域125bに転
送する。そして、第9図に示すように、第2水平線の第
2画素Cから始め、隣接4画素A 、B 、D 、Eと
の演算処理を順次行う。この処理は、各画素を2値化し
、明るい画素を輪郭として抽出する処理l(ステップS
P2〜8)と、抽出された輪郭をよりはっきりさせるた
めの処理2(ステップSP9〜16)とからなっている
When the preprocessing is started, the image processing CPU 23 performs the following processing. First, in step SPI of FIG.
For each pixel of frame memories 22R and 22B,
The logical sum is taken and the result is transferred to the RAM area 125b. Then, as shown in FIG. 9, starting from the second pixel C on the second horizontal line, arithmetic processing is sequentially performed on four adjacent pixels A, B, D, and E. This process involves the process l (step S) of binarizing each pixel and extracting bright pixels as outlines.
Steps SP2 to SP8) and Processing 2 (Steps SP9 to SP16) for making the extracted outline more clear.

処理1では、第9図(a)に示すように、RAM領域[
25bから1画素ずつ読み出して、以下の演算を施し、
RAM領域1125cの対応アドレスに書き込んでいく
In process 1, as shown in FIG. 9(a), the RAM area [
Read out each pixel from 25b and perform the following calculation,
The data is written to the corresponding address in the RAM area 1125c.

まず、ステップSP2において、画素Cの輝度レベルを
4倍し、この値をXとする。この値Xから、隣接画素A
 、B 、D 、Eの輝度レベルの和を引いて、新たな
値Xとしくステップ5P3)、この新たな値Xが基準レ
ベル(二値化レベル)より大きいときには値“FF”(
+6進表示)をRAM領域[125cの対応アドレスに
書き込む(ステップSP4.5)。一方、前記新たな値
Xか、二値化レベルより小さいときには、RAM領域■
25cの対応アドレスに“00”を書き込む(ステップ
SP4.6)。つまり、画素Cの輝度レベルが回りの画
素A−Eの平均より高いときには“FF”を、低いとき
には“00”をRAM領域1125cの対応アドレスに
書き込む。
First, in step SP2, the luminance level of pixel C is multiplied by 4, and this value is set as X. From this value X, the adjacent pixel A
, B, D, and E to obtain a new value X (step 5P3). If this new value
+ hexadecimal representation) is written to the corresponding address of the RAM area [125c (step SP4.5). On the other hand, when the new value X is smaller than the binarization level, the RAM area
"00" is written to the corresponding address of 25c (step SP4.6). That is, when the luminance level of pixel C is higher than the average of surrounding pixels A to E, "FF" is written, and when it is lower, "00" is written to the corresponding address in the RAM area 1125c.

以下、各画素を逐次抽出して(ステップ5P7)、上記
処理を繰り返し、全画素についてこの二値化処理が終了
したら(ステップ5P8)、次の処理2へ進む。
Thereafter, each pixel is extracted one by one (step 5P7), the above process is repeated, and when this binarization process is completed for all pixels (step 5P8), the process proceeds to the next process 2.

処理lで明るい部分が抽出されたら、次は孤立点を除去
する処理を行う。この処理は、第9図に示すように、R
AM領域1125cから1画素ずつ読み出し、以下の演
算を行ってrtAM領域I25bに書き込んでいく処理
である。
After bright parts are extracted in process 1, the next process is to remove isolated points. This process is performed as shown in FIG.
This is a process of reading out one pixel from the AM area 1125c, performing the following calculations, and writing to the rtAM area I25b.

この場合、隣接4画素A 、B 、D 、Eの状態によ
り、次の3通りの処理が行なわれる。
In this case, the following three types of processing are performed depending on the states of the four adjacent pixels A 1 , B 2 , D 2 , and E.

(1)画素A 、B 、D 、Eがすべて“00”、す
なわち暗いときは、画素Cも“00”とする。これによ
り、孤立点が除去される。
(1) When pixels A, B, D, and E are all "00", that is, when it is dark, pixel C is also set to "00". This removes isolated points.

(2)画素A 、B 、D 、Eがすべて“FF”、す
なイつち高輝度のときは、画素Cを“00”とする。こ
れにより、細線化が遂行される。
(2) When pixels A, B, D, and E are all "FF", that is, high brightness, pixel C is set to "00". This accomplishes thinning.

(3)上記(1)、(2)以外のときは、画素Cの値そ
のものを転送する。
(3) In cases other than (1) and (2) above, the value of pixel C itself is transferred.

次に、第8図を参照して処理2の具体的な動作を説明す
る。
Next, the specific operation of process 2 will be explained with reference to FIG.

まず、画素A 、B 、D 、Eが全て“00”のとき
は、ステップSP9で演算される、画素A、B、D、E
の論理和Xが“00”となるから、ステップ5PIOか
らステップ5P14へ移行し、画素Cの値にかかわりな
く、上記論理和x1つまり“00”がRAM領域125
bに転送される。これにより、上記(1)の処理が実行
されたこととなり、孤立した高輝度点が除去される。
First, when pixels A, B, D, and E are all "00", pixels A, B, D, and E are calculated in step SP9.
Since the logical sum X becomes "00", the process moves from step 5PIO to step 5P14, and regardless of the value of pixel C, the above logical sum x1, that is, "00" is stored in the RAM area 125.
transferred to b. This means that the process (1) above has been executed, and isolated high-brightness points are removed.

次に、画素A 、B 、D 、Eがすべて“FF”のと
きには、論理和Xが“FF”となるからステップ5PI
Oからステップ5PIIへ進み、画素A 、B 、D 
Next, when pixels A, B, D, and E are all "FF", the logical sum X becomes "FF", so step 5PI
Proceed to step 5PII from O, pixels A, B, D
.

Eの論理積がとられる。この論理積も“FF”であり、
その否定論理“00”が新たなXとされる(ステップ5
P12)。従って、ステップSP+3で演算される画素
Cと新たな値Xとの論理積ら“00”となり、これがR
AM領域125bへ転送される。
The AND of E is taken. This logical product is also “FF”,
The negative logic “00” is set as a new X (step 5
P12). Therefore, the logical product of the pixel C calculated in step SP+3 and the new value X becomes "00", which is R
The data is transferred to the AM area 125b.

こうして、上記(2)の処理が行−なわれる。In this way, the process (2) above is performed.

更に、上記以外の場合、すなわち隣接4画素A。Furthermore, in cases other than the above, that is, the adjacent 4 pixels A.

B 、D 、Eの内の1〜3個が“FF”(高輝度)の
ときは、“00”の画素が少なくとらIっ存在するから
、4つの画素A 、B 、D 、Eの論理積が“00”
となり、その否定論理Xが“FF“となる(ステップS
P + 2゜13)。従って、画素Cの値がそのままR
AM領域125bに転送される(ステップS13.14
)。
When one to three of B, D, and E are "FF" (high brightness), there are at least a few "00" pixels, so the logic of four pixels A, B, D, and E is The product is “00”
Then, the negative logic X becomes “FF” (step S
P + 2°13). Therefore, the value of pixel C remains R
Transferred to the AM area 125b (step S13.14
).

以下、次の画素を順次抽出しくステップSP+5)、上
と同様の処理を行い、全画素の処理が終了した時点で前
処理を完了する(ステップSP I G)。
Thereafter, the next pixel is sequentially extracted (step SP+5), and the same process as above is performed, and when all pixels have been processed, the preprocessing is completed (step SP I G).

前処理が終了すると、次はぶどう果実の直径算出を行う
。以下、第10図〜第12図を参照して直径算出処理を
説明する。
Once the preprocessing is complete, the next step is to calculate the diameter of the grape fruit. The diameter calculation process will be described below with reference to FIGS. 10 to 12.

この処理は、CODカメラ4によって取り込まれた画像
データに基づいて行なわれる。すなわち、前記画像デー
タより連続する画素を追跡して円弧を見付け、この円弧
上の3点からぶどう粒の直径を求める。なお、この場合
、ぶどう粒は真円であるものとじ−で解析するため誤差
が生じる。この誤差を考慮して、円弧の中心座標が一定
の小範囲内に入るものについては同一円とみなし、直径
の平均をとり、これを最終的な直径とする。
This processing is performed based on image data captured by the COD camera 4. That is, a circular arc is found by tracing consecutive pixels from the image data, and the diameter of the grape grain is determined from three points on this circular arc. Note that in this case, errors occur because the grape grains are analyzed with perfect circular binding. Taking this error into account, arcs whose center coordinates fall within a certain small range are considered to be the same circle, and the average diameter is taken as the final diameter.

第10図において、RAM領域125bに格納された画
像データから順番に画素を読み出し、これを注目画素P
とする(ステップ5P31)。この注目画素Pが“00
“の場合は次の画素を読み出して注目画素Pとする。注
目画素が“FF”の場合、第11図(a)に示ず隣接8
画素A〜I−1の各々について以下の処理を行う。
In FIG. 10, pixels are read out in order from the image data stored in the RAM area 125b, and these are read out from the pixel of interest P.
(Step 5P31). This pixel of interest P is “00”
If the pixel of interest is “FF”, the next pixel is read out and set as the pixel of interest P. If the pixel of interest is “FF”, the adjacent pixel is
The following processing is performed for each of pixels A to I-1.

まず、隣接画素Aを選択して読み出しくステップ5P3
3)、これが“FF”か否かを調べる(ステップ5P3
4)。そして、“FF”の場合はベクトル量の加算を実
行する(ステップ5P35)。このベクトル量は、第1
1図(b)に示すように、注目画素Pと隣接画素A −
Hとの位置関係によって定まるもので、例えば画素人の
ベクトル量は(1,1)、画素Fのベクトル量は(1,
−1)という具合に、注目画素Pを原点とずろLY座標
に対応して定められている。画素Aが選択された今の場
合、ベクトル量はVX= 1 、Vy= Iであるから
、次の式によってベクトル量の和TVX、TVyが求め
られる。
First, select the adjacent pixel A and read it out Step 5P3
3), check whether this is “FF” (step 5P3
4). Then, in the case of "FF", addition of vector quantities is executed (step 5P35). This vector quantity is the first
As shown in FIG. 1(b), the pixel of interest P and the adjacent pixel A −
It is determined by the positional relationship with H. For example, the vector amount of a pixel person is (1, 1), and the vector amount of a pixel F is (1,
-1), the pixel P of interest is determined corresponding to the origin and the LY coordinate. In the current case where pixel A is selected, the vector quantities are VX=1 and Vy=I, so the sum of the vector quantities TVX and TVy can be found by the following equation.

TVx=TVxprev+ I−−(1)T V y=
 T V yprev+ 1− ・・・(2)ここで、
T V xprev、 T V yprevは各々曲回
までのベクトル和であり、過去数回にわたるベクトル和
かとられる。
TVx=TVxprev+I--(1)TVy=
T V yprev+ 1- (2) Here,
T V xprev and T V yprev are vector sums up to the number of times each song is played, and the vector sums over the past several times are taken.

また、他の画素B −Hが選択された場合乙、それぞれ
のベクトルff1Vx、Vyが同様に加算され、ベクト
ル和TVX、TVyが求められる。
Furthermore, when other pixels B to H are selected, their respective vectors ff1Vx and Vy are added in the same manner to obtain vector sums TVX and TVy.

こうして求められたベクトル和TVX、TVYによって
、第11図(c)に示すようにして、解析方向が決定さ
れる(ステップ5P36)。この図では、ベクトル和T
Vx、TVyの符号(正負)と比とによって、−周が2
2.5°ずっ16方向に分割され、次に選択すべき画素
が決められている。例えば、ベクトル和TVx、TVY
が共に正で、かつこれらの比TVy/TVxh(tan
22 、 5°より小さい場合、ステップSP37〜3
9を経てステップ5P33に戻り、画素り、A、F’が
この順位で次々に選ばれ、連続画素の追跡が行なイつれ
る。
Based on the vector sums TVX and TVY thus obtained, the analysis direction is determined as shown in FIG. 11(c) (step 5P36). In this figure, the vector sum T
Depending on the sign (positive or negative) of Vx and TVy and the ratio, -period is 2
It is divided into 16 directions at 2.5 degrees, and the next pixel to be selected is determined. For example, vector sum TVx, TVY
are both positive, and their ratio TVy/TVxh(tan
22, if it is smaller than 5°, step SP37-3
9, the process returns to step 5P33, and pixels A, F' are selected one after another in this order, and continuous pixels are tracked.

こうして、連続画素が数十画素追跡されたならば(ステ
ップ5P37)、この連続画素を円弧とみなし、後に説
明する方法で直径と中心座標とを算出する(ステップ5
P38)。そして、上記8隣接画素A〜■]についてこ
の処理が終了したら(ステップ5P39)、順次、次の
注目画素を選択して同様の処理を行い、全画素につき上
記処理を実行する(ステップ5P40)。全画素につい
ての処理終了後、中心座標が一定範囲に入る幾つかの直
径について平均をとり(ステップ5P41)、これを求
めるへき直径として、管理コンピュータ40に送信する
(ステップ5P42)。
In this way, once several tens of continuous pixels have been tracked (step 5P37), this continuous pixel is regarded as an arc, and the diameter and center coordinates are calculated by the method described later (step 5P37).
P38). When this process is completed for the above-mentioned 8 adjacent pixels A to ■] (step 5P39), the next pixel of interest is sequentially selected and the same process is performed, and the above process is executed for all pixels (step 5P40). After the processing for all pixels is completed, an average is taken for several diameters whose center coordinates fall within a certain range (step 5P41), and this is sent to the management computer 40 as the determined diameter (step 5P42).

第11図(d)は、上記追跡動作の具体例を示すもので
あり、図のPO−PI3は“F”F”の画像データであ
る。まず、注目画素POが選択される。
FIG. 11(d) shows a specific example of the above tracking operation, and PO-PI3 in the figure is image data of "F" and "F". First, the pixel of interest PO is selected.

次に、第1夏図(a)の画素Aに相当する画素PIか選
択され、ベクトルff1Vx= I 、Vy= Iであ
ることから、ベクトル和TVx−1、TVy= Iとな
る。また、これらの比は1であるから、第11図(c)
より、次の解析画素A、B、Dが選択される。
Next, the pixel PI corresponding to pixel A in the first map (a) is selected, and since the vector ff1Vx=I and Vy=I, the vector sum TVx-1 and TVy=I. Also, since the ratio of these is 1, Fig. 11(c)
Accordingly, the next analysis pixels A, B, and D are selected.

今の場合、画素PIに対して画素A、Bの位置にあるも
のは“00”であるから、画素りの位置にある画素P2
が選択される。この画素りのベクトル量は、Vx= I
 、Vy=0であるから、ベクトル和’I”Vx=1+
1=2、TVy=1+0=1となる。
In this case, the pixel A and B at the pixel PI are "00", so the pixel P2 at the pixel position is "00".
is selected. The vector amount of this pixel is Vx=I
, Vy=0, so the vector sum 'I''Vx=1+
1=2, TVy=1+0=1.

また、これらの比TVy/’rVX= 1 /2だから
、第11図(c)から、次の解析画素はA 、D 、r
3となる。
Also, since these ratios TVy/'rVX= 1/2, from FIG. 11(c), the next analysis pixels are A, D, r
It becomes 3.

よって、画素P2に対してAの位置にある画素P4が選
択される。このとき、画素P3ら“FF”であるが、画
素Aの位置にある画素P4か優先的に選択される。以下
同様に、画素P12で、以降の点が認められなくなるま
で追跡が進められ、ここでもう一度画素POに戻り、8
隣接画素A −Hについて解析が終了した時点で次の注
目画素POに移る。
Therefore, pixel P4 located at position A with respect to pixel P2 is selected. At this time, although the pixel P3 is "FF", the pixel P4 located at the position of the pixel A is preferentially selected. In the same way, tracking is continued at pixel P12 until no subsequent points are recognized, and then it returns to pixel PO once again.
When the analysis of adjacent pixels A to H is completed, the process moves to the next pixel of interest PO.

第12図は、上記ステップSP38の直径算出方法を説
明するための図である。
FIG. 12 is a diagram for explaining the diameter calculation method in step SP38.

この図において、円弧上の3点をQ+(x+、Y+)。In this figure, three points on the arc are Q+(x+, Y+).

Q 2(X2.Y2)、 Q 3(X3.y3)とする
。また線分Q、Q。
Let Q 2 (X2.Y2) and Q 3 (X3.y3). Also, line segments Q and Q.

の中点をQ4(X4.F4)、線分Q2Qsの中点をQ
−(x、。
The midpoint is Q4 (X4.F4), and the midpoint of line segment Q2Qs is Q
−(x,.

ys)とする。更に、線分Q、Q、の垂直二等分線をa
、線分Q、Q3の垂直二等分線をbとする。これにより
、中心座標(xo 、 yo)と、直径dとは以下のよ
うにして求まる。
ys). Furthermore, the perpendicular bisector of line segments Q and Q is a
, the perpendicular bisector of line segments Q and Q3 is b. Thereby, the center coordinates (xo, yo) and the diameter d are determined as follows.

まず、線aおよび線すの傾きDa、Dbは、これらが線
分Q、Q、、Q2Q3に直交することから、D a= 
 (X2  XI)/ (J2  Y+)・・・・・(
3)D b−Cx3X2)/ (F3  )’t)・・
−(4)また、中点Q4.Qsの座標は、 )[、= (x+ + xy)/ 2、Y4= (y+
+yt)/ 2 ・−−C5)X5= (x、+ XI
)/ 2、ys = (Y2 + y3)/ 2−− 
(6)で与えられる。よって、傾きがDa、Dbで与え
られ、中点Q、、Q5を通過する線a、bの方程式を求
め、x=Oとおけば、次の式により線a、bの切片Ca
、Cbが求められる。
First, the slopes Da and Db of the line a and the line are orthogonal to the line segments Q, Q, , Q2Q3, so Da=
(X2 XI)/ (J2 Y+)・・・・・・(
3) D b-Cx3X2)/ (F3)'t)...
-(4) Also, midpoint Q4. The coordinates of Qs are )[, = (x+ + xy)/2, Y4= (y+
+yt)/2 ・--C5)X5= (x, +XI
)/2, ys = (Y2 + y3)/2−-
It is given by (6). Therefore, if we find the equations of lines a and b whose slopes are given by Da and Db and which pass through the midpoints Q, Q5, and set x=O, we can calculate the intercepts Ca of lines a and b using the following formula.
, Cb are determined.

Ca=−x4XDa+y+°°°°°°(7)Cb=X
s X D b+ Vs・・・・・・(8)また、2つ
の線a、bの交点として与えられる中心座標Q。(xo
、yg)は、 xo=(Ca  Cb)/(Da  Db)・・−(9
)yo: −DaX XOX Cミニ・・−・・・−・
(I O)となる。更に、直径dは点Q、と中心座標と
の距離として与えられる。
Ca=-x4XDa+y+°°°°°°(7)Cb=X
s X D b+ Vs (8) Also, the center coordinate Q given as the intersection of two lines a and b. (xo
, yg) is xo=(Ca Cb)/(Da Db)...-(9
)yo: -DaX XOX C mini・・・・・・・・・
(IO). Furthermore, the diameter d is given as the distance between the point Q and the center coordinates.

次に、第13図および第14図を参照して色調測定およ
び色調判定の各処理について説明ずろ。
Next, each process of color tone measurement and color tone determination will be explained with reference to FIGS. 13 and 14.

披検査体がCODカメラ4を経て色差計5の所にくると
、図示せぬ近接センサがこれを検出し、入力接点群36
、ライン制御用CPU35aを介してA/D変換用CP
O32aに色調計測指令が与えられる(ステップ5P5
1)。色差計5からスタート信号が出力されると(第4
.5図参照)、CPU32aはステップ5P52からス
テップ5P53に移り、第1回目のデータ取り込みを行
う。
When the object to be inspected passes through the COD camera 4 and reaches the color difference meter 5, a proximity sensor (not shown) detects this, and the input contact group 36
, A/D conversion CP via the line control CPU 35a.
A color tone measurement command is given to O32a (step 5P5
1). When the start signal is output from the color difference meter 5 (the fourth
.. 5), the CPU 32a moves from step 5P52 to step 5P53, and performs the first data acquisition.

すなわち、第4図のフィルタ54 B、54 R,54
Yから出力される各色信号を順次取り込み、A/D変換
する。そして、全部のフィルタ54 B、54 R,5
4Yからのデータ採集が終了したら(ステップ5P54
)、上記と同様にして、第2回目、第3回目・・・・・
・第N回目の各色信号を採集する。第N回目の採集が終
了したら(ステップ5P57)、各フィルタ54 B、
54 R,54Y@のN個の色信号について加算平均を
取り(ステップ5P58)、この結果(色調データ)を
管理コンピュータ40へ送信する。この送信は、通信用
CPU33aを介して行なわれる。なお、上記ステップ
5P54において、スタート信号が正しい順序で得られ
なかった場合は、ステップ5P55からステップ5P5
6へ進み、管理コンピュータ40ヘエラーコードを送信
する。
That is, the filters 54 B, 54 R, 54 in FIG.
Each color signal output from Y is taken in sequentially and A/D converted. And all the filters 54 B, 54 R, 5
When data collection from 4Y is completed (Step 5P54)
), 2nd time, 3rd time, etc. in the same way as above.
- Collect each color signal for the Nth time. When the Nth collection is completed (step 5P57), each filter 54B,
The average of N color signals of 54R and 54Y@ is taken (step 5P58), and the result (color tone data) is sent to the management computer 40. This transmission is performed via the communication CPU 33a. In addition, in step 5P54, if the start signals are not obtained in the correct order, steps 5P55 to 5P5 are performed.
Proceed to step 6 and send the error code to the management computer 40.

一方、上記色調データあるいはエラーコードを受は取っ
た管理コンピュータ40は、第14図のステップSP6
1で受信を検出し、ステップ5P62において受は取っ
たデータが色調データかエラーコードかを調べる。そし
て、色調データの場合は、ステップ5P63に進んで色
調データから色の判定を行い、エラーコードの場合はス
テ・ノブ5P64でエラー処理を行う。
On the other hand, the management computer 40 that has received the color tone data or error code performs step SP6 in FIG.
At step 1, reception is detected, and at step 5P62, the receiver checks whether the received data is color tone data or an error code. In the case of color tone data, the process proceeds to step 5P63 to determine the color from the color tone data, and in the case of an error code, error processing is performed in step knob 5P64.

上記色調判定は、各色の成分割合を計算して求める。す
なわち、赤、黄、青の各色成分をR,Y。
The above color tone determination is obtained by calculating the component ratio of each color. That is, the red, yellow, and blue color components are R and Y.

Bとし、 r=R/(R+Y+B) y= Y/(R+ Y + B)   ・・・・・・(
I 1)b=B/(R+ Y + B) なる式によって、各成分割合r、y、bを求め、(if
 rに対する値すの大きさを10点満点で点数づけずろ
B, r=R/(R+Y+B) y= Y/(R+ Y + B) ・・・・・・(
I 1) Determine the proportions of each component r, y, b using the formula b=B/(R+Y+B), and calculate (if
Rate the magnitude of the value for r on a scale of 10 to 10.

この場合値b/rが大きいほど、つまり、黒に近いほど
高得点とする。
In this case, the larger the value b/r, that is, the closer to black, the higher the score.

次に、第15図および第16図を参照して茎の露出割合
の測定について説明する。この処理は、第15図に示す
ように、フレームメモリ22R122G、22Bの各ア
ドレスから1画素分(1バイト)ずつデータri、gi
、biを順次読み出し、これに第16図の処理を施すも
ので、画像処理装置20で実行される。
Next, measurement of the exposed proportion of the stem will be explained with reference to FIGS. 15 and 16. In this process, as shown in FIG.
, bi are sequentially read out and subjected to the processing shown in FIG. 16, which is executed by the image processing device 20.

ここで、茎(緑の成分)の抽出は、次の条件で行う。Here, the extraction of the stem (green component) is performed under the following conditions.

(1)3つのデータri、gi、biが共に設定閾値よ
り大きいとき、すなわち、これらデータに相当する画素
の輝度が所定閾値上り高いときは、第15図に示す白紙
(背景)として除去する。
(1) When the three data ri, gi, and bi are all larger than the set threshold, that is, when the luminance of the pixels corresponding to these data exceeds the predetermined threshold, they are removed as a blank page (background) as shown in FIG.

(2)3つのデータri、gi、biの値がほぼ等しい
ときも白紙として除去する。
(2) When the values of the three data ri, gi, and bi are almost equal, it is also removed as a blank page.

(3)緑のデータgiがデータri、biのいずれより
も大きいとき、すなわち、次の条件が成立するとき、茎
と判定する。
(3) When green data gi is larger than either data ri or bi, that is, when the following conditions are met, it is determined that it is a stem.

(gi> ri) ・(gi> bi)−−(12)(
4)上記(1)〜(3)以外はぶどうの房と判定する。
(gi>ri) ・(gi>bi)---(12)(
4) Anything other than the above (1) to (3) is determined to be a bunch of grapes.

そして、ぶどうの房と茎に対する茎の比率P(%)を次
の式によって求める。
Then, the ratio P (%) of the stem to the bunch of grapes is determined by the following formula.

P・100XGcNT/(GCNT+BCNT)・・・
・・・(13)ここで、GCNTは茎と判定された画素
数BCNTは房と判定された画素数 第16図は、この茎露出割合測定の流れを示すフローチ
ャートである。
P・100XGcNT/(GCNT+BCNT)...
(13) Here, GCNT is the number of pixels determined to be a stem. BCNT is the number of pixels determined to be a tuft. FIG. 16 is a flowchart showing the flow of this stem exposure ratio measurement.

−J+」 −−−Jハnり1−ふ^−,h竺mt++t
lll/しを行った後、ステップ5P72〜74で上述
した(1)〜(3)の判定を実行し、緑の画素数G C
NTと青の画素数BCNTとを数える(ステップ5P7
5.76)。そして、次の画素に対応するデータri、
gi、biを順次選んで(ステップ5P78)上と同様
の処理を行い、全画素についての処理が終了したら(ス
テップ5P77)、(13)式によって茎の露出割合を
計算する(ステップ5P79)。こうして、求められた
結果は、管理コンピュータ40へ送られる(ステップ5
P80)。
-J+'' ---Jhanri1-fu^-, hjikumt++t
After carrying out llll/shi, in steps 5P72 to 74, the above-mentioned determinations (1) to (3) are executed, and the number of green pixels G C
NT and the number of blue pixels BCNT (Step 5P7)
5.76). Then, data ri corresponding to the next pixel,
gi and bi are sequentially selected (step 5P78) and the same processing as above is performed, and when the processing for all pixels is completed (step 5P77), the exposure ratio of the stem is calculated using equation (13) (step 5P79). The results thus obtained are sent to the management computer 40 (step 5).
P80).

管理コンピュータ40は、画像処理装置20で求められ
た直径データと茎露出割合データおよび色差計5とCP
U32aで求められた色調データによって、ぶどうの品
質を決定する。すなわら、上記3種のデータに、各IO
点満点として点数をつけ、これらに重みづけの係数を掛
けて合計し、合計点数を、秀1、秀2、優、並、外の5
段階に分けて評価する。
The management computer 40 stores the diameter data and stem exposure ratio data obtained by the image processing device 20, the color difference meter 5, and the CP.
The quality of the grapes is determined based on the color tone data obtained in U32a. In other words, each IO
Scores are given as a perfect score, and these are multiplied by weighting coefficients and totaled to give a total score of 5: excellent 1, excellent 2, excellent, average, and outside.
Evaluate in stages.

この評価結果は、通信用CPU33aを介してライン制
御用CPU35aに送られる。そして、段ボール箱が選
別機構7の所にきたときに、上記評価に対応する出力接
点群37が作動され、ぶどうの選別が行なわれる。
This evaluation result is sent to the line control CPU 35a via the communication CPU 33a. Then, when the cardboard box arrives at the sorting mechanism 7, the output contact group 37 corresponding to the above evaluation is activated, and the grapes are sorted.

[発明の効果] 以上説明したように、この発明は、ぶどうの果実のよう
に重なりあった被検査体の輪郭を抽出してその形状を調
べると共に、被検査体の色調を調べ、これらを総合して
被検査体の等級を決め、これによって被検査体を自動的
に選別するようにしたので、従来のように検査員の主観
が介在することなく、常に安定した客観的な評価が可能
となると共に、作業能率の向上および作業者の労力の軽
減を図ることができる。また、被検査体と他の物体との
混在比を求めて選別を行えば、更に精度の高い選別を行
うことができる。
[Effects of the Invention] As explained above, the present invention extracts the contours of an object to be inspected that overlap each other like the fruits of a grape, examines the shape, examines the color tone of the object, and synthesizes these. This method determines the grade of the inspected object and automatically selects the inspected object based on this, making it possible to always perform stable and objective evaluations without the intervention of the inspector's subjectivity as in the past. At the same time, it is possible to improve work efficiency and reduce the labor of the worker. Further, if the selection is performed by determining the mixing ratio of the object to be inspected and other objects, it is possible to perform the selection with even higher accuracy.

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

第1図はこの発明の一実施例による選別装置の全体構成
を示す平面図、第2図は同実施例の電気的構成を示すブ
ロック図、第3図は画像処理装置20の記憶部のメモリ
マツプ、第4図は色差計5の構成を示すブロック図、第
5図は同色差計の出力を示す波形図、第6図は同実施例
の全体動作を示すフローチャート、第7図は画像処理装
置20の動作概要を示すフローチャート、第8図は前処
理の動作を示すフローチャート、第9図は前処理におけ
るデータの動きを示す概念図、第10図はぶどう果実の
直重算出動作を示すフローチャート、第11図は画像デ
ータの連続成分の追跡方法を説明するための概念図、第
12図は直径算出の具体的方法を示す概念図、第13図
は色調測定の流れを示すフローチャート、第14図は色
調判定の流れを示すフローチャート、第15図は茎の露
出割合の算出方法を説明するための概念図、第16図は
前記算出方法の流れを示すフローチャートである。 4・・・・・・CCDカメラ(撮像手段)、5・・・・
・・色差計、23・・・・・・画像処理用CPU(抽出
手段、形状判定手段、物体判定手段)、32a・・・・
・・色調判定用CPU140・・・・・・管理コンピュ
ータ。
FIG. 1 is a plan view showing the overall configuration of a sorting device according to an embodiment of the present invention, FIG. 2 is a block diagram showing the electrical configuration of the same embodiment, and FIG. 3 is a memory map of the storage section of the image processing device 20. , FIG. 4 is a block diagram showing the configuration of the color difference meter 5, FIG. 5 is a waveform diagram showing the output of the same color difference meter, FIG. 6 is a flow chart showing the overall operation of the same embodiment, and FIG. 7 is the image processing device. 8 is a flowchart showing the operation of preprocessing, FIG. 9 is a conceptual diagram showing the movement of data in preprocessing, FIG. 10 is a flowchart showing the operation of calculating the direct weight of grape fruits, Fig. 11 is a conceptual diagram for explaining the method of tracking continuous components of image data, Fig. 12 is a conceptual diagram showing a specific method for calculating the diameter, Fig. 13 is a flowchart showing the flow of color tone measurement, and Fig. 14 15 is a conceptual diagram for explaining a method for calculating the exposure ratio of a stem. FIG. 16 is a flow chart showing the flow of the calculation method. 4...CCD camera (imaging means), 5...
...Color difference meter, 23... Image processing CPU (extraction means, shape judgment means, object judgment means), 32a...
...CPU 140 for color tone determination...Management computer.

Claims (2)

【特許請求の範囲】[Claims] (1)ぶどうの果実のように重なり合って位置する複数
の被検査体を撮像する撮像手段と、前記撮像手段の出力
から前記各被検査体の輪郭を抽出する抽出手段と、前記
輪郭から前記被検査体の大きさおよびそのばらつきを判
定する形状判定手段と、前記被検査体に光を照射し反射
光から前記被検査体の色調に対応する信号を得る色差計
と、前記色差計の出力により前記被検査体の色調を判定
する色調判定手段とを具備し、前記形状判定手段と前記
色調判定手段との出力に基づいて前記被検査体の選別を
行うことを特徴とする選別装置。
(1) An imaging means for taking images of a plurality of objects to be inspected that are located one on top of the other like the fruits of a grape; an extraction means for extracting the outline of each of the objects to be inspected from the output of the imaging means; a shape determining means for determining the size and variation thereof of the object to be inspected; a color difference meter that irradiates light onto the object to be inspected and obtains a signal corresponding to the color tone of the object from the reflected light; and an output of the color difference meter. A sorting device comprising a color tone determining means for determining the color tone of the object to be inspected, and sorting the object to be inspected based on outputs from the shape determining means and the color tone determining means.
(2)ぶどうの房の茎のように前記被検査体に混在する
物体を前記撮像手段の出力から抽出し、抽出した物体と
前記被検査体との混在比率を出力する物体判定手段を有
し、前記形状判定手段と色調判定手段と物体判定手段と
の出力に基づいて前記被検査体の選別を行うことを特徴
とする特許請求の範囲第1項記載の選別装置。
(2) an object determining means for extracting an object mixed in the object to be inspected, such as a stem of a bunch of grapes, from the output of the imaging means and outputting a mixing ratio of the extracted object and the object to be inspected; 2. The sorting device according to claim 1, wherein the inspection object is sorted based on the outputs of the shape determining means, the color tone determining means, and the object determining means.
JP9612286A 1986-04-25 1986-04-25 Selector Granted JPS62250981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9612286A JPS62250981A (en) 1986-04-25 1986-04-25 Selector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9612286A JPS62250981A (en) 1986-04-25 1986-04-25 Selector

Publications (2)

Publication Number Publication Date
JPS62250981A true JPS62250981A (en) 1987-10-31
JPH0366953B2 JPH0366953B2 (en) 1991-10-21

Family

ID=14156575

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9612286A Granted JPS62250981A (en) 1986-04-25 1986-04-25 Selector

Country Status (1)

Country Link
JP (1) JPS62250981A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07262284A (en) * 1994-03-17 1995-10-13 Fujitsu Ltd Delivery reservation system and input device
JPH07318429A (en) * 1994-05-20 1995-12-08 Yanmar Agricult Equip Co Ltd Optical rotation angle measuring method
JP2002219420A (en) * 2001-01-24 2002-08-06 Anritsu Corp Products examinations system
JP2003143960A (en) * 2001-11-09 2003-05-20 Chikuma Nogyo Kyodo Kumiai Method for counting grape grain and grape bunch- controlling tool
JP2010054342A (en) * 2008-08-28 2010-03-11 National Agriculture & Food Research Organization Method and apparatus for measuring quality of strawberry
JP2010253444A (en) * 2009-04-28 2010-11-11 Satake Corp Method of setting sorting condition of resin pieces in sorter
KR101324338B1 (en) * 2012-12-27 2013-10-31 충남대학교산학협력단 A compact quality sorting method and apparatus for cherry tomatoes based on real-time color image processing
JP2014163697A (en) * 2013-02-21 2014-09-08 Mitsutech Kk Firm crop selecting device and firm crop selecting method for firm crop
JP2018066660A (en) * 2016-10-20 2018-04-26 株式会社寺岡精工 Inspection device
JP2019152673A (en) * 2019-04-26 2019-09-12 株式会社寺岡精工 Inspection device
JP2019200563A (en) * 2018-05-16 2019-11-21 株式会社クピド・ファーム Grape counting device and grape counting method
JP2021015125A (en) * 2019-04-26 2021-02-12 株式会社寺岡精工 Inspection device, program, and inspection method
JP2021192066A (en) * 2020-10-21 2021-12-16 株式会社寺岡精工 Inspection device and program

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07262284A (en) * 1994-03-17 1995-10-13 Fujitsu Ltd Delivery reservation system and input device
JPH07318429A (en) * 1994-05-20 1995-12-08 Yanmar Agricult Equip Co Ltd Optical rotation angle measuring method
JP4652583B2 (en) * 2001-01-24 2011-03-16 アンリツ産機システム株式会社 Item inspection system
JP2002219420A (en) * 2001-01-24 2002-08-06 Anritsu Corp Products examinations system
JP2003143960A (en) * 2001-11-09 2003-05-20 Chikuma Nogyo Kyodo Kumiai Method for counting grape grain and grape bunch- controlling tool
JP2010054342A (en) * 2008-08-28 2010-03-11 National Agriculture & Food Research Organization Method and apparatus for measuring quality of strawberry
JP2010253444A (en) * 2009-04-28 2010-11-11 Satake Corp Method of setting sorting condition of resin pieces in sorter
KR101324338B1 (en) * 2012-12-27 2013-10-31 충남대학교산학협력단 A compact quality sorting method and apparatus for cherry tomatoes based on real-time color image processing
JP2014163697A (en) * 2013-02-21 2014-09-08 Mitsutech Kk Firm crop selecting device and firm crop selecting method for firm crop
JP2018066660A (en) * 2016-10-20 2018-04-26 株式会社寺岡精工 Inspection device
JP2019200563A (en) * 2018-05-16 2019-11-21 株式会社クピド・ファーム Grape counting device and grape counting method
JP2019152673A (en) * 2019-04-26 2019-09-12 株式会社寺岡精工 Inspection device
JP2021015125A (en) * 2019-04-26 2021-02-12 株式会社寺岡精工 Inspection device, program, and inspection method
JP2021192066A (en) * 2020-10-21 2021-12-16 株式会社寺岡精工 Inspection device and program

Also Published As

Publication number Publication date
JPH0366953B2 (en) 1991-10-21

Similar Documents

Publication Publication Date Title
JPS62250981A (en) Selector
US20220375184A1 (en) System for counting quantity of game tokens
US5483603A (en) System and method for automatic optical inspection
Liao et al. Real-time detection of colour and surface defects of maize kernels using machine vision
Pietikainen et al. Accurate color discrimination with classification based on feature distributions
US4807762A (en) Procedure for sorting a granular material and a machine for executing the procedure
JPH03504424A (en) Automatic optical classification method and device for plants
EP1118978A2 (en) Method and apparatus for transforming color image into monochromatic image
CN114648594B (en) Textile color detection method and system based on image recognition
Niskanen et al. Color and texture based wood inspection with non-supervised clustering
US8526717B2 (en) Rich color transition curve tracking method
JPH01284743A (en) Method and device for appearance inspection of resin mold of semiconductor device
JPH08254501A (en) Method and apparatus for visual inspection
JPS5999581A (en) Method and device for pattern recognition
JP4090775B2 (en) Appearance inspection method and appearance inspection apparatus for electronic circuit components, and method for manufacturing electronic circuit components
Gujjar et al. Recognition and classification of different types of food grains and detection of foreign bodies using neural networks
Teoh et al. A transputer-based automated visual inspection system for electronic devices and PCBs
CN108960028B (en) Congestion level based on image analysis judges system
JPH06249810A (en) Gas discrimination device
CN112069841A (en) Novel X-ray contraband parcel tracking method and device
JPH04364449A (en) Fruit defect detecting apparatus
JP2003076991A (en) Automatic inspection device and method and method for processing image signal
CN115063605B (en) Method for identifying color printing package by using electronic equipment
Quispe et al. An algorithm oriented to the classification of quinoa grains by color from digital images
JPH0291505A (en) Inspecting device for solder surface of circuit board