JPS61129974A - Graphic processor - Google Patents
Graphic processorInfo
- Publication number
- JPS61129974A JPS61129974A JP25226084A JP25226084A JPS61129974A JP S61129974 A JPS61129974 A JP S61129974A JP 25226084 A JP25226084 A JP 25226084A JP 25226084 A JP25226084 A JP 25226084A JP S61129974 A JPS61129974 A JP S61129974A
- Authority
- JP
- Japan
- Prior art keywords
- data
- black
- scanning
- area
- white
- 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
Links
- 230000001174 ascending effect Effects 0.000 claims abstract description 6
- 238000000034 method Methods 0.000 claims description 24
- 238000004364 calculation method Methods 0.000 claims description 12
- 238000010586 diagram Methods 0.000 claims description 11
- 238000000926 separation method Methods 0.000 claims description 4
- 102220639059 Protein Wnt-11_W60E_mutation Human genes 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
く技術分野〉
この発明は図形処理装置に関し、さらに詳細にいえば、
変化点アドレスデータ(画素座標値)により表現された
画像データを論理演算し、その画像図形を演算処理する
図形処理装置に関する。[Detailed Description of the Invention] Technical Field> This invention relates to a graphic processing device, and more specifically,
The present invention relates to a graphic processing device that performs logical operations on image data expressed by change point address data (pixel coordinate values) and performs arithmetic processing on the image graphics.
〈従来技術〉
ファクシミリ装置等のインテリジェント化を図る場合に
は、各走査線間の画素データの連結状態を検出して原稿
に記載された記号、図形等を認識する必要がある。<Prior Art> In order to make a facsimile machine or the like more intelligent, it is necessary to detect the connection state of pixel data between each scanning line and recognize symbols, figures, etc. written on a document.
従来、読取装置で読取られ、白レベル画素を“O″、黒
レベル画素を″1′°として2値化された画像データに
ついて、その画像図形の面積、或は外接長方形等を計算
するためには、先ず、各画素毎に演算処理を施して黒レ
ベル画素の連結領域に分割し、各領域の黒レベル画素の
数を係数する手法が用いられていた。Conventionally, for image data read by a reading device and binarized with white level pixels as "O" and black level pixels as "1'°," in order to calculate the area of the image figure or the circumscribed rectangle, etc. In this method, first, each pixel is subjected to arithmetic processing, divided into connected regions of black level pixels, and the number of black level pixels in each region is calculated as a coefficient.
しかし、このような画像処理では、各画素が処理単位と
なるので、処理すべき画像データ量が多くなり、処理時
間が長くなるという不都合を有しており、汎用計算機を
用いて処理する場合にはピット操作が必要となり、効率
が悪くなるという不都合を有している。However, in this type of image processing, each pixel is the processing unit, so the amount of image data to be processed increases and the processing time becomes longer. This method requires pit operation, which has the disadvantage of decreasing efficiency.
そこで、処理画像データ数を減少させるために、1走査
線M個の画素に対して、順番に○から(M−1)の番号
をつけ、画素レベルが白から黒、または黒から白へ変化
した時点の画素番号(画素アドレス)でもって画像内容
を表す(変化点アドレス表現する)ことが考えられる。Therefore, in order to reduce the number of image data to be processed, the M pixels of one scanning line are sequentially numbered from ○ to (M-1), and the pixel level changes from white to black or from black to white. It is conceivable to represent the image content using the pixel number (pixel address) at the time of the change (expressing the change point address).
本件発明者は、上記の方法による図形処理装置について
、特開昭58−142467号公報、および特開昭58
−142468号公報に示す新規な図形処理装置を発明
した。The inventor of the present invention discloses the graphic processing device according to the above method in Japanese Patent Application Laid-open No. 58-142467 and
A novel graphic processing device disclosed in Japanese Patent No. 142468 was invented.
これら発明によれば、処理すべき画像データ量を少なく
して処理時間を短縮でき、しかも汎用計算機を用いて黒
領域の面積、外接長方形等を計ねする場合に、簡単なア
ルゴリズムを用いて、比較的高速に、1回の走査のみで
同時に計算することができるという利点を有している。According to these inventions, the processing time can be shortened by reducing the amount of image data to be processed, and when measuring the area of a black area, circumscribed rectangle, etc. using a general-purpose computer, a simple algorithm can be used to It has the advantage of being relatively fast and can be calculated simultaneously with only one scan.
しかしながら、面積、外接長方形等の算出は、画像認識
処理の1段階として行なわれることが多く、画像認識処
理全体としてみれば、文字、図形としての黒領域のみな
らず、背景としての白領域についても面積、外接長方形
等の算出をも行なわなければならない。そして、上記発
明は、黒領域についてのみ、面積、外接長方形等の算出
を行なうものであるから、上記黒領域、および白領域に
ついて面積、外接長方形等の算出を行なおうとすれば、
1回の走査を行なって黒領域に対する図形処理を行なっ
た後、白領域と黒領域とを反転させる処理を行ない、次
いで反転処理されたデータに対して、1回走査すること
により白領域(反転後の黒領域)に対する図形処理を行
なう必要がある。However, calculation of area, circumscribed rectangle, etc. is often performed as one step of image recognition processing, and when viewed as a whole image recognition process, calculations are performed not only for black areas as characters and figures, but also for white areas as backgrounds. Calculations such as area and circumscribed rectangle must also be performed. Since the above invention calculates the area, circumscribed rectangle, etc. only for the black area, if you want to calculate the area, circumscribed rectangle, etc. for the black area and the white area,
After performing graphic processing on the black area by performing one scan, processing is performed to invert the white area and black area, and then the white area (inverted) is performed by scanning the inverted data once. It is necessary to perform graphical processing on the subsequent black area).
即ら、白領域と黒領域とについて図形処理を行なおうと
すれば、走査回数が多くなり、全体としての処理時間が
長くなるという不都合がある。That is, if it is attempted to perform graphic processing on white areas and black areas, the number of scans will increase, resulting in an inconvenience that the overall processing time will become longer.
く目的〉
この発明は上記の問題点に鑑みてなされたものであり、
簡単なアルゴリズムを用いて、1回走査を行なうのみで
、黒領域、および白領域の双方についての図形処理を行
なうことができる図形処理装置を提供することを目的と
している。Purpose> This invention was made in view of the above problems,
It is an object of the present invention to provide a graphic processing device that can perform graphic processing for both black and white areas by scanning only once using a simple algorithm.
〈構成〉
十記の目的を達成するための、この発明の図形処理装置
は、判定手段と、記憶テーブルと、演算手段とを具備し
ており、判定手段は、隣接する両走査線の変化点アドレ
ス値をその4順に比較するとともに、その比較結果に応
じて予め定められた複数の連結画素パターンに分離判定
し、さらに走査開始部分、および走査終了部分をも予め
定められた複数の連結画素パターンに分離判定するもの
であり、記憶テーブルは、白データ、黒データ毎に、上
記判定結果に基いてラン状態を記憶するものであり、演
算手段は、L記判定結果に応じて走査線の変化点アドレ
スデータ、および上記記憶テーブルの内容を演算処理す
るものである。<Structure> In order to achieve the above objects, the graphic processing device of the present invention includes a determination means, a memory table, and a calculation means, and the determination means determines the change point of both adjacent scanning lines. The address values are compared in the four sequential order, and according to the comparison results, separation is determined into a plurality of predetermined connected pixel patterns, and the scan start part and scan end part are also divided into a plurality of predetermined connected pixel patterns. The storage table stores the run status for each of white data and black data based on the above determination results, and the calculation means determines the change in scanning line according to the determination results in L. It performs arithmetic processing on the point address data and the contents of the storage table.
したがって、判定手段によって、1回の走査により得ら
れる、走査線の全範囲について画素連結パターンに分離
判定し、この判定結果に基いて白データ、黒データ毎に
ラン状態を記憶テーブルに記憶させ、演算手段によって
、必要な演算処理を行ない、もって図形処理を行なうこ
とができる。Therefore, the determining means separates and determines the entire range of scanning lines obtained by one scan into pixel connected patterns, and stores the run state for each white data and black data in a storage table based on the determination result, The arithmetic means performs necessary arithmetic processing, thereby making it possible to perform graphical processing.
促し、演算手段としては、連結画素領域の面積を算出す
るものであってもよく、或は連結画素領域に外接する外
接長方形の座標値を算出するものであってもよい。The calculation means may be one that calculates the area of the connected pixel area, or may be one that calculates the coordinate values of a circumscribed rectangle that circumscribes the connected pixel area.
〈実施例〉 以下、実施例を示ず添付図面によって詳細に説明する。<Example> DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail with reference to the accompanying drawings without referring to embodiments.
先ず、画像データの処理は、走査線単位に、そして、走
査線番号順に行なわれる。即ち、走査入力される画像デ
ータAは、変化点数を■とすると、第2図のように示さ
れ、これら各変化点アドレスデータa(Il)[+1=
1.2・PIは、0からMまでの間の画素アドレス値を
とり、昇順(a(1))<a(El+1))に配列され
ている。尚、この走査線Aの変化点アドレスデータには
内部の処理の必要性から、そのデータWJ +7) 最
1 ニ、HXI(>H)、+422(>HXf) (7
) 2データが付加されている。First, image data is processed in units of scanning lines and in the order of scanning line numbers. That is, image data A to be scanned and input is shown as shown in FIG. 2, assuming that the number of change points is ■, and each of these change point address data a(Il) [+1=
1.2.PI takes pixel address values between 0 and M, and is arranged in ascending order (a(1))<a(El+1)). Note that, due to the necessity of internal processing, the change point address data of scanning line A is changed to WJ +7), HXI (>H), +422 (>HXf) (7
) 2 data are added.
また、隣接走査線にまたがる画素の連結領域を知るため
には、現在、処理を行なっている走査線Aの1つ前の走
査線の画像データBが必要となる。Furthermore, in order to know the connected region of pixels spanning adjacent scanning lines, image data B of the scanning line immediately before the scanning line A currently being processed is required.
この場合の変化点数をJとすると、第3図に示すように
、その各変化点アドレスデータはb(q)[q=1.2
・・・Q]となり、走査線△の場合と同様に、そのデー
タ列の最後にはHXI 、 HX2が付加されている。If the number of change points in this case is J, then each change point address data is b(q) [q=1.2, as shown in FIG.
. . Q], and HXI and HX2 are added to the end of the data string as in the case of the scanning line Δ.
第1図は図形処理装置を示すブロック図であり、操作に
よりiqられる画19データAを、隣接する両走査線の
変化点アドレス値をその昇順に比較するとともに、その
比較結果に応じて予め定められた複数の連結画素パター
ンに分離判定し、さらに走査開始部分、および走査終了
部分をも予め定められた複数の連結画素パターンに分離
判定する判定手段(1)に印加し、判定手段〔1)の出
力信号を、白データ、黒データ毎に、上記判定結果に基
いてラン状態を記憶する記憶テーブル(21に印加し、
上記判定手段(1)の出力信号に応じて、走査線の変化
点アドレスデータ、および上記記憶テーブル(2の記憶
データを演算手段(3)に印加している。FIG. 1 is a block diagram showing a graphic processing device, in which image 19 data A that is iqed by an operation is compared in ascending order of change point address values of both adjacent scanning lines, and is predetermined according to the comparison result. The voltage is applied to the determining means (1) which determines separation into a plurality of predetermined connected pixel patterns, and further separates and determines the scanning start part and the scanning end part into a plurality of predetermined connected pixel patterns. The output signal is applied to a memory table (21) that stores the run state based on the above judgment result for each white data and black data.
In response to the output signal of the determination means (1), the change point address data of the scanning line and the data stored in the storage table (2) are applied to the calculation means (3).
次いで、第4図乃至第7図を参照して図形処理動作を詳
細に説明する。Next, the graphic processing operation will be explained in detail with reference to FIGS. 4 to 7.
第4図のフローチャートは、図形処理全体の動作を説明
するものであり、ステップ■において、plqをそれぞ
れ1に初期設定し、ステップ■において最初のランの処
理を行ない、ステップ■において黒領域か否かを判別す
る。The flowchart in FIG. 4 explains the overall operation of graphic processing. In step (2), plq is initialized to 1, the first run is processed in step (2), and whether or not it is a black area is determined in step (2). Determine whether
そして、黒領域でなければ、ステップ■においてレコー
ドエンドか否か、即ち、pトq≧トN−2か否かを判別
し、レコードエンドであれば、ステップ■において最後
のランの処理を行なう。もし、レコードエンドでなけれ
ば、ステップ■■においてTI、T2の判別を行なう。If it is not a black area, it is determined in step 2 whether it is the end of the record, that is, whether ptq≧tN-2, and if it is the end of the record, the last run is processed in step 2. . If it is not the end of the record, TI and T2 are determined in step ■■.
ここで、T1であると判別されれば、ステップ■におい
て81の処理を行ない、ステップ■においてW4の処理
を行ない、ステップ[相]においてpを2だけ増加さぼ
、再びステップ■以下の判別、処理を行なう。また、T
2であると判別されれば、ステップ■において82の処
理を行ない、ステップ■においてW5の処理を行ない、
ステップ[相]においてqを2だけ増加させ、再びステ
ップ■以下の判別、処理を行なう。また、T1でもT2
でもないと判別されれば、ステップ■において83の処
理を行ない、ステップ■においてW6の処理を行ない、
ステップ[相]においてp、Qを1だけ増加させ、次い
でステップ@の判別を行なう。Here, if it is determined that it is T1, the process of 81 is performed in step ■, the process of W4 is performed in step ■, p is increased by 2 in step [phase], and the determination and processing in step ■ and below are performed again. Do the following. Also, T
If it is determined that it is 2, the process of 82 is performed in step ■, the process of W5 is performed in step ■,
In step [phase], q is increased by 2, and the determination and processing from step ① is performed again. Also, even at T1, T2
If it is determined that this is not the case, the process of 83 is performed in step ■, the process of W6 is performed in step ■,
In step [phase], p and Q are increased by 1, and then step @ is determined.
一方、ステップ■において黒領域であると判別された場
合には、ステップ■においてレコードエンドであるか否
かを判別し、レコードエンドであれば、ステップ■にお
いて最後のランの処理を行なう。もし、レコードエンド
でなければ、ステップ■[相]においてT3、T4の判
別を行なう。ここで、T3であると判別されれば、ステ
ップ■において84の処理を行ない、ステップ0におい
てWlの処理を行ない、ステップ[相]においてpを2
だけ増加させ、再びステップO以下の判別、処理を行な
う。また、T4であると判別されれば、ステップ■にお
いて85の処理を行ない、ステップ[相]においてW2
の処理を行ない、ステップ■においてqを2だけ増加さ
せ、再びステップ@以下の判別、処理を行なう。また、
T3でもT4でもない場合には、ステップOにおいて8
6の処理を行ない、ステップ[相]においてW3の処理
を行ない、ステップOにおいてp、qを1だけ増加させ
、再びステップ■以下の判別、処理を行なう。On the other hand, if it is determined in step (2) that it is a black area, it is determined in step (2) whether or not it is the end of the record, and if it is the end of the record, the last run is processed in step (2). If it is not the end of the record, T3 and T4 are determined in step (2) [phase]. Here, if it is determined that it is T3, the process of 84 is performed in step ②, the process of Wl is performed in step 0, and p is 2 in step [phase].
, and the determination and processing from step O onwards is performed again. Further, if it is determined that it is T4, the process of 85 is performed in step
Then, in step (2), q is increased by 2, and the determination and processing in step @ and subsequent steps are performed again. Also,
If neither T3 nor T4, 8 in step O.
Step 6 is performed, W3 is performed in step [phase], p and q are increased by 1 in step O, and the determination and processing in step 2 and subsequent steps are performed again.
M5図は上記ステップ■の最初のランを処理するための
フローチャートを示し、ステップ■においてa(1)が
“′0″であるか否かを判別する。Figure M5 shows a flowchart for processing the first run of step (2), in which it is determined whether a(1) is "'0" or not.
そして、a(1)が′0″であれば、ステップ■におい
てb(1)が11011であるか否かを判別し、II
O11であれば、ステップ■において83の処理を行な
い、ステップ■においてり、Qを1だけ増加させる。Then, if a(1) is '0'', it is determined whether b(1) is 11011 in step (2), and II
If it is O11, the process of 83 is performed in step (2), and the process returns to step (2), where Q is increased by 1.
また、b(1)が°O′でなければ、ステップ■におい
てa(2)とb(1)との大小関係を判別し、a(2)
≧b(1)であれば、ステップ■においてW2B5の処
理を行ない、ステップ■において83の処理を行ない、
ステップ■においてり、Qを1だけ増加さゼる。もし、
a(2)< b(1)であれば、ステップ■において8
1の処理を行ない、ステップ■においてW3B8の処理
を行ない、ステップ■においてpを2だけ増加させる。Furthermore, if b(1) is not °O', the magnitude relationship between a(2) and b(1) is determined in step ■, and a(2)
If ≧b(1), perform the process of W2B5 in step ■, perform the process of 83 in step ■,
Go to step 3 and increase Q by 1. if,
If a(2)<b(1), then 8 in step ■
1, and in step (2), W3B8 is processed, and in step (2), p is increased by 2.
一方、a(1)が0′°でなければ、ステップ@におい
てb(1)が011か否かを判別し、“0パでなければ
、ステップ[相]においてW3C8の処理を行なう。ま
た、b(1)が“0″′であれば、ステップ■において
a(1)とb(2)との大小関係を判別し、a(1)>
b(2)であれば、ステップ■において82の処理を行
ない、ステップ[相]においてW3ASの処理を行ない
、ステップOにおいてqを2だけ増加させる。もし、a
(1)≦b(2)であれば、ステップ[相]においてW
I ASの処理を行ない、ステップ[相]においてB3
の処理を行ない、ステップ[相]においてplqを1だ
け増加させる。On the other hand, if a(1) is not 0'°, it is determined whether b(1) is 011 or not in step @, and if it is not 0', the process of W3C8 is performed in step [phase]. If b(1) is "0"', then in step 2, the magnitude relationship between a(1) and b(2) is determined, and a(1)>
If it is b(2), the process of 82 is performed in step (2), the process of W3AS is performed in step [phase], and q is increased by 2 in step O. If, a
If (1)≦b(2), W in step [phase]
I AS processing and B3 in step [phase]
, and increment plq by 1 in step [phase].
そして、以上の場合において、ステップ■■[相]の処
理を行なった後は、第4図のフローチャートのステップ
O以下の判別、処理を行ない、上記ステップ■[相]O
の処理を行なった後は、第4図のフローチャートのステ
ップ■以下の判別、処理を行なう。In the above case, after performing the processing in step ■■ [phase], the determination and processing in and after step O in the flowchart of FIG.
After performing the processing, the following determinations and processing are performed in step (2) of the flowchart of FIG.
尚、上記第5図のフローチャートは8連結の場合に対応
するものであるが、ステップ■における判別をa(2)
> b(1)か、a(2)≦b(1)かによって行なう
とともに、ステップ■における判別をa(1)≧b(2
)か、a(1)<b(2)かによって行なえば、4連結
の場合に対応するものとすることができる。Note that the flowchart in FIG. 5 above corresponds to the case of 8 connections, but the determination in step
>b(1) or a(2)≦b(1), and the determination in step ■ is made based on whether a(1)≧b(2).
) or a(1)<b(2), it is possible to correspond to the case of 4-connection.
第6図は第4図のステップ■の最後のランを処理するた
めのフロ・−チャートを示し、ステップ■■において、
a(p)=Mであるか否か、およびb(q)=Mである
か否かを判別する。a(p)=Mでなければステップ■
においてWlAE、お−よびB6の処理を行な、う。ま
た、a(p)−Mであって、しかもb(q)=Mでなけ
ればステップ■においてW2BE1およびB6の処理を
行なう。もし、a(p)= Mであって、しかもb(a
)=Mであればステップ■において86の処理を行なう
。FIG. 6 shows a flowchart for processing the last run of step ■■ in FIG.
It is determined whether a(p)=M and b(q)=M. If a(p)=M, step ■
At step WlAE and B6 are processed. Further, if a(p)-M and b(q)=M, then in step 2, processing of W2BE1 and B6 is performed. If a(p) = M and b(a
)=M, the process of 86 is performed in step (2).
そして、以上の場合において、ステップ■■■の処理を
行なった後は上記第4図のフローチャートの判別、処理
を終了する。In the above case, after performing the processing in step ■■■, the determination and processing in the flowchart of FIG. 4 are completed.
第7図は第4図のステップ[相]の最後のランを処理す
るためのフローチャートを示し、ステップ■において残
りデータ数が“ONであるか否かを判別し、残りデータ
数が“O11でなければ、ステップ■■においてa(1
))=Mであるか否か、およびb(Q)=Mであるか否
かを判別する。a(1))=Mであればステップ■にお
いて82、およびW6AEの処理を行なう。また、b(
Q)=Mであって、しかもa(p)−Mでなければステ
ップ■において81、およびW68Eの処理を行なう。FIG. 7 shows a flowchart for processing the last run of step [phase] in FIG. If not, a(1
))=M, and b(Q)=M. If a(1))=M, the processing of 82 and W6AE is performed in step (2). Also, b(
Q)=M, and if it is not a(p)-M, then in step (2), the processing of 81 and W68E is performed.
もし、a(p)=Mでなく、しかもb(Q)= Mでな
ければステップ■においてW60Eの処理を行なう。ま
た、ステップ■において残りデータ数が0″であると判
別された場合にもステップ■の処理を行なう。If a(p)=M and b(Q)=M, the process of W60E is performed in step (2). Furthermore, even if it is determined in step (2) that the number of remaining data is 0'', the process in step (2) is performed.
そして、以上の場合において、ステップ■■■の処理を
行なった後は上記第4図のフローチャートの判別、処理
を終了する。In the above case, after performing the processing in step ■■■, the determination and processing in the flowchart of FIG. 4 are completed.
但し、上記連結画素状態W1〜W6.81〜B6を元の
白、黒2値信号で表すと、第8図のとおりである。即ち
、B1はAだけに黒ランが1つある状態を示し、B2は
Bだけに黒ランが1つある状態を示し、B3はA、Bで
連結した黒ランが検出された状態を示し、84〜B6は
、それぞれ1〜B3状態を白黒反転させた状態を示し、
W1〜W3はそれぞれ84〜B6状態と同じ状態を示し
、W4〜W6はそれぞれ81〜B3状態と同じ状態を示
している。第8図から明らかなように、81〜B3.W
4〜W6状態は、両走査線の前の状態としてWl、W2
.83であることが必要であり、84〜86.W1〜W
3状態は、前の状態としてW3,81.82であること
が必要である。However, when the connected pixel states W1 to W6 and 81 to B6 are represented by the original white and black binary signals, they are as shown in FIG. That is, B1 indicates a state in which there is one black run only in A, B2 indicates a state in which there is one black run only in B, B3 indicates a state in which a connected black run is detected in A and B, 84 to B6 indicate states in which the black and white states of 1 to B3 are reversed,
W1 to W3 indicate the same states as 84 to B6, respectively, and W4 to W6 indicate the same states as 81 to B3, respectively. As is clear from FIG. 8, 81 to B3. W
4 to W6 states are Wl and W2 as the previous states of both scanning lines.
.. Must be 83, 84-86. W1~W
3 state requires that the previous state be W3, 81.82.
また、最初のランの連結画素状態W3C8;B1および
W3BS、B2およびW3△S、WIASおよびB3、
W2B5およびB3、B3を元の白、黒2fii信号で
表すと、第9図のとおりである。Also, the connected pixel state W3C8 of the first run; B1 and W3BS, B2 and W3ΔS, WIAS and B3,
When W2B5, B3, and B3 are represented by the original white and black 2fii signals, it is as shown in FIG.
即ち、W3C8はA、8で連結した白ランがある状態を
示し、B1およびW3BSはAだ【プに黒ランが1つあ
る状態を示し、B2およびW3ASはBだけに黒ランが
1つある状態を示し、WIASおよびB3はAだけに白
ランが1つある状態を示し、W2B5およびB3はBだ
けに白ランが1つある状態を示し、B3はA、Bで連結
した黒ランがある状態を示している。That is, W3C8 indicates a state in which there is a white run connected by A and 8, B1 and W3BS indicate a state in which there is one black run in A, and B2 and W3AS indicate a state in which only B has one black run. WIAS and B3 indicate a state in which only A has one white run, W2B5 and B3 indicate a state in which only B has one white run, and B3 has a black run connected to A and B. Indicates the condition.
また、最後のランの連結画素状態W6CE、B1および
W6BE、82およびW6AE、WlAEおよびB6、
W2BEおよびB6、B6を元の白、黒2値信丹で表す
と、第10図のとおりである。Also, the connected pixel states of the last run W6CE, B1 and W6BE, 82 and W6AE, WlAE and B6,
When W2BE, B6, and B6 are represented in the original white and black binary Shintan, it is as shown in FIG.
即ち、W60EはA、Bで連結した白ランがある状態を
示し、B1およびW6BEはAだけに黒ランが1つある
状態を示し、B2およびW6AEはBだりに思ランが1
つある状態を示し、WIAEおよびB6はAだけに白ラ
ンが1つある状態を示し、W2BEおよびB6はBだけ
に白ランが1つある状態を示し、B6はA、Bで連結し
た黒ランがある状態を示している。That is, W60E indicates a state in which there is a white run connected at A and B, B1 and W6BE indicate a state in which there is one black run only in A, and B2 and W6AE indicate a state in which there is one black run in B.
WIAE and B6 indicate a state in which only A has one white run, W2BE and B6 indicate a state in which only B has one white run, and B6 indicates a state in which there is a black run connected by A and B. indicates a certain state.
尚、連結領域の判定との関係では、厳密には正確ではな
いが、概念的には、B1は新たな黒の連結領域が検出さ
れたことを示し、B2は黒の連結領域がなくなったこと
を示し、B3は黒の連結領域が続いていることを示し、
B4は黒の連結領域が分裂していくことを示し、B5は
2つの黒の連結領域が接続したことを示し、W1〜W6
は白の連結領域について、上記81〜B6に対応する状
態を示している。In relation to the determination of connected areas, although it is not strictly accurate, conceptually B1 indicates that a new black connected area has been detected, and B2 indicates that the black connected area has disappeared. , B3 indicates that the black connected area continues,
B4 indicates that the black connected region is splitting, B5 indicates that two black connected regions are connected, and W1 to W6
indicates the state corresponding to 81 to B6 above for the white connected area.
また、上記の分離判定のための必要十分条件は第11図
に示すとおりである。連結条件として4連結と8連結が
あるが、それにより、必要十分条件は異なったものとな
る。そして、第4図のフローチャートのステップ■■[
相][相]の判別条件T1〜T4は、それぞれB1およ
びW4、B2およびW5、B4およびWl、85および
W2の必要十分条件と等しく設定されている。Further, the necessary and sufficient conditions for the above separation determination are as shown in FIG. There are 4 connections and 8 connections as connection conditions, but the necessary and sufficient conditions are different accordingly. Then, step ■■[ of the flowchart in Figure 4
Phase] [Phase] discrimination conditions T1 to T4 are set equal to the necessary and sufficient conditions for B1 and W4, B2 and W5, B4 and Wl, and 85 and W2, respectively.
ところで、連結画素領域の面積を計算するためには、処
理を行なっている走査線までの途中結果を入れるテーブ
ルが必要であり、その構成としては第12図に示すとお
りであり、それぞれのエリアは各連結領域に対応してい
る。そして、C0NTはコン1〜ロール用であり、(r
es)=1は、その連結領域の演算が終了し、′rfJ
積が求まったことを示しており、(ACT)=1は、そ
のエリアが連結領域に割当てられ、面積を計算中である
ことを示している。また、Sは演算出力、即ち、面積を
いれるためのものである。By the way, in order to calculate the area of a connected pixel area, it is necessary to have a table that stores the intermediate results up to the scanning line being processed, and its structure is as shown in Figure 12, and each area is It corresponds to each connected area. And C0NT is for control 1 to roll, and (r
es)=1 means that the operation of the connected region is completed and 'rfJ
This indicates that the product has been determined, and (ACT)=1 indicates that the area has been assigned to a connected region and the area is being calculated. Further, S is for calculating the calculation output, that is, the area.
また、第13図は面積を算出するための処理を示す図で
あり、状態81〜B6に対して図示の処理を行なうこと
により黒の連結領域の面積を算出することができ、状f
fW1〜W6に対して図示の処理を行なうことにより黒
の連結領域の面積を算出することができる。Further, FIG. 13 is a diagram showing processing for calculating the area, and by performing the illustrated processing for states 81 to B6, the area of the black connected region can be calculated, and the area of the black connected region can be calculated.
By performing the illustrated processing on fW1 to fW6, the area of the black connected region can be calculated.
他方、第12図のテーブルの構成、および第13図の処
理を、それぞれ第14図、第15図に示すように変更す
ることにより、連結領域の外接長方形(アドレス座標点
)を算出することができる。On the other hand, by changing the configuration of the table in FIG. 12 and the processing in FIG. 13 as shown in FIGS. 14 and 15, respectively, it is possible to calculate the circumscribed rectangle (address coordinate points) of the connected area. can.
く効果〉
以上のようにこの発明は、1回の走査により読取られ、
2値化された画素データに基いて、最初の白ラン部分、
および最後の白ラン部分をも考慮した簡単なアルゴリズ
ムで白の連結領域、黒の連結領域の面積、外接長方形等
を算出することができるようにしているので、処理FR
間を大幅に短縮することができるという特有の効果を奏
する。Effects> As described above, the present invention enables reading by one scan,
Based on the binarized pixel data, the first white run part,
The area of the white connected area, the black connected area, the circumscribed rectangle, etc. can be calculated using a simple algorithm that also takes into account the final white run part, so the processing FR
This has the unique effect of significantly shortening the time required.
第1図は図形処理装置を示すブロック図、第2図および
第3図は変化点アドレス表現された各走査線の画像デー
タを示すデータ説明図、第4図乃至第7図は図形処理動
作を示すフローチャート、
第8図乃至第10図は連結画素状態を示すパターン図、
第11図は連結画素状態を判定するための必要十分条件
を示す説明図、
第12図は面積を算出するための記憶テーブルの構成を
示す図、
第13図は面積算出のための処理動作を示す説明図、
第14図は外接長方形を算出するための記憶テーブルの
構成を示す図、
第15図は外接長り形算出のための処理動作を示す説明
図。FIG. 1 is a block diagram showing a graphic processing device, FIGS. 2 and 3 are data explanatory diagrams showing image data of each scanning line expressed by changing point addresses, and FIGS. 4 to 7 are diagrams showing graphic processing operations. FIGS. 8 to 10 are pattern diagrams showing connected pixel states. FIG. 11 is an explanatory diagram showing necessary and sufficient conditions for determining connected pixel states. FIG. 12 is a memory for calculating area. Figure 13 is an explanatory diagram showing the processing operation for calculating the area; Figure 14 is a diagram showing the configuration of the storage table for calculating the circumscribed rectangle; Figure 15 is the circumscribed rectangle. FIG. 7 is an explanatory diagram showing a processing operation for calculation.
Claims (1)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP25226084A JPS61129974A (en) | 1984-11-28 | 1984-11-28 | Graphic processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP25226084A JPS61129974A (en) | 1984-11-28 | 1984-11-28 | Graphic processor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPS61129974A true JPS61129974A (en) | 1986-06-17 |
Family
ID=17234753
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP25226084A Pending JPS61129974A (en) | 1984-11-28 | 1984-11-28 | Graphic processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS61129974A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0635112U (en) * | 1992-10-13 | 1994-05-10 | 株式会社ポールスタア | Cardboard box |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS58142468A (en) * | 1982-02-17 | 1983-08-24 | Mitsubishi Electric Corp | Pattern processor |
| JPS58142467A (en) * | 1982-02-17 | 1983-08-24 | Mitsubishi Electric Corp | Picture data processor |
| JPS59174969A (en) * | 1983-03-24 | 1984-10-03 | Matsushita Electric Ind Co Ltd | Picture recognizing device |
-
1984
- 1984-11-28 JP JP25226084A patent/JPS61129974A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS58142468A (en) * | 1982-02-17 | 1983-08-24 | Mitsubishi Electric Corp | Pattern processor |
| JPS58142467A (en) * | 1982-02-17 | 1983-08-24 | Mitsubishi Electric Corp | Picture data processor |
| JPS59174969A (en) * | 1983-03-24 | 1984-10-03 | Matsushita Electric Ind Co Ltd | Picture recognizing device |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0635112U (en) * | 1992-10-13 | 1994-05-10 | 株式会社ポールスタア | Cardboard box |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2595158B2 (en) | Automatic picture / character separation apparatus for image information and its method | |
| US4153897A (en) | Method and device for detecting the similarity between standard and unknown patterns | |
| JPH04315272A (en) | Graphic recognizing device | |
| JPS61129974A (en) | Graphic processor | |
| EP0278528B1 (en) | Area searching system | |
| JP2812401B2 (en) | Image processing device | |
| JP2947566B2 (en) | In-frame area detection device | |
| JPH0277891A (en) | character recognition device | |
| JPS60157681A (en) | Image shape unevenness detection method | |
| JP2716291B2 (en) | Paper information input device | |
| JPH0357507B2 (en) | ||
| JPS6239459B2 (en) | ||
| JP2803736B2 (en) | Character recognition method | |
| JP4052500B2 (en) | Character detection device | |
| JP2522511B2 (en) | Image contour tracking unit | |
| JP4129320B2 (en) | Image processing apparatus and recording medium | |
| JP2721415B2 (en) | Character image extraction method | |
| JPH0710430Y2 (en) | Binary image reduction device | |
| JP3747602B2 (en) | Image processing method and image processing apparatus | |
| JPS609887Y2 (en) | Preprocessing circuit in character reading device | |
| JPH06292016A (en) | Picture processing unit | |
| JPS63184887A (en) | Processing system for determining line to be deleted | |
| JPH0222427B2 (en) | ||
| JPH0460779A (en) | Labelling and feature quantity arithmetic unit for object in binary image | |
| JPH04333179A (en) | Device and method for recognizing type name |