JP2000231640A - Method and device for deciding boundary of article - Google Patents

Method and device for deciding boundary of article

Info

Publication number
JP2000231640A
JP2000231640A JP11034468A JP3446899A JP2000231640A JP 2000231640 A JP2000231640 A JP 2000231640A JP 11034468 A JP11034468 A JP 11034468A JP 3446899 A JP3446899 A JP 3446899A JP 2000231640 A JP2000231640 A JP 2000231640A
Authority
JP
Japan
Prior art keywords
pixel
boundary
value
image
absolute
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
JP11034468A
Other languages
Japanese (ja)
Other versions
JP4299908B2 (en
Inventor
Masaki Ishizaka
正樹 石坂
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.)
Sysmex Corp
Original Assignee
Sysmex 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 Sysmex Corp filed Critical Sysmex Corp
Priority to JP03446899A priority Critical patent/JP4299908B2/en
Publication of JP2000231640A publication Critical patent/JP2000231640A/en
Application granted granted Critical
Publication of JP4299908B2 publication Critical patent/JP4299908B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Investigating Or Analysing Biological Materials (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To trace the outline of the picture of an article which is image-picked up with a video camera at high speed with a small circuit scale by calculating a direction in which a picture element is connected next with the connected direction of the picture element positioned in the boundary of the article as a reference. SOLUTION: An eight nearby picture element extraction filter 10 outputs eight bit data on a picture element at the boundary of particles. An edge tracing part 12 traces only the picture element positioned at the boundary of the particles. An eight nearby picture element normalizing unit 28 rearranges the bit arrangement, of eight nearby picture element state values stored in an eight nearby picture element memory 11 with the value of an absolute direction register 26 as a reference. A first arithmetic and logic unit 24 executes a prescribed operation and outputs the relative connection direction value of a next boundary. An adder 25 adds the relative connection direction value and an absolute connection direction value stored in the register 26 and outputs a value as the absolute connection direction value of the next boundary. The register 26 outputs a connection code (chain code) 28 which the boundary of the particles shows.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、画像中の物体の
輪郭をトレースする物体の境界決定方法および装置に関
し、さらに詳しくは、例えば血球や細胞などの粒子を、
顕微鏡を介してビデオカメラ等で撮像して画像メモリに
取り込み、この取り込んだ画像中の粒子領域の境界を画
像処理によって決定する物体の境界決定方法および装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an object boundary determination method and apparatus for tracing the outline of an object in an image, and more particularly, to a method for detecting particles such as blood cells and cells.
The present invention relates to a method and an apparatus for determining a boundary of an object which captures an image with a video camera or the like via a microscope, captures the captured image into an image memory, and determines a boundary of a particle region in the captured image by image processing.

【0002】[0002]

【従来の技術】一般に、物体の形状を知ることにより、
その物体の特徴や傾向を知ることができる。例えば、血
液や尿中に含まれる血球や細胞の形状により、体の状態
を知ることが可能である。このため、血球や細胞(通常
「粒子」と呼ぶ)をビデオカメラ等で撮像し、画像処理
によって血球や細胞の形状を解析することが行われてい
る。この解析では、粒子の輪郭(エッジまたは境界とも
いう)を追跡(トレース)することにより、粒子の周囲
長や面積などの特徴量を算出し、どのような形状をして
いるのかを数値的に把握するようにしている。
2. Description of the Related Art Generally, by knowing the shape of an object,
The characteristics and tendency of the object can be known. For example, it is possible to know the state of the body from the shape of blood cells and cells contained in blood and urine. For this reason, blood cells and cells (usually called “particles”) are imaged with a video camera or the like, and the shapes of the blood cells and cells are analyzed by image processing. In this analysis, features such as the perimeter and area of a particle are calculated by tracking the outline (also called an edge or a boundary) of the particle, and the shape of the particle is numerically determined. I try to figure it out.

【0003】画像中のある領域の境界に注目し解析する
手法としては、従来、例えば特公平5−71991号公
報に記載の「物体の境界の決定方法及び装置」や、特聞
昭63−301372号公報に記載の「画像処理装置」
などが知られている。
[0003] As a method of analyzing by paying attention to the boundary of a certain region in an image, a conventional method and an apparatus for determining a boundary of an object described in Japanese Patent Publication No. 5-71991 or Japanese Patent Publication No. Sho 63-301372 have been known. "Image processing device"
Etc. are known.

【0004】特公平5−71991号公報に記載の方法
では、図27に示すように、以下の方法で画像処理を行
い、物体の境界を追跡するようにしている。 ステップl:血球や細胞などの物体を撮像し、撮像した
画像をA/D変換し、各画素の輝度を多値画像(グレー
スケール)としてフレーム(画像)メモリに取り込み記
憶する。これを第1表示とする。
In the method described in Japanese Patent Publication No. 5-71991, as shown in FIG. 27, image processing is performed by the following method to track the boundary of an object. Step 1: An image of an object such as a blood cell or a cell is captured, the captured image is A / D converted, and the luminance of each pixel is captured and stored in a frame (image) memory as a multi-valued image (gray scale). This is the first display.

【0005】ステップ2:物体と背景とを区別するため
のしきい値を設定し、そのしきい値により、多値画像を
2値画像に変換し、別のフレームメモリに記憶する。こ
れを第2表示とする。
Step 2: A threshold value for distinguishing the object from the background is set, and the multi-valued image is converted into a binary image according to the threshold value and stored in another frame memory. This is the second display.

【0006】ステップ3:2値画像において、着目する
画素とその周囲8方向に隣接する8画素の値を取り出
し、ルックアップテーブルで変換し、これを別に用意し
たフレームメモリに蓄える。これを第3表示とする。こ
れにより、物体の輸郭部分の画素のみに非“0”の値を
持たせ、物体の内部および外部の画素には“0”の値を
持たせる。
Step 3: In a binary image, values of a pixel of interest and eight pixels adjacent in eight directions around the pixel of interest are extracted, converted by a look-up table, and stored in a separately prepared frame memory. This is the third display. As a result, only the pixels at the transposed part of the object have a non- “0” value, and the pixels inside and outside the object have a value of “0”.

【0007】ステップ4:第3表示画像をラスタースキ
ャンし、非ゼロ値の画素を探索する。いったん非ゼロ値
の画素を見つければ、その値とその画素に到達するため
に進行してきた方向をパラメータとしてルックアップテ
ーブルを参照し、次に進むべき画素の方向を決定する。
境界部分の画素を追跡する度にその画素に対応する第3
表示のメモリの内容をゼロクリアする。第3表示のメモ
リで次に連接(チェーン)する画素の内容が非ゼロであ
る間、境界部分の画素を追跡し、次に連接する画素の内
容がゼロであれば、全ての境界部分の画素を追跡し終わ
ったものとみなし、境界の迫跡を終了する。このように
して物体の境界を追跡し、最終的にチェーンコードを得
る。
Step 4: The third display image is raster-scanned to search for non-zero pixel values. Once a pixel with a non-zero value is found, the direction of the next pixel to be moved is determined by referring to the look-up table using the value and the direction of travel to reach that pixel as parameters.
Each time a pixel at the boundary is tracked, a third pixel corresponding to that pixel is tracked.
Clears the contents of the display memory to zero. While the contents of the next connected pixel in the memory of the third display are non-zero, the pixels at the boundary are tracked, and if the contents of the next connected pixel are zero, all the pixels at the boundary are tracked. Is deemed to have been tracked and the wake of the boundary is terminated. In this way, the boundaries of the object are tracked, and finally a chain code is obtained.

【0008】また、特開昭63−301372号公報に
記載の方法では、以下の方法で画像処理を行い、物体の
境界を追跡するようにしている。上記ステップ1〜3ま
では特公平5−71991号公報に記載の方法とほぼ同
じで、ステップ3から得た第3表示の画素値に対し、前
の画素の方向をkとした場合、k+2審目の桁(kが奇
数)、あるいはk+3審目の桁(kが偶数)からkが増
加する方向にチェーン方向を探索し、最初に見つかる
「1」となった桁をチェーンコードとして、境界を追跡
するようにしている。
In the method described in Japanese Patent Application Laid-Open No. 63-301372, image processing is performed by the following method to track the boundaries of objects. The above steps 1 to 3 are almost the same as the method described in Japanese Patent Publication No. 5-71991, and when the direction of the previous pixel is k with respect to the pixel value of the third display obtained from step 3, k + 2 The chain direction is searched in the direction in which k increases from the eye digit (k is an odd number) or the digit of the (k + 3) th judgment (k is an even number). I try to track.

【0009】従来においては、このような方法で画像処
理を行って境界の追跡を行うようにしていた。
Conventionally, image processing is performed by such a method to track a boundary.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、上記特
公平5−71991号公報に記載のエッジトレースの方
法は、ルックアップテーブルを多用しており、論理回路
の規模としては比較的大きく、またルックアップテーブ
ルに用いるPROMは論理素子としては比較的低速であ
るため、境界点追跡回路の高速化、低価格化が図りにく
いという問題があった。
However, the edge tracing method described in Japanese Patent Publication No. 5-71991 uses a lot of look-up tables, and the logic circuit is relatively large in scale. Since the PROM used for the table is relatively slow as a logic element, there has been a problem that it is difficult to increase the speed and cost of the boundary point tracking circuit.

【0011】また、特開昭63−301372号公報に
記載のエッジトレースの方法は、トレース方向の探索の
ために数ステップを必要とし、処理の高速化が困難であ
るという問題があった。
The edge tracing method described in Japanese Patent Application Laid-Open No. 63-301372 has a problem in that several steps are required for searching for a tracing direction, and it is difficult to speed up the processing.

【0012】この発明は、このような事情を考慮してな
されたもので、顕微鏡などを経てビデオカメラで撮像し
た物体の画像の輪郭の追跡を、高速かつ少ない回路規模
で行うことができるようにした物体の境界決定方法及び
装置を提供するものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and is intended to enable high-speed, small-scale circuit tracking of the outline of an image of an object captured by a video camera via a microscope or the like. The present invention provides a method and apparatus for determining a boundary of an object.

【0013】[0013]

【課題を解決するための手段】この発明の物体の境界決
定方法は、物体を撮像した画像の各画素の濃度情報を2
値信号に変換し物体領域を抽出した2値画像に対し、物
体領域に位置する画素についてそれら各画素が周囲の2
値信号に応じた値を持つような近傍画素状態値に変換す
るとともに、物体領域の頂点に位置する画素の座標を求
め、その座標に位置する画素を始点とし、上記近傍画素
状態値を参照しながら物体の境界に位置する画素の連接
してきた方向を基準とする相対連接方向値を求めること
により次に連接する方向の絶対連接方向値を算出し、こ
れを物体の境界に位置する各画素について繰り返すこと
により物体の境界を追跡することを特徴とするものであ
る。
According to a method for determining a boundary of an object according to the present invention, the density information of each pixel of an image obtained by imaging the object is represented by 2%.
With respect to the binary image obtained by converting the value into a value signal and extracting the object region, each pixel located in the object region
In addition to converting to a neighboring pixel state value having a value corresponding to the value signal, the coordinates of the pixel located at the vertex of the object area are obtained, the pixel located at the coordinates is set as a starting point, and the above-described neighboring pixel state value is referred to. While calculating the relative connection direction value based on the connected direction of the pixels located at the boundary of the object, the absolute connection direction value of the next connected direction is calculated, and this is calculated for each pixel positioned at the boundary of the object. The feature is that the boundary of the object is tracked by repeating.

【0014】この発明によれば、物体の境界の追跡に際
しては、物体領域の頂点に位置する画素を始点とし、物
体の境界に位置する画素の連接してきた方向を基準とす
る相対連接方向値を求めることにより次に連接する方向
の絶対連接方向値を算出するようにしているので、従来
のルックアップテーブルを用いる方法と比較して、物体
の画像の境界の追跡を、高速かつ少ない回路規模(高集
積化)で行うことが可能となる。
According to the present invention, when tracking the boundary of an object, the relative connection direction value based on the direction in which the pixels located at the vertex of the object area are connected to the starting point of the pixel located at the boundary of the object is used as a reference. By calculating the absolute connecting direction value of the next connecting direction, the tracking of the boundary of the image of the object can be performed faster and with a smaller circuit scale (compared to the conventional method using a lookup table). High integration).

【0015】[0015]

【発明の実施の形態】この発明の物体の境界決定方法に
おいて、処理対象である画像はカメラなどで物体を撮像
することにより得られる。このカメラとしては、撮像し
た物体の画像を電気信号に変換して出力することが可能
なものであればよく、CCD(電荷結合素子)を用いた
通常のビデオカメラを適用することができる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In an object boundary determination method according to the present invention, an image to be processed is obtained by imaging an object with a camera or the like. Any camera can be used as long as it can convert an image of a captured object into an electric signal and output the electric signal, and an ordinary video camera using a CCD (charge coupled device) can be applied.

【0016】このように、カメラとして通常のビデオカ
メラを適用すれば、撮像した画像は複数の画素をスキャ
ンしたアナログ映像信号として得られる。したがって、
アナログ映像信号をグレースケール(多値画像)で表し
たディジタル信号への変換、ディジタル信号の2値信号
への変換、2値信号の近傍画素状態値への変換、および
連接方向値の算出は、CPU,ROM,RAM,I/O
ポートからなるマイクロコンピュータを備えた画像処理
装置(イメージプロセッサ)で行うことができる。
As described above, when a normal video camera is applied as a camera, a captured image is obtained as an analog video signal obtained by scanning a plurality of pixels. Therefore,
The conversion of an analog video signal to a digital signal represented by a gray scale (multi-valued image), the conversion of a digital signal to a binary signal, the conversion of a binary signal to a neighboring pixel state value, and the calculation of a connection direction value CPU, ROM, RAM, I / O
The processing can be performed by an image processing device (image processor) including a microcomputer including a port.

【0017】上記構成においては、次に連接する方向の
絶対連接方向値を、前に連接してきた方向の絶対連接方
向値に相対連接方向値を加えることにより算出すること
ができる。
In the above configuration, the absolute connecting direction value of the next connecting direction can be calculated by adding the relative connecting direction value to the absolute connecting direction value of the previously connected direction.

【0018】また、この発明の物体の境界決定装置は、
物体を撮像した画像の各画素の濃度情報を2値信号に変
換し物体領域を抽出する2値化部と、得られた2値画像
に対し、物体領域に位置する画素についてそれら各画素
が周囲の2値信号に応じた値を持つような近傍画素状態
値に変換する画素抽出部と、物体領域の頂点に位置する
画素の座標を求める座標抽出部と、上記座標抽出部で得
られた座標に位置する画素を始点とし、上記画素抽出部
によって変換された近傍画素状態値を参照しながら物体
の境界に位置する画素の連接してきた方向を基準とする
相対連接方向値を求めることにより次に連接する方向の
絶対連接方向値を算出し、これを境界に位置する各画素
について繰り返すことにより物体の境界を追跡するエッ
ジトレース部を備えてなることを特徴とする。
Further, the object boundary determining apparatus of the present invention comprises:
A binarization unit for converting density information of each pixel of the image of the object into a binary signal to extract an object region; and for the obtained binary image, the pixels located in the object region are surrounded by A pixel extracting unit that converts the pixel value into a neighboring pixel state value having a value corresponding to the binary signal, a coordinate extracting unit that obtains coordinates of a pixel located at a vertex of the object area, and coordinates obtained by the coordinate extracting unit. With the pixel located at the starting point as a starting point, the relative connected direction value based on the connected direction of the pixels located at the boundary of the object is determined by referring to the neighboring pixel state value converted by the pixel extracting unit, An edge tracing unit is provided which calculates an absolute connection direction value of the connection direction and repeats the calculation for each pixel located at the boundary to track the boundary of the object.

【0019】以下、図面に示す実施例に基づいてこの発
明を詳述する。なお、これによってこの発明が限定され
るものではない。
Hereinafter, the present invention will be described in detail based on an embodiment shown in the drawings. Note that the present invention is not limited to this.

【0020】図lはこの発明の物体の境界決定方法の実
施に直接使用する物体の境界決定装置の構成を示すブロ
ック図である。
FIG. 1 is a block diagram showing the configuration of an object boundary determining apparatus directly used for implementing the object boundary determining method of the present invention.

【0021】この物体の境界決定装置は、測定する対象
物1を撮像するビデオカメラ2と、イメージプロセッサ
(画像処理装置)3と、マイクロコンピュータ4と、C
RTディスプレイ装置5と、外部記憶装置6から構成さ
れている。
The apparatus for determining a boundary of an object includes a video camera 2 for imaging an object 1 to be measured, an image processor (image processing apparatus) 3, a microcomputer 4,
It comprises an RT display device 5 and an external storage device 6.

【0022】イメージプロセッサ3は、デジタイザ7
と、コンパレータ8と、2値画像保持メモリ9と、画素
抽出部(ここでは8近傍画素抽出フィルタ10と8近傍
画素メモリ11)と、エッジトレース部12と、特徴量
抽出部13とから構成されている。
The image processor 3 includes a digitizer 7
, A comparator 8, a binary image holding memory 9, a pixel extraction unit (here, an 8-neighbor pixel extraction filter 10 and an 8-neighbor pixel memory 11), an edge trace unit 12, and a feature amount extraction unit 13. ing.

【0023】測定する対象物1は、例えばイメージング
フローサイトメータ等を流れる血球や尿に合まれる細胞
などの粒子である。イメージングフローサイトメータと
は、血液や尿などを希釈した試料液(サンプル液ともい
う)をフローセルと呼ばれる透明な管中に導いて試料流
(サンプル流ともいう)を形成し、この試料流に対しス
トロボ光やパルスレーザ光のようなパルス光を照射し
て、血液中に合まれる血球や尿中に合まれる細胞のよう
な粒子(被検粒子と称すこともある)をビデオカメラで
撮像する装置であり、本実施例では図示していないが、
対象物1をビデオカメラ2で撮像する場合、このような
方法で撮像することが可能である。
The object 1 to be measured is, for example, particles such as blood cells flowing through an imaging flow cytometer or cells mixed with urine. An imaging flow cytometer guides a sample solution (also called sample solution) diluted with blood or urine into a transparent tube called a flow cell to form a sample flow (also called sample flow). By irradiating pulsed light such as strobe light or pulsed laser light, the video camera captures particles (sometimes referred to as test particles) such as blood cells mixed with blood or cells mixed with urine. Although not shown in the present embodiment,
When an image of the object 1 is captured by the video camera 2, it is possible to capture an image by such a method.

【0024】ビデオカメラ2は、市販のビデオカメラで
あり、イメージングフローサイトメ一タを流れる血球や
細胞等の対象物1を、顕撒鏡を介して撮像する。このよ
うなビデオカメラ2には、画素数に対応する多数のCC
Dが光電変換素子として用いられており、ビデオカメラ
2は、このCCDにより対象物lの画像を光電変換し
て、EIA準拠のアナログ映像信号を出力する。
The video camera 2 is a commercially available video camera, and captures an image of an object 1 such as blood cells and cells flowing through an imaging flow cytometer through a microscope. Such a video camera 2 has a large number of CCs corresponding to the number of pixels.
D is used as a photoelectric conversion element, and the video camera 2 photoelectrically converts the image of the object 1 by the CCD and outputs an analog video signal conforming to EIA.

【0025】デジタイザ7は、ビデオカメラ2からのア
ナログ映像信号をA/D変換する。すなわち、アナログ
映像信号を、各画素の輝度(光強度)を例えば0〜25
5までの256段階のデジタルの8ビット信号で表した
多値画像(グレースケール)に変換し、これをラスター
スキャン(線順次走査)の様式で順次出力する。多値画
像の値については後ほど詳述する。
The digitizer 7 A / D converts an analog video signal from the video camera 2. That is, the analog video signal is converted from the luminance (light intensity) of each pixel to, for example, 0 to 25.
The image data is converted into a multi-valued image (gray scale) represented by a digital 8-bit signal of 256 steps up to 5, and this is sequentially output in a raster scan (line sequential scan) manner. The values of the multi-valued image will be described later in detail.

【0026】このようにしてデジタイザ7から出力され
る情報は、対象画像の各画素の濃度情報といえるもので
あり、この情報が、以下に述べる2値化部、画像抽出
部、座標抽出部、エッジトレース部で処理されることに
より、物体の境界が追跡される。
The information output from the digitizer 7 in this manner can be said to be density information of each pixel of the target image, and this information is converted into a binarizing unit, an image extracting unit, a coordinate extracting unit, The boundary of the object is tracked by being processed by the edge tracing unit.

【0027】2値化部は、例えばコンパレータ8と2値
画像保持メモリ9とから構成される。コンパレータ8
は、グレースケールのディジタル信号を、名画素毎に、
粒子を“l”、背景を“0”とする2値のレベルに振り
分け、この2値信号をラスタースキャンの様式で順次出
力する。すなわち、グレースケールに変換された粒子な
どの対象画像の輝度ヒストグラムをあらかじめ解析して
おき、背景と粒子とが好適に分離されるしきい値を求め
ておく。そして、コンパレータ8にこのしきい値をセッ
トし、粒子を“l”、背景を“0”とする2値に振り分
ける。この振り分けは、粒子を“0”、背景を“1”と
するものであってもよい。
The binarizing section comprises, for example, a comparator 8 and a binary image holding memory 9. Comparator 8
Converts the grayscale digital signal for each pixel
The particles are sorted into binary levels with “1” and the background as “0”, and the binary signals are sequentially output in a raster scan format. That is, a luminance histogram of a target image such as a particle converted into a gray scale is analyzed in advance, and a threshold value at which the background and the particle are appropriately separated is obtained. Then, this threshold value is set in the comparator 8, and the particles are sorted into two values in which the particle is "1" and the background is "0". This sorting may be such that the particle is “0” and the background is “1”.

【0028】2値画像保持メモリ9は、粒子と背景とに
2値化された画像を保持するメモリであり、着目画素お
よびその着目画素の周囲8画素の2値化情報(1か0か
の情報)をラスタースキャンの様式で順次出力する。2
値画像保持メモリ9の記憶内容については後ほど詳述す
る。
The binary image holding memory 9 is a memory for holding a binarized image of particles and a background, and stores binary information of a pixel of interest and eight pixels surrounding the pixel of interest (1 or 0). Information) is sequentially output in a raster scan format. 2
The storage contents of the value image holding memory 9 will be described later in detail.

【0029】画素抽出部は、例えば8近傍画素抽出フィ
ルタ10と8近傍画素メモリ11とから構成される。8
近傍画素抽出フィルタl0は、2値画像の全画素を順次
着目画素とし、その着目画素の周囲の8近傍画素の2値
について論理演算を行い、粒子の内部と外部の画素につ
いては“0”の値を持ち、粒子の境界にある画素につい
ては非“0”の値を持つような8ビットデータ(1バイ
トすなわち1ワードのデータ)を、ラスタースキャンの
様式で順次出力する。
The pixel extraction section is composed of, for example, an eight-neighbor pixel extraction filter 10 and an eight-neighbor pixel memory 11. 8
The neighboring pixel extraction filter 10 sequentially sets all pixels of the binary image as a pixel of interest, performs a logical operation on the binary values of eight neighboring pixels around the pixel of interest, and sets “0” for pixels inside and outside the particle. 8-bit data (1 byte, that is, 1 word data) having a value and a non-zero value for a pixel at the boundary of a particle is sequentially output in a raster scan format.

【0030】8近傍画素メモリ11は、画像入力時にお
ける動作と、エッジトレース時における動作との2状態
の動作モードを有しており、画像入力時には、8近傍画
素状態値(上述した“0”または“8ビットデータ”の
値)がラスタースキャンの様式で順次入力される。すな
わち、前ステージの8近傍画素抽出フィルタ10から8
近傍画素状態値がラスタースキャンの様式で順次出力さ
れるので、これを受けてこの8近傍画素状態値を保持す
る。また、エッジトレース時には、次ステージのエッジ
トレース部12が粒子の境界に沿って指示するアドレス
に保持されている8近傍画素状態値を出力する。
The 8-neighbor pixel memory 11 has two operation modes, an operation at the time of inputting an image and an operation at the time of edge tracing. Or the value of “8-bit data”) is sequentially input in a raster scan format. That is, the 8 neighboring pixel extraction filters 10 to 8 of the previous stage
Since the neighboring pixel state values are sequentially output in a raster scan format, the eight neighboring pixel state values are held in response to this. At the time of edge tracing, the next-stage edge tracing unit 12 outputs the 8-neighbor pixel state value held at the address specified along the boundary of the particle.

【0031】エッジトレース部12は、8近傍画素メモ
リ11の内容を参照しながら粒子のエッジ(境界または
輪郭ともいう)を画素単位でトレース(追跡)し、粒子
の境界が表す連接コード(チェーンコード)を出力す
る。このトレースの方法については後程詳述する。
The edge tracing unit 12 traces (traces) the edge of a particle (also referred to as a boundary or an outline) in pixel units while referring to the contents of the 8-neighbor pixel memory 11, and generates a concatenated code (chain code) indicated by the particle boundary ) Is output. The tracing method will be described later in detail.

【0032】特徴量抽出部13は、前ステージのエッジ
トレース部12が出力する粒子の境界が表すチェーンコ
ードから、粒子の周囲長や面積等の特徴量を求めて出力
する。
The characteristic amount extracting unit 13 obtains and outputs characteristic amounts such as the perimeter and area of the particle from the chain code represented by the boundary of the particle output from the edge trace unit 12 of the previous stage.

【0033】マイクロコンピュータ4は、イメージプロ
セッサ3の各要素を適切に制御する。また周囲長や面積
のような特徴量を粒子ごとに一時記憶し、統計処理を施
し、CRTディスプレイ装置5に出力する。CRTディ
スプレイ装置5は、この統計処理の結果を表示する。物
体の境界決定等の制御プログラムは、マイクロコンピュ
ータ4の主メモリ上で実行される。
The microcomputer 4 controls each element of the image processor 3 appropriately. Further, feature amounts such as a perimeter and an area are temporarily stored for each particle, subjected to statistical processing, and output to the CRT display device 5. The CRT display device 5 displays the result of the statistical processing. A control program for determining a boundary of an object is executed on the main memory of the microcomputer 4.

【0034】本発明において外部記憶装置6が設けられ
ていてよい。外部記憶装置6は、マイクロコンピュータ
4を制御するためのプログラム、すなわち本発明の物体
の境界決定装置をマイクロコンピュータ4によって制御
するためのプログラムを記憶することができる。また、
イメージブロセッサ3で得られた粒子の特徴量や統計処
理の結果を記憶することができる。
In the present invention, an external storage device 6 may be provided. The external storage device 6 can store a program for controlling the microcomputer 4, that is, a program for controlling the object boundary determining device of the present invention by the microcomputer 4. Also,
The feature amount of the particles obtained by the image processor 3 and the result of the statistical processing can be stored.

【0035】この外部記憶装置6は、ハードディスクに
データの書き込みや読み出しを行うハードディスク装置
や、フロッピー(登録商標)ディスクにデータの書き込
みや読み出しを行うフロッピーディスク装置であっても
よいし、回線を通じて接続されたファイルサーバのよう
な他の装置と共用の記憶装置であってもよい。物体の境
界決定の制御プログラムが、この外部記憶装置6からロ
ーディングされた後、マイクロコンピュータ4の主メモ
リ上で実行されてよい。
The external storage device 6 may be a hard disk device for writing and reading data to and from a hard disk, a floppy disk device for writing and reading data to and from a floppy (registered trademark) disk, or may be connected through a line. The storage device may be a storage device shared with another device such as a file server. After the control program for determining the boundary of the object is loaded from the external storage device 6, it may be executed on the main memory of the microcomputer 4.

【0036】次に、上記8近傍画素抽出フィルタ10の
処理について詳述する。8近傍画素抽出フィルタ10の
処理では、1ラスタースキャンの走査時間の間に以下の
ような論理演算を行う。
Next, the processing of the above-described 8-neighbor pixel extraction filter 10 will be described in detail. In the process of the 8-neighbor pixel extraction filter 10, the following logical operation is performed during the scanning time of one raster scan.

【0037】図2に示すように、中心の着目画素n8に対
し、3時の方向から反時計周りに8近傍画素n0,n1,n
2,n3,n4,n5,n6,n7を定義し、8近傍画素メモリ1
1の着目画素n8に対応する位置に以下の論理式の演算結
果aを8ビットデータとして記憶する。
As shown in FIG. 2, the eight neighboring pixels n0, n1, and n are positioned counterclockwise from the three o'clock direction with respect to the center pixel of interest n8.
2, n3, n4, n5, n6, n7 are defined, and 8 neighboring pixel memories 1
The operation result a of the following logical expression is stored as 8-bit data at a position corresponding to one target pixel n8.

【0038】 a=n8&(n0♯n1♯n2#n3#n4#n5#n6#n7)&nj (ただし、#は論理和、&は論理積、!は否定、njは
“n7n6n5n4n3n2n1n0”のバイナリー表示を表す)
A = n8 & (n0♯n1♯n2 # n3 # n4 # n5 # n6 # n7) & nj (where # is a logical sum, & is a logical product,! Is negation, and nj is a binary display of “n7n6n5n4n3n2n1n0” Represent)

【0039】具体的には、n8と、(n0♯n1#n2#n3#n4
♯n5♯n6#n7)と、njのアンド(論理積)をとってお
り、以下の意味を持っている。右辺の第l項は着目画素
が粒子領域、すなわち粒子の境界または内部にあるか否
かを表し、第2項は着目画素の周囲に“1”となる画素
があるか否かを表し、第3項は着目画素の周囲8画素の
状態をを表している。
Specifically, n8 and (n0♯n1 # n2 # n3 # n4
♯n5♯n6 # n7) and nj's AND (logical product), and has the following meaning. The first term on the right-hand side indicates whether or not the pixel of interest is in the particle area, that is, the boundary or inside of the particle. The second term indicates whether or not there is a pixel that becomes “1” around the pixel of interest. The third term indicates the state of eight pixels around the target pixel.

【0040】つまり、着日画素が“0”であれば、これ
は背景とみなして8近傍画素の値に関係なくaを“0”
とする。着目画素が“1”であっても、8近傍画素が全
て“0”であれば、これは粒子ではなく塵等とみなして
aを“0”とする。
That is, if the arrival pixel is "0", this is regarded as the background and a is set to "0" regardless of the value of the eight neighboring pixels.
And Even if the pixel of interest is “1”, if all eight neighboring pixels are “0”, this is regarded as dust instead of particles, and a is set to “0”.

【0041】結局、上記のような論理条件下で“0”に
ならない画素が、粒子の境界および内部に位置する画素
とみなされる。したがって、背景の画素だけが“0”の
値を持ち、粒子の境界および内部に位置する画素はa=
njの値、つまり非“0”の値を持つことになる。このよ
うに、着目画素が粒子の境界および内部に位置する場合
には、その着日画素の周囲の8近傍画素状態値(1か0
かの2値)が8近傍画素メモリ11の着目画素に対応す
る位置に8ビットデータで保持される。
After all, a pixel which does not become "0" under the above-described logical conditions is regarded as a pixel located at and inside the boundary of the particle. Therefore, only the background pixel has a value of “0”, and the pixels located at and inside the boundary of the particle have a =
It has a value of nj, that is, a non- "0" value. As described above, when the target pixel is located at the boundary or inside of the particle, the eight neighboring pixel state values (1 or 0) around the arrival pixel are set.
Is stored as 8-bit data at a position corresponding to the pixel of interest in the 8-neighbor pixel memory 11.

【0042】例えば、着目画素n8を合む8近傍画素nj
(j=0〜7)図3に示すような2値状態であれば、nj
は“n7n6n5n4n3n2n1n0”すなわち“11111000”となり、
8近傍画素メモリ11の着目画素n8に対応する位置に
は、(11111000)Bの値、つまり0x“F8”の値が記憶
される。ただし“( )B”は2進数(バイナリーコー
ド)であることを示す記号であり、“0x”または
“( )H”は16進数(ヘキサコード)であることを
示す記号である。
For example, eight neighboring pixels nj that combine the pixel of interest n8
(J = 0 to 7) If the binary state is as shown in FIG.
Becomes “n7n6n5n4n3n2n1n0”, that is, “11111000”,
The value of (11111000) B, that is, the value of 0x “F8” is stored in the 8-neighbor pixel memory 11 at the position corresponding to the target pixel n8. However, “() B” is a symbol indicating a binary number (binary code), and “0x” or “() H” is a symbol indicating a hexadecimal number (hex code).

【0043】このようにして、2値化後の画像に対して
上記のような手法で画像に合まれる粒子を抽出し、粒子
の境界および内部に位置する画素の周囲の状況を8近傍
画素状態値として保持しておくことにより、後述するよ
うなより少ない回路規模でエッジトレースを実現する。
In this way, the particles that fit into the image are extracted from the binarized image by the above-described method, and the state of the boundary between the particles and the surroundings of the pixels located inside are extracted by the eight neighboring pixels. By holding the state value, edge tracing is realized with a smaller circuit scale as described later.

【0044】なお、上記の論理式において、右辺に!
(n0&n2&n4&n6)の項を加えて、粒子の境界に位置す
る画素だけを抽出するようにしてもよい。すなわち、論
理式を a=n8&(n0♯n1♯n2#n3#n4♯n5♯n6♯n7)&!(n0
&n2&n4&n6)&nj とし、n8と、(n0♯n1#n2♯n3♯n4#n5#n6♯n7)と、
!(n0&n2&n4&n6)と、njのアンド(論理積)をとる
ようにしてもよい。
In the above logical expression, the right side!
The term (n0 & n2 & n4 & n6) may be added to extract only the pixels located at the boundaries of the particles. That is, the logical expression is expressed as a = n8 & (n0♯n1♯n2 # n3 # n4♯n5♯n6♯n7) &! (N0
& N2 & n4 & n6) & nj, and n8, (n0♯n1 # n2♯n3♯n4 # n5 # n6♯n7),
! (N0 & n2 & n4 & n6) and nj (logical product) may be taken.

【0045】このようにした場合には、!(n0&n2&n4
&n6)の条件を加えることができる。つまり、着目画素
が“1”で、8近傍画素のいずれか1つが“l”であっ
ても、8近傍画素の内の時計方向に3時と12時と9時
と6時の方向の近傍画素が“1”であれば、これは粒子
の内部とみなしてaを“0”とすることができる。
In this case,! (N0 & n2 & n4
& N6) condition can be added. That is, even if the pixel of interest is “1” and one of the eight neighboring pixels is “1”, the neighboring pixels in the clockwise direction of the three o'clock, twelve o'clock, nine o'clock, and six o'clock of the eight neighboring pixels are If the pixel is “1”, this can be regarded as inside the particle and a can be set to “0”.

【0046】したがって、この場合には、粒子の境界で
ない画素、つまり粒子の外部と内部の画素は“0”の値
を持ち、粒子の境界画素だけがa=njの値、つまり非
“0”の値を持つことになる。これにより、着目画素が
粒子の境界に位置する場合にだけ、その着目画素の周囲
の8近傍画素状態値(lか0かの2値)が8近傍画素メ
モリ11の着目画素に対応する位置に8ビットデータで
保持されることになる。
Therefore, in this case, pixels that are not at the boundaries of the particles, that is, pixels inside and outside the particles have a value of “0”, and only the boundary pixels of the particles have the value of a = nj, that is, non- “0”. Will have the value of Thereby, only when the target pixel is located at the boundary of the particle, the eight neighboring pixel state values (binary 1 or 0) around the target pixel are set to the positions corresponding to the target pixel in the eight neighboring pixel memory 11. It will be held as 8-bit data.

【0047】次ステージのエッジトレース部12では、
粒子の境界に位置する画素だけをトレースしてゆくの
で、粒子の内部の画素が8近傍画素状態値を持っていて
も“0”であっても影響はないが、粒子の内部を“0”
にして、粒子の境界に位置する画素だけに8近傍画素状
態値を与えるようにすることにより、エッジトレース時
に、連接する方向の誤りを防止することができる。
In the next stage edge tracing unit 12,
Since only the pixel located at the boundary of the particle is traced, it does not matter whether the pixel inside the particle has an 8-neighbor pixel state value or is “0”, but the inside of the particle is “0”.
By giving the 8-neighbor pixel state value only to the pixels located at the boundaries of the particles, it is possible to prevent an error in the direction of connection at the time of edge tracing.

【0048】図4はエッジトレース部12の詳細構成を
示すブロック図である。この図に示すように、エッジト
レース部12は、Xアドレスカウンタ21と、Yアドレ
スカウンタ22と、8近傍画素正規化器23と、第1論
理演算器24と、加算器25と、絶対方向レジスタ26
と、第2論理演算器27から構成されており、絶対方向
レジスタ26からチェーンコード28を出力する。
FIG. 4 is a block diagram showing a detailed configuration of the edge trace unit 12. As shown in FIG. As shown in the figure, the edge trace unit 12 includes an X address counter 21, a Y address counter 22, an 8-neighbor pixel normalizer 23, a first logical operator 24, an adder 25, an absolute direction register 26
And a second logical operation unit 27, and outputs a chain code 28 from the absolute direction register 26.

【0049】Xアドレスカウンタ21とYアドレスカウ
ンタ22は、8近傍画素メモリ11のデータを読み出す
擦に、どの位置のデータを読み出すのかを指定するアッ
プダウンカウンタであり、読み出す画素の座標値を指定
するものである。Xアドレスカウンタ21は横方向に相
当するX方向の値を指定し、Yアドレスカウンタ22は
縦方向に相当するY方向の値を指定する。粒子の境界を
トレースする場合には、このXアドレスカウンタ21と
Yアドレスカウンタ22から指示を与えて、次に連接す
る境界画素のアドレスにある8近傍画素状態値を8近傍
画素メモリ11から読み出す。
The X-address counter 21 and the Y-address counter 22 are up-down counters for designating which position data is to be read when reading data from the 8-neighbor pixel memory 11, and specify the coordinate value of the pixel to be read. Things. The X address counter 21 specifies a value in the X direction corresponding to the horizontal direction, and the Y address counter 22 specifies a value in the Y direction corresponding to the vertical direction. When tracing the boundary of a particle, an instruction is given from the X address counter 21 and the Y address counter 22, and the 8 neighboring pixel state value at the address of the next connected boundary pixel is read from the 8 neighboring pixel memory 11.

【0050】8近傍画素メモリ11は、上述したよう
に、画像入力時に、ラスタースキャンの様式で前ステー
ジにあたる8近傍画素抽出フィルタ10の出力結果を2
次元型画像データとして保持している。その後、エッジ
トレース時に、Xアドレスカウンタ21とYアドレスカ
ウンタ22で指示されたアドレスの8近傍画素状態値を
出力する。
As described above, the eight-neighbor pixel memory 11 stores the output result of the eight-neighbor pixel extraction filter 10 corresponding to the previous stage in a raster scan manner at the time of image input, as described above.
It is stored as dimensional image data. After that, at the time of edge tracing, the 8-neighbor pixel state value of the address specified by the X address counter 21 and the Y address counter 22 is output.

【0051】8近傍画素正規化器23は、8近傍画素メ
モリ11に記憶された8近傍画素状態値のビット配置
“n7n6n5n4n3n2n1n0”を、絶対方向レジスタ26の値を
基準として並べ替え、正規化近傍画素値として出力す
る。この並び替え(正規化)方法については後述する。
The eight-neighbor pixel normalizer 23 rearranges the bit arrangement “n7n6n5n4n3n2n1n0” of the eight-neighbor pixel state value stored in the eight-neighbor pixel memory 11 with reference to the value of the absolute direction register 26. Output as a value. This sorting (normalization) method will be described later.

【0052】第1論理演算器24は、8近傍画素正規化
器23から出力される正規化近傍画素値をn0,n1,n2,
n3,n6,n7とすれば、以下の演算を行う。
The first logical operation unit 24 converts the normalized neighboring pixel values output from the 8-neighbor pixel normalizer 23 into n0, n1, n2,
Assuming n3, n6, and n7, the following calculation is performed.

【0053】 d2=(!n0&!n1&!n2&!n3)#n6#n7; d1=(!n0&!n1&n2)#(!n0&!n1&n3)#n6#n
7; d0=(!n0&n1&!n6)#(!n0&!n2&n3&!n6)♯
(!n6&n7); (ただし#は論理和、&は論理積、!は否定を表す。)
D2 = (! N0 &! N1 &! N2 &! N3) # n6 # n7; d1 = (! N0 &! N1 & n2) # (! N0 &! N1 & n3) # n6 # n
7; d0 = (! N0 &! N1 &! N6) # (! N0 &! N2 & n3 &! N6) ♯
(However, # indicates logical sum, & indicates logical product, and! Indicates negation.)

【0054】この演算によって得られたd2,d1,d0の値
(d2d1d0)Bが次の境界の相対連接方向を示すものとな
り、第1論理演算器24は、このd2,d1,d0の値を相対
連接方向値として出力する。ここで、d2,d1,d0の右辺
にはn4とn5が合まれていないが、これはn4とn5が相対連
接方向値の算出には不要なデータであることを示してい
る。
The value (d2d1d0) B of d2, d1, d0 obtained by this operation indicates the relative connection direction of the next boundary, and the first logical operator 24 calculates the values of d2, d1, d0. Output as relative connection direction value. Here, n4 and n5 are not combined on the right side of d2, d1, and d0, indicating that n4 and n5 are unnecessary data for calculating the relative connection direction value.

【0055】連接方向を説明するため、図5に(d2d1d
0)Bの2進数で示す方向とこれを10進数に変換した方
向とを示す。着目画素から連接する方向は8方向である
ため、方向は、時計の3時の方向を“0”とし、反時計
回りに0〜7の数値で示している。このような方向を示
す数値を連接コードという。
FIG. 5 shows (d2d1d)
0) The direction indicated by the binary number of B and the direction converted to a decimal number are shown. Since the directions connected from the pixel of interest are eight directions, the direction is indicated by a numerical value of 0 to 7 in the counterclockwise direction, with the direction of 3 o'clock of the clock being “0”. A numerical value indicating such a direction is called a connection code.

【0056】例えば、(d2d1d0)Bが(011)Bであれ
ば連接方向は“3”の方向であり、(d2d1d0)Bが(0
10)Bであれば連接方向は“2”の方向である。ただ
し、この第l論理演算器24から出力される値は、絶対
方向レジスタ26の値を基準とした相対連接方向値であ
る。
For example, if (d2d1d0) B is (011) B, the connecting direction is the direction of "3" and (d2d1d0) B is (0)
10) If B, the connection direction is the direction of “2”. However, the value output from the first logical operation unit 24 is a relative connection direction value based on the value of the absolute direction register 26.

【0057】加算器25は、第l論理演算器24から出
力された相対連接方向値と、絶対方向レジスタ26に記
憶されている絶対連接方向値とを加算し、これを次の境
界の絶対連接方向値として出力する。この加算器25は
3ビット加算器であり、000〜111までの8通りの
値しかとらない。
The adder 25 adds the relative connection direction value output from the l-th logical operation unit 24 and the absolute connection direction value stored in the absolute direction register 26, and adds the absolute connection direction value at the next boundary. Output as direction value. The adder 25 is a 3-bit adder and takes only eight values from 000 to 111.

【0058】例えば、絶対方向レジスタ26に(01
1)B=3が記憶されており、上記の論理式で求めた(d
2d1d0)Bが(010)B=2であれば、加算器25の出
力は(011)B+(010)B=(101)Bとなり、
次の境界の絶対連接方向値は“5”の方向となる。
For example, (01
1) B = 3 is stored and obtained by the above logical expression (d
If (2d1d0) B is (010) B = 2, the output of the adder 25 is (011) B + (010) B = (101) B, and
The absolute connection direction value of the next boundary is the direction of “5”.

【0059】また、例えば、絶対方向レジスタ26に
(101)B=5が記憶されており、上記の論理式で求
めた(d2d1d0)Bが(111)B=7であれば、加算器2
5の出力は、3ビットだけであるため、(l01)B+
(111)B=(100)Bとなり、次の境界の絶対連接
方向値は“4”の方向となる。絶対方向レジスタ26
は、この加算器25から出力された次の境界の絶対連接
方向値を保持する。
For example, if (101) B = 5 is stored in the absolute direction register 26 and (d2d1d0) B obtained by the above logical expression is (111) B = 7, the adder 2
Since the output of 5 is only 3 bits, (101) B +
(111) B = (100) B, and the absolute connection direction value of the next boundary is the direction of "4". Absolute direction register 26
Holds the absolute connection direction value of the next boundary output from the adder 25.

【0060】チェーンコード28は、絶対方向レジスタ
26の出力するデータ系列であり、このような境界の絶
対連接方向値のデータ系列を粒子の境界のチェーンコー
ドとして用い、次ステージで粒子の特徴量を算出する。
The chain code 28 is a data sequence output from the absolute direction register 26. Such a data sequence of the absolute connection direction value at the boundary is used as a chain code at the boundary of the particle, and the characteristic amount of the particle is determined in the next stage. calculate.

【0061】第2論理演算器27は、次の境界の絶対連
接方向値よりXアドレスカウンタ21とYアドレスカウ
ンタ22に、図6に示すような増減値を指示する。すな
わち、絶対連接方向値が“0”であれば、座標値として
(X,Y)=(+1,0)を、“1”であれば(+1,
+1)を、“2”であれば(0,+1)を、“3”であ
れば(−1,+1)を、“4”であれば(−1,0)
を、“5”であれば(−1,−1)を、“6”であれば
(0,−l)を、“7”であれば(+l,−1)を、そ
れぞれ増減値として指示する。
The second logical operation unit 27 instructs the X address counter 21 and the Y address counter 22 to increase or decrease as shown in FIG. 6 based on the absolute connection direction value at the next boundary. That is, if the absolute connection direction value is “0”, (X, Y) = (+ 1, 0) as the coordinate value, and if it is “1”, (+1,
+1) is (0, +1) for "2", (-1, +1) for "3", and (-1, 0) for "4".
, "5" indicates (-1, -1), "6" indicates (0, -1), and "7" indicates (+1, -1) as an increase / decrease value. I do.

【0062】次に、上記8近傍画素正規化器23の処理
について詳述する。すなわち、8近傍画素メモリ11に
記憶された8近傍画素状態値のビット配置を、前に連接
する方向を起点として並び替え、正規化し、次の連接ゴ
ードに変換する過程について具体的に説明する。
Next, the processing of the 8-neighbor pixel normalizer 23 will be described in detail. That is, the process of rearranging the bit arrangement of the 8-neighbor pixel state value stored in the 8-neighbor pixel memory 11 with the direction of the previous concatenation as a starting point, normalizing the bit arrangement, and converting it into the next concatenated gorge will be specifically described.

【0063】図7の(a)〜(h)に一例を示すよう
に、着目画素に対して周囲8方向に隣接する8個の近傍
画素の関係は、多くは4回対称、場合によって8回対称
となる。例えば、図7(a)の8近傍画素状態値のビッ
ト配置を反時計方向に1つシフトさせると図7(b)の
ビット配置となる。同様に、図7(b)を1つシフトさ
せると図7(c)に、図7(c)をlつシフトさせると
図7(d)に、図7(d)を1つシフトさせると図7
(e)に、図7(e)を1つシフトさせると図7(f)
に、図7(f)を1つシフトさせると図7(g)に、図
7(g)を1つシフトさせると図7(h)になる。
As shown in FIGS. 7A to 7H, the relationship between eight neighboring pixels adjacent to the target pixel in eight directions around the target pixel is often symmetric four times, and in some cases, eight times. Become symmetric. For example, if the bit arrangement of the 8-neighbor pixel state value in FIG. 7A is shifted by one in the counterclockwise direction, the bit arrangement shown in FIG. 7B is obtained. Similarly, if FIG. 7B is shifted by one, FIG. 7C is shifted, FIG. 7C is shifted by one, FIG. 7D is shifted, and FIG. 7D is shifted by one. FIG.
7E is shifted by one to FIG. 7E, and FIG.
7 (f) is shifted by one, and FIG. 7 (g) is shifted, and FIG. 7 (g) is shifted by one, as shown in FIG. 7 (h).

【0064】このように、図7の(a)〜(h)の例で
は、着目画素に対して隣接する8個の近傍画素の関係は
8回対称となり、この対称性に着目して論理圧縮を施す
と、エッジトレースを行う際の次の連接方向の算出に必
要な論理回路の規模をl/4〜1/8に削減する事が可
能である(4〜8倍の集積化が可能である)。
As described above, in the examples of FIGS. 7A to 7H, the relationship between the eight neighboring pixels adjacent to the pixel of interest is eight-fold symmetrical. , It is possible to reduce the scale of the logic circuit necessary for calculating the next connection direction when performing edge tracing to 1/4 to 1/8 (the integration of 4 to 8 times is possible. is there).

【0065】このような論理回路の規模の削減のため、
8近傍画素正規化器23では、以下のようにして8近傍
画素状態値のビット配置をシフトさせる。例えば、8近
傍画素状態値のビット配置が図8に示す配置であるとす
れば、中央の空白部分の着目画素に対して連接してきた
方向が“0”の方向、つまり前連接コードが“0”であ
れば、図9(a)に示すように、8近傍画素状態値のビ
ット配置をシフトさせずそのままとする。
In order to reduce the scale of such a logic circuit,
The 8-neighbor pixel normalizer 23 shifts the bit arrangement of the 8-neighbor pixel state value as follows. For example, assuming that the bit arrangement of the 8-neighboring pixel state value is the arrangement shown in FIG. 8, the direction in which the central blank portion is connected to the target pixel in the direction of “0”, that is, the previous connection code is “0” ", As shown in FIG. 9A, the bit arrangement of the 8-neighbor pixel state values is not shifted and is left as it is.

【0066】また、前連接コードが“1”であれば、着
目画素に対して“l”の方向から反時計回りにn0〜n
7のビット値を取り出す(図9(b)参照)。同様に、
前連接コードが“2”であれば、着日画素に対して
“2”の方向から反時計回りにn0〜n7のビット値を取り
出し(図9(c)参照)、前連接コードが“3”であれ
ば、着目画素に対して“3”の方向から反時計回りにn0
〜n7のビット値を取り出し(図9(d)参照)、前連接
コードが“4”であれば、着目画素に対して“4”の方
向から反時計回りにn0〜n7のビット値を取り出し(図9
(e)参照)、前連接コードが“5”であれば、着目画
素に対して“5”の方向から反時計回りにn0〜n7のビッ
ト値を取り出し(図9(f)参照)、前連接コードが
“6”であれば、着目画素に対して“6”の方向から反
時計回りにn0〜n7のビット値を取り出し(図9(g)参
照)、前連接コードが“7”であれば、着目画素に対し
て“7”の方向から反時計回りにn0〜n7のビット値
を取り出す(図9(h)参照)。
If the preceding connection code is "1", n0 to n are rotated counterclockwise from the direction of "1" with respect to the target pixel.
The bit value of 7 is extracted (see FIG. 9B). Similarly,
If the previous connection code is "2", the bit values of n0 to n7 are extracted counterclockwise from the direction of "2" with respect to the arrival pixel (see FIG. 9C), and the previous connection code is "3". ”, N0 from the direction of“ 3 ”counterclockwise with respect to the target pixel.
The bit values of n0 to n7 are extracted (see FIG. 9D). If the preceding concatenated code is "4", the bit values of n0 to n7 are extracted counterclockwise from the direction of "4" for the pixel of interest. (FIG. 9
(See (e)), if the previous connection code is "5", bit values n0 to n7 are extracted counterclockwise from the direction of "5" with respect to the pixel of interest (see FIG. 9 (f)). If the concatenation code is "6", the bit values of n0 to n7 are extracted counterclockwise from the direction of "6" with respect to the target pixel (see FIG. 9 (g)). If there is, the bit values of n0 to n7 are extracted counterclockwise from the direction of "7" with respect to the pixel of interest (see FIG. 9H).

【0067】例えば、着自画素の8近傍画素が図10に
示すような2値である場合、正規化する前の着目画素の
8近傍画素状態値は以下のような値である。すなわち、
3時の方向から反時計回りにn0,n1,・・・,n7と順番
に2値を当てはめるため、 (n7,n6,n5,n4,n3,n2,n1,n0)=(1,1,1,0,
0,0,0,0) の値である。
For example, when the eight neighboring pixels of the destination pixel are binary as shown in FIG. 10, the eight neighboring pixel state values of the target pixel before normalization are as follows. That is,
Since n0, n1,..., N7 are applied in order in the counterclockwise direction from the 3 o'clock direction, (n7, n6, n5, n4, n3, n2, n1, n0) = (1, 1, 1, 0,
0,0,0,0).

【0068】この8近傍画素状態値において、着目画素
に連接してきた方向、つまり前連接方向が“3”の方向
(図中、矢印Rで示す)であったとすると、方向3で正
規札した正規化近傍画素値は、図11に示すように、着
目画素から見て“3”の方向を基準にし、そこから反時
計回りにn0,n1,・・・,n7と2値を取り出してゆくた
め、 (n7,n6,n5,n4,n3,n2,n1,n0)=(0,0,0,1,
1,1,0,0) となる。
In this 8-neighbor pixel state value, if the direction connected to the target pixel, that is, the previous connection direction is the direction of “3” (indicated by an arrow R in the drawing), the normal As shown in FIG. 11, the binarized neighborhood pixel value is based on the direction of “3” as viewed from the target pixel, and from there, n0, n1,... , (N7, n6, n5, n4, n3, n2, n1, n0) = (0, 0, 0, 1,
1, 1, 0, 0).

【0069】同様に、着目画素の8近傍画素が図12に
示すような2値である場合、正規化する前の着目画素の
8近傍画素状態値は以下のような値である。
Similarly, when the eight neighboring pixels of the target pixel are binary as shown in FIG. 12, the eight neighboring pixel state values of the target pixel before normalization are as follows.

【0070】 (n7,n6,n5,n4,n3,n2,n1,n0)=(1,1,0,0,
0,0,0,1) この8近傍画素状態値において、前連接方向が“4”の
方向(図中、矢印Rで示す)であったとすると、方向4
で正規札した正規化近傍画素値は、図13に示すよう
に、 (n7,n6,n5,n4,n3,n2,n1,n0)=(0,0,0,1,
1,1,0,0) となる。
(N7, n6, n5, n4, n3, n2, n1, n0) = (1, 1, 0, 0,
0, 0, 0, 1) In this 8-neighbor pixel state value, if the previous connection direction is the direction of “4” (indicated by an arrow R in the drawing), the direction 4
As shown in FIG. 13, the normalized neighboring pixel values normalized as shown in FIG. 13 are (n7, n6, n5, n4, n3, n2, n1, n0) = (0, 0, 0, 1,.
1, 1, 0, 0).

【0071】このように、連接してきた方向に関して正
規化を施せば、図10で示した8近傍画素状態値と、図
12で示した8近傍画素状態値とは、着目画素に隣接す
る8画素の2値状態は異なっているにもかかわらず、同
じ値となり、これは実は相対的にみれば、8近傍画素が
同じ並び方であることを示している。したがって、この
ように相対的な連接方向を採用することにより、連接方
向のパターンを大幅に減らすことができ、これにより、
次ステージの第1論理演算器24の論理回路の規模を大
幅に圧縮することができる。
As described above, by normalizing the connected directions, the eight neighboring pixel state values shown in FIG. 10 and the eight neighboring pixel state values shown in FIG. Although the two states differ, they have the same value, which indicates that the eight neighboring pixels are actually arranged in the same manner when viewed relatively. Therefore, by adopting the relative connecting direction in this way, the pattern of the connecting direction can be significantly reduced,
The size of the logic circuit of the first logic operation unit 24 in the next stage can be greatly reduced.

【0072】次に、8近傍画素正規化器23からデータ
を受け取った場合の第l論理演算器24における処理に
ついて詳述する。
Next, the processing in the l-th logical operation unit 24 when data is received from the 8-neighbor pixel normalizer 23 will be described in detail.

【0073】図14は第1論理演算器24における論理
演算の真理値を示す説明図であり、8近傍画素正規化器
23から出力される正規化近傍画素値と、第1論理演算
器24から出力される相対連接方向値との関係を示して
いる。
FIG. 14 is an explanatory diagram showing the truth value of the logical operation in the first logical operation unit 24. The normalized adjacent pixel value output from the 8-neighbor pixel normalizer 23 and the The relationship with the output relative connection direction value is shown.

【0074】例えば、第1論理演算器24から出力され
る正規化近傍画素値が前述のような(n7,n6,n5,n4,
n3,n2,n1,n0)=(0,0,0,1,1,1,0,0)であれ
ば、これ0xlCであるので、相対連接方向値は“2”
(0,l,0)となり、境界の連接方向が、着自画素か
ら反時計方向に90°の方向に転進することを意味して
いる。
For example, the normalized neighboring pixel values output from the first logical operation unit 24 are (n7, n6, n5, n4,
If (n3, n2, n1, n0) = (0, 0, 0, 1, 1, 1, 0, 0), this is 0 × 1C, and the relative connection direction value is “2”.
(0, l, 0), which means that the connecting direction of the boundary turns 90 ° counterclockwise from the destination pixel.

【0075】このように、第1論理演算器24は、8近
傍画素正規化器23から出力される正規化近傍画素値n
0,n1,n2,n3,n6,n7から、上述した論理演算によっ
て相対連接方向値d2,d1,d0を得るのであるが、8近傍
画素を正規化しているために、図14に示すように、正
規化近傍画素値は19種類のパターンに集約され、これ
による相対連接方向値は0,1,2,3,4,6,7の
7方向となり、極めて簡単な論理横算処理となる。
As described above, the first logical operation unit 24 calculates the normalized neighboring pixel value n output from the 8-neighbor pixel normalizing unit 23.
The relative connection direction values d2, d1, and d0 are obtained from 0, n1, n2, n3, n6, and n7 by the above-described logical operation. However, since eight neighboring pixels are normalized, as shown in FIG. , The normalized neighboring pixel values are aggregated into 19 types of patterns, and the relative connection direction values are set in seven directions of 0, 1, 2, 3, 4, 6, and 7, which is a very simple logical crossing process.

【0076】この相対連接方向値の0〜7の意味は、境
界の連接する方向を意味する。すなわち、方向0は前連
接方向と同じ方向に転進することを意味し、方向1は前
連接方向に対して反峙計回りで45°の方向に転進する
ことを意味し、方向2は前連接方向に対して反時計回り
で90°の方向に転進することを意味し、方向3は前連
接方向に対して反時計回りで135°の方向に転進する
ことを意味し、方向4は前連接方向に対して反時計回り
で180。の方向に転進することを意味し、方向6は前
連接方向に対して反時計回りで270°の方向に転進す
ることを意味し、方向7は前連接方向に対して反時計回
りで315°の方向に転進することを意味する。
The meaning of the relative connection direction values of 0 to 7 means the direction in which the boundaries are connected. That is, the direction 0 means turning in the same direction as the front connection direction, the direction 1 means turning in a direction of 45 ° counter to the front connection direction, and the direction 2 means the front connection direction. The direction 3 means turning in the direction of 90 ° in a counterclockwise direction, the direction 3 means turning in the direction of 135 ° in a counterclockwise direction with respect to the front connection direction, and the direction 4 means the front connection. 180 counterclockwise to the direction. The direction 6 means turning in a direction of 270 ° counterclockwise with respect to the front connecting direction, and the direction 7 means turning 315 ° in the counterclockwise direction with respect to the front connecting direction. Means to turn in the direction of.

【0077】参考のために説明すれば、相対連接方向値
d2,d1,d0の出力には、“5”の値がない。これは、図
15(a)および図16(a)に示すように、境界の前
連接方向に対して225°転進することを意味するが、
物体の境界を左回りにトレースする場合、図15(b)
および図16(b)に示すように、225°転進するこ
とはできず、このため、相対連接方向値の出力には、
“5”という値は存在しない。
For reference, the relative connection direction value
The output of d2, d1, and d0 does not have a value of “5”. This means that, as shown in FIGS. 15A and 16A, the vehicle makes a 225 ° turn with respect to the front connecting direction of the boundary.
When tracing the boundary of the object counterclockwise, FIG.
As shown in FIG. 16B and FIG. 16B, it is not possible to make a 225 ° turn, and therefore, the output of the relative connection direction value includes:
The value “5” does not exist.

【0078】なお、この“5”の方向と対称な“3”の
方向ついては、図17の(a)および(b)に示すよう
に、境界のトレース方向に対して135°転進すること
を意味し、この転進は可能である。
The "3" direction, which is symmetrical to the "5" direction, means a 135 ° turn with respect to the boundary trace direction as shown in FIGS. 17 (a) and 17 (b). However, this transfer is possible.

【0079】“4”の方向への転進については、180
°の方向であるため、もとの方向へ戻ることとなるが、
線状あるいは棒状の粒子であればこの方向への転進はあ
り得る。
For the transfer in the direction of “4”, 180
° direction, so it will return to the original direction,
If the particles are linear or rod-shaped, they can be shifted in this direction.

【0080】以上述べたような論理演算により、エッジ
トレース部12は、次に運接すべき画素を探索し、探索
した画素の8近傍画素状態値が有効(非ゼロ)である限
りその画素を追跡し、開始座標と一致するまで境界の追
跡を続ける。
With the above-described logical operation, the edge trace unit 12 searches for the next pixel to be brought in next, and as long as the eight neighboring pixel state values of the searched pixel are valid (non-zero), the pixel is searched. Track and continue tracking the boundary until it matches the starting coordinates.

【0081】すなわち、エッジトレース部12では、こ
のように、着目画素の直前の連接方向を起点として、8
近傍画素状態値を並び替えて正規化し、次に連接する方
向を絶対角度ではなく前の運接方向に対する相対角度と
して出力するようにしているので、従来のルックアップ
テーブルによる方法よりも大帽に少ない論理規模で境界
を追跡することができ、したがって、そのための論理回
路もゲートアレイ等で容易に集積することができる。
That is, the edge tracing unit 12 sets the starting point to the connection direction immediately before the pixel of interest as described above.
The neighboring pixel state values are rearranged and normalized, and the direction of the next connection is output not as an absolute angle but as a relative angle with respect to the previous transportation direction. The boundary can be tracked with a small logic scale, and therefore a logic circuit therefor can be easily integrated with a gate array or the like.

【0082】このような構成における物体の境界決定装
置の勤作を、図18に示すフローチャートを交えて説明
する。まず、マイクロコンピュータ4は、対象物であ
る、血液中に合まれる血球や尿中に合まれる細胞のよう
な粒子をビデオカメラ2で撮像する。撮像した粒子のア
ナログ映像信号はイメージプロセッサ3に入力される。
The operation of the object boundary determining apparatus having such a configuration will be described with reference to the flowchart shown in FIG. First, the microcomputer 4 captures, using the video camera 2, particles such as blood cells to be combined with blood and cells to be combined with urine. An analog video signal of the imaged particles is input to the image processor 3.

【0083】イメージプロセッサ3では、デジタイザ7
により、アナログ映像信号をA/D変換する。図19は
グレースケール画像の一例を示す説明図であり、A/D
変換した0〜64までの65段階のグレースケール画像
を示したものである。デジタイサ7は、これをラスター
スキャンの様式で順次出力する。
In the image processor 3, the digitizer 7
A / D-converts the analog video signal. FIG. 19 is an explanatory diagram showing an example of a grayscale image.
It shows the converted gray scale image of 65 levels from 0 to 64. The digitizer 7 sequentially outputs the data in a raster scan format.

【0084】次に、コンパレータ8により、グレースケ
ール画像を2値のレベルに振り分け、2値画像保持メモ
リ9に記憶する。図20は2値画像保持メモリ9の記憶
内容の一例を示す説明図であり、グレースケール画像を
“25”のしきい値で2値化したものである。
Next, the grayscale image is sorted into binary levels by the comparator 8 and stored in the binary image holding memory 9. FIG. 20 is an explanatory diagram showing an example of the contents stored in the binary image holding memory 9, in which a grayscale image is binarized with a threshold value of "25".

【0085】次に、8近傍画素抽出フィルタ10によ
り、着目画素の周囲の8近傍画素の2値について論理演
算を行って8近傍画素状態値を算出し、これを8近傍画
素メモリ11に記億する。
Next, the 8-neighbor pixel extraction filter 10 performs a logical operation on the binary values of the eight neighbor pixels surrounding the pixel of interest to calculate an 8-neighbor pixel state value. I do.

【0086】図21は8近傍画素メモリllの記憶内容
の一例を示す説明図であり、背景を“0”とし、粒子の
境界と内部を非“0”とした場合を示すものである。こ
こまでは、画像入力時の動作であり、以後はエッジトレ
ース時の動作となる。
FIG. 21 is an explanatory diagram showing an example of the storage contents of the 8-neighbor pixel memory 11 in which the background is "0" and the boundaries and inside of the particles are non- "0". Up to this point, the operation is performed at the time of image input, and thereafter, the operation is performed at the time of edge tracing.

【0087】エッジトレース時には、エッジトレース部
12により、8近傍画素メモリ11の内容を参照しなが
ら粒子のエッジを画素単位でトレースし、連接コードを
出力する。次に、特徴量抽出部13により、連接コード
から粒子の周囲長や面積等の特徴量を求める。
At the time of edge tracing, the edge tracing unit 12 traces the edges of the particles in pixel units while referring to the contents of the 8-neighbor pixel memory 11, and outputs a concatenated code. Next, the characteristic amount extraction unit 13 obtains characteristic amounts such as the perimeter and area of the particle from the connection code.

【0088】ここで、エッジトレース時の処理動作につ
いて、図18のフローチャートに従い詳述する。まず、
エッジトレースの始点を決める必要がある。そのためマ
イクロコンピュータ4は、まず、2次元型データを持つ
8近傍画素メモリ11を、図22の矢印Tで示すよう
に、左上から右下の方向ヘラスタースキャンの様式で順
次アクセスし、非“0”の点(画素)を探索する(ステ
ップSl)。図22では、(E0)Hの値を持つ点Aが
探索される。
Here, the processing operation at the time of edge tracing will be described in detail with reference to the flowchart of FIG. First,
It is necessary to determine the starting point of the edge trace. For this reason, the microcomputer 4 first accesses the 8-neighbor pixel memory 11 having the two-dimensional data in the order of the upper left to lower right direction raster scan as shown by the arrow T in FIG. A point (pixel) is searched for (step Sl). In FIG. 22, a point A having a value of (E0) H is searched.

【0089】次に、ラスタースキャンで最初に見つけた
(E0)Hの値を持つ点Aの座標、すなわちX,Yアド
レスをスタートアドレス(Sx、Sy)とし、その値を
スタートアドレスレジスタと、X,Yアドレスカウンタ
21,22にセットする(ステップS2)。なお、スタ
ートアドレスレジスタはX,Yアドレスカウンタ21,
22内にあらかじめ設けておく。
Next, the coordinates of the point A having the value of (E0) H first found by the raster scan, that is, the X and Y addresses are set as the start address (Sx, Sy), and the values are set in the start address register and the X address. , Y address counters 21 and 22 (step S2). The start address register is an X, Y address counter 21,
22 is provided in advance.

【0090】次に、X,Yアドレスカウンタ21,22
の示すアドレスに従って、8近傍画素メモリ11から着
目画素の8近傍画素の状態を読み出し、この8近傍画素
の状態から、着目画素の前の連接コードを予測し、絶対
方向レジスタ26にセットする(ステップS3)。な
お、この最初の着目画素への前の連接コードの予測は、
従来の方法にて行う。
Next, the X and Y address counters 21 and 22
The state of the eight neighboring pixels of the pixel of interest is read from the eight neighboring pixel memory 11 in accordance with the address shown in (1), and the concatenation code before the pixel of interest is predicted from the state of the eight neighboring pixels and set in the absolute direction register 26 (step S3). Note that the prediction of the previous concatenated code for the first pixel of interest is
Perform in the conventional manner.

【0091】この従来の方法では、例えば、連接方向と
連接コードを図5に示したように定義し、8近傍画素メ
モリ11から得た着目画素の8近傍画素の状態が(E
0)H=(1,1,1,0,0,0,0,0)Bであれば、着目画
素の近傍画素の状態は、図23に示したものとなるの
で、これから、図中の矢印で示すように、前の連接方向
を“3”の方向と予測し、この値“3”を絶対方向レジ
スタ26にセットする。
In this conventional method, for example, the connection direction and the connection code are defined as shown in FIG. 5, and the state of the eight neighboring pixels of the pixel of interest obtained from the eight neighboring pixel memory 11 is (E
0) If H = (1,1,1,0,0,0,0,0) B, the state of the pixel in the vicinity of the target pixel is as shown in FIG. 23. As indicated by the arrow, the previous connection direction is predicted as the direction of “3”, and this value “3” is set in the absolute direction register 26.

【0092】次に、8近傍画素正規化器23により、絶
対方向レジスタ26の値を基準にして、8近傍画素メモ
リ11から読み出した着目画素の8近傍画素を並べ替
え、正規化する(ステップS4)。
Next, the 8-neighbor pixel normalizer 23 rearranges and normalizes the 8-neighbor pixels of the pixel of interest read from the 8-neighbor pixel memory 11 with reference to the value of the absolute direction register 26 (step S4). ).

【0093】例えば、図24に示すように、8近傍画素
の状態が(E0)H=(1,1,1,0,0,0,0,0)Bであ
るものを、絶対方向レジスタ26の値“3”の方向を起
点として並ベ替えると、(0,0,0,1,1,1,0,0)B
となる。なお、この並べ替え処理は、従来公知のマルチ
プレクサを設けておくことにより容易に実現できる。
For example, as shown in FIG. 24, when the state of the eight neighboring pixels is (E0) H = (1,1,1,0,0,0,0,0) B, the absolute direction register 26 When rearranged starting from the direction of the value “3” of (3), (0,0,0,1,1,1,0,0) B
Becomes Note that this rearrangement process can be easily realized by providing a conventionally known multiplexer.

【0094】次に、この8近傍画素正規化器23から出
力された正規化近傍画素値を第1論理演算器24に入力
し、図14に示したような相対連接方向値を得る(ステ
ップS5)。
Next, the normalized neighboring pixel value output from the 8-neighbor pixel normalizer 23 is input to the first logical operator 24 to obtain a relative connection direction value as shown in FIG. 14 (step S5). ).

【0095】例えば(n7,n6,n5,n4.n3,n2,n1,n
0)として(0,0,0,1,1,1,0,0)Bすなわち0x1C
を入力すると、出力(d2,d1,d0)は(0,1,0)と
なる。つまり次に連接する境界の相対連接方向値は
“2”(l0進数)の方向となる。
For example, (n7, n6, n5, n4. N3, n2, n1, n
0) as (0,0,0,1,1,1,0,0) B, ie 0x1C
Is input, the output (d2, d1, d0) becomes (0, 1, 0). In other words, the relative connection direction value of the next connected boundary is the direction of “2” (10 decimal).

【0096】次に、絶対方向レシスタ26の値と第1論
理演算器24の出力である相対連接方向値とを加算器2
5で加算し、その値を次の境界の絶対連接方向値とし
て、絶対方向レジスタ26に記憶する(ステップS
6)。加算器25は3ビット加算器であるので、連接コ
ードが10進数で“8”以上になる場合は、8の剰余が
絶対連接方向値となる。
Next, the value of the absolute direction register 26 and the relative connection direction value output from the first logical operation unit 24 are added to the adder 2.
5, and the value is stored in the absolute direction register 26 as the absolute connecting direction value of the next boundary (step S).
6). Since the adder 25 is a 3-bit adder, when the concatenated code is "8" or more in decimal, the remainder of 8 becomes the absolute concatenated direction value.

【0097】例えば、絶対方向レジスタ26の値が
“3”であり、加算器25から出力された相対連接方向
値が“2”であれば、3+2=5で、次の境界の絶対連
接方向値は“5”となる。次のクロックでこの値が絶対
方向レジスタ26にセットされる。
For example, if the value of the absolute direction register 26 is "3" and the relative connection direction value output from the adder 25 is "2", then 3 + 2 = 5, and the absolute connection direction value of the next boundary is obtained. Becomes “5”. This value is set in the absolute direction register 26 at the next clock.

【0098】このように、次の境界の絶対連接コード
は、前の境界の絶対連接コードに、前の境界の絶対連接
コードと次の境界の絶対連接コードとの差分(相対値)
を加算した結果となる。
As described above, the absolute connection code at the next boundary is the difference (relative value) between the absolute connection code at the previous boundary and the absolute connection code at the next boundary.
Is added.

【0099】次に、絶対方向レジスタ26に記憶した絶
対連接方向値を、第2論理回路27で、図6に示したよ
うな増減値に変換し、この増減値をX,Yアドレスカウ
ンタ21,22に指示する(ステップS7)。
Next, the absolute connection direction value stored in the absolute direction register 26 is converted by the second logic circuit 27 into an increase / decrease value as shown in FIG. 22 (step S7).

【0100】例えば、絶対方向レジスタ26の値が、上
述したように“5”であれば、X,Yの増減値は(−
1,−1)となり、この値をX,Yアドレスカウンタ2
1,22に指示する。これにより、境界の追跡は、図2
5の矢印で示すように、相対連接方向値“2”の方向へ
転進するため、次の境界画素は、(E3)Hの値を持つ
点Bとなる。
For example, if the value of the absolute direction register 26 is "5" as described above, the increase and decrease values of X and Y are (-
1, -1), and this value is stored in the X, Y address counter 2
Instruct 1 and 22. Thus, the tracking of the boundary is performed as shown in FIG.
As shown by the arrow 5, since the vehicle moves in the direction of the relative connection direction value "2", the next boundary pixel is a point B having a value of (E3) H.

【0101】次に、スタートアドレスレジスタに保存し
ておいた、粒子の境界の追跡を始めたスタートアドレス
(Sx、Sy)と、X.Yアドレスカウンタ21,22
の示すアドレスとを比較する(ステップS8)。
Next, the start address (Sx, Sy) at which the tracking of the boundaries of the particles is started, which is stored in the start address register, and Y address counters 21 and 22
(Step S8).

【0102】ここで、X,Yアドレスカウンタ21.2
2の示すアドレスがスタートアドレス(Sx、Sy)と
異なっていれば、ステップS4に戻り、境界の画素の数
だけステップS4からステッブS8までを繰り返す。
Here, the X, Y address counter 21.2
If the address indicated by 2 is different from the start address (Sx, Sy), the process returns to step S4, and steps S4 to S8 are repeated by the number of boundary pixels.

【0103】ここでもし、X,Yアドレスカウンタ2
1,22の示すアドレスがスタートアドレス(Sx、S
y)と一致していれば、図26に示すように、粒子の境
界を一周したことになるので、エッジトレースを中止す
る。エッジトレースを開始してから終了するまでの絶対
方向レジスタ26の値のデータ系列が、その粒子の境界
を表すチェーンコードを示している。
Here, the X, Y address counter 2
The addresses indicated by 1 and 22 are the start addresses (Sx, Sx
If y) coincides with each other, as shown in FIG. 26, it means that the particle has made one round, and the edge tracing is stopped. The data sequence of the value of the absolute direction register 26 from the start to the end of the edge trace indicates a chain code representing the boundary of the particle.

【0104】このようにして、8近傍画素状態値におけ
る境界追跡の方向を基準とした対称性に着目し、直前の
チェーンコードを基準として8近傍画素状態値を並べ替
えているので、最小限のパラメータ(6ビット)で次の
チェーン方向を算出することができ、結果的に簡単な論
理演算と加算器のみでチェーンコードを生成することが
可能となる。そして、このように簡単な論理演算とラン
ダム論理のみで境界の追跡が実現できるので、従来のマ
イクロプログラム論理方式と比較して、イメージプロセ
ッサの高度な集積化(4倍以上の集積化)や、イメージ
処理の大幅な高速化(500万画素/秒以上の境界追跡
能力)が可能となる。そして、これらのことが比較的小
容量(数1000ゲート)のFPGA(フィールドプロ
グラマブルゲートアレー)で実現することができた。
As described above, focusing on the symmetry based on the boundary tracking direction in the eight neighboring pixel state values and rearranging the eight neighboring pixel state values on the basis of the immediately preceding chain code, a minimum The next chain direction can be calculated by the parameter (6 bits), and as a result, a chain code can be generated only by a simple logical operation and an adder. In addition, since the boundary can be tracked only by such a simple logical operation and a random logic, a high degree of integration of the image processor (more than four times integration), Significant speed-up of image processing (boundary tracking capability of 5 million pixels / second or more) is possible. These were realized by a relatively small capacity (several thousand gates) FPGA (field programmable gate array).

【0105】ところで、本発明においては、図2に示す
ように座標抽出部(ここでは頂点座標検出部14と頂点
座標保持メモリ15で表わす)を備え、それによってエ
ッジトレースの始点を検出するようにすることが好まし
い。以下説明する。座標抽出部において、例えば、粒子
の境界上のある一つの画素について“1”の値を持ち、
他の画素については“0”の値を持つ1ビットデータを
得ることができれば、その値が“1”となる場合の画素
の座標を知ることができる。この座標情報はエッジトレ
ース部12によるエッジトレースの際に参照されること
により、エッジトレースの始点として有効利用され、さ
らなる処理の高速化や回路の集積化に貢献する。
By the way, in the present invention, as shown in FIG. 2, a coordinate extracting unit (here, represented by a vertex coordinate detecting unit 14 and a vertex coordinate holding memory 15) is provided so that the start point of the edge trace is detected. Is preferred. This will be described below. In the coordinate extraction unit, for example, a pixel on the boundary of a particle has a value of “1”,
If 1-bit data having a value of "0" can be obtained for other pixels, the coordinates of the pixel when the value is "1" can be known. This coordinate information is referred to at the time of edge tracing by the edge tracing unit 12, and is effectively used as a starting point of the edge tracing, which contributes to further speeding up of processing and integration of circuits.

【0106】頂点座標検出部14は、8近傍画素抽出フ
ィルタl0が各着目画素の周囲の8近傍画素について論
理演算する際に、その着目画素について別の論理演算を
行う。すなわち、各着目画素n8に対して次のような粒子
端検出フラグTIPを計算する。n0,n1,n2,n3,n4,n
5,n6,n7,n8は図2に従うとする。n8は着目画素であ
る。 TIP=n8&!n1&!n2&!n3&!n4&(n0♯n5♯n6#n
7)
When the 8-neighbor pixel extraction filter 10 performs a logical operation on the eight neighboring pixels around each pixel of interest, the vertex coordinate detection unit 14 performs another logical operation on the pixel of interest. That is, the following particle edge detection flag TIP is calculated for each pixel of interest n8. n0, n1, n2, n3, n4, n
5, n6, n7, and n8 are assumed to be in accordance with FIG. n8 is a pixel of interest. TIP = n8 &! n1 &! n2 &! n3 &! n4 & (n0♯n5♯n6 # n
7)

【0107】このフラグTIPの値は、n8が“1”であっ
て、n1,n2,n3,n4が全て“0”であって、n0,n5,n
6,n7のいずれかが“1”である場合に“1”となり、
このときその着目画素n8は2値画像において右上、上、
左上、左のいずれの側の画素にも連接せず、左下、下、
右下、右のいずれかの側の画素には連接する画素となっ
ている。すなわち粒子領域の左上端に位置する画素とな
っている。図20の2値画像の場合には、上から3段
目、左から7番目の画素(これは図22における点Aで
ある)についてフラグTIPが“1”となり、他の画素に
ついては“0”となる。
The value of the flag TIP is such that n8 is "1", n1, n2, n3, and n4 are all "0" and n0, n5, n
When either of 6 and n7 is “1”, it becomes “1”,
At this time, the target pixel n8 is located at the upper right, upper,
Do not connect to the upper left or left side pixel, lower left, lower,
The pixel is connected to either the lower right pixel or the right pixel. That is, the pixel is located at the upper left corner of the particle area. In the case of the binary image in FIG. 20, the flag TIP is “1” for the third pixel from the top and the seventh pixel from the left (this is point A in FIG. 22), and “0” for the other pixels. ".

【0108】このようにして、頂点座標検出部14にお
いて、フラグTIPが“1”となるときの着目画素の座標
(Sx,Sy)を検出する。この座標は頂点座標保持メ
モリ15に記憶される。
In this way, the vertex coordinate detecting section 14 detects the coordinates (Sx, Sy) of the pixel of interest when the flag TIP becomes "1". These coordinates are stored in the vertex coordinate holding memory 15.

【0109】エッジトレース時の処理動作について、図
18を参照して説明する。先の実施例では、8近傍画素
メモリをラスタースキャンの様式でアクセスし非ゼロの
値を持つ点を探索することによりその点の座標を見つけ
ていたが(ステップS1)、本実施例ではラスタースキ
ャン処理を行うことなく、頂点座標保持メモリ15から
出力された頂点座標(Sx,Sy)をスタートアドレス
レジスタと、X,Yアドレスカウンタ21,22にセッ
トするようにしており、このことによりエッジトレース
時におけるさらなる処理の簡略化、高速化を図ってい
る。以降行われる処理、すなわち、8近傍画素メモリ1
1の内容を参照しながら粒子のエッジ(境界または輪郭
ともいう)を画素単位でトレース(追跡)し、粒子の境
界が表す連接コード(チェーンコード)を出力する処理
については同じである。
The processing operation at the time of edge tracing will be described with reference to FIG. In the previous embodiment, the coordinates of the non-zero value are found by accessing the 8-neighbor pixel memory in a raster scan manner and searching for a point having a non-zero value (step S1). The vertex coordinates (Sx, Sy) output from the vertex coordinate holding memory 15 are set in the start address register and the X, Y address counters 21 and 22 without performing the processing, so that the edge tracing is performed. Simplifies and speeds up the processing. The processing performed thereafter, that is, the 8-neighbor pixel memory 1
The process of tracing (tracing) the edge of a particle (also referred to as a boundary or contour) in pixel units while referring to the contents of 1 and outputting a concatenated code (chain code) represented by the boundary of the particle is the same.

【0110】[0110]

【発明の効果】この発明によれば、ビデオカメラなどで
撮像した物体の境界の追跡に際し、物体領域の頂点に位
置する画素を始点とし、物体の境界に位置する画素の連
接してきた方向を基準とする相対連接方向値を求めるこ
とにより次に連接する方向の絶対連接方向値を算出する
ようにしたので、従来よりも論理回路の規槙を小さくす
ることができ、容易にゲートアレイなどに集積すること
が可能となる。また、これにより迅速な境界の追跡が可
能となる。
According to the present invention, when tracking the boundary of an object imaged by a video camera or the like, a pixel located at the vertex of the object area is set as a starting point, and a direction in which the pixels located at the boundary of the object are connected is used as a reference. The absolute connecting direction value of the next connecting direction is calculated by calculating the relative connecting direction value, which makes it possible to reduce the regulation of the logic circuit compared to the conventional one and easily integrate it in a gate array etc. It is possible to do. This also allows for rapid border tracking.

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

【図1】この発明の物体の境界決定装置の構成を示すブ
ロック図である。
FIG. 1 is a block diagram showing a configuration of an object boundary determination device according to the present invention.

【図2】着目画素に対する8近傍画素の定義を示す説明
図である。
FIG. 2 is an explanatory diagram showing the definition of eight neighboring pixels for a pixel of interest.

【図3】着目画素を合む8近傍画素の2値状態の一例を
示す説明図である。
FIG. 3 is an explanatory diagram showing an example of a binary state of eight neighboring pixels including a target pixel.

【図4】エッジトレース部の詳細構成を示すブロック図
である。
FIG. 4 is a block diagram illustrating a detailed configuration of an edge trace unit.

【図5】連接方向を示す説明図である。FIG. 5 is an explanatory diagram showing connection directions.

【図6】連接方向とX,Yアドレスカウンタの増減値と
の関係を示す説明図である。
FIG. 6 is an explanatory diagram showing a relationship between a connection direction and an increase / decrease value of an X, Y address counter.

【図7】着目画素に対する8近傍画素の対称性を示す説
明図である。
FIG. 7 is an explanatory diagram showing the symmetry of eight neighboring pixels with respect to a target pixel.

【図8】8近傍画素状態値のビット配置を示す説明図で
ある。
FIG. 8 is an explanatory diagram showing a bit arrangement of an 8-neighbor pixel state value.

【図9】8近傍画素状態値をシフトさせた状態を示す説
明図である。
FIG. 9 is an explanatory diagram showing a state in which an 8-neighbor pixel state value is shifted.

【図10】正規化前の8近傍画素状態値の一例を示す説
明図である。
FIG. 10 is an explanatory diagram showing an example of 8-neighbor pixel state values before normalization.

【図11】正規化前の8近傍画素状態値の一例を示す説
明図である。
FIG. 11 is an explanatory diagram showing an example of an 8-neighbor pixel state value before normalization.

【図12】正規化前の8近傍画素状態値の一例を示す説
明図である。
FIG. 12 is an explanatory diagram showing an example of 8-neighbor pixel state values before normalization.

【図13】正規化前の8近傍画素状態値の一例を示す説
明図である。
FIG. 13 is an explanatory diagram showing an example of 8-neighbor pixel state values before normalization.

【図14】第1論理演算器いおける論理演算の真理値を
示す説明図である。
FIG. 14 is an explanatory diagram showing truth values of a logical operation in a first logical operation unit.

【図15】境界の前連接方向に対して225°転進する
例を示す説明図である。
FIG. 15 is an explanatory diagram showing an example in which the vehicle makes a 225 ° turn with respect to the front connection direction of the boundary.

【図16】境界の前連接方向に対して225°転進する
例を示す説明図である。
FIG. 16 is an explanatory diagram showing an example in which the vehicle makes a 225 ° turn with respect to the front connecting direction of the boundary.

【図17】境界の前連接方向に対して135°転進する
例を示す説明図である。
FIG. 17 is an explanatory diagram showing an example in which the vehicle makes a 135 ° turn with respect to the front connection direction of the boundary.

【図18】エッジトレース時の処理動作を示すフローチ
ャートである。
FIG. 18 is a flowchart showing a processing operation at the time of edge tracing.

【図19】グレースケール画像の一例を示す説明図であ
る。
FIG. 19 is an explanatory diagram illustrating an example of a grayscale image.

【図20】2値画像保持メモリの記憶内容の一例を示す
説明図である。
FIG. 20 is an explanatory diagram illustrating an example of storage contents of a binary image holding memory.

【図21】8近傍画素メモリの記憶内容の一例を示す説
明図である。
FIG. 21 is an explanatory diagram showing an example of the storage contents of an 8-neighbor pixel memory.

【図22】8近傍画素メモリのラスタースキャンの様子
を示す説明図である。
FIG. 22 is an explanatory diagram showing a state of a raster scan of an 8-neighbor pixel memory.

【図23】着目画素が(E0)Hの8近傍画素状態値を
示す説明図である。
FIG. 23 is an explanatory diagram showing eight neighboring pixel state values where the pixel of interest is (E0) H.

【図24】着目画素が(E0)Hの8近傍画素状態値を
並べ替えた場合のビット配置を示す説明図である。
FIG. 24 is an explanatory diagram showing a bit arrangement in a case where the pixel of interest rearranges eight neighboring pixel state values of (E0) H.

【図25】8近傍画素メモリにおける境界の追跡状態を
示す説明図である。
FIG. 25 is an explanatory diagram showing a tracking state of a boundary in the 8-neighbor pixel memory.

【図26】粒子の境界を一周してエッジトレースを終了
する状態を示す説明図である。
FIG. 26 is an explanatory diagram showing a state in which edge tracing is completed after making a round around the boundary of a particle.

【図27】従来の物体の境界追跡方法を示すブロック図
である。
FIG. 27 is a block diagram illustrating a conventional method of tracking the boundary of an object.

【符合の説明】[Description of sign]

1 対象物 2 ビデオカメラ 4 マイクロコンピュータ 5 CRTディスプレイ装置 6 外部記憶装置 7 デジタイザ 8 コンパレータ 9 2値画像保持メモリ 10 8近傍画素抽出フィルタ 11 8近傍画素メモリ 12 エッジトレース部 13 特徴抽出部 14 頂点座標検出部 15 頂点座標保持メモリ 21 Xアドレスカウンタ 22 Yアドレスカウンタ 23 8近傍画素正規化器 24 第1論理演算器 25 加算器 26 絶対方向レジスタ 27 第2論理演算器 28 チェーンコード DESCRIPTION OF SYMBOLS 1 Object 2 Video camera 4 Microcomputer 5 CRT display device 6 External storage device 7 Digitizer 8 Comparator 9 Binary image holding memory 10 8 Neighboring pixel extraction filter 11 8 Neighboring pixel memory 12 Edge trace part 13 Feature extraction part 14 Vertex coordinate detection Unit 15 vertex coordinate holding memory 21 X address counter 22 Y address counter 23 8 neighborhood pixel normalizer 24 first logical operator 25 adder 26 absolute direction register 27 second logical operator 28 chain code

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 物体を撮像した画像の各画素の濃度情報
を2値信号に変換し物体領域を抽出した2値画像に対
し、物体領域に位置する画素についてそれら各画素が周
囲の2値信号に応じた値を持つような近傍画素状態値に
変換するとともに、物体領域の頂点に位置する画素の座
標を求め、その座標に位置する画素を始点とし、上記近
傍画素状態値を参照しながら物体の境界に位置する画素
の連接してきた方向を基準とする相対連接方向値を求め
ることにより次に連接する方向の絶対連接方向値を算出
し、これを物体の境界に位置する各画素について繰り返
すことにより物体の境界を追跡する物体の境界決定方
法。
1. A binary image obtained by converting density information of each pixel of an image obtained by capturing an object into a binary signal and extracting an object region, for each pixel located in the object region, each of the pixels is located in a surrounding binary signal. In addition to converting to a neighboring pixel state value having a value corresponding to, the coordinates of the pixel located at the vertex of the object area are obtained, the pixel located at that coordinate is set as the starting point, and the object is referred to with reference to the neighboring pixel state value. Calculate the absolute connection direction value of the next connected direction by calculating the relative connection direction value based on the connected direction of the pixels located at the boundary of, and repeat this for each pixel located at the boundary of the object A method for determining the boundary of an object by tracking the boundary of the object.
【請求項2】 物体を撮像した画像の各画素の濃度情報
を2値信号に変換し物体領域を抽出する2値化部と、得
られた2値画像に対し、物体領域に位置する画素につい
てそれら各画素が周囲の2値信号に応じた値を持つよう
な近傍画素状態値に変換する画素抽出部と、物体領域の
頂点に位置する画素の座標を求める座標抽出部と、上記
座標抽出部で得られた座標に位置する画素を始点とし、
上記画素抽出部によって変換された近傍画素状態値を参
照しながら物体の境界に位置する画素の連接してきた方
向を基準とする相対連接方向値を求めることにより次に
連接する方向の絶対連接方向値を算出し、これを境界に
位置する各画素について繰り返すことにより物体の境界
を追跡するエッジトレース部を備えてなる物体の境界決
定装置。
2. A binarizing unit for converting density information of each pixel of an image of an object into a binary signal to extract an object region, and for a pixel located in the object region with respect to the obtained binary image. A pixel extracting unit for converting each pixel into a neighboring pixel state value having a value corresponding to a surrounding binary signal, a coordinate extracting unit for obtaining coordinates of a pixel located at a vertex of the object area, Starting from the pixel located at the coordinates obtained in
The absolute connecting direction value of the next connecting direction is obtained by calculating the relative connecting direction value based on the connecting direction of the pixels located at the boundary of the object while referring to the neighboring pixel state value converted by the pixel extracting unit. And an edge tracing unit that tracks the boundary of the object by repeating this for each pixel located at the boundary.
JP03446899A 1999-02-12 1999-02-12 Object boundary determination method and apparatus Expired - Fee Related JP4299908B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03446899A JP4299908B2 (en) 1999-02-12 1999-02-12 Object boundary determination method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03446899A JP4299908B2 (en) 1999-02-12 1999-02-12 Object boundary determination method and apparatus

Publications (2)

Publication Number Publication Date
JP2000231640A true JP2000231640A (en) 2000-08-22
JP4299908B2 JP4299908B2 (en) 2009-07-22

Family

ID=12415093

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03446899A Expired - Fee Related JP4299908B2 (en) 1999-02-12 1999-02-12 Object boundary determination method and apparatus

Country Status (1)

Country Link
JP (1) JP4299908B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007509334A (en) * 2003-10-21 2007-04-12 ライカ マイクロシステムス ツェーエムエス ゲーエムベーハー Automatic generation method of laser cutting line in laser micro incision
JP2011516890A (en) * 2008-04-09 2011-05-26 アボット ポイント オブ ケア インコーポレイテッド Method for measuring the area of a sample placed in an analysis chamber
WO2023136240A1 (en) * 2022-01-11 2023-07-20 Jfeスチール株式会社 Information processing method, information processing device, information processing system, information processing program, and sintered ore production method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007509334A (en) * 2003-10-21 2007-04-12 ライカ マイクロシステムス ツェーエムエス ゲーエムベーハー Automatic generation method of laser cutting line in laser micro incision
US9217694B2 (en) 2003-10-21 2015-12-22 Leica Microsystems Cms Gmbh Method for automatically generating laser cutting lines in laser microdissection processes
JP2011516890A (en) * 2008-04-09 2011-05-26 アボット ポイント オブ ケア インコーポレイテッド Method for measuring the area of a sample placed in an analysis chamber
WO2023136240A1 (en) * 2022-01-11 2023-07-20 Jfeスチール株式会社 Information processing method, information processing device, information processing system, information processing program, and sintered ore production method
JP7508027B2 (en) 2022-01-11 2024-07-01 Jfeスチール株式会社 Information processing method, information processing device, information processing system, information processing program, and sintered ore manufacturing method

Also Published As

Publication number Publication date
JP4299908B2 (en) 2009-07-22

Similar Documents

Publication Publication Date Title
JP3853034B2 (en) Object boundary determination method and apparatus, and recording medium recording object boundary determination program
JP2686274B2 (en) Cell image processing method and apparatus
US20110211726A1 (en) System and method for processing image data relative to a focus of attention within the overall image
JPH11110561A (en) Image information processor
Wang et al. A real-time multi-face detection system implemented on FPGA
CN113807378A (en) Training data increment method, electronic device and computer readable recording medium
CN113609984A (en) Pointer instrument reading identification method and device and electronic equipment
CN115017931A (en) Method and system for extracting QR codes in batches in real time
JP2000231640A (en) Method and device for deciding boundary of article
JP2810660B2 (en) Particle image analyzer
US20230154144A1 (en) Method and system or device for recognizing an object in an electronic image
JPH06129992A (en) Inspection device for periodic pattern
JP3007392B2 (en) Pattern recognition method and apparatus
JP2001243479A (en) Method and device for image processing and recording medium having image processing program recorded thereon
JP2843389B2 (en) Bonding ball inspection device
JPS62108381A (en) Density histogram detecting system
CN118396966A (en) Method and device for detecting surface defects of industrial parts
JP2008205603A (en) Image processing apparatus and image processing method
CN110232351A (en) A kind of electronic equipment, asic chip and its method for detecting human face and device
JPH10188000A (en) Method and device for extracting linear component of image
JPH03150689A (en) Numeral recognizing method
JPH0224782A (en) Change detecting system of result image in logical filter processing of binary image
JPH0783614A (en) Distance image processing method
JPH1097634A (en) Method for recognizing object
JPH10214341A (en) Color extraction device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090306

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090407

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090420

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120424

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120424

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20150424

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees