JPS6190276A - Distance conversion circuit - Google Patents

Distance conversion circuit

Info

Publication number
JPS6190276A
JPS6190276A JP21208684A JP21208684A JPS6190276A JP S6190276 A JPS6190276 A JP S6190276A JP 21208684 A JP21208684 A JP 21208684A JP 21208684 A JP21208684 A JP 21208684A JP S6190276 A JPS6190276 A JP S6190276A
Authority
JP
Japan
Prior art keywords
data
image
image memory
distance conversion
clock
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
JP21208684A
Other languages
Japanese (ja)
Other versions
JPH0462104B2 (en
Inventor
Makoto Imamura
誠 今村
Shinichi Akagi
赤木 信一
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Hokushin Electric 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 Yokogawa Hokushin Electric Corp filed Critical Yokogawa Hokushin Electric Corp
Priority to JP21208684A priority Critical patent/JPS6190276A/en
Publication of JPS6190276A publication Critical patent/JPS6190276A/en
Publication of JPH0462104B2 publication Critical patent/JPH0462104B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To execute distance conversion calculation of image processing in a high speed and to realize the weighted distance conversion action and image calculation, by providing 4 direction raster scan circuit and executing arithmetic process by the hardware. CONSTITUTION:Variable density data of one image frame range is stored at an image memory 1 as a working area. A four direction raster scan circuit 2 is the circuit to make four directional raster scan to the memory 1, and is composed of two sets of up/down counters which work left/right direction and up/down direction and an additional circuit which switches the flow of a clock. Namely, the distance conversion algorithm is repeatedly reduced to calculations. And by doping this calculation by the hardware, the distance conversion can be done four time faster that the video rate. Also by adding an input dedicated bus, output dedicated bus and an adding circuit, it is possible to make weighted distance conversion and image calculation.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、ディジタル画像処理における距離変換回路に
関づる。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a distance conversion circuit in digital image processing.

(従来の技術) ディジタル画像処理の分野においては、画像内の各画素
につきその背景画面からの距離を求めること(距離変換
)が行われる。第11図は距臼1変換画像例を示す歯で
ある。画像中の数字は周囲の背隈データOからの距離を
示している。図のJ8合4と3の点にイれぞれ頂点があ
り、この点の位置と、距な[データはこの画像を特徴づ
ける有用な情報となっている。従来、このような距離変
換は画像データが記憶された画像メモリとコンピュータ
を用い、画像メモリから読出しだ画像データにソフトウ
ェア上の演算処理を行い、その演算結果を再び画像メモ
リに出込むという操作を?1っていた。
(Prior Art) In the field of digital image processing, the distance from a background screen to each pixel in an image is determined (distance transformation). FIG. 11 shows a tooth showing an example of the talolone 1 converted image. The numbers in the image indicate the distance from the surrounding dokuma data O. There are vertices at points J8 4 and 3 in the figure, and the position and distance of these points are useful information that characterizes this image. Conventionally, such distance conversion has been performed by using an image memory in which image data is stored and a computer, performing arithmetic processing on the image data read from the image memory using software, and then reading the result of the calculation back into the image memory. ? 1 was there.

(発明が解決しようと7−る問題点) 前)ホしたように、従来の距rJI変換は各画J2、ご
とにソフトウエア上の1g1t O処理を行つCいるI
、=め、処理に極めて長時間を苅していた。
(Problems to be Solved by the Invention) Previous) As mentioned above, the conventional distance rJI conversion performs 1g1tO processing on software for each image J2.
、=Me、It took a very long time to process.

本発明はこのよう41点に鑑み−(なされたしのであっ
て、その目的は第1に演蓮処理をハードで構成すること
によりディジタル画1象処理にお(プる距離変換演算を
ビデオレートのら々倍のオーダ0行うことのできる高速
の距離変換回路を実現Jることにあり、第2に距離変換
動作に加えて中み付けされた距離変換動作も行える距1
イ1変挽回路を実現することにあり、第3にy1離変換
動作に加えて画;′に演算も行える距離変換回路を実現
することにあり、第4に距離変換動作に加えて画像の骨
119点b v>出することができる距離変換演算を実
現ツることにある。
The present invention has been made in view of these 41 points, and its first purpose is to convert the distance conversion calculation to video rate processing into one digital image processing by configuring the processing using hardware. The purpose is to realize a high-speed distance conversion circuit that can perform a distance conversion operation on the order of 0 times that of Norara.
The third purpose is to realize a distance conversion circuit that can perform image calculations in addition to the y1 distance conversion operation, and the fourth purpose is to realize a distance conversion circuit that can perform image The objective is to realize a distance conversion calculation that can produce 119 bone points b v>.

(問題点を解決するための手段) 前記した問題点を解決づる第1の発明は画(象データが
格納された画像メモリを4方向にラスタスキャンし、そ
れぞれの方向の場合において、ビデオクロックの前半で
読出したデータと1クロック前に画像メモリに書込まれ
たデーに定数にを加えた値とを比較し、小さい方のデー
タをビデオクロックの後半で画像メモリに書込む操作を
行うようにしたことを特徴とするものであり、第2の発
明は画像データが格納された画像メモリを4方向にラス
タスキャンし、それぞれの方向の場合において、同期ク
ロックの前半で読出したデータと1クロック前に画像メ
モリに書込まれたデータに濃淡画像の濃度値に応じた定
数にを加えた値とを比較し、小さい方のデータを同期ク
ロックの後半で画像メモリに書込む操作を行うようにし
たことを特徴とするものであり、第3の発明は画像デー
タが格納された画像メモリを4方向にラスタスキャンし
、それぞれの方向の場合において、ビデオクロックの前
半で読出したデータと1クロック前に画像メモリに占込
まれたデータに定数にを加えた値とを比較し、小さい方
のデータをビデオクロックの後半で画像メモリに占込む
操作を行うと共に、前記2つの比較データの画像i1i
 nも行うことができるように構成したことを特iL+
とするものであり、第4の発明は画像データが格納され
た画像メモリを4方向にラスタスキ17ンし、それぞれ
の方向の場合において、ビデオクロックの前半で読出し
たデータと1クロック前に画像メモリに書込まれたデー
タに定数にを加えた値とを比較し、小さい方のデータを
ビデAり[コックの後半で画像メモリに書込む操作を行
うと共に、前記比較の結果を2値化データとして各方向
ごとにメモリに記憶しておき、各メモリの記憶データの
論理積をとることにより画像の骨格点も算出できるよう
に構成したことを特徴としている。
(Means for Solving the Problems) A first invention that solves the above-mentioned problems is to raster scan an image memory in which image data is stored in four directions, and scan the video clock in each direction. The data read in the first half is compared with the value obtained by adding a constant to the data written to the image memory one clock ago, and the smaller data is written to the image memory in the second half of the video clock. The second invention is characterized in that the image memory in which image data is stored is raster-scanned in four directions, and in each direction, the data read in the first half of the synchronized clock and the data read out one clock earlier are scanned in four directions. The data written to the image memory is compared with the value obtained by adding a constant according to the density value of the grayscale image, and the smaller data is written to the image memory in the second half of the synchronized clock. The third invention is characterized in that an image memory in which image data is stored is raster-scanned in four directions, and in each direction, data read out in the first half of the video clock and data read out one clock earlier are scanned in four directions. The data stored in the image memory is compared with the value obtained by adding a constant, and the smaller data is stored in the image memory in the latter half of the video clock, and the image i1i of the two comparison data is
iL+ is specially configured to be able to perform
The fourth invention is to raster scan an image memory in which image data is stored in four directions, and in each direction, the data read in the first half of the video clock and the image memory one clock earlier are scanned. The data written in the data is compared with the value obtained by adding a constant, and the smaller data is written to the image memory. The image data is stored in a memory for each direction, and the skeleton points of the image can also be calculated by logically multiplying the data stored in each memory.

(実施例) 以下、図面を参照して本発明の実施例を詳細に説明する
(Example) Hereinafter, an example of the present invention will be described in detail with reference to the drawings.

第1図は、本発明の一実施例を承す(構成ブロック図で
ある。図において、1tJ:¥:業域として1両面分の
領域の濃淡画像データが格納されている画(/1:メモ
リ、2は該画像メ七り1を4方向にラスタスキャンづる
ラスタスキ1ン回路である。4方向は、第2図に示すよ
うに右、左、下、上の4方向として定義される。ラスタ
スキャン回路2は、第2図に示すような方向にラスタス
キャンするためのアドレスを画像メモリ1に与えるよう
になっている。なお、画像メモリ1のデータの読出しと
書込みはビデ副クロック1周期の前半部と後半部を使っ
て行われる。
FIG. 1 is a configuration block diagram of an embodiment of the present invention. The memory 2 is a raster scan circuit that raster scans the image screen 1 in four directions.The four directions are defined as right, left, bottom, and top as shown in FIG. The raster scan circuit 2 is configured to give the image memory 1 an address for raster scanning in the direction shown in FIG. It is performed using the first half and the second half of.

3は画像メモリ1から読出されたデータをビデオクロッ
クによって一時的に保持するトランスベアシン1〜ラツ
チ、4は画像メモリ1へ書込むための画像データをビデ
オクロックにより一時的に保持するレジスタ、5は該レ
ジスタ4の出力データに1を加締するインクリメンタで
ある。6はトランスペアレントラッチ3の出力Pとイン
クリメンタ5の出力Qの大小を比較するコンパレータ、
7はPデータとQデータを受け、コンパレータ6からの
制御信号によって何れか一方を選択してデータバスDB
にのせるマルチプレクサである。該マルチプレクサ7は
、P<QのときにはPを、P2OのときにはQを出力す
るようになっている。該マルチプレクサ7には、ビデオ
クロックか出力状態制御信号として人力されており、ビ
デオクロックが′O“′のとぎにイネーブル状態゛′1
°°のときにディスエーブル状態となるように構成され
ている。
Reference numeral 3 designates transverse bearings 1 to latches that temporarily hold data read from the image memory 1 according to the video clock, 4 registers that temporarily hold the image data to be written to the image memory 1 according to the video clock, and 5 is an incrementer that increments the output data of the register 4 by 1. 6 is a comparator that compares the output P of the transparent latch 3 and the output Q of the incrementer 5;
7 receives the P data and Q data, selects one of them according to the control signal from the comparator 6, and connects it to the data bus DB.
It is a multiplexer that is installed on the The multiplexer 7 outputs P when P<Q, and outputs Q when P2O. The multiplexer 7 is supplied with a video clock or an output state control signal, and when the video clock is 'O', it is in the enable state '1'.
It is configured to be in a disabled state when .

インクリメンタ5としては、ALU(算術論理演算ユニ
ット)の+M能や、ROlvlまたはRA Mによるル
ックアップテーブル(LUT)で実現することができ、
コンパレータ6はALUの減Q成能や専用のコンパレー
タで実現することができる、また、マルチプレクサ7は
3ステート出力のマルチプレクサICや、2組の3ステ
ートバツフアで実現することができ、4方向ラスタスキ
ャン回路2は左右方向と上下方向に対応する2組のアッ
プダウンカウンタとクロックの流れを切換える付加回路
を用いて実現することができる。このように構成された
回路の動作を第3図に示すタイミングチャートを参照し
ながら説明すれば、以下のどJ3りである。
The incrementer 5 can be realized by the +M function of an ALU (arithmetic logic unit) or a look-up table (LUT) by ROlvl or RAM.
The comparator 6 can be realized with the reduced Q function of the ALU or a dedicated comparator, and the multiplexer 7 can be realized with a 3-state output multiplexer IC or two sets of 3-state buffers. The scan circuit 2 can be realized using two sets of up/down counters corresponding to the left-right direction and the up-down direction, and an additional circuit for switching the clock flow. The operation of the circuit configured as described above will be explained below with reference to the timing chart shown in FIG.

第3図において、(イ)はビデオクロックを、(ロ)は
データバスDB上の入出力データDI10を、くハ)(
よPデータの状態を、く二)はQデータの状態をそれぞ
れ示す。以下の説明においては、第4図に示づような左
右方向への距離変換の場合を例にとって説明する。図に
おいて、(a>は物体と背景画を示す図、(b)は右方
向への変換を示1図、(C)は左方向への変換を示す図
である。また、横軸はX方向の位置を縦軸は距離を表わ
している。<a)において、Aは物体の存在領域をBは
背景領域を示す。まlζ、(b)または(C)の下方に
矢印と共に示された記号PまたはQは選択されlζデー
タを示している。
In Fig. 3, (a) indicates the video clock, (b) indicates the input/output data DI10 on the data bus DB, and (c) (
y indicates the state of P data, and 2) indicates the state of Q data, respectively. In the following explanation, a case of distance conversion in the left-right direction as shown in FIG. 4 will be explained as an example. In the figure, (a> is a diagram showing an object and a background image, (b) is a diagram showing conversion to the right, and (C) is a diagram showing conversion to the left. Also, the horizontal axis is X The vertical axis represents the distance. In <a), A indicates the area where the object exists and B indicates the background area. The symbol P or Q shown with an arrow below ζ, (b) or (C) is selected and indicates ζ data.

最初、距離変換すべき物体と背景に対応して、li!!
i像メモリ1に255とOをそれぞれデータとして書込
む。第4図(a)の場合を例にとって説明すれば、物体
存在領域A内の各画素に対しては全て255を書込み、
背景領域B内の各画素に対しては全てOを書込む。なお
、物体存在領域内のデータを255としたのは、取扱う
画像データのピッ1〜故を8ビツトとしたことに対応し
lζものである。次に、画像メモリ1に記憶されている
画像データを、第3図(イ)に示寸ビデAクロックの前
半部(時刻t1〜t2)で続出づ。
First, corresponding to the object to be distance transformed and the background, li! !
255 and O are respectively written in the i-image memory 1 as data. To explain the case of FIG. 4(a) as an example, 255 is written to each pixel in the object existence area A,
All O's are written to each pixel in the background area B. Note that the reason why the data in the object existing area is set to 255 corresponds to the fact that the bits 1 to 2 of the image data to be handled are set to 8 bits. Next, the image data stored in the image memory 1 is sequentially displayed in the first half (times t1 to t2) of the video display A clock as shown in FIG. 3(a).

この結果、データバスDB上には、第3図(ロ)に示す
ようにアクセス時間だけ遅れて読出しデータが確立する
。確立されたデータは、時刻t2におけるビデオクロッ
クの立下りでトランスペアレントラッチ3にラッチされ
る。このラッチされたデータが、11訂述したデータP
となる(第3図(ハ))。
As a result, read data is established on the data bus DB with a delay of the access time, as shown in FIG. 3(b). The established data is latched into the transparent latch 3 at the falling edge of the video clock at time t2. This latched data is the data P described in 11.
(Figure 3 (c)).

一方、前述した読出し動作を行う直前のデータバスDB
上にはその前の書込み石−ドで画像メモリ1に書込まれ
lζデータ(直前データ)がのっている。この直前デー
タは、時刻t1におけるビデオクロックの立上りでレジ
スタ4に取込まれる。
On the other hand, the data bus DB immediately before performing the above-mentioned read operation
Above is the lζ data (previous data) written into the image memory 1 in the previous writing mode. This immediately preceding data is taken into the register 4 at the rising edge of the video clock at time t1.

取込まれたデータは、続くインクリメンタ5に入り、該
インクリメンタで+1される。インクリメンタ5の出力
が前述したデータQとなる。第4図(a)の場合を例に
とれば図に示すようにB部分は背景画であるからI Q
 I!、この値に1を加えた値“1″がQデータとなる
。△の部分の左端では、画像メモリ1から読出されてト
ランスペアレントラッチ3にラッチされたデータPは、
物体の存在領域(A)内のデータであるから255 ”
 、直前のデータに1を加えたデータQは、直前のデー
タが背景領域B内のデータであるから“0°”、これに
1を加えIc値がデータQであるからQの値は“1″と
なる。
The captured data enters the subsequent incrementer 5 and is incremented by one. The output of the incrementer 5 becomes the data Q mentioned above. Taking the case of Fig. 4(a) as an example, as shown in the figure, part B is the background image, so IQ
I! , the value "1" obtained by adding 1 to this value becomes the Q data. At the left end of the △ portion, the data P read out from the image memory 1 and latched in the transparent latch 3 is
255 because it is data within the object's existence area (A).
, the data Q obtained by adding 1 to the previous data is "0°" because the previous data is data in the background area B, and the value of Q is "1" since the Ic value is the data Q by adding 1 to this data. ”.

コンパレータ6は読出したデータPと直前の書込みデー
タに1を加えたデータQとを比較する。
The comparator 6 compares the read data P and the data Q obtained by adding 1 to the immediately previous write data.

そして、比較結果によるセレクト信号Sをマルチプレク
サ7に送′る。マルチプレクサ7はデータPとデータQ
のうち、コンパレータ6からのセレクト信MSにより小
さい方のデータを出力する。第4図(a)の場合を例に
とるど、Aの部分の左端ではデータPが’255”、デ
ータQが1″であるからこの場合はデータQ(=1>が
セレクトされる。マルチプレクサ7でセレクトされたデ
ータ(ここではQ)は、データバスDB上に出力される
。データバスDB上に出力されたデータが第3図(ロ)
に承す’ IJ込みデータとなる。
Then, a select signal S based on the comparison result is sent to the multiplexer 7. Multiplexer 7 has data P and data Q
Among them, the smaller data is output based on the select signal MS from the comparator 6. Taking the case of FIG. 4(a) as an example, data P is '255' and data Q is 1'' at the left end of part A, so in this case data Q (=1> is selected. The data selected in step 7 (Q in this case) is output onto the data bus DB.The data output onto the data bus DB is shown in FIG.
The data will include IJ.

このtl込みデータQは、第3図(イ)に承りように続
くビデオクロックの後半部の時刻t3における立上りに
よってレジスタ4に書込まれる。一方、時刻t3〜t4
は、同時に画像メモリ1に対しては、読出しモードとし
て芸能し、画像メモリ1から次の番地の画像データ(こ
こで【よ255)が所定のアクレスIff間経過後読出
されて、第3図(b)に示すようにデータバスDBにの
る1、データバスDB上に確立した読出しデータは、ビ
デオクロックの時刻t4における立下りでトランスペア
レントラッチ3に書込まれて第3図(ハ)に示すデータ
Pとなって、コンパレータ6及びマルチプレクサ7に与
えられる。
This tl-included data Q is written into the register 4 at the rising edge at time t3 in the latter half of the subsequent video clock as shown in FIG. 3(a). On the other hand, time t3-t4
At the same time, the image memory 1 is set to the read mode, and the image data at the next address (here, 255) is read out from the image memory 1 after a predetermined address period has elapsed, and as shown in FIG. As shown in FIG. 3(c), the read data established on the data bus DB is written into the transparent latch 3 at the falling edge of the video clock at time t4, as shown in FIG. 3(c). The data becomes data P and is applied to the comparator 6 and the multiplexer 7.

一方、レジスタ4には、前述したようにその直前の書込
みデータQ(=1>が洛納されその値は、続くインクリ
メンタ5で+1されて°゛2″となる。
On the other hand, as described above, the immediately preceding write data Q (=1>) is stored in the register 4, and its value is incremented by 1 in the subsequent incrementer 5 to become 0.2''.

この“2′′になった値が第3図(ニ)に示づデータQ
として再びコンパレータ6及びマルチプレクサ7に与え
られる。コンパレータ6はデータP(=255>とデー
タQ(=2>を比較し、その比較の結果によりセレクト
信号Sをマルチプレクサ7に与える。マルチプレクサ7
は、セレクト信号Sによって小さい方のデータQをセレ
クトしてデータバスDBにのせる。データバスDB上に
確立したデータQ(l込みデータ)は時刻t5における
ビデオクロックの立上りで画像メモリ1に書込まれる。
This value of “2'' is the data Q shown in Figure 3 (d).
The signal is again applied to the comparator 6 and the multiplexer 7. Comparator 6 compares data P (=255> and data Q (=2>), and provides a select signal S to multiplexer 7 based on the comparison result. Multiplexer 7
selects the smaller data Q by the select signal S and puts it on the data bus DB. Data Q (1-input data) established on data bus DB is written into image memory 1 at the rising edge of the video clock at time t5.

なお、マルチプレクサ7は、画像メモリ1からの続出し
データと自己の出力データ同志が直接繋がらないよう、
ビデオクロックの後半のみデータバス上に書込みデータ
を出力している。
Note that the multiplexer 7 is designed to prevent the successive output data from the image memory 1 from being directly connected to its own output data.
Write data is output onto the data bus only in the second half of the video clock.

第1図に示す回路は、データの読出し、データの比較、
データの書込みという第4図に示すような繰返しのアル
ゴリズムを1画面全体について行う。この場合において
、画面メモリ1のアドレスは4方向ラスタスキャン回路
2により、第2図に示す4方向について各方向1回ずつ
行う。方向の順序は任意であってよい。また、各走査方
向とも、走査ラインの順序は任意であってよい。例えば
、右方向の走査において、第2図では各走査ラインは上
から下へと移行しているが、逆に下から上でも或いは全
くランダムであってもかまわない。変換時間は、1方向
の画面走査に要する時間を 1/60秒とすると、その
4倍のL/15秒で仝15向の距離変換を終了する。従
来のソフトウェア演諒による方式に比較して、極めて高
速に距離変換を行うことができる。
The circuit shown in FIG. 1 can read data, compare data,
A repetitive algorithm for writing data as shown in FIG. 4 is performed for the entire screen. In this case, the screen memory 1 is addressed once in each of the four directions shown in FIG. 2 by the four-direction raster scan circuit 2. The order of directions may be arbitrary. Furthermore, the order of the scanning lines may be arbitrary in each scanning direction. For example, in scanning in the right direction, each scan line transitions from top to bottom in FIG. 2, but could alternatively be from bottom to top, or completely randomly. Assuming that the time required to scan the screen in one direction is 1/60 seconds, the conversion time is four times L/15 seconds to complete the distance conversion in 15 directions. Distance conversion can be performed extremely quickly compared to the conventional software recitation method.

第5図は、距離変換アルゴリズムの適用例を示す図であ
る。(イ)は変換前の原形、(ホ)は距離変換終了後の
画象を示し、(ロ)〜(ニ)1よ変換の過程を示してい
る。(ホ)を見ると明らかなように、背景からの距離が
遠ざかるにつれて膣が大きくなり、等高検に類似の距離
変換画像が形成されていることがわかる。
FIG. 5 is a diagram showing an example of application of the distance conversion algorithm. (A) shows the original form before conversion, (E) shows the image after distance conversion, and (B) to (D) 1 show the conversion process. As is clear from (e), the vagina becomes larger as the distance from the background increases, and a distance-transformed image similar to the height test is formed.

第6図は、本発明の第2の実施例を示す構成ブロック図
である。図に示1”回路は、データバスを入力専用バス
DB+ と出力専用バスDB2に分8!tしたものであ
る。このようにすると、データバス上の読出しデータと
書込みデータの所突を避けるためのマルチプレクサ7の
出力コントロールが不要になる。
FIG. 6 is a configuration block diagram showing a second embodiment of the present invention. The 1" circuit shown in the figure is one in which the data bus is divided into an input-only bus DB+ and an output-only bus DB2. In this way, in order to avoid collisions between read data and write data on the data bus, The output control of the multiplexer 7 becomes unnecessary.

第7図は、本発明の第3の実施例を示す構成ブロック図
である。図に示す回路は、第1図のインクリメンタ5を
加算回路5′で実現し、関数が+1だけでなく、加(1
回路5−に入力される濃淡画像データの値りにより、1
クロック前に書込まれた画像データが十にされるように
し、濃度重み付きの距離変換回路を実現したものである
。図に示す回路によれば、加算回路5−に加えられる値
には濃淡画像の濃度値に応じて変化するようになってい
る。従って、澗淡画也データが図に示すように領域によ
って1liartKが異なっている場合でも最適な濃度
重み付きの距離変換を行うことができる。
FIG. 7 is a configuration block diagram showing a third embodiment of the present invention. The circuit shown in the figure realizes the incrementer 5 in Figure 1 with an adder circuit 5', and the function is not only +1 but also
1 depending on the value of the grayscale image data input to the circuit 5-.
Image data written before the clock is set to 10, and a distance conversion circuit with density weighting is realized. According to the circuit shown in the figure, the value added to the addition circuit 5- changes according to the density value of the grayscale image. Therefore, even if 1liartK differs depending on the area of the Kantan Painter data as shown in the figure, optimal density weighted distance conversion can be performed.

第8図は、本発明の第4の実施例を示す構成ブロック図
である。図に示す回路は、距離変換回路を汎用の画像演
算器としても使用できるように構成したものである。図
に示す回路は、第1図に示す−コンバレータ6を算術論
理演算ユニット21で買換し、咋術論理演算ユニット2
1にコンパレート−機能をもたせたものである。22は
、算術論理演算ユニット21の演算出力Fを受ける3ス
テートバツフ?で、その出力はマルチブレクリ′7と同
様、データバスDBに接続されている。このように構成
されlζ回路の動作を説明すれば、以下のとおりである
FIG. 8 is a configuration block diagram showing a fourth embodiment of the present invention. The circuit shown in the figure is configured so that the distance conversion circuit can also be used as a general-purpose image arithmetic unit. The circuit shown in FIG. 1 is constructed by replacing the converter 6 shown in FIG.
1 with a comparator function. 22 is a 3-state buffer that receives the calculation output F of the arithmetic and logic unit 21. The output thereof is connected to the data bus DB, similar to the multi-branch controller '7. The operation of the lζ circuit configured in this way will be explained as follows.

先ず、図に示づ回路を距離変換回路として用いる場合は
、3ステートバツフア22の出力をディスエーブル状態
にしておき、算術論理演算ユニット21をコンパレータ
として用いる。データ[〕とデータQの比較結果は、セ
レクト化g 3としてマルチプレク4f 7に入る。該
マルチプレクサ7は、セレクト信号Sを受けて、データ
PとデータQの何れか一方を選択してデータバスDB上
に出力する。その他の動作については、第1図に承り実
施例と同様であるので説明は省略する。
First, when the circuit shown in the figure is used as a distance conversion circuit, the output of the three-state buffer 22 is disabled, and the arithmetic and logic unit 21 is used as a comparator. The comparison result between data [] and data Q is input to multiplexer 4f7 as selection g3. The multiplexer 7 receives the select signal S, selects either data P or data Q, and outputs the selected data onto the data bus DB. The other operations are the same as those in the embodiment as shown in FIG. 1, so a description thereof will be omitted.

° 次に、図に示す回路を画像演算器として用いる場合
は、3スアートバツフア22の出力をイネーブル状態に
、マルチプレクサ7の出力をディスエ′ −プル状態に
しておき、算術論理演算ユニット21を演算器として用
いる。データPとデータQは、諒術論理演亦ユニット2
1に入り、該算術論理演算ユニット21で所定の演算処
理が行われる。演算の結果は出力Fとして取出され、3
ステートバツフア22を介してデータバスDBに出力さ
れる。
° Next, when using the circuit shown in the figure as an image arithmetic unit, the output of the 3-smart buffer 22 is enabled and the output of the multiplexer 7 is disabled, and the arithmetic and logic unit 21 is used as an arithmetic unit. use Data P and data Q are the rhetorical logic unit 2
1, and predetermined arithmetic processing is performed in the arithmetic and logic unit 21. The result of the operation is taken out as output F, and 3
It is output to the data bus DB via the state buffer 22.

データバスDB上に確立された処理画像データは、画他
メモリ1に書込まれる。、なお、3ステートバツフア2
2の出力は、画像メモリ1にiI込む場合に用いる他、
曲の用途に利用できるようにバス等に出力してもよい。
The processed image data established on the data bus DB is written to the image memory 1. , Furthermore, the 3-state buffer 2
The output of 2 is used to input iI into the image memory 1, and
It may also be output to a bus or the like so that it can be used for music purposes.

第9図は、本発明の第5の実施例を示ず構成図である。FIG. 9 is a block diagram showing the fifth embodiment of the present invention.

図に示す回路は、第8図に示す実施例と同様、距離変換
回路を汎用の画像演紳器としても使用できるように構成
したものである。図に示す回路は、第1図に示すマルチ
プレクサ7を論理演算−1ニツト21で置換し、算術論
理演障ユニット21にマルチプレクサ機能をもたせたも
のである。
The circuit shown in the figure is constructed so that the distance conversion circuit can also be used as a general-purpose image display device, similar to the embodiment shown in FIG. In the circuit shown in the figure, the multiplexer 7 shown in FIG. 1 is replaced with a logic operation unit 21, and the arithmetic logic operation unit 21 is provided with a multiplexer function.

23は、コンパレータ6の出力と関数指定信号Func
を受け、算術論理演算ユニット21に関数セレクト信号
SLTを与える関数指定制御回路である。篩術論yf!
演算ユニット21の出力Fは、3ステートバツフア22
を介してデータバスD (3に接続されている。このよ
うに構成されlζ回路の動作を説明すれば、以下のとお
りである。
23 is the output of the comparator 6 and the function designation signal Func
This is a function designation control circuit which receives a function select signal SLT and provides a function select signal SLT to the arithmetic and logic unit 21. Sieve theory yf!
The output F of the arithmetic unit 21 is sent to the 3-state buffer 22
It is connected to the data bus D(3) via the data bus D(3).The operation of the lζ circuit configured in this way will be explained as follows.

先ず、図に示9回路を距離変換回路として用いる場合は
、算術論理演算ユニット21はlll1故指定制御回路
23からの関vlt?レクトイを号SLTによりマルチ
ブレフナとして動作する。そして、算術論理演算ユニッ
ト21は、データト)及びデータQのうち小さい方のデ
ータをデータバスDB上に出力する1、その他の動作に
ついて(よ、第1図に示す実施例と同様であるので、説
明は省略する。
First, when the nine circuits shown in the figure are used as a distance conversion circuit, the arithmetic and logic unit 21 inputs the function vlt? The rectoy operates as a multi-brevner with the SLT. The arithmetic and logic operation unit 21 outputs the smaller of data (data) and data (Q) onto the data bus DB, and other operations are similar to those in the embodiment shown in FIG. Explanation will be omitted.

次に、図に示す回路を画像演の器として用いる場合はコ
ンパレータ6の動作は無視され、関数指定制御回路23
は関数指定信号Funcを受けて、C■1理演亦ユニッ
ト21に関数セレクト化>5. SLTを与える。0術
論理演等ユニット21は、データP及びデータQを入力
して、関数セレクト信号S L−Tに従った所定の演算
処理を行う。演算の結果は、3ステートバツフア22を
介してデータバスDBに出力される。データバスI) 
B上に確立された処理画像データは、画(象メモリ1に
書込まれる。
Next, when the circuit shown in the figure is used as an image rendering device, the operation of the comparator 6 is ignored, and the function specification control circuit 23
receives the function designation signal Func and selects the function in the C1 physical performance unit 21>5. Give SLT. The zero arithmetic logic unit 21 receives data P and data Q and performs predetermined arithmetic processing according to the function select signal SLT. The result of the calculation is output to the data bus DB via the 3-state buffer 22. data bus I)
The processed image data established on B is written to the image memory 1.

なお、第8図、第9図における実施例においては、イン
クリメンタとしてルックアップテーブル5′を用い、+
1の加算だけではなく、定数倍、2乗、絶対(ぽ1等、
種々の゛1人力変換関数として動作させることができる
In the embodiments shown in FIGS. 8 and 9, a lookup table 5' is used as an incrementer, and +
Not only addition of 1, but also constant multiplication, squaring, absolute (Po1, etc.)
It can be operated as a variety of manual conversion functions.

第10図は、本発明の第6の実施例を示を構成ブロック
図である。図に示づ回路は、コンパレータ6の比較結果
を、別途設置〕だ21iij画像メモリ31に占込める
ようにして、距離変換された画像データから骨格点も求
めることができるようにしたものである。ここで骨格点
とは、「その点の距離変換データが、隣接する点のどの
データよりも小さくない」という条eトを満たす点をい
う。画像メモリは、4方向ラスタスキャン回路2(図示
せず)により4方向にスキャンされる。2圃画像メモリ
31は、スキャン方向に対応してB M oから8M3
までの内分割されたメモリから構成されている。
FIG. 10 is a block diagram showing a sixth embodiment of the present invention. The circuit shown in the figure allows the comparison results of the comparator 6 to be loaded into a separately installed image memory 31, so that skeleton points can also be determined from distance-converted image data. Here, the skeleton point refers to a point that satisfies the condition e that "distance conversion data of that point is not smaller than any data of adjacent points." The image memory is scanned in four directions by a four-way raster scan circuit 2 (not shown). The 2nd field image memory 31 has 8M3 images from BMo to 8M3 corresponding to the scanning direction.
It consists of divided memory.

図に示す実施例においては、インクリメンタ5(第1図
)の代わりにルックアップテーブル(1−0丁)32を
用いている。コンパレータ6(ま、P′:Qのときに’
o”、p≧Qのとぎに“1″なる信号$−を出力づる。
In the illustrated embodiment, a look-up table (1-0) 32 is used in place of the incrementer 5 (FIG. 1). Comparator 6 (Well, when P':Q'
When p≧Q, a signal $- of “1” is output.

このように構成された回路の動作を説明すれは、以下の
とおりである。
The operation of the circuit configured as described above will be explained as follows.

まず、前述の操作により距離変換を行う1.この時、L
UT32の関数は+19画像メモリ1はリードモディフ
ァイライト(W E +tビデオクロックにより制御さ
れる)で動作させる。次に、LUT32の関数を×11
画像メ〔す1を読出しモードに切換えて骨格点を求める
。即ら、1!)られた![’! Htljl変換画像の
入った画像メ七り1を4方向にスギセンして読出し、現
在の点のデータPと1つ前の点のデータQをコンパレー
タ6で比較し、この比較結果(Oまたは1)をスキャン
方向毎に2値画象メモリB M o〜B M 3に91
込む。そしてこの4面のデータの論理積をとり、結果が
1の点が骨格点を示すことになる。なお、このとき、マ
ルチブレフナ7はディスエーブル状態である。
First, perform distance conversion using the operations described above.1. At this time, L
The function of UT32 is +19 Image memory 1 is operated with read-modify-write (controlled by W E +t video clock). Next, the function of LUT32 is ×11
The image frame 1 is switched to read mode and skeleton points are determined. Immediately, 1! ) Got it! ['! The image menu 1 containing the Htljl converted image is scanned and read out in four directions, the data P of the current point and the data Q of the previous point are compared with the comparator 6, and the comparison result (O or 1) is read out. 91 to binary image memory B M o to B M 3 for each scanning direction.
It's crowded. Then, the data of these four planes are logically ANDed, and the point where the result is 1 indicates the skeleton point. Note that, at this time, the multi-brevener 7 is in a disabled state.

また、L U T 32について、関数を→−1(距離
変換時)から×1(骨格点抽出時)への切換えは、関数
テーブルの内容を書換えてもよいし、+1用と×1用の
13tl数を予め別のページに占込んでおいて、ページ
指定を切換えるようにしてもよい。また、ルックアップ
テーブルの代わりに+1と×1の両方の演掠が可能なp
術論理演算ユニット(ALU)を用いてもよい。図にお
いては、説明を分かりやす(するため、2値画像メモリ
31としては4画面公示したが、順次論理積をとってそ
の結果を占込むリードモディファイライトを21直画像
メモリ31に対して行えば1画面分だ1プで済ませるこ
とができる。
Also, for LUT32, switching the function from →-1 (during distance conversion) to ×1 (during skeleton point extraction) may be done by rewriting the contents of the function table, or by changing the function for +1 and ×1. The 13tl number may be assigned to another page in advance and the page designation may be switched. Also, instead of a lookup table, p can be used for both +1 and ×1 operations.
An algorithmic logic unit (ALU) may also be used. In the figure, four screens are shown for the binary image memory 31 in order to make the explanation easier to understand. One screen can be filled with one tap.

前述の説明(特に第1図の実施例)においては、データ
Qとして1クロック1nのデータに+1を加締してデー
タQと覆る場合を例にとったが、本発明はこれに限る必
要はなく加算するIj’fは任意の定数Rであってよい
。また、距離変換づ゛べぎ物体の数も1個である必要は
なく、任意の故であってよい。また、回路全体の同期を
とる同期クロックは、ビデオクロックに限る必要はなく
、各回路要ZQのデータ遅延を考慮して会適なスピード
のクロックを使用してもよい。
In the above explanation (particularly the embodiment shown in FIG. 1), an example was taken in which the data of 1 clock 1n is added to data Q by +1, but the present invention does not need to be limited to this. Ij'f, which is added without any difference, may be any constant R. Further, the number of objects to be converted during distance conversion does not need to be one, and may be any number. Further, the synchronization clock for synchronizing the entire circuit is not limited to the video clock, and a clock having an appropriate speed may be used in consideration of the data delay of each circuit ZQ.

(発明の効果) 以上詳細に説明したように、本箱1の発明によれば距離
変換アルゴリズムを、ラスタスWt−ンにJ、る繰返し
演算に分解し、この演(πを専用のハードウェアで実現
することにより、従来コンビ1−タ(ノイマン形)で多
大の時間を要していた距離変換動作が、ビデオレート(
1/60秒)の4倍の時間、即ら、1 、/ 15秒で
行うことができる。更に本発明によれば、第1の発明に
若干の回路を付加するだけで高速路ρJ1変換に加えて
、1口度重み何さの距離変換や、汎用の画像演いや骨格
点の抽出等を行うことのできる距離変換回路を実現する
ことができる。
(Effects of the Invention) As explained in detail above, according to the invention in Bookcase 1, the distance conversion algorithm is decomposed into the iterative operation of raster Wt-n, and this operation (π is calculated using dedicated hardware. By realizing this, the distance conversion operation, which previously took a lot of time with a combinator (Neumann type), can be performed at a video rate (
1/60 seconds), i.e., 1/15 seconds. Furthermore, according to the present invention, by simply adding a few circuits to the first invention, in addition to expressway ρJ1 conversion, it is possible to perform distance conversion with 1 mouth degree weight, general-purpose image rendering, skeleton point extraction, etc. It is possible to realize a distance conversion circuit that can perform the following steps.

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

第1図は本発明の一実施例を示す]i11成ブロック図
、第2図はスキャン方向を示寸図、第3図は各部の動作
を示づタイミングチャート、第4ジ1(よ距離変換アル
ゴリズムを説明づるための図、第5図は距トミ1変換ア
ルゴリズムの適用例を示す図、第6図乃至第10図は本
発明の他の実施例を示す図、第11図は距離変換された
画倣例を示づ図である。 1・・・画像メモリ 2・・・4h向クラスタスキ1Pン路 3・・・トーランスペアレントラツチ 4・・・レジスタ     5・・・インクリメンタ5
′・・・jJロcネ回路    6・・・コンパレータ
7・・・マルチプレクサ 21・・・算トドi論理演算ユニット 22・・・3ステートバツフア 23・・・関数指定制御回路 31・・・21直画像メモリ 32・・・LUTB l
’VI o〜BM!・・・メモリDB、DB+ 、DB
2・・・データバス篇2図 諮6回 5′;加曽回路
Figure 1 shows an embodiment of the present invention; Figure 2 is a dimensional diagram showing the scanning direction; Figure 3 is a timing chart showing the operation of each part; Figure 5 is a diagram for explaining the algorithm, Figure 5 is a diagram showing an example of application of the distance-to-mi 1 conversion algorithm, Figures 6 to 10 are diagrams illustrating other embodiments of the present invention, and Figure 11 is a diagram showing an application example of the distance conversion algorithm. 1... Image memory 2... 4h direction cluster scan 1P path 3... Torrance parent latch 4... Register 5... Incrementer 5
'...JJ Rocne circuit 6...Comparator 7...Multiplexer 21...Calculation and i logic operation unit 22...3-state buffer 23...Function specification control circuit 31...21 Direct image memory 32...LUTB l
'VI o~BM! ...Memory DB, DB+, DB
2... Data bus version 2 figure consultation 6th episode 5'; Kaso circuit

Claims (4)

【特許請求の範囲】[Claims] (1)画像データが格納された画像メモリを4方向にラ
スタスキャンし、それぞれの方向の場合において、同期
クロックの前半で読出したデータと1クロック前に画像
メモリに書込まれたデータに定数にを加えた値とを比較
し、小さい方のデータを同期クロックの後半で画像メモ
リに書込む操作を行うようにしたことを特徴とする距離
変換回路。
(1) Raster scan the image memory in which image data is stored in four directions, and in each direction, the data read in the first half of the synchronous clock and the data written to the image memory one clock ago are set to a constant value. A distance conversion circuit is characterized in that the data of the smaller one is compared with the added value of the synchronous clock, and the smaller data is written into the image memory in the second half of the synchronous clock.
(2)画像データが格納された画像メモリを4方向にラ
スタスキャンし、それぞれの方向の場合において、同期
クロックの前半で読出したデータと1クロック前に画像
メモリに書込まれたデータに濃淡画像の濃度値に応じた
定数にを加えた値とを比較し、小さい方のデータを同期
クロックの後半で画像メモリに書込む操作を行うように
したことを特徴とする距離変換回路。
(2) Raster scan the image memory in which image data is stored in four directions, and in each direction, a grayscale image is created between the data read in the first half of the synchronous clock and the data written to the image memory one clock ago. A distance conversion circuit is characterized in that it compares a value obtained by adding a constant corresponding to a density value of , and writes the smaller data to an image memory in the latter half of a synchronous clock.
(3)画像データが格納された画像メモリを4方向にラ
スタスキャンし、それぞれの方向の場合において、同期
クロックの前半で読出したデータと1クロック前に画像
メモリに、書込まれたデータに定数にを加えた値とを比
較し、小さい方のデータを同期クロックの後半で画像メ
モリに書込む操作を行うと共に、前記2つの比較データ
の画像演算も行うことができるように構成したことを特
徴とする距離変換回路。
(3) Raster scan the image memory in which image data is stored in four directions, and in each direction, set a constant to the data read in the first half of the synchronous clock and the data written to the image memory one clock ago. is compared with the sum of the data, and writes the smaller data to the image memory in the latter half of the synchronized clock, and is also configured to perform image calculations on the two comparison data. distance conversion circuit.
(4)画像データが格納された画像メモリを4方向にラ
スタスキャンし、それぞれの方向の場合において、同期
クロックの前半で読出したデータと1クロック前に画像
メモリに書込まれたデータに定数にを加えた値とを比較
し、小さい方のデータを同期クロックの後半で画像メモ
リに書込む操作を行うと共に、前記比較の結果を2値化
データとして各方向ごとにメモリに記憶しておき、各メ
モリの記憶データの論理積をとることにより画像の骨格
点も算出できるように構成したことを特徴とする距離変
換回路。
(4) Raster scan the image memory in which image data is stored in four directions, and in each direction, the data read in the first half of the synchronous clock and the data written to the image memory one clock ago are set to a constant value. , and the smaller data is written into the image memory in the second half of the synchronization clock, and the result of the comparison is stored as binarized data in the memory for each direction, A distance conversion circuit characterized in that it is configured to be able to calculate a skeleton point of an image by taking a logical product of data stored in each memory.
JP21208684A 1984-10-09 1984-10-09 Distance conversion circuit Granted JPS6190276A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21208684A JPS6190276A (en) 1984-10-09 1984-10-09 Distance conversion circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21208684A JPS6190276A (en) 1984-10-09 1984-10-09 Distance conversion circuit

Publications (2)

Publication Number Publication Date
JPS6190276A true JPS6190276A (en) 1986-05-08
JPH0462104B2 JPH0462104B2 (en) 1992-10-05

Family

ID=16616638

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21208684A Granted JPS6190276A (en) 1984-10-09 1984-10-09 Distance conversion circuit

Country Status (1)

Country Link
JP (1) JPS6190276A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103886542A (en) * 2014-03-24 2014-06-25 北京工业大学 Method for achieving Arnold image scrambling effect on quantum computer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103886542A (en) * 2014-03-24 2014-06-25 北京工业大学 Method for achieving Arnold image scrambling effect on quantum computer

Also Published As

Publication number Publication date
JPH0462104B2 (en) 1992-10-05

Similar Documents

Publication Publication Date Title
JPH0812690B2 (en) Image scaler
JPH0353668B2 (en)
JPS6190276A (en) Distance conversion circuit
US4945497A (en) Method and apparatus for translating rectilinear information into scan line information for display by a computer system
JP3154741B2 (en) Image processing apparatus and system
JPH11203467A (en) Display and its method
KR100206258B1 (en) Image processing apparatus
US6788348B1 (en) Method and system for processing digital images
JPH0256874B2 (en)
US8717628B1 (en) Flexible image processing apparatus and method
JP2973819B2 (en) Image processing device
JPH0546744A (en) Image processor
JP2777189B2 (en) Stereoscopic shadow processing device
JPS61187083A (en) Storage device of picture element information
JPS62219078A (en) Arithmetic and processing device for expanded picture
JPH0139149B2 (en)
JPH011072A (en) Image processing device
JP2787487B2 (en) Circuit for determining the position of a line segment displayed and operated on a computer system
JP2601138B2 (en) Video display
JPH07118010B2 (en) Mask signal processing circuit
JPS63249223A (en) Multi-window display control system
JPH0519032A (en) Compression processing device of spectrum data
JPH03223894A (en) Image processing circuit
JPH011070A (en) Image processing device
JPH05192334A (en) Ultrasonic diagnostic device