JPH09288060A - Method and apparatus for capturing moving body image - Google Patents

Method and apparatus for capturing moving body image

Info

Publication number
JPH09288060A
JPH09288060A JP9781296A JP9781296A JPH09288060A JP H09288060 A JPH09288060 A JP H09288060A JP 9781296 A JP9781296 A JP 9781296A JP 9781296 A JP9781296 A JP 9781296A JP H09288060 A JPH09288060 A JP H09288060A
Authority
JP
Japan
Prior art keywords
image
memory
image data
data
screen
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
JP9781296A
Other languages
Japanese (ja)
Other versions
JP3349037B2 (en
Inventor
Kiyoo Kobayashi
清雄 小林
Toshihiro Yamashita
敏広 山下
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.)
Nireco Corp
Original Assignee
Nireco Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nireco Corp filed Critical Nireco Corp
Priority to JP09781296A priority Critical patent/JP3349037B2/en
Publication of JPH09288060A publication Critical patent/JPH09288060A/en
Application granted granted Critical
Publication of JP3349037B2 publication Critical patent/JP3349037B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Input (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To rapidly decide the image adapted to image analysis from images by a simple method when the images are captured by imaging moving bodies sequentially fed at a predetermined interval. SOLUTION: The method for capturing moving body image comprises the steps of imaging the bodies by an imaging camera 4 at a predetermined time interval, storing present image data in a first memory 61, and storing the image before one in a second memory 62. The method further comprises the steps of fetching the representative range of the image data by a sampling unit 71 as one-dimensional image, converging it into one-dimensional binary image by a binarizer 72, checking whether one body is completely input to a screen or not by an effective visual field deciding unit 73, and calculating the deviation of the center of the body from the input binary image from the center of the screen by a central deviation calculator 74. The best image deciding unit 75 decides the continuation of using either the image stored in the first memory or the image stored in the second memory based on the deviation or capturing the image.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はベルトコンベヤなど
で連続的に移動している対象物を一定時間毎に撮像した
画像データの中から選択し最良な画像を得る移動体画像
の取込方方法と装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for capturing an image of a moving body, which selects an image of an object continuously moving on a belt conveyor or the like from image data taken at regular intervals to obtain the best image. And equipment.

【0002】[0002]

【従来の技術】ベルトコンベヤなどで次々と移動してく
る対象物、例えばメロンなどを1個ごとに撮像し、画像
解析により等級付けなどを行う場合がある。図11は従
来用いられている移動体の撮像装置を示す図である。1
0は撮像されるべき対象物であり、ベルトコンベヤ11
によって、次々と搬送されてくる。1は対象物10の到
来検出器で、例えば、光電センサ等が用いられ、撮像用
カメラ4とはベルトコンベヤ11に沿って距離Lを隔て
て配置されている。2はベルトコンベヤ11の移動距
離、換言すれば対象物10の移動距離を測定するための
発信器であり、例えばインクリメンタルエンコーダ等が
用いられ、ベルトコンベヤ11の単位移動距離ΔL当た
り1パルスを発生するものとする。対象物10が到来検
出器1で検知されてから撮像用カメラ4の位置まで距離
L移動するとき発生するパルス数PはP=L/ΔLで表
される。
2. Description of the Related Art In some cases, objects moving one after another on a belt conveyor or the like, such as melons, are imaged one by one, and are graded by image analysis. FIG. 11 is a diagram showing a conventional moving body imaging apparatus. 1
0 is an object to be imaged, and the belt conveyor 11
Are transported one after another. Reference numeral 1 denotes an arrival detector of the object 10, which is, for example, a photoelectric sensor or the like, and is arranged at a distance L from the imaging camera 4 along the belt conveyor 11. Reference numeral 2 is a transmitter for measuring the moving distance of the belt conveyor 11, that is, the moving distance of the object 10. For example, an incremental encoder is used to generate one pulse per unit moving distance ΔL of the belt conveyor 11. I shall. The number P of pulses generated when the object 10 is moved by the distance L from the arrival detector 1 to the position of the imaging camera 4 is represented by P = L / ΔL.

【0003】対象物10の横、すなわち移動方向の長さ
を対象物10の幅と称し、rは対象物10の幅の1/2
を表す。対象物10がメロンのようにほぼ球に近い時は
rは半径を示す。この値は到来検出器1と撮像用カメラ
4との間の実効設置距離Lを規定するために考慮される
べき値である。5はトリガ発生機で、到来検出器1から
の信号を受ける度に発信器2からのパルスを計数開始
し、この値が上述したPに達する度に撮像用カメラ4に
対しシャッタを開くための指令Tを与える。同時に撮像
用カメラ4の撮像した画像を取り込み解析を行う画像解
析機6に対して画像取込許可信号Iを発生する。これに
より信号Iを受け取った直後のビデオ信号Vはカメラの
視野中心に来ていることが保証される。なお、任意時刻
にシャッタを開く事が可能な撮像用カメラ(以下ランダ
ムシャッタカメラと称す)の代わりにストロボフラッシ
ュを用いることもある。
The width of the object 10, that is, the length in the moving direction is called the width of the object 10, and r is 1/2 of the width of the object 10.
Represents When the object 10 is close to a sphere like a melon, r indicates a radius. This value should be considered in order to define the effective installation distance L between the arrival detector 1 and the imaging camera 4. Reference numeral 5 denotes a trigger generator, which starts counting pulses from the oscillator 2 each time a signal from the arrival detector 1 is received, and opens the shutter for the imaging camera 4 each time the value reaches P described above. Give a command T. At the same time, the image capturing permission signal I is generated to the image analyzer 6 which captures and analyzes the image captured by the image capturing camera 4. This ensures that the video signal V immediately after receiving the signal I is centered in the field of view of the camera. Note that a strobe flash may be used instead of an image pickup camera whose shutter can be opened at an arbitrary time (hereinafter referred to as a random shutter camera).

【0004】[0004]

【発明が解決しようとする課題】上述した移動体の撮像
装置は実用化され良好な動作をしているが、次のような
問題点もまた存在する。 到来検出器1が必要である。 ベルトコンベヤなどの搬送機の移動距離を測定する発
信器が必要である。 撮像用カメラ4にシャッタを開くタイミングを知らせ
るトリガ発生機5(遅延計算器)を必要とする。 対象物の寸法変化があった時画像取込位置に誤差を生
じる。 比較的高価なランダムシャッタカメラもしくはストロ
ボ照明装置を必要とする。 到来検出器とカメラ間の物理的距離内に複数の対象物
が入るようなレイアウトではトリガー発生機の構成が複
雑になる。
Although the above-mentioned moving body image pickup device has been put into practical use and is operating satisfactorily, it also has the following problems. Arrival detector 1 is required. A transmitter is required to measure the distance traveled by conveyors such as belt conveyors. A trigger generator 5 (delay calculator) for notifying the image pickup camera 4 of the timing of opening the shutter is required. When the size of the object changes, an error occurs in the image capture position. It requires a relatively expensive random shutter camera or strobe illuminator. The layout of the trigger generator becomes complicated in the layout in which a plurality of objects are placed within the physical distance between the arrival detector and the camera.

【0005】本発明は、上述の問題点に鑑みてなされた
もので、簡単で高速処理可能な移動体の撮像装置を提供
することを目的とする。
The present invention has been made in view of the above problems, and an object of the present invention is to provide a moving body image pickup apparatus which is simple and capable of high-speed processing.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
請求項1の発明では、固定した撮像装置の前を移動する
移動体を一定時間の間隔で撮像し、現在の画像データと
1つ前の画像データとを記憶し、両画像データについて
移動体の移動方向の中心座標と画面の中心とのずれ量を
演算し、このずれ量に基づいていずれかの画像データを
使用するか画像取込を継続するかを決定する。
In order to achieve the above object, according to the invention of claim 1, a moving body moving in front of a fixed image pickup device is imaged at a constant time interval, and the present image data and the previous image data are obtained. Image data of the image data is stored, the amount of deviation between the center coordinates of the moving direction of the moving body and the center of the screen is calculated for both image data, and either image data is used or the image is captured based on this amount of deviation. Decide whether to continue.

【0007】移動してゆく移動体を一定時間毎にすなわ
ち、通常のテレビジョンカメラのフィールド、もしくは
フレームレートで撮像し、現在の画像と1つ前の画像を
記憶し、記憶画像について画面の中心付近に移動体の全
体像が写っている有効画像、端の方に寄り移動体の全体
像の一部が欠損していたり、2個の移動体の像が写って
いる非有効画像を判別する。非有効画像は捨て、有効画
像の移動体の移動方向の中心座標と画面の中心とのずれ
量を算出し、このずれ量に基づいて現在の画像データと
1つ前の画像データのいずれかを使用するか画像取込を
継続するかを決定する。このように一定時間間隔で撮像
した画像データそのものから最良画像データを判別する
と、ハードウェアの構成が極めて簡単となる。
A moving moving body is imaged at regular time intervals, that is, at the field of a normal television camera or at a frame rate, the current image and the previous image are stored, and the stored image is displayed at the center of the screen. Discriminate between an effective image in which the entire image of the moving body is shown in the vicinity, and an ineffective image in which a part of the entire image of the moving body is missing near the edge or in which the images of two moving bodies are shown. . The ineffective image is discarded, the amount of deviation between the center coordinate of the moving direction of the moving body of the effective image and the center of the screen is calculated, and either the current image data or the previous image data is calculated based on this amount of deviation. Decide whether to use or continue with image capture. When the best image data is discriminated from the image data itself taken at regular time intervals in this way, the hardware configuration becomes extremely simple.

【0008】請求項2の発明では、一定の時間間隔で移
動体を撮像する固定された撮像装置と、この撮像装置の
撮像した画像データの代表的範囲を1次元データとして
取り出すサンプリング部と、この1次元データを移動体
と背影とに2値化したデータとする2値化部と、この2
値化データについて移動体の全体像が画面内にある有効
画像データを判定する有効視野判定部と、前記撮像装置
の撮像した現在の画像データと1つ前の画像データとを
格納する画像メモリと、前記有効視野判定部の判定した
2値化データの移動体の中心位置と画面の中心とのずれ
量を演算する中心ずれ演算部と、この中心ずれ演算部の
演算したずれ量に基づき、前記画像メモリの現在の画像
データと1つ前の画像データの使用、または画像取込の
継続につき判定する最良画像判定部とを備える。
According to a second aspect of the present invention, a fixed image pickup device for picking up an image of a moving body at fixed time intervals, a sampling section for taking out a representative range of image data picked up by the image pickup device as one-dimensional data, and A binarization unit for binarizing one-dimensional data into a moving body and a back shadow, and
An effective field-of-view determination unit that determines effective image data in which the entire image of the moving object is within the screen for the binarized data, and an image memory that stores the current image data captured by the image capturing apparatus and the previous image data. A center shift calculation unit that calculates a shift amount between the center position of the moving body and the center of the screen of the binarized data determined by the effective visual field determination unit; and based on the shift amount calculated by the center shift calculation unit, The present image data in the image memory and the best image determination unit that determines whether the previous image data is used or whether image capture is continued are provided.

【0009】撮像装置で一定時間毎に前方を次々と移動
してゆく対象物を撮像し、撮像した画像データの代表的
な範囲、例えば球であれば、赤道付近を1次元データ、
つまり水平走査線上のデータとしてサンプリング部で取
り出し、この1次元データを背景と対象物を代表する2
値化データにする。有効視野判定部ではこうして得られ
た2値化データについて解析し、移動体の全体像が画面
内にある有効画像データであるか否か判定する。画像メ
モリには画像データを格納し、1つ前の画像データと共
に順次格納しておく。中心ずれ演算部では、有効視野判
定部で判定した有効画像データについて移動体の中心と
画面の中心とのずれ量を求め、このずれ量に基づきメモ
リに格納したいずれかの画像データを使用とするか、ま
たは次回以降の判定にゆだねる。これにより従来の装置
で用いられていた到来検出器、発信器、トリガ発生機な
どのハードウェアを必要としないので簡単な構造とな
る。
[0009] The image pickup device picks up an image of an object moving forward one after another at regular intervals, and a typical range of the imaged image data, for example, in the case of a sphere, one-dimensional data near the equator,
In other words, the data on the horizontal scanning line is taken out by the sampling unit, and this one-dimensional data is used to represent the background and the object.
Convert to digitized data. The effective visual field determination unit analyzes the binarized data thus obtained, and determines whether or not the entire image of the moving body is the effective image data within the screen. Image data is stored in the image memory and is sequentially stored together with the previous image data. The center shift calculation unit obtains the shift amount between the center of the moving body and the center of the screen for the effective image data determined by the effective visual field determination unit, and uses any image data stored in the memory based on this shift amount. Or leave it to the next and subsequent decisions. As a result, the hardware such as the arrival detector, the transmitter, and the trigger generator used in the conventional device is not required, so that the structure is simple.

【0010】請求項3の発明では、前記サンプリング部
は、所定範囲の複数本の水平走査線の1次元データを垂
直方向に加算した、換言すれば平均した1次元データを
算出する。
In the third aspect of the present invention, the sampling section adds one-dimensional data of a plurality of horizontal scanning lines in a predetermined range in the vertical direction, in other words, calculates averaged one-dimensional data.

【0011】対象物の移動方向は画面の水平走査線方向
であり対象物の移動方向の長さを幅と称し、1つの対象
物についてこの幅が画面に完全に表れていれば有効な画
像データとなる。そこでこの幅が最大となる付近の水平
走査線の垂直方向のある範囲を対象物に対して予め決め
ておき、この水平走査線の1次元データを指定範囲の縦
方向について加算することにより、平均した1次元デー
タが得られる。この加算によりノイズの影響を相当程度
に排除できる。
The moving direction of the object is the horizontal scanning line direction of the screen, and the length in the moving direction of the object is called the width. If the width of one object completely appears on the screen, effective image data is obtained. Becomes Therefore, a certain range in the vertical direction of the horizontal scanning line near the maximum width is predetermined for the object, and one-dimensional data of this horizontal scanning line is added in the vertical direction of the specified range to obtain the average. The obtained one-dimensional data is obtained. By this addition, the influence of noise can be considerably eliminated.

【0012】請求項4の発明では、前記有効視野判定部
は、前記2値化データが0から1に変化した時をもって
レベル1を割当て、一方1から0に変化した時レベル0
に割当てることにより、変化を0と1の交互の配列で表
す。こうして得られた変化パターンを予め作成した標準
変化パターンと比較して1つの移動体が確実に画面内に
含まれているか否かを判定する。この場合0から1に変
化した時を0のレベル,1から0に変化した時を1のレ
ベルとしてもよい。このようにすることにより例えば5
12個の画素よりなる1次元データを4〜5ビットの変
化パターンで表すことができる。このような変化パター
ンを予め準備した標準変化パターンと比較し、1つの移
動体が確実に画面に含まれているか否かを判定する。
In the invention of claim 4, the effective visual field determining section assigns level 1 when the binarized data changes from 0 to 1, and when it changes from 1 to 0, level 0
To represent changes in an alternating array of 0s and 1s. The change pattern thus obtained is compared with a standard change pattern created in advance to determine whether or not one moving object is surely included in the screen. In this case, the change from 0 to 1 may be the level of 0, and the change from 1 to 0 may be the level of 1. By doing this, for example, 5
One-dimensional data composed of 12 pixels can be represented by a change pattern of 4 to 5 bits. Such a change pattern is compared with a standard change pattern prepared in advance, and it is determined whether or not one moving object is definitely included in the screen.

【0013】請求項5の発明では、前記中心ずれ演算部
は、前記2値化データが最初に移動体の到来を検知した
位置とそれに続く最初の移動体の消滅を検出した位置の
平均値を2値化データの中心とする。
According to a fifth aspect of the present invention, the center deviation calculating section calculates an average value of positions at which the binarized data first detects the arrival of the moving body and subsequent positions at which the disappearance of the moving body is detected. It is the center of the binarized data.

【0014】1つの移動体が確実に画面に含まれている
場合、例えば移動体が1、背景が0で表された1次元デ
ータの場合、最初の立ち上がりとこれに続く立ち下がり
の位置は画面上における移動体の位置を示す。故にこの
立ち上がりと立ち下がり位置の平均値は画面上における
移動体の中心位置を表す。移動体が0、背景が1で表さ
れた1次元データの場合、最初の立ち下がりとこれに続
く立ち上がりの位置の平均値が移動体の画面上の中心位
置となる。
When one moving object is certainly included in the screen, for example, in the case of one-dimensional data in which the moving object is 1 and the background is 0, the position of the first rising edge and the subsequent falling edge are on the screen. The position of the moving body above is shown. Therefore, the average value of the rising and falling positions represents the center position of the moving body on the screen. In the case of one-dimensional data in which the moving body is represented by 0 and the background is represented by 1, the average value of the positions of the first falling and the subsequent rising is the center position on the screen of the moving body.

【0015】請求項6の発明では、前記画像メモリは第
1メモリと第2メモリからなり、画面が変わる度に変わ
った画面の画像データを第1メモリと第2メモリに交互
に記憶するようにし、前記最良画像判定部は現在の画像
データと1つ前の画面の画像データの選択指令を、第1
メモリに現在の画像データ、第2メモリに1つ前の画像
データが固定的に格納されているとして表した第1選択
指令を、画面が変わるのに同期して第1選択指令を反転
した第2選択指令に変えて出力する。
According to a sixth aspect of the present invention, the image memory is composed of a first memory and a second memory, and image data of a changed screen is alternately stored in the first memory and the second memory each time the screen changes. , The best image determination unit issues a first command to select the current image data and the image data of the previous screen.
The first selection command represented as the current image data is fixedly stored in the memory and the previous image data is fixedly stored in the second memory is inverted by the first selection command in synchronization with the screen change. 2 Change to a selection command and output.

【0016】本請求項の発明は現在の画像と1つ前の画
像の記憶をハードウェアでより高速に行うための一手段
である。現在の画面の画像データを第1メモリに記憶
し、1つ前の画面の画像データを第2メモリに記憶する
ようにすると、現在の画像データと1つ前の画面の画像
データの選択指令を出す先は固定してよい。しかし、新
たな現在の画像データが来る度に第1メモリの内容を第
2メモリに移動しなければならない。そこで画面(フレ
ーム)が変わる度に現在の画像データを第1メモリと第
2メモリに交互に格納するようにし、選択指令も画面の
変わる度その極性を変化、例えば第1メモリの選択であ
れば第2メモリの選択に、第2メモリの選択であれば第
1メモリの選択に代えて出力する。これにより第1メモ
リより第2メモリへのデータの転送が不要となり、装置
が簡単となり、処理が迅速化する。
The invention of this claim is one means for storing the current image and the previous image at a higher speed by hardware. When the image data of the current screen is stored in the first memory and the image data of the previous screen is stored in the second memory, a command for selecting the current image data and the image data of the previous screen is issued. The place to put out may be fixed. However, the contents of the first memory must be moved to the second memory each time new current image data arrives. Therefore, the current image data is alternately stored in the first memory and the second memory each time the screen (frame) changes, and the selection command also changes its polarity each time the screen changes, for example, if the first memory is selected. If the second memory is selected, the second memory is output instead of the first memory. This eliminates the need to transfer data from the first memory to the second memory, which simplifies the device and speeds up the process.

【0017】[0017]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。図1は第1実施の形態の全
体の構成を示す図である。本実施の形態は対象物10が
ベルトコンベヤ11上を次々と移動してゆく状態で各対
象物10を撮像した画像データの内最良の画像データを
画像解析機6で取り込む装置である。対象物10は例え
ばメロンで、画像解析機6はメロンの表面の網目の画像
を解析し、等級等を定める装置である。本実施の形態に
おいては解析の基となる最良の画像データを取り込むま
でについてのみ説明し、以降の解析処理については触れ
ない。撮像用カメラ4はビデオ信号を出力するカメラ
で、自己の発生する一定周期でシャッタが動作するいわ
ゆるノーマルシャッタカメラを用いる。画像解析機6に
は画像データ取り込み用のメモリが第1メモリ、第2メ
モリと2つあり、撮像用カメラ4が一定周期で撮像した
画像データVを次々と第1のメモリに上書きすると同時
にもともと第1のメモリにあった画像データは第2のメ
モリに移送される。その結果第1メモリに現在の画像デ
ータが記憶され、第2メモリに1つ前の画像データが記
憶される。撮像用カメラ4の画像データは最良画像判定
装置7にも送られ、有効視野中にある画像について現在
の画像データまたは1つ前の画像データが最良の画像デ
ータであるか、あるいはまだ最良の画像データとは認め
られないかの判断を行い、画像データの取り込みまたは
更新の継続を指令するための信号Nを画像解析機6に与
える。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing the overall configuration of the first embodiment. The present embodiment is a device that takes in the best image data of the image data of each object 10 captured by the image analyzer 6 while the object 10 is moving on the belt conveyor 11 one after another. The object 10 is, for example, a melon, and the image analyzer 6 is a device that analyzes a mesh image on the surface of the melon and determines a grade and the like. In the present embodiment, only the process of capturing the best image data to be the basis of analysis will be described, and the subsequent analysis processing will not be described. The image pickup camera 4 is a camera that outputs a video signal, and uses a so-called normal shutter camera in which a shutter operates at a constant cycle generated by itself. The image analyzer 6 has two memories for capturing image data, a first memory and a second memory, and the image data V captured by the imaging camera 4 in a constant cycle is overwritten in the first memory one after another and at the same time originally. The image data in the first memory is transferred to the second memory. As a result, the current image data is stored in the first memory, and the previous image data is stored in the second memory. The image data of the image pickup camera 4 is also sent to the best image determination device 7, and the current image data or the previous image data of the image in the effective field of view is the best image data, or the still best image data. It is determined whether or not the data is recognized, and a signal N for instructing the continuation of the acquisition or update of the image data is given to the image analyzer 6.

【0018】対象物10は十分に照明して明るくし、背
景は暗くして容易に2値化により対象物が認識できるよ
うにしてある。もちろん、対象物が黒に近い時は背景を
明るい白に近くして識別を容易にしてもよい。
The object 10 is sufficiently illuminated to make it bright, and the background is made dark so that the object can be easily recognized by binarization. Of course, when the object is close to black, the background may be close to bright white to facilitate identification.

【0019】図2は第1実施の形態の詳細な構成を示す
ブロック図である。図1と対応して61〜63は画像解
析機6の最良画像を出力する部分を示し、71〜75は
最良画像判定装置7の詳細構造を示す。撮像用カメラ4
で撮像された画像データは現在の画像データを格納する
第1メモリ61へ格納される。第1メモリ61に格納さ
れていた画像データは1つ前の画像データとして第2メ
モリ62へ移動される。メモリセレクタ63は最良画像
判定部7より送られてくる信号Nにより第1メモリ61
または第2メモリ62に格納された有効画像データの内
いずれかを選択して最良画像として出力するか、あるい
は出力しないで、メモリ内容の更新の継続を行わせる。
FIG. 2 is a block diagram showing a detailed configuration of the first embodiment. Corresponding to FIG. 1, reference numerals 61 to 63 denote parts for outputting the best image of the image analyzer 6, and 71 to 75 denote detailed structures of the best image determination device 7. Imaging camera 4
The image data picked up in is stored in the first memory 61 which stores the current image data. The image data stored in the first memory 61 is moved to the second memory 62 as the previous image data. The memory selector 63 uses the signal N sent from the best image determination unit 7 to generate the first memory 61.
Alternatively, one of the valid image data stored in the second memory 62 is selected and output as the best image, or is not output, and the memory contents are updated.

【0020】一回の撮像においては1つの対象物10は
完全に入るが2つ以上の対象物10が完全に入ることの
ない視野となるよう撮像用カメラ4の視野を設定してお
く。
The field of view of the imaging camera 4 is set so that one object 10 is completely entered in one image pickup, but two or more objects 10 are not completely entered.

【0021】サンプリング部71は撮像用カメラ4から
の画像データから対象物10の代表部分を表す1次元デ
ータを算出する。2値化部72は1次元データの対象物
10に相当する部分が1のレベル、背景が0のレベルと
なるようにしきい値を設定して対象物と背景に2値化す
る。なお、対象物10を0のレベル、背景を1のレベル
に反転してもよい。以降の説明は対象物10を1、背景
を0として説明する。有効視野判定部73は2値化した
1次元2値化データについて、1つそしてただ1つの移
動体が完全に画面内に含まれているか否かを判定し、含
まれているデータを以降の判断を行うのに有効な画像デ
ータとする。1つの完全な対象物10と不完全な対象物
10の画像が入っている画像もまた有効画像データとな
る。
The sampling unit 71 calculates one-dimensional data representing the representative portion of the object 10 from the image data from the image pickup camera 4. The binarization unit 72 binarizes the object and the background by setting thresholds so that the portion of the one-dimensional data corresponding to the object 10 has a level of 1 and the background has a level of 0. The object 10 may be inverted to the 0 level and the background to the 1 level. In the following description, the object 10 is 1, and the background is 0. The effective visual field determination unit 73 determines whether or not one and only one moving body is completely included in the screen with respect to the binarized one-dimensional binary data, and the included data is referred to as the subsequent data. The image data is effective for making a judgment. An image containing an image of one complete object 10 and an image of an incomplete object 10 is also effective image data.

【0022】図3は有効視野と無効視野とを表した図で
ある。有効視野は1つの対象物10が完全に入っている
もので、無効視野は1つの対象物10が完全な形では入
っていないものである。なお、上述したように2つ以上
の対象物10が完全な形で入るようにはならぬよう視野
の設定がなされている。左側の0と1との組み合わせは
各視野の画像を表す変化パターンである。0−1−0は
両側が背景0で中央に対象物10が1として完全な形で
存在する画像データを表している。1−0−1−0の左
端の1は不完全な対象物10の形状を表す。完全な対象
物10の形状とは1の両側に0がある場合である。無効
視野の配置パターンはこのような変化パターンとなって
いない。
FIG. 3 is a diagram showing an effective visual field and an invalid visual field. The effective visual field is one in which the object 10 is completely included, and the ineffective visual field is one in which the object 10 is not completely included. Note that, as described above, the field of view is set so that the two or more objects 10 do not completely enter. The combination of 0 and 1 on the left is a change pattern representing an image of each field of view. 0-1-0 represents image data in which the background 10 is on both sides and the object 10 is 1 in the center and is present in a perfect form. The leftmost 1 of 1-0-1-0 represents the shape of the incomplete object 10. The shape of the complete object 10 is the case where there are 0s on both sides of 1. The layout pattern of the invalid visual field is not such a change pattern.

【0023】中心ずれ演算部74は有効画像データの1
次元2値化データより得られる対象物10の両端の位置
の中央を対象物10の中心位置とし、この中心位置と画
面の中心とのずれ量を求める。また1つ前の有効画像デ
ータの中心位置とずれ量を保持できるメモリをも有して
いる。現在の対象物10の中心位置をPn,ずれ量をδ
n、1つ前の中心位置をPp,ずれ量をδpとする。
The center deviation calculating section 74 is set to 1 of the effective image data.
The center of the positions of both ends of the object 10 obtained from the dimensional binarized data is set as the center position of the object 10, and the amount of deviation between this center position and the center of the screen is obtained. It also has a memory capable of holding the center position and the shift amount of the previous effective image data. The current center position of the object 10 is Pn, and the shift amount is δ
n, the previous center position is Pp, and the shift amount is δp.

【0024】最良画像判定部75は中心ずれ演算部74
で得られたPn,δn,Pp,δpのデータおよび設定
した許容ずれδoから次の3種類の判断を生成する。 現在の画像が最良の画像である。 1つ前の画像が最良の画像である。 画像取込を継続し、次回の画像組についての判断にゆ
だねる。
The best image determining section 75 is a center shift calculating section 74.
The following three types of judgments are generated from the data of Pn, δn, Pp, and δp obtained in step 1 and the set allowable deviation δo. The current image is the best image. The previous image is the best image. Continues to capture images, leaving it to the next set of images.

【0025】と判断し、現在の画像データを取り込む
よう選択信号を発生するのは次の場合である。 |δn|≦δo ……(1) つまり現在のずれ量δnの絶対値が許容ずれ量δo以下
の場合である。また、次式が成立する場合である。 ||Pn+(Pn−Pp)|−F/2|>|δn| ……(2) ここで(Pn−Pp)は1つ前の画面における対象物1
0が現在の画面を得るまでに移動した距離を表し、次の
画面でそこまで移動するであろうとの推定値を表す。F
/2は画面の中心を表し、(2)式の左辺は次の画面で
の対象物の中心の予想ずれ量を表す。(2)式は次の画
面でのずれ量の絶対値が現在の画面のずれ量の絶対値δ
nより大きい場合を示し、このときは(1)式が成立し
なくても現在の画像データを取り込む。なぜならば少な
くとも次回の画面よりは現在の画面の方が中央に近いで
あろうからである。
In the following case, it is determined that the selection signal is generated so as to fetch the current image data. | Δn | ≦ δo (1) That is, this is the case where the absolute value of the current shift amount δn is equal to or less than the allowable shift amount δo. Moreover, it is a case where the following formula is materialized. || Pn + (Pn-Pp) | -F / 2 |> | δn | (2) where (Pn-Pp) is the object 1 on the previous screen.
0 represents the distance traveled to get the current screen, and an estimate that it will move there on the next screen. F
/ 2 represents the center of the screen, and the left side of the equation (2) represents the expected shift amount of the center of the object on the next screen. In equation (2), the absolute value of the deviation amount on the next screen is the absolute value δ of the deviation amount on the current screen.
The case where it is larger than n is shown. At this time, the current image data is taken in even if the expression (1) is not established. This is because at least the current screen will be closer to the center than the next screen.

【0026】に記した1つ前の画像データを取り込む
よう選択指令を発するのは現在のずれ量の絶対値δnが
1つ前のずれ量の絶対値δpより大きい場合で次式が成
立する場合である。 |δn|>|δp| ……(3)
When the absolute value δn of the current displacement amount is larger than the absolute value δp of the previous displacement amount, the selection command is issued to capture the image data of the immediately preceding displacement described in (2) Is. | Δn |> | δp | (3)

【0027】またはのいずれにも属さない場合はす
べてとなる。
If it does not belong to any of the above, it becomes all.

【0028】以上述べた判断基準は第1、第2メモリの
内容共有効画像であった場合の動作であるが、もし少な
くもどちらかのメモリ内容が無効視野の画像であった場
合の判断基準は下表に従う。現在画像 前視野画像 動作 無効 無効 画像取込継続 有効 無効 画像取込継続 無効 有効 前視野画像採用
The judgment criteria described above are the operations when the contents of both the first and second memories are valid images, but at least at least one of the memories is an invalid field of view image. Follows the table below. Current image Front view image operation Invalid Invalid Image capture continued Valid Invalid Image capture continued Invalid Invalid Front field image adopted

【0029】最良画像を取り込んだら、次に視野内の有
効画像がなくなるまで、すなわち、0−1−0,0−1
−0−1,……が続く限りはダミーサイクルを繰り返
す。
Once the best image has been captured, there are no more valid images in the field of view, ie 0-1-0,0-1.
As long as -0-1, ... continues, the dummy cycle is repeated.

【0030】図2に示すブロック図の操作はソフトウェ
アのプログラムによって容易に構成することができる。
しかし、ソフトウェアで演算するときは処理時間がかか
るので、一般的にオンラインで速い検査をするには不向
きである。高速オンライン検査のために、以下にハード
ウェア回路で演算を行う例を示す。
The operation of the block diagram shown in FIG. 2 can be easily configured by a software program.
However, since it takes a long processing time to perform calculation by software, it is generally unsuitable for fast online inspection. For high speed online inspection, an example of performing calculation by a hardware circuit is shown below.

【0031】次にサンプリング部71の回路構成例を説
明する。図4は水平走査線と対象物の画像との関係を示
す図である。対象物10が画面上で適切な位置つまり画
面のほぼ中央部に写されているか否かを調べるには対象
物10の幅が最大となる付近の垂直方向の位置、図4で
は上下方向ほぼ中央の水平走査線上の画像データを調べ
ればよい。このようにすれば2次元の画像データを1次
元にすることができ、取り扱いが容易となる。しかし1
本の水平走査線のデータではノイズなどに対して弱いの
で上下複数本の平均値を用いた方がよい。図4において
は水平走査線を上より順に付番してH0〜Hnとした場
合、中央部の例えば4本Hm0〜Hm3の平均像の2値
化像を用いた1次元2値化データとして取り出す回路を
説明する。
Next, a circuit configuration example of the sampling section 71 will be described. FIG. 4 is a diagram showing the relationship between the horizontal scanning line and the image of the object. In order to check whether or not the object 10 is imaged at an appropriate position on the screen, that is, in the substantially central portion of the screen, a vertical position near the maximum width of the object 10, that is, a substantially vertical center in FIG. It suffices to check the image data on the horizontal scanning line. By doing so, the two-dimensional image data can be made one-dimensional, and the handling becomes easy. But one
Since the data of the horizontal scanning line of one book is weak against noise and the like, it is better to use the average value of a plurality of upper and lower lines. In FIG. 4, when the horizontal scanning lines are sequentially numbered from the top to H0 to Hn, for example, one-dimensional binarized data using a binarized image of an average image of four lines Hm0 to Hm3 in the central portion is taken out. The circuit will be described.

【0032】図5はサンプリング回路と2値化回路とを
示す図である。711は撮像用カメラ4の垂直走査タイ
ミング発生器であり、水平走査線Hkを発生するタイミ
ングを決定する。加算ゲート712には水平走査線ごと
にディジタル化されたビデオ信号が入力され、予め設定
した水平走査線、図4の場合Hm0〜Hm3のデータの
み通過させ、他の水平走査線のデータをマスクして出力
させないようにする。1Hディレイライン713は加算
器714で加算した水平走査線1ライン分のデータを保
持するメモリである。加算器714は水平走査ライン上
の各画素と、水平方向同一位置にある1Hディレイライ
ン713の各画素とを加算する加算器である。加算した
結果は再び1Hディレイライン713に蓄えられてゆく
ので加算器714の出力は加算ゲートを通過した水平走
査ラインの積算値となっている。積算値を、加算したラ
イン数で割れば平均値が得られるので、実質的に積算値
は平均値そのものと言って良い。
FIG. 5 is a diagram showing a sampling circuit and a binarization circuit. Reference numeral 711 denotes a vertical scanning timing generator of the imaging camera 4, which determines the timing of generating the horizontal scanning line Hk. A video signal digitized for each horizontal scanning line is input to the addition gate 712, and only the data of a preset horizontal scanning line, that is, Hm0 to Hm3 in the case of FIG. 4, is passed and the data of other horizontal scanning lines are masked. So that it is not output. The 1H delay line 713 is a memory that holds the data for one horizontal scanning line added by the adder 714. The adder 714 is an adder that adds each pixel on the horizontal scanning line and each pixel on the 1H delay line 713 at the same position in the horizontal direction. The result of the addition is stored again in the 1H delay line 713, so that the output of the adder 714 is the integrated value of the horizontal scanning lines that have passed through the addition gate. Since the average value can be obtained by dividing the integrated value by the number of added lines, the integrated value can be said to be the average value itself.

【0033】しきい値設定器722は対象物10と背景
とを区分するしきい値を設定する。2値化器721はこ
のしきい値により積算された1次元データを2値化し、
平均化された1次元2値化像を出力する。なお、上述の
説明では4本の水平走査線のデータを加算したが、垂直
走査タイミング発生器711のタイミングを変更するこ
とにより、加算する水平走査線とその本数を調整するこ
とができる。なお1Hディレイライン713は1画像デ
ータごとに初期化(各画素をクリア)される。
The threshold setter 722 sets a threshold for distinguishing the object 10 from the background. The binarizer 721 binarizes the one-dimensional data accumulated by this threshold value,
An averaged one-dimensional binary image is output. Although the data of four horizontal scanning lines are added in the above description, the horizontal scanning lines to be added and the number thereof can be adjusted by changing the timing of the vertical scanning timing generator 711. The 1H delay line 713 is initialized (clears each pixel) for each image data.

【0034】次に有効視野判定部73の回路例を説明す
る。2値化器721から出力された1次元2値化像には
対象物が1、背景が0で表されているのでこれを用いて
水平走査線上で1個の対象物が完全に画面上に(1次元
2値化像上に)表れているかを調べることが出来る。こ
れは図3で説明した変化パターンを1次元2値化像から
抽出し、予め設定した有効視野と無効視野を表す変化パ
ターンと比較して有効か無効かを調べる。
Next, a circuit example of the effective visual field determination section 73 will be described. In the one-dimensional binarized image output from the binarizer 721, the object is represented by 1 and the background is represented by 0. Therefore, by using this, one object is perfectly displayed on the screen on the horizontal scanning line. It is possible to check whether it appears (on the one-dimensional binarized image). For this, the change pattern described in FIG. 3 is extracted from the one-dimensional binarized image, and it is checked whether it is valid or invalid by comparing it with a change pattern representing a preset effective visual field and invalid visual field.

【0035】図6は有効視野判定部73を表す回路の一
例を示す図である。なお、有効視野判定部73はソフト
ウェアによっても容易に実現できるが、ハードウェアの
方が高速処理ができるので、本回路を設けている。73
1は極性反転検出器であり、1次元2値化像の値が0→
1または1→0に変化する度にシフト信号SHを発生す
る。732はタイミングを同期させるためのレジスタ
で、1クロック分データの出力を遅らせ極性変化後の画
素を送り出す。7320〜7324は各1ビットのレジ
スタであり、全体で5ビットのシフトレジスタを形成す
る。シフトレジスタの内容はシフト信号SHによって矢
印方向に順次シフトする。5ビットのシフトレジスタと
した理由は図3に示した最大の変化パターンの5ビット
に合わせたものである。734は判定ROMであり、シ
フトレジスタから出力された変化パターンを予め格納さ
れている図3に示す有効視野および無効視野の変化パタ
ーンと比較し、判定を行う。この判定結果はラッチ73
5で必要期間保持され、ストローブ信号STにより出力
される。ストローブ信号STは例えば図4で示したHm
3の終了時等が便利である。なお、シフトレジスタ73
20〜7324も1画面(1フレーム)ごとに初期化を
行う。
FIG. 6 is a diagram showing an example of a circuit representing the effective visual field determination section 73. Although the effective visual field determination unit 73 can be easily realized by software, this circuit is provided because the hardware can perform higher speed processing. 73
1 is a polarity inversion detector, and the value of the one-dimensional binary image is 0 →
The shift signal SH is generated every time 1 or 1 → 0. Reference numeral 732 is a register for synchronizing the timing, which delays the output of data for one clock and sends out the pixel after the polarity change. Reference numerals 7320 to 7324 are 1-bit registers, and form a 5-bit shift register as a whole. The contents of the shift register are sequentially shifted in the arrow direction by the shift signal SH. The reason for using the 5-bit shift register is to match the 5-bit maximum change pattern shown in FIG. A determination ROM 734 compares the change pattern output from the shift register with the change patterns of the effective visual field and the invalid visual field shown in FIG. 3, which are stored in advance, and makes a determination. This determination result is latch 73
It is held for a required period at 5 and is output by the strobe signal ST. The strobe signal ST is, for example, Hm shown in FIG.
It is convenient at the end of 3, etc. The shift register 73
20 to 7324 are also initialized for each screen (one frame).

【0036】次に中心ずれ演算部74の回路例を説明す
る。本回路を成立させるために撮像用カメラ4の視野は
画面に1つの対象物10が完全に写され2つ以上の対象
物10が完全に写されないようにカメラの視野を調整し
ておく。これは2つの対象物10が完全に画面に入る場
合、解析が不可能になるからである。なお、対象物10
は1つそしてただ1つが完全に写っていれば、不完全な
対象物が一緒に写っていても問題はない。
Next, a circuit example of the center deviation calculating section 74 will be described. In order to establish this circuit, the field of view of the imaging camera 4 is adjusted so that one object 10 is completely imaged on the screen and two or more objects 10 are not completely imaged on the screen. This is because the analysis becomes impossible when the two objects 10 completely enter the screen. The object 10
As long as one and only one is perfectly visible, it is okay to have an imperfect object together.

【0037】図7は中心ずれ演算部74を表す回路の一
例を示す図である。画素同期パルスはシステム全体に共
通のシステムクロックで、画像情報が1画素移動する度
に1パルス発生する。画素同期パルスは水平方向パルス
カウンタ741で計数される。従って水平方向パルスカ
ウンタ741の出力Hpは現在の1次元2値化像の横方
向位置をリアルタイムに表現している。742,743
はレジスタでクロック信号CKを入力したときのカウン
タ出力Hpの値を保持する。744,745は極性変化
検出器で744は1次元2値化像の最初の立ち上がりを
検出してクロック信号CKとしてレジスタ742に出力
し、745は最初の立ち上がりに続く立ち下がりを検出
し、クロック信号CKとしてレジスタ743に出力す
る。図3に示すように、有効視野の変化パターンは1次
元2値化像の最初の立ち上がりが対象物10の左端位
置、この立ち上がりに続く立ち下がりが対象物10の右
端位置を示している。これによりレジスタ742には対
象物10の左端位置が保持され、レジスタ743には対
象物10の右端位置が保持される。
FIG. 7 is a diagram showing an example of a circuit representing the center deviation calculating section 74. The pixel synchronization pulse is a system clock common to the entire system, and one pulse is generated each time image information moves by one pixel. The pixel synchronizing pulse is counted by the horizontal pulse counter 741. Therefore, the output Hp of the horizontal pulse counter 741 represents the current horizontal position of the one-dimensional binary image in real time. 742,743
Holds the value of the counter output Hp when the clock signal CK is input to the register. 744 and 745 are polarity change detectors, 744 detects the first rising edge of the one-dimensional binarized image and outputs it as a clock signal CK to the register 742, and 745 detects the falling edge following the first rising edge, and the clock signal It is output to the register 743 as CK. As shown in FIG. 3, in the change pattern of the effective visual field, the first rising edge of the one-dimensional binarized image indicates the left end position of the object 10 and the trailing edge thereof indicates the right end position of the object 10. As a result, the register 742 holds the left end position of the object 10 and the register 743 holds the right end position of the object 10.

【0038】平均器746は両レジスタ742,743
の保持する左端、右端位置の平均をとり、対象物10の
中心位置を算出する。なお、平均器746は原則的には
2入力の加算器にすぎないので実現は容易である。Fは
水平方向の全画素数で例えば256,512個等が用い
られる。F/2は画面水平方向の中心座標を示す。引算
器747は対象物10の中心位置PとF/2との差δを
算出する。差δは対象物10の画面中心からのずれ量δ
を表す。748,749はメモリで現在の画像の1つ前
の画像のデータを保持し、748は対象物10の中心位
置P、749はずれ量δを保持する。なお、現在の対象
物の中心位置をPn,1つ前の中心位置をPp,現在の
ずれ量をδn,1つ前のずれ量をδpで表す。
The averager 746 is composed of both registers 742 and 743.
The center position of the object 10 is calculated by taking the average of the left end and right end positions held by. The averaging device 746 is, in principle, only a two-input adder, so that it is easy to realize. F is the total number of pixels in the horizontal direction, for example, 256 or 512 is used. F / 2 indicates the center coordinate in the horizontal direction of the screen. The subtractor 747 calculates the difference δ between the center position P of the object 10 and F / 2. The difference δ is the amount of deviation δ from the center of the screen of the object 10.
Represents Numerals 748 and 749 hold data of the image immediately preceding the current image in the memory, 748 holds the center position P of the object 10, and 749 holds the shift amount δ. The current center position of the object is represented by Pn, the previous center position by Pp, the current displacement amount by δn, and the previous displacement amount by δp.

【0039】図8は図7に示した中心ずれ演算回路の説
明図である。一例として変化パターン1−0−1−0−
1の場合を示す。この変化パターンの1次元2値化像に
対してa点は変化検出器744で検出される最初の立ち
上がりであり、b点はこの最初の立ち上がりに続く最初
の立ち下がりで、変化検出器745によって検出され
る。他の立ち上がり、立ち下がりは検出されない。これ
により対象物10の左端a,右端bの位置を検出するこ
とができる。Pnはこのa,b点の中心を示す。またF
/2はこの画面の水平方向の中心を示す。δnはこのF
/2とPnとのずれ量を示す。ずれ量の正,負により対
象物10の中心Pnが画面の右側か左側かにあるのがわ
かる。
FIG. 8 is an explanatory diagram of the center shift calculating circuit shown in FIG. As an example, the change pattern 1-0-1-0-
The case of 1 is shown. For the one-dimensional binarized image of this change pattern, the point a is the first rising edge detected by the change detector 744, and the point b is the first falling edge following this first rising edge. To be detected. Other rising edges and falling edges are not detected. Thereby, the positions of the left end a and the right end b of the object 10 can be detected. Pn indicates the center of the points a and b. Also F
/ 2 indicates the horizontal center of this screen. δn is this F
The amount of deviation between / 2 and Pn is shown. It can be seen that the center Pn of the object 10 is on the right side or the left side of the screen depending on whether the shift amount is positive or negative.

【0040】次に第2実施の形態を説明する。本実施の
形態は、第1実施の形態に対して第1メモリ61、第2
メモリ62の使用法を変えたもので、他は同じである。
図2に示す第1実施の形態では、第1メモリ61には現
在の画像データ、第2メモリ62には1つ前の画像デー
タを格納するため画面が変わり新たな現在の画像データ
が入力されるとこれを第1メモリ61に格納し、第1メ
モリの内容を第2メモリ62に移転し1つ前の画像デー
タとしている。つまり第1メモリ61と第2メモリは2
次元データのシフトレジスタの如く働く。しかし画像デ
ータは2次元で情報量も多く1動作に多大の時間を要す
る。これを解決するため、第2実施の形態では第1メモ
リ61と第2メモリ62に交互に画像データを格納する
ようにし、選択指令もこれに対応させたものである。
Next, a second embodiment will be described. This embodiment is different from the first embodiment in that the first memory 61, the second memory
The usage of the memory 62 is changed, and the others are the same.
In the first embodiment shown in FIG. 2, since the current image data is stored in the first memory 61 and the previous image data is stored in the second memory 62, the screen is changed and new current image data is input. Then, this is stored in the first memory 61, and the contents of the first memory are transferred to the second memory 62 to be the previous image data. That is, the first memory 61 and the second memory are 2
It works like a dimensional data shift register. However, image data is two-dimensional and has a large amount of information, which requires a large amount of time for one operation. In order to solve this, in the second embodiment, the image data is alternately stored in the first memory 61 and the second memory 62, and the selection command also corresponds to this.

【0041】図9は第2実施の形態の画像メモリの基本
概念図である。なお、最良画像判定装置7は第1実施の
形態と同じである。通常は図2に示すように第1メモリ
を経由して第2メモリに次々に転送し、固定した第1メ
モリと第2メモリに選択指令を出すことが考えられる
が、このようにすると、上述したように新たな現在画像
が来るたびに転送する動作が必要で、その動作時間が必
要になる。そこで、より高速の処理をハードウェアで行
うために図9の方法を用いる。第1メモリ61と第2メ
モリ62はそれぞれ全く対等な1画面分の画像メモリで
ある。書き込みは61,62のどちらに対しても同様に
行える。しかし一度には何れか一方にのみアクセスでき
る。アクセスの順序は交互であり、現在の画面の画像デ
ータを第1メモリ61に書き込んだ後、次の画面の画像
データを第2メモリ62に書き込む。読み出しは反転選
択指令により61,62のいずれからでも行える。第1
メモリ61,第2メモリ62のいずれかに現在の画像デ
ータ、他方に1つ前の画面の画像データが格納され、ど
ちらかに現在の画像データが格納されるというように固
定されず次の約束に従う。
FIG. 9 is a basic conceptual diagram of the image memory of the second embodiment. The best image determination device 7 is the same as in the first embodiment. Normally, as shown in FIG. 2, it is possible to transfer data to the second memory one after another via the first memory and issue a selection command to the fixed first memory and second memory. As described above, the operation of transferring the new current image is required each time, and the operation time is required. Therefore, the method of FIG. 9 is used in order to perform higher speed processing by hardware. The first memory 61 and the second memory 62 are image memories for one screen which are completely equal to each other. Writing can be similarly performed for both 61 and 62. However, only one of them can be accessed at a time. The access order is alternating, and after writing the image data of the current screen in the first memory 61, the image data of the next screen is written in the second memory 62. Reading can be performed from either 61 or 62 by an inversion selection command. First
The current image data is stored in one of the memory 61 and the second memory 62, the image data of the previous screen is stored in the other, and the current image data is stored in either one. Follow

【0042】書き込みが第1メモリ61に対して行わ
れたとき、 1つ前の画面の画像データ:第2メモリ62 現画面の画像データ :第1メモリ61 書き込みが第2メモリ62に対して行われたとき、 1つ前の画面の画像データ:第1メモリ61 現画面の画像データ :第2メモリ62
When the writing is performed in the first memory 61, the image data of the immediately preceding screen: the second memory 62, the image data of the current screen: the first memory 61, the writing is performed in the second memory 62. Image data of the previous screen: first memory 61 image data of the current screen: second memory 62

【0043】このような方法で第1メモリ61と第2メ
モリ62がその格納する内容をフレームの変更(画面の
変更)の度に変えると選択指令の対応が必要となる。選
択指令は現在の画像データと1つ前の画像データがそれ
ぞれ固定したメモリに格納されているとして作成する方
が容易であるので、このようにして作成された選択指令
をフレームの変更に応じて反転した反転選択指令とし、
メモリの変更に対応させる。
If the contents stored in the first memory 61 and the second memory 62 are changed every time the frame is changed (the screen is changed) by such a method, it is necessary to deal with the selection command. It is easier to create the selection command assuming that the current image data and the previous image data are stored in the fixed memories, respectively. Therefore, the selection command created in this way can be changed according to the frame change. Inverted reverse selection command,
It corresponds to the change of memory.

【0044】図10は第2実施の形態の画像メモリ関係
の構成図である。入力される画像は図2に示す撮像用カ
メラ4からの2次元画像データである。画素同期パルス
は第1メモリ61,第2メモリ62への書込指令であ
り、フレーム信号は撮像用カメラ4の1フレーム進行す
る度に発生する信号である。メモリセレクタ63は図2
の場合と同じであり、第1メモリ61または第2メモリ
62からのデータをD1またはD2端子より入力し反転
選択指令信号N′の値によって選択し、Y端子より選択
出力する。64はTプリップフロップであり、フレーム
信号により1画面変わる度に出力する極性が反転する。
これにより第1メモリ61、第2メモリ62に加えられ
る画素同期パルスによる書込み信号はANDゲート66
A,66Bで交互に禁止される。すなわちフレーム信号
毎にいずれかのメモリ61,62に交互に書き込まれ
る。一方メモリセレクタ63に対する選択指令Nはその
まま動作するのでなく、XORゲート65によってTフ
リップフロップ64の出力に応じて極性を反転し、メモ
リ61,62の交互の変換に応じた反転選択指令N′と
なってメモリセレクタ63のS端子に加わる。この動作
は特に外部から把握する必要はない、すなわち透過的で
あるため、本方式を採用する事による制御の複雑化はな
い。
FIG. 10 is a block diagram of the image memory related to the second embodiment. The input image is two-dimensional image data from the imaging camera 4 shown in FIG. The pixel synchronization pulse is a write command to the first memory 61 and the second memory 62, and the frame signal is a signal generated each time the imaging camera 4 advances by one frame. The memory selector 63 is shown in FIG.
This is the same as the case of 1., the data from the first memory 61 or the second memory 62 is input from the D1 or D2 terminal, selected by the value of the inversion selection command signal N ', and selectively output from the Y terminal. Reference numeral 64 denotes a T flip-flop, which reverses the polarity output every time one screen changes depending on the frame signal.
As a result, the write signal based on the pixel synchronizing pulse applied to the first memory 61 and the second memory 62 is not AND gate 66.
Alternately prohibited at A and 66B. That is, each frame signal is alternately written in one of the memories 61 and 62. On the other hand, the selection command N to the memory selector 63 does not operate as it is, but the polarity is inverted by the XOR gate 65 in accordance with the output of the T flip-flop 64, and an inversion selection command N'corresponding to the alternate conversion of the memories 61 and 62 is generated. Then, it is added to the S terminal of the memory selector 63. Since this operation does not need to be grasped from the outside, that is, it is transparent, the control is not complicated by adopting this method.

【0045】このように少量の付加論理回路で通常の画
像メモリが等価的に2次元シフトレジスタとして動作
し、実際の画像転送に要する動作時間を全く必要としく
なる。
As described above, a normal image memory operates equivalently as a two-dimensional shift register with a small amount of additional logic circuits, and the operation time required for actual image transfer becomes completely unnecessary.

【0046】[0046]

【発明の効果】以上の説明より明らかなように、本発明
は、移動する対象物を一定時間毎に撮像し、その画像デ
ータのうち最良の画像データを選択することにより、従
来必要とされていた対象物搬送機の移動距離測定器、撮
像用カメラのシャッタを開くトリガ発生機を必要とせ
ず、撮像用カメラも高価なランダムシャッタ方式でなく
一定周期で開閉するノーマルシャッタカメラでよいので
ハードウェアが極めて簡単となり安価となる。また現在
の画面と1つ前の画面とを2つの画像メモリに交互に格
納することにより、1つのメモリより他のメモリへの画
像データの転送が不要となり、更なる高速処理が可能に
なる。
As is apparent from the above description, the present invention has been conventionally required by picking up an image of a moving object at regular intervals and selecting the best image data from the image data. It does not require a moving distance measuring device for the object carrier, a trigger generator that opens the shutter of the imaging camera, and the imaging camera can be a normal shutter camera that opens and closes at a fixed cycle instead of the expensive random shutter system. Is extremely simple and inexpensive. Further, by alternately storing the current screen and the previous screen in the two image memories, it is not necessary to transfer the image data from one memory to another memory, which enables further high speed processing.

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

【図1】本発明の実施例の基本構成を示すブロック図で
ある。
FIG. 1 is a block diagram showing a basic configuration of an embodiment of the present invention.

【図2】第1実施の形態の構成を示すブロック図であ
る。
FIG. 2 is a block diagram showing the configuration of the first embodiment.

【図3】有効視野および無効視野判定を説明する図であ
る。
FIG. 3 is a diagram illustrating determination of an effective visual field and an invalid visual field.

【図4】水平走査線と対象物の画像との関係を示す図で
ある。
FIG. 4 is a diagram showing a relationship between a horizontal scanning line and an image of an object.

【図5】サンプリング回路と2値化回路とを示す図であ
る。
FIG. 5 is a diagram showing a sampling circuit and a binarization circuit.

【図6】有効視野判定回路図である。FIG. 6 is an effective visual field determination circuit diagram.

【図7】中心ずれ演算回路である。FIG. 7 is a center shift calculation circuit.

【図8】中心ずれ演算回路を説明する図である。FIG. 8 is a diagram illustrating a center shift calculation circuit.

【図9】第2実施の形態の画像メモリの基本概念図であ
る。
FIG. 9 is a basic conceptual diagram of an image memory according to a second embodiment.

【図10】第2実施の形態の画像メモリ関係の構成図で
ある。
FIG. 10 is a configuration diagram related to an image memory according to a second embodiment.

【図11】従来の移動体の撮像装置の構成図である。FIG. 11 is a configuration diagram of a conventional moving body imaging apparatus.

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

4 撮像用カメラ 6 画像解析機 7 最良画像判定装置 61 第1メモリ 62 第2メモリ 63 メモリセレクタ 71 サンプリング部 72 2値化部 73 有効視野判定部 74 中心ずれ演算部 75 最良画像判定部 4 Imaging Camera 6 Image Analyzer 7 Best Image Judgment Device 61 First Memory 62 Second Memory 63 Memory Selector 71 Sampling Section 72 Binarization Section 73 Effective Field of View Judgment Section 74 Center Deviation Calculation Section 75 Best Image Judgment Section

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 固定した撮像装置の前を移動する移動体
を一定時間の間隔で撮像し、現在の画像データと1つ前
の画像データとを記憶し、両画像データについて移動体
の移動方向の中心座標と画面の中心とのずれ量を演算
し、このずれ量に基づいていずれかの画像データを使用
するかそのまま画像取込を継続するかを決定することを
特徴とする移動体画像の取込方法。
1. A moving body moving in front of a fixed image pickup device is imaged at regular time intervals, current image data and previous image data are stored, and the moving direction of the moving body for both image data is stored. The amount of deviation between the center coordinates of the image and the center of the screen is calculated, and based on this amount of deviation, it is determined whether to use any image data or continue image capture as it is. Acquisition method.
【請求項2】 一定の時間間隔で移動体を撮像する固定
された撮像装置と、この撮像装置の撮像した画像データ
の代表的範囲を1次元データとして取り出すサンプリン
グ部と、この1次元データを移動体と背影とに2値化し
たデータとする2値化部と、この2値化データについて
移動体の全体像が画面内にある有効画像データを判定す
る有効視野判定部と、前記撮像装置の撮像した現在の画
像データと1つ前の画像データとを格納する画像メモリ
と、前記有効視野判定部の判定により抽出した2値化デ
ータの移動体の中心位置と画面の中心とのずれ量を演算
する中心ずれ演算部と、この中心ずれ演算部の演算した
ずれ量に基づき、前記画像メモリの現在の画像データと
1つ前の画像データの使用または画像取込みの継続を判
定する最良画像判定部とを備えたことを特徴とする移動
体画像の取込装置。
2. A fixed image pickup device for picking up an image of a moving body at fixed time intervals, a sampling unit for taking out a representative range of image data picked up by the image pickup device as one-dimensional data, and moving the one-dimensional data. A binarization unit for binarizing the data of the body and the back shadow, an effective visual field determination unit for determining effective image data in which the entire image of the moving body is on the screen for the binarized data, and the imaging device. An image memory for storing the captured current image data and the immediately preceding image data, and an amount of deviation between the center position of the moving body and the center of the screen of the binarized data extracted by the determination of the effective visual field determination unit. Best image determination for determining use of the current image data and the previous image data of the image memory or continuation of image capture based on the center shift calculating unit to be calculated and the shift amount calculated by the center shift calculating unit And a moving body image capturing device.
【請求項3】 前記サンプリング部は、所定の範囲の複
数本の水平走査線の1次元データを垂直方向に加算した
1次元データを算出することを特徴とする請求項2記載
の移動体画像の取込装置。
3. The moving object image according to claim 2, wherein the sampling unit calculates one-dimensional data by vertically adding one-dimensional data of a plurality of horizontal scanning lines in a predetermined range. Capture device.
【請求項4】 前記有効視野判定部は、前記2値化デー
タが0から1に変化した時をもって0または1のいずれ
かのレベルを割当て、前記2値化データが1から0に変
化した時をもって他方のレベルを割当てて、これらの変
化を0と1の交互の配列で表した変化パターンを作成
し、予め作成した標準変化パターンと比較して1つの移
動体が確実に画面内に含まれているか否かを判定するこ
とを特徴とする請求項1記載の移動体画像の取込装置。
4. The effective visual field determination unit assigns a level of 0 or 1 when the binarized data changes from 0 to 1, and when the binarized data changes from 1 to 0. Then, the other level is assigned to create a change pattern in which these changes are represented by an alternating arrangement of 0 and 1, and one moving object is surely included in the screen in comparison with the standard change pattern created in advance. The moving image capturing apparatus according to claim 1, wherein it is determined whether or not the moving body image is captured.
【請求項5】 前記中心ずれ演算部は、前記2値化デー
タが最初に移動体を検出した事を示す変化と、これに続
く最初の移動体消滅を示す変化の位置の平均値を2値化
データの中心とすることを特徴とする請求項1記載の移
動体画像の取込装置。
5. The center deviation computing unit binarizes an average value of a change position indicating that the moving body is first detected in the binarized data and a subsequent change position indicating the disappearance of the moving body. The moving object image capturing apparatus according to claim 1, wherein the apparatus is the center of the converted data.
【請求項6】 前記画像メモリは第1メモリと第2メモ
リからなり、画面が変わる度に変わった画面の画像デー
タを第1メモリと第2メモリに交互に記憶するように
し、前記最良画像判定部は現在の画像データと1つ前の
画面の画像データの選択指令を、第1メモリに現在の画
像データ、第2メモリに1つ前の画像データが固定的に
格納されているとして表した第1選択指令を、画面が変
わるのに同期して第1選択指令を反転した第2選択指令
に変えて出力することを特徴とする請求項1記載の移動
体画像の取込装置。
6. The best image determination means is configured such that the image memory includes a first memory and a second memory, and image data of a screen changed every time the screen is changed is alternately stored in the first memory and the second memory. The section shows the instruction to select the current image data and the image data of the previous screen, assuming that the first image data is fixedly stored in the first memory and the previous image data is fixedly stored in the second memory. 2. The moving object image capturing apparatus according to claim 1, wherein the first selection command is output by changing the first selection command to a second selection command that is the inverted first selection command in synchronization with the screen change.
JP09781296A 1996-04-19 1996-04-19 Method and apparatus for capturing moving object image Expired - Lifetime JP3349037B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP09781296A JP3349037B2 (en) 1996-04-19 1996-04-19 Method and apparatus for capturing moving object image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP09781296A JP3349037B2 (en) 1996-04-19 1996-04-19 Method and apparatus for capturing moving object image

Publications (2)

Publication Number Publication Date
JPH09288060A true JPH09288060A (en) 1997-11-04
JP3349037B2 JP3349037B2 (en) 2002-11-20

Family

ID=14202179

Family Applications (1)

Application Number Title Priority Date Filing Date
JP09781296A Expired - Lifetime JP3349037B2 (en) 1996-04-19 1996-04-19 Method and apparatus for capturing moving object image

Country Status (1)

Country Link
JP (1) JP3349037B2 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008502918A (en) * 2004-06-09 2008-01-31 コグネックス・テクノロジー・アンド・インベストメント・コーポレーション Method and apparatus for visual detection and inspection of objects
JP2008241718A (en) * 2001-06-22 2008-10-09 Orbotech Ltd High-sensitivity optical scanning using memory integration
USRE44353E1 (en) 2004-11-12 2013-07-09 Cognex Technology And Investment Corporation System and method for assigning analysis parameters to vision detector using a graphical interface
US8891852B2 (en) 2004-06-09 2014-11-18 Cognex Technology And Investment Corporation Method and apparatus for configuring and testing a machine vision detector
US9094588B2 (en) 2004-06-09 2015-07-28 Cognex Corporation Human machine-interface and method for manipulating data in a machine vision system
US9092841B2 (en) 2004-06-09 2015-07-28 Cognex Technology And Investment Llc Method and apparatus for visual detection and inspection of objects
US9651499B2 (en) 2011-12-20 2017-05-16 Cognex Corporation Configurable image trigger for a vision system and method for using the same
US10311592B2 (en) 2014-04-28 2019-06-04 Canon Kabushiki Kaisha Image processing method and image capturing apparatus
JP2021131359A (en) * 2020-02-21 2021-09-09 レーザーテック株式会社 Luminance correction device, inspection device, method for correcting luminance, and luminance correction program

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8536506B2 (en) 2001-06-22 2013-09-17 Orbotech Ltd. Imaging device and method for high-sensitivity optical scanning and integrated circuit therefor
JP2008241718A (en) * 2001-06-22 2008-10-09 Orbotech Ltd High-sensitivity optical scanning using memory integration
JP2008275611A (en) * 2001-06-22 2008-11-13 Orbotech Ltd High-sensitivity optical scanning using memory integration
US9232114B2 (en) 2001-06-22 2016-01-05 Orbotech Ltd. Imaging device and method for high-sensitivity optical scanning and integrated circuit therefor
US8119969B2 (en) 2001-06-22 2012-02-21 Orbotech Ltd Imaging device and method for high-sensitivity optical scanning and integrated circuit therefor
US9094588B2 (en) 2004-06-09 2015-07-28 Cognex Corporation Human machine-interface and method for manipulating data in a machine vision system
US8891852B2 (en) 2004-06-09 2014-11-18 Cognex Technology And Investment Corporation Method and apparatus for configuring and testing a machine vision detector
JP2008502918A (en) * 2004-06-09 2008-01-31 コグネックス・テクノロジー・アンド・インベストメント・コーポレーション Method and apparatus for visual detection and inspection of objects
US9092841B2 (en) 2004-06-09 2015-07-28 Cognex Technology And Investment Llc Method and apparatus for visual detection and inspection of objects
US9183443B2 (en) 2004-06-09 2015-11-10 Cognex Technology And Investment Llc Method and apparatus for configuring and testing a machine vision detector
JP2011247898A (en) * 2004-06-09 2011-12-08 Cognex Technology And Investment Corp Method and apparatus for visual detection and inspection of object
USRE44353E1 (en) 2004-11-12 2013-07-09 Cognex Technology And Investment Corporation System and method for assigning analysis parameters to vision detector using a graphical interface
US9651499B2 (en) 2011-12-20 2017-05-16 Cognex Corporation Configurable image trigger for a vision system and method for using the same
US10311592B2 (en) 2014-04-28 2019-06-04 Canon Kabushiki Kaisha Image processing method and image capturing apparatus
JP2021170404A (en) * 2014-04-28 2021-10-28 キヤノン株式会社 Image processing method and imaging device
JP2021131359A (en) * 2020-02-21 2021-09-09 レーザーテック株式会社 Luminance correction device, inspection device, method for correcting luminance, and luminance correction program

Also Published As

Publication number Publication date
JP3349037B2 (en) 2002-11-20

Similar Documents

Publication Publication Date Title
US4387298A (en) Recognition logic circuit for bar code reader systems
JPH09288060A (en) Method and apparatus for capturing moving body image
US5386482A (en) Address block location method and apparatus
US5815590A (en) Target light detection
US7110618B2 (en) Digital image analysis of reflecting markers
US4356390A (en) Optical path monitoring circuit for a document scanner
JPH08313454A (en) Image processing equipment
CN109767424A (en) Binocular vision train water filling port based on FPGA detects localization method
JPH067171B2 (en) Moving object detection method
JPH09178444A (en) Method of measuring shape through image processing, and sorting device therefor
JPS63288593A (en) Carrying object photographing device
JP2507811B2 (en) Binarization device
JPH06137837A (en) Part attitude judgement method for visual attitude selection device
JPH0560514A (en) Image processing device for traveling workpiece
JP3035578B2 (en) Inspection condition determination device, inspection device, and shutter speed determination device
JPH09330417A (en) Shape measuring unit
JP3175946B2 (en) Object position measuring method and device
JPS60252205A (en) Direction identifying device of moving object
JPH0844852A (en) Image processor
JPH04196993A (en) Image monitor device
JP2543900Y2 (en) Work posture determination device
JP2525769Y2 (en) Image processing device for parts feeder
JPS63282889A (en) Image processing method
JPH0511036A (en) Target tracking apparatus
JPS6136881A (en) Pattern discriminator

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080913

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110913

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140913

Year of fee payment: 12

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term