JPS62264380A - Picture processor - Google Patents

Picture processor

Info

Publication number
JPS62264380A
JPS62264380A JP61108865A JP10886586A JPS62264380A JP S62264380 A JPS62264380 A JP S62264380A JP 61108865 A JP61108865 A JP 61108865A JP 10886586 A JP10886586 A JP 10886586A JP S62264380 A JPS62264380 A JP S62264380A
Authority
JP
Japan
Prior art keywords
data
memory means
group
logic
output
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.)
Pending
Application number
JP61108865A
Other languages
Japanese (ja)
Inventor
Tsutomu Minagawa
勉 皆川
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP61108865A priority Critical patent/JPS62264380A/en
Publication of JPS62264380A publication Critical patent/JPS62264380A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To detect a prescribed picture element position such as a border line in a short time by dissolving and storing a picture for respective reference colors, executing the logical operation respectively after the storage data are divided into two groups based on the designating color and deciding the presence/absence of the designating color. CONSTITUTION:A memory means 1 dissolves and stores a two-dimensional picture for respective reference colors. The storage data of the memory means 1 are inputted to a classifying means 2 and divided into two groups based on the designating color to be retrieved. To the respective storage data classified by a classifying means 2, the prescribed logical operation is executed by the first and second logical means 3 and 4, the output of these logical means 3 and 4 is inputted to a deciding means 5 and the presence/absence of the designating color are decided.

Description

【発明の詳細な説明】 〔発明の目的〕 (産業上の利用分野) 本発明は画像処理装置、特に境界線等の所定の画素位置
の検出を行なう画像処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to an image processing apparatus, and particularly to an image processing apparatus that detects predetermined pixel positions such as boundary lines.

(従来の技術) 一般に画像処理装置では、二次元画像を形成する各画素
データをメモリに記憶させ、必要な処理を施す。この場
合、ある特定の色をもった画素の位置を検出する処理が
必要となることが多い。例えば、メモリ内に、ある閉領
域をもった図形が定義されており、この閉領域内を塗り
つぶすような画像処理を施す場合、境界線の座標値を求
めなければならない。
(Prior Art) Generally, in an image processing device, each pixel data forming a two-dimensional image is stored in a memory, and necessary processing is performed on the data. In this case, processing to detect the position of a pixel with a certain specific color is often required. For example, if a figure with a certain closed area is defined in memory and image processing is performed to fill the inside of this closed area, the coordinate values of the boundary lines must be determined.

いま、例えば赤、緑、青(以下それぞれR,G。For example, red, green, and blue (hereinafter referred to as R and G, respectively).

Bと略す)の3つの基準色について3個のメモリMR,
MG、M、を設け、このメモリ内に紫色の境界線を有す
る三角形が第4図に示すように定義されているものとす
る。この三角形の内側を塗りつぶすような画像処理を行
なうためには、この境界線の座標値を求めなければなら
ない。
3 memories MR for the three reference colors (abbreviated as B),
It is assumed that MG and M are provided, and a triangle with a purple border is defined in this memory as shown in FIG. In order to perform image processing that fills the inside of this triangle, it is necessary to find the coordinate values of this boundary line.

従来装置では、この作業を次のようにして行なっている
。l]ち所定点Aから第4図の矢印に示す方向に各画素
を検索してゆき、紫色の画素Bをみつけ出すのである。
In the conventional device, this work is performed as follows. l] Each pixel is searched from a predetermined point A in the direction shown by the arrow in FIG. 4, and a purple pixel B is found.

第5図にこの手順の流れ図を示ず。まず各メモリMR0
MG0MBのそれぞれからA点を含んだ所定のnピット
分のデータDI  、Di  、DlBを読出す。通常
は、このRG ビットanとしては、1ワードに相当するビット数、が
採られ、結局1ワードデータの読出しを行なったことに
なる(ステップS1)。次にこのデータDIR,D1G
、D19に基づいて紫色の画素の検索を行なう(ステッ
プ82)。紫色の画素がなければ、続いて次の1ワ一ド
分のデータD2R。
A flowchart of this procedure is not shown in FIG. First, each memory MR0
Data DI, Di, and DlB for a predetermined n pits including point A are read from each of MG0MB. Normally, the number of bits corresponding to one word is taken as this RG bit an, and in the end, one word of data is read out (step S1). Next, this data DIR, D1G
, D19, a search for purple pixels is performed (step 82). If there is no purple pixel, then the next one word worth of data D2R.

D2G、D2.を読出して同じ処理を繰返す(ステップ
83.84.81)。紫色の画素があれば(この例では
Dk  、Dk  、Dk、を読出したR      
 G とき)、そのワードデータの中の何番目のビットが紫色
の画素に対応するのかを、データを1ビツトずつシフト
する操作を行なって検出する(ステップ85)。
D2G, D2. is read and the same process is repeated (steps 83, 84, 81). If there is a purple pixel (in this example, R
G), which bit in the word data corresponds to the purple pixel is detected by shifting the data one bit at a time (step 85).

このようにして8点の座標を検出することができる。同
様にしてこの三角形の全境界線の座標が求められる。
In this way, the coordinates of eight points can be detected. In the same way, the coordinates of all boundaries of this triangle are determined.

(発明が解決しようとする問題点) 従来の画像処理装置では、第5図に示す操作をすべてソ
フトウェアで処理していたため処理時間が長くなるとい
う問題点がある。即ら、CPUが所定のプログラムに基
づいて1ワードデータごとの読出しを行ない、所定の演
算処理を行なっているため、CPUの実行すべきステッ
プ数ががなり多くなり、最終的な境界座標が求まるまで
、かなりの時間がかかつてしまうのである。画II処理
は対象物が視覚的に把握されるため、処理時間をできる
だけ短縮することが望まれている。
(Problems to be Solved by the Invention) In the conventional image processing apparatus, all the operations shown in FIG. 5 are processed by software, which causes a problem that the processing time becomes long. In other words, since the CPU reads data one word at a time based on a predetermined program and performs predetermined arithmetic processing, the number of steps that the CPU must execute becomes large, and the final boundary coordinates are determined. It takes a considerable amount of time to do so. Since the image II process allows the object to be visually grasped, it is desired to shorten the processing time as much as possible.

そこで本発明はできるだけ短時間で境界線等の所定の画
素位置の検出を行なうことができる画像処理袋δを提供
することを目的とする。
Therefore, an object of the present invention is to provide an image processing bag δ that can detect predetermined pixel positions such as boundary lines in as short a time as possible.

〔発明の構成〕[Structure of the invention]

(問題点を解決するための手段) 本発明は画像処理装置において、 a)二次元画像を形成する各画素をm色(mは自然数)
の基準色に分解し、各y!準単色との画素データを記a
するm個のメモリ手段と、 b)検索すべき指定色に基づいてm個のメモリ手段を、
指定色を構成する基準色についてのメモリ手段から成る
第1群と、それ以外のメモリ手段から成る第2群と、に
分類する分類手段と、C)第1群に属するメモリ手段が
2以上ある場合には、第1群に属する各メモリ手段の検
索対象となるアドレス位置から、それぞれ所定のnビッ
ト(nは自然数)のデータを取出し、対応するビット間
での論理積演算を行なってその結果のデータを出力し、 第1uに属するメモリ手段が1つのみの場合には、この
1つのみのメモリ手段の検索対象となるアドレス位置か
らnビットのデータをそのまま出力し、 第1群に属するメモリ手段が無い場合には、nビットの
論理14111のデータを出力する第1の論理手段と、 d) 第2群に属するメモリ手段が2以上ある場合には
、第2群に属する各メモリ手段の検索対象となるアドレ
ス位置から、それぞれnビットのデータを取出し、対応
するビット間での論理和演算を行なってその結果の否定
論理データを出力し、第2群に属するメモリ手段が1つ
のみの場合には、この1つのみのメモリ手段の検索対象
となるアドレス位置からnビットのデータの否定論理デ
ータを出力し、 第2群に属するメモリ手段が無い場合には、nビットの
論理“1″のデータを出力する第2の論理手段と、 e)第1の論理手段の出力データと、第2の論理手段の
出力データと、の対応するビット間での論理積演口を行
なって、その結果論理゛1”となるビットが存在すれば
検索対象となる領域に指定色を有する画素が存在すると
判定する判定手段と、を設け、境界線等の所定の画素位
置の検出を短時間で行なえるようにしたものである。
(Means for Solving the Problems) The present invention provides an image processing device in which: a) each pixel forming a two-dimensional image is divided into m colors (m is a natural number);
Separated into standard colors, each y! Record pixel data with semi-monochrome
b) m memory means based on the specified color to be searched;
C) There are two or more memory means belonging to the first group; C) a classification means for classifying into a first group consisting of memory means for reference colors constituting the specified color and a second group consisting of other memory means; and C) there are two or more memory means belonging to the first group. In this case, each predetermined n-bit data (n is a natural number) is extracted from the address position to be searched in each memory means belonging to the first group, and the result is obtained by performing an AND operation between the corresponding bits. If there is only one memory means belonging to the 1uth group, output n-bit data as is from the address position to be searched in this only memory means, and output the data belonging to the 1st group. When there is no memory means, a first logic means that outputs n-bit logic 14111 data, and d) When there are two or more memory means belonging to the second group, each memory means belonging to the second group. n bits of data are extracted from each address position to be searched, performs a logical OR operation between the corresponding bits, and outputs the negative logical data of the result, and only one memory means belongs to the second group. In this case, n-bit logic data of n-bit data is output from the address position to be searched in only one memory means, and if there is no memory means belonging to the second group, n-bit logic " e) performing an AND operation between corresponding bits of the output data of the first logic means and the output data of the second logic means; , and a determination means that determines that a pixel having a specified color exists in the area to be searched if there is a bit that becomes logical ``1'' as a result, and detects a predetermined pixel position such as a boundary line in a short time. It was made so that it could be done.

(作 用) 従来ソフトウェアで処理していた操作を、ハードウェア
で実現できるようになるため、処理時間が極端に短縮す
る。
(Function) Operations that were conventionally processed using software can now be performed using hardware, resulting in an extremely shortened processing time.

(実施例) 以下本発明を図示する実施例に基づいて説明する。第2
図は本発明に係る画像処理装置の基本構成を示すブロッ
ク図である。本実施例では3つのメモリ1が設けられて
おり、それぞれR,G、Bの゛基準色に対応する。この
3つのメモリ1は第4図のMR,M、 、M8に対応す
る。分類手段2は、検索すべき指定色に基づいてこの3
つのメモリ1を第1群および第2群の2つの群に分類す
る。第1群のメモリ内のデータに対しては第1の論理手
段3で後述する所定の論理演算が施され、第2群のメモ
リ内のデータに対しては第2の論理手段4で後述する所
定の論理演算が施される。判定手段5は、これら2つの
論理演算の結果に更に所定の論理演算を施し、指定色を
右する画素の存在を判定する。
(Example) The present invention will be described below based on an illustrated example. Second
The figure is a block diagram showing the basic configuration of an image processing device according to the present invention. In this embodiment, three memories 1 are provided, each corresponding to R, G, and B standard colors. These three memories 1 correspond to MR, M, , M8 in FIG. The classification means 2 selects these three colors based on the specified color to be searched.
The memories 1 are classified into two groups: a first group and a second group. The data in the first group of memories is subjected to a predetermined logical operation, which will be described later, by the first logic means 3, and the data in the second group of memories is subjected to a predetermined logical operation, which will be described later, by the second logic means 4. A predetermined logical operation is performed. The determining means 5 further performs a predetermined logical operation on the results of these two logical operations, and determines the existence of a pixel that corresponds to the designated color.

いま、前述の従来装置の例と同様に第4図に示すような
三角形について、A点から矢印のように右方に検索して
ゆき、紫色の境界線上の点Bを求める場合の動作につい
て説明する。この動作のアルゴリズム自体は第5図の流
れ図に示すアルゴリズムと同様であるが、本実施例に係
る装置では、ステップS2の指定色画素の検索動作がす
べてハードウェアによって行なわれる。
Now, as in the example of the conventional device described above, we will explain the operation of searching a triangle as shown in FIG. 4 from point A to the right as indicated by the arrow to find point B on the purple boundary line. do. The algorithm itself for this operation is similar to the algorithm shown in the flowchart of FIG. 5, but in the apparatus according to this embodiment, the search operation for the specified color pixel in step S2 is entirely performed by hardware.

さて、まず第4図に示すメモリMR,MG。First, the memories MR and MG shown in FIG.

M からそれぞれデータD1  、DiG、D1BR を読出して分類手段2に取込む。この取込lυだnビッ
トのデータを、それぞれRO−R(n−1) 。
Data D1, DiG, and D1BR are read out from M and taken into the classification means 2, respectively. The captured n bits of data are each RO-R(n-1).

Go−G (n−1) 、 BO〜B (n−1)と表
わすことにする。例えばデータD1Rは1≧O,R1゜
R2,・・・、R(n−1)のnビットで構成される。
They will be expressed as Go-G (n-1) and BO-B (n-1). For example, data D1R is composed of n bits: 1≧O, R1°R2, . . . , R(n-1).

fR3図(a)はこれら取込んだデータを示す。この三
角形の例では、はじめに取込んだデータD1に対応する
画素はすべて黒であるため、ずぺてのビットは0となる
fR3 diagram (a) shows these captured data. In this triangular example, all pixels corresponding to the first captured data D1 are black, so all bits are 0.

ここで分類手段2は、検索すべき指定色に基づいてデー
タD1 、Dl 、DlBを2つの群にG 分ける。この例では検索すべき指定色は境!71i線の
紫色であるため、紫色を構成する基準色RとBから成る
第1群と、それ以外の基準色Gから成る第2群とに分け
られる。従ってデータD1Rと01、とは第1の論理手
段3に与えられ、データD1oは第2の論理手段4に与
えられる。
Here, the classification means 2 divides the data D1, D1, and D1B into two groups G based on the specified color to be searched. In this example, the specified color to search for is border! Since it is the purple color of the 71i line, it is divided into a first group consisting of the reference colors R and B that make up the purple color, and a second group consisting of the other reference colors G. Therefore, data D1R and 01 are applied to the first logic means 3, and data D1o is applied to the second logic means 4.

第1の論理手段3は次のような論理演韓を行なう。The first logical means 3 performs the following logical operation.

(i)  与えられたデータが2組以上ある場合与えら
れた各データの対応するビット間での論理積を出力。
(i) If there are two or more sets of given data, output the AND between the corresponding bits of each given data.

(11)与えられたデータが1組のみの場合与えられた
データをそのまま出力。
(11) If the given data is only one set, output the given data as is.

(iii)  与えられたデータがない場合nビットの
論理111 I+を出力。
(iii) If there is no given data, output n-bit logic 111 I+.

いま、この第1の論理手段3の論理出力をXとし、この
XをxO〜X (n−1)なるnビットで表ねすとすれ
ば、 X1=(R+Ri)−(G+Gi)・ (B+B i )         ・・・・・・(1
)なる式でXの各ビットを表わすことができる。ここで
iはO〜(n−1)までの自然数であり、RoG、Bは
各色が指定色の構成となっている場合は論理“1″、な
っていない場合は論理“0″をとる論理値である。
Now, let the logic output of this first logic means 3 be X, and if this X is represented by n bits xO~X (n-1), then X1=(R+Ri)-(G+Gi)・(B+B i) ・・・・・・(1
) can represent each bit of X. Here, i is a natural number from O to (n-1), and RoG and B are logics that take logic "1" if each color has the specified color composition, and logic "0" if not. It is a value.

さて、この例では第1の論理手段3にはデータD1 と
01.とが与えられるため、出力XはDIRとDl、と
の論理和となる。即ち、指定色は紫色であるから11=
1.G−0,8−1であり、式(1)は Xi−(0+Ri) ・(1+Gi)−(0+Bi)−
Ri−3i         ・・・・・・(2)とな
る。第3図(b)上段にXの演算結果を示す。
Now, in this example, the first logic means 3 contains data D1 and 01. is given, so the output X is the logical sum of DIR and Dl. That is, since the specified color is purple, 11=
1. G-0,8-1, and formula (1) is Xi-(0+Ri) ・(1+Gi)-(0+Bi)-
Ri-3i...(2). The calculation result of X is shown in the upper part of FIG. 3(b).

一方、第2の論理手段4は次のような論理演算を行なう
On the other hand, the second logical means 4 performs the following logical operation.

(i)  与えられたデータが2組以上ある場合与えら
れた各データの対応するビット間での論理和の否定を出
力。
(i) When there are two or more sets of given data, outputs the negation of the logical OR between the corresponding bits of each given data.

(ii)  与えられたデータが1組のみの場合与えら
れたデータの否定を出力。
(ii) If there is only one set of given data, output the negation of the given data.

(iii)  与えられたデータがない場合nビットの
論理“1″を出力。
(iii) If there is no given data, output n-bit logic "1".

いま、この第2の論理手段4の論理出力をYとし、この
YをYO〜Y(n−1)なるnビットで表わすとすれば
、 ・・・・・・(3) なる式でYの各ビットを表わすことができる。
Now, if the logic output of this second logic means 4 is Y, and if this Y is expressed by n bits YO~Y(n-1), then the expression of Y is expressed as follows (3) Each bit can be represented.

さて、この例では第2の論理手段3にはデータD1oの
1組のみが与えられるため、出力YはDloの否定とな
る。即ち式(3)にR−1゜G−0,8=1を代入すれ
ば Yi=  (0・Ri+i・Qi+Q・Bi)=  Q
i           ・・・・・・(4)を得る。
Now, in this example, since only one set of data D1o is given to the second logic means 3, the output Y becomes the negation of Dlo. That is, by substituting R-1°G-0,8=1 into equation (3), Yi= (0・Ri+i・Qi+Q・Bi)=Q
i ......(4) is obtained.

第3図(b)中段にYのW4算結果を示す。The middle part of FIG. 3(b) shows the W4 calculation result of Y.

最後に判定手段5は第1の論理手段3の出力Xと第2の
論理手段4の出力Yとの論理和2をとり、このZが0か
否か、即ち20〜Z(n−1)のnビットのうら論理1
41 I+となるビットが1つでも存在するか否かを判
定する。論理“1パとなるビットが1つでも存在すれば
、検索対象となる領域に指定色を有する画素が存在する
と判定される。
Finally, the determining means 5 takes the logical sum 2 of the output X of the first logic means 3 and the output Y of the second logic means 4, and determines whether this Z is 0 or not, that is, 20~Z(n-1) Logic 1 behind n bits of
41 Determine whether there is even one bit that is I+. If there is even one bit with logic "1", it is determined that a pixel having the specified color exists in the area to be searched.

(!11ち、 Z i =X i −Y i     ”=(5)なる
演算が行なわれ、Ziが“1″か否か判定されることに
なる。第3図(b)下段に2の演n結果を示す。このよ
うにこの例では1ワード目のデータD1についての検索
の結果はZ−0であり、指定色画素はこの領域内にはな
しと判断される。
(!11, Z i =X i −Y i ”=(5) is performed, and it is determined whether Zi is “1” or not. Thus, in this example, the search result for the first word data D1 is Z-0, and it is determined that there is no specified color pixel within this area.

続いて2ワード目のデータD2についても同様の検索処
理が行なわれるが、この例ではやはりZ=0となる。z
40となるのはにワード目のデータDkについての検索
処理が行なわれたときである。第4図を見ればわかるよ
うに、データDkの領域内には境界点Bが存在するため
である。第3図(C)に、このDkを各基準色について
取込んだデータを示す。図のようにDkRおよびDkB
の第10ビツト目が1″となっており、この位置に紫色
の境界点Bが存在することが示されている。このデータ
Dkに基づいて前述と同様の論理演算を行なった結果を
第3図(d)に示す。結果的にZキ01即ち第10ビツ
ト目が“1″となり、この領域に指定色画素が存在する
ことが確認される。
Subsequently, similar search processing is performed for the second word data D2, but in this example, Z=0 as well. z
40 when the search process for the word-th data Dk is performed. As can be seen from FIG. 4, this is because a boundary point B exists within the area of data Dk. FIG. 3(C) shows the data obtained for this Dk for each reference color. DkR and DkB as shown
The 10th bit is 1'', indicating that the purple boundary point B exists at this position.The result of performing the same logical operation as above based on this data Dk is shown in the third As shown in Figure (d), Z key 01, that is, the 10th bit becomes "1", confirming that the specified color pixel exists in this area.

第1図は、第2図に示す装置のうち、分類手段2、第1
および第2の論理手段3および4、判定手段5の部分を
具体的な論理回路で構成した一例の回路図である。ここ
でRO−R(n−1)はメモリMRから取出したnビッ
トのデータ、GO〜G(n−1)はメモリMGから取出
したnビットのデータ、BO〜B(n−1)はメモリM
Bから取出したnビットのデータである。また、R,G
FIG. 1 shows the classification means 2, the first
FIG. 3 is a circuit diagram of an example in which the second logic means 3 and 4 and the determination means 5 are constructed by concrete logic circuits. Here, RO-R(n-1) is n-bit data retrieved from memory MR, GO~G(n-1) is n-bit data retrieved from memory MG, and BO~B(n-1) is memory M
This is n-bit data extracted from B. Also, R,G
.

Bは前述したように各色が指定色の構成となっているか
否かを示す論理値である。この回路はB ITO〜B 
IT (n−1)のn個の部分から成るが、各部分の構
成は全く同一であるため、以下BITOの部分について
のみ説明する。
B is a logical value indicating whether or not each color is configured as a designated color, as described above. This circuit is B ITO~B
It consists of n parts of IT (n-1), but since the configuration of each part is exactly the same, only the BITO part will be explained below.

BITOにおいて、データビットRO,Go。In BITO, data bits RO, Go.

80はそれぞれANDゲート6 (6R,6G、6B)
およびORゲート7 (7R,7G、7B)の一方の入
力に与えられる。これらのゲートのもう一方の入力には
、インバータ8 (8R,8G、8B)を介して論理反
転されたR、G、Bが与えられる。またANDゲート6
の出力はNORゲート9に、ORゲート7の出力はAN
Dゲート10に、それぞれ与えられ、更にNORゲート
9の出力とANDゲート10の出力とが、ANDゲート
11に与えられる。最後にB ITO−B IT (n
−1)のすべてについてのANDゲート11の出力がO
Rゲート12に与えられる。
80 is AND gate 6 (6R, 6G, 6B)
and one input of OR gate 7 (7R, 7G, 7B). The other inputs of these gates are supplied with logically inverted R, G, and B via an inverter 8 (8R, 8G, 8B). Also, AND gate 6
The output of is sent to NOR gate 9, and the output of OR gate 7 is sent to AN
The output of the NOR gate 9 and the output of the AND gate 10 are applied to the AND gate 11. Finally, B ITO-B IT (n
-1), the output of AND gate 11 for all of
It is applied to the R gate 12.

以下各ゲートの機能について説明する。ANDゲート6
、ORゲート7、インバータ8は分類手段2として機能
する。即ら、ANDゲート6はRlG、Bが0゛′のと
きのみRO,Go、BOを出力し、ORゲート7はR,
G、Bが1″のとぎのみRO,Go、BOを出力する。
The functions of each gate will be explained below. AND gate 6
, OR gate 7, and inverter 8 function as the classification means 2. That is, the AND gate 6 outputs RO, Go, and BO only when RlG and B are 0'', and the OR gate 7 outputs R,
RO, Go, and BO are output only when G and B are 1''.

従ってORゲート7の出力は第1群のメモリデータに相
当し、ANDゲート6の出力は第2群のメモリデータに
相当する。また、ANDゲート10は第1の論理手段3
、NORゲート9は第2の論理手段4として機能し、そ
れぞれXおよびYを出力する。出力Xが式(1)に従い
、出力Yが式(3)に従つ−Cいることが容易に理解で
きよう。一方、ANDゲート11およびORゲート12
は、判定手段5として機能する。即ち、ANDゲート1
1は式(5)に従ってXとYとのANDをとり、Zを出
力する。
Therefore, the output of the OR gate 7 corresponds to the first group of memory data, and the output of the AND gate 6 corresponds to the second group of memory data. Further, the AND gate 10 is connected to the first logic means 3.
, NOR gate 9 functions as the second logic means 4 and outputs X and Y, respectively. It can be easily understood that the output X follows equation (1) and the output Y follows equation (3). On the other hand, AND gate 11 and OR gate 12
functions as the determining means 5. That is, AND gate 1
1 ANDs X and Y according to equation (5) and outputs Z.

このようにしてB 1.TO〜B I T (n−1)
からzO〜Z(n−1)が得られ、ORゲート12でそ
の論理和がとられる。従ってORゲート12の出力J 
U D G E ハ、2O−Z(n−1)(7)うち1
つでも1”があれば“1”となり、指定色画素の存在を
示すことになる。
In this way B1. TO~BIT (n-1)
zO to Z(n-1) are obtained from the above, and the OR gate 12 takes the logical sum. Therefore, the output J of OR gate 12
U D G E Ha, 2O-Z(n-1) (7) 1 of them
If there is a "1" at any time, it becomes "1" and indicates the existence of a designated color pixel.

第1図に示す回路を用いれば、以上のようにして第5図
のステップ81〜S3までの手順をハードウェアによっ
て行なうことができる。なお、指定色画素が存在した場
合、ステップS5においてビットシフトによる画素位置
検出を行なうが、このステップ$5の手順もハードウェ
アによって行なうようにしてもよい。これは第1図の回
路でZO〜Z (n−1)なる出力をシフトレジスタに
入れ、このシフトレジスタによりシフト動作を行なうよ
うにすれば容易に実現できる。
If the circuit shown in FIG. 1 is used, the procedures from steps 81 to S3 in FIG. 5 can be performed by hardware as described above. Note that if a designated color pixel exists, the pixel position is detected by bit shifting in step S5, but the procedure of step $5 may also be performed by hardware. This can be easily realized by inputting the outputs ZO to Z (n-1) into a shift register in the circuit shown in FIG. 1, and using this shift register to perform a shift operation.

従来のソフトウェア処理を行なう装置では、第5図のス
テップ81〜S3までを行なうのに、CPUのクロック
サイクルで数10クロック分だけ必要となり、演算時間
としては数10μsec程度かかっていた。ところが第
1図に示す回路を用いれば、同じ処理を4段の論理ゲー
トを1回通すだけで行なうことかでき、演昨時間として
は10n sec以下とすることができ、演暮時間の大
幅な短縮化を図ることができる。
In a conventional software processing device, several tens of CPU clock cycles are required to perform steps 81 to S3 in FIG. 5, and the calculation time is approximately several tens of microseconds. However, if the circuit shown in Figure 1 is used, the same process can be performed by passing through four stages of logic gates once, and the performance time can be reduced to less than 10n sec, which significantly reduces the performance time. It is possible to shorten the time.

なお、上述の実施例では基準色としてR,G。Note that in the above embodiment, R and G are used as reference colors.

Bの3色を用いた例について示したが、本発明はこの3
色を用いる場合に限定されるものでないことは勿論であ
る。基準色が4色以上の場合にも全く同様に本発明を適
用することができる。また、第1図に示す具体的回路構
成は、一実施例として掲げたものであって、同様の論理
構成をハードウェアで実現できるものであればどのよう
な論理回路を用いてもかまわない。
Although an example using three colors of B was shown, the present invention uses these three colors.
Of course, the present invention is not limited to the case where colors are used. The present invention can be applied in exactly the same way even when there are four or more reference colors. Further, the specific circuit configuration shown in FIG. 1 is given as an example, and any logic circuit may be used as long as it can realize a similar logic configuration using hardware.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、画像処理装置において、二次元画像を
基準色ごとに分解して記憶するメモリ手段と、この記憶
データを検索すべき指定色に!itづいて2群に分ける
分類手段と、分類したそれぞれに対し所定の論理演鋒を
/II!iず第1および第2の論理学段と、これら論理
手段の出力に基づいて指定色の有無を判定する判定手段
と、を設けるようにしたため、境界線等の所定の画素位
置の検出を短時間で行なうことができるようになる。
According to the present invention, an image processing device includes a memory means for separating and storing a two-dimensional image for each reference color, and a specified color to be searched for using this stored data! A classification means that divides into two groups based on it, and a predetermined logical driver for each of the classified groups /II! Since the first and second logic stages and the determination means for determining the presence or absence of a specified color based on the outputs of these logic means are provided, detection of predetermined pixel positions such as border lines is shortened. You will be able to do it in time.

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

第1図は本発明に係る画像処理装置の一実施例の回路図
、第2図は本発明に係る画像処理装置の一実施例の基本
構成を示すブロック図、第3図は第2図に示す装置の動
作説明図、第4図は境界線位置を求める一般的な方法の
概念図、第5図は境界線位置を求める一般的な方法の手
順を示す流れ図である。 1・・・メモリ手段、2・・・分類手段、3・・・第1
の論理手段、4・・・第2の論理手段、5・・・判定手
段、6・・・ANDゲート、7・・・ORゲート、8・
・・インバータ、9・・・NORゲート、10・・・A
NDゲート、11・・・ANDゲート、12・・−OR
ゲート、81〜S5・・・流れ図の各ステップ。 躬2閏 佑3図 躬4図
FIG. 1 is a circuit diagram of an embodiment of an image processing apparatus according to the present invention, FIG. 2 is a block diagram showing the basic configuration of an embodiment of an image processing apparatus according to the present invention, and FIG. FIG. 4 is a conceptual diagram of a general method for determining the boundary line position, and FIG. 5 is a flowchart showing the procedure of the general method for determining the boundary line position. 1... Memory means, 2... Classification means, 3... First
Logic means, 4... second logic means, 5... determination means, 6... AND gate, 7... OR gate, 8.
...Inverter, 9...NOR gate, 10...A
ND gate, 11...AND gate, 12...-OR
Gate, 81-S5... Each step of the flowchart.庬 2 喏仑 3 躬 4 fig.

Claims (1)

【特許請求の範囲】 a)二次元画像を形成する各画素をm色(mは自然数)
の基準色に分解し、前記基準色ごとの画素データを記憶
するm個のメモリ手段と、 b)検索すべき指定色に基づいて前記m個のメモリ手段
を、前記指定色を構成する基準色についてのメモリ手段
から成る第1群と、それ以外のメモリ手段から成る第2
群と、に分類する分類手段と、 c)前記第1群に属するメモリ手段が2以上ある場合に
は、前記第1群に属する各メモリ手段の検索対象となる
アドレス位置から、それぞれ所定のnビット(nは自然
数)のデータを取出し、対応するビット間での論理積演
算を行なってその結果のデータを出力し、 前記第1群に属するメモリ手段が1つのみの場合には、
この1つのみのメモリ手段の前記検索対象となるアドレ
ス位置からnビットのデータをそのまま出力し、 前記第1群に属するメモリ手段か無い場合には、nビッ
トの論理“1”のデータを出力する第1の論理手段と、 d)前記第2群に属するメモリ手段が2以上ある場合に
は、前記第2群に属する各メモリ手段の前記検索対象と
なるアドレス位置から、それぞれnビットのデータを取
出し、対応するビット間での論理和演算を行なってその
結果の否定論理データを出力し、 前記第2群に属するメモリ手段が1つのみの場合には、
この1つのみのメモリ手段の前記検索対象となるアドレ
ス位置からnビットのデータの否定論理データを出力し
、 前記第2群に属するメモリ手段が無い場合には、nビッ
トの論理“1”のデータを出力する第2の論理手段と、 e)前記第1の論理手段の出力データと、前記第2の論
理手段の出力データと、の対応するビット間での論理積
演算を行なって、その結果論理“1”となるビットが存
在すれば前記検索対象となる領域に前記指定色を有する
画素が存在すると判定する判定手段と、 を備えることを特徴とする画像処理装置。
[Claims] a) Each pixel forming a two-dimensional image is divided into m colors (m is a natural number)
m memory means for separating pixel data into reference colors and storing pixel data for each of the reference colors; b) dividing the m memory means into reference colors constituting the designated color based on the specified color to be searched; A first group consisting of memory means for , and a second group consisting of other memory means.
and c) if there are two or more memory means belonging to the first group, a predetermined number of n from the address position to be searched for each memory means belonging to the first group; Extracting bit data (n is a natural number), performing a logical AND operation between corresponding bits, and outputting the resulting data, and when there is only one memory means belonging to the first group,
Output n-bit data as is from the address position to be searched for in only one memory means, and if there is no memory means belonging to the first group, output n-bit logic "1" data. d) If there are two or more memory means belonging to the second group, n-bit data is obtained from each address position to be searched in each memory means belonging to the second group; is extracted, performs a logical sum operation between corresponding bits, and outputs the resultant negated logic data, and when there is only one memory means belonging to the second group,
Output n-bit logical negation data from the search target address position of only one memory means, and if there is no memory means belonging to the second group, n-bit logic "1" is output. a second logic means for outputting data; e) performing an AND operation between corresponding bits of the output data of the first logic means and the output data of the second logic means; An image processing apparatus comprising: determination means for determining that a pixel having the designated color exists in the search target area if a bit with a resultant logic of "1" exists.
JP61108865A 1986-05-13 1986-05-13 Picture processor Pending JPS62264380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61108865A JPS62264380A (en) 1986-05-13 1986-05-13 Picture processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61108865A JPS62264380A (en) 1986-05-13 1986-05-13 Picture processor

Publications (1)

Publication Number Publication Date
JPS62264380A true JPS62264380A (en) 1987-11-17

Family

ID=14495544

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61108865A Pending JPS62264380A (en) 1986-05-13 1986-05-13 Picture processor

Country Status (1)

Country Link
JP (1) JPS62264380A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6050586A (en) * 1983-08-16 1985-03-20 インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション Raster scan digital display system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6050586A (en) * 1983-08-16 1985-03-20 インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション Raster scan digital display system

Similar Documents

Publication Publication Date Title
JPH07287567A (en) Arithmetical logical unit with plural independent segments and register that stores result from each fraction
JPH086544A (en) Rotary register for orthogonal data conversion
US3814925A (en) Dual output adder and method of addition for concurrently forming the differences a{31 b and b{31 a
US6668362B1 (en) Hierarchical verification for equivalence checking of designs
Nicol A systolic approach for real time connected component labeling
CN110210346A (en) A kind of optimization method that video template matching is handled in real time
JPH0769782B2 (en) Microprogrammable 32-bit cascadable bit slice
CN1194301C (en) Partial matching partial output high speed buffer storage for computer arithmetic operation
US4878189A (en) Microcomputer having Z-flag capable of detecting coincidence at high speed
JPS62264380A (en) Picture processor
JP3012357B2 (en) Shift amount detection circuit
US4870606A (en) Trigonometric function preprocessing system
CN113515908A (en) Driving matrix, method for generating driving matrix, method for representing gate circuit information, and map
TW202228070A (en) Computer device and image processing method
JP2793357B2 (en) Parallel processing unit
Romanov et al. An Algorithm for FPGA-based Segmentation of Binary Images
CN111931441B (en) Method, device and medium for establishing FPGA fast carry chain time sequence model
JP2735255B2 (en) Hatching treatment method
JPH01271876A (en) Comparison arithmetic processor
JPH01119872A (en) Conversion circuit
JPS63257841A (en) Logic simulator
RU2007109908A (en) COMPUTER METHOD FOR IMAGING PARTS polyline lying both within and outside of a polygonal area, and computer imaging method the boundary of one or more areas, resulting from applying the specified logical operation to TWO polygonal area
JPH0260020B2 (en)
JPH05298893A (en) Associative storage device
JPS592142A (en) Bit train retrieving system