Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0624019B2 - Circumscribing rectangular pattern arithmetic circuit - Google Patents
[go: Go Back, main page]

JPH0624019B2 - Circumscribing rectangular pattern arithmetic circuit - Google Patents

Circumscribing rectangular pattern arithmetic circuit

Info

Publication number
JPH0624019B2
JPH0624019B2 JP62177098A JP17709887A JPH0624019B2 JP H0624019 B2 JPH0624019 B2 JP H0624019B2 JP 62177098 A JP62177098 A JP 62177098A JP 17709887 A JP17709887 A JP 17709887A JP H0624019 B2 JPH0624019 B2 JP H0624019B2
Authority
JP
Japan
Prior art keywords
pixel
document image
interest
rectangular pattern
pixels
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.)
Expired - Lifetime
Application number
JP62177098A
Other languages
Japanese (ja)
Other versions
JPS6421583A (en
Inventor
保夫 本郷
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP62177098A priority Critical patent/JPH0624019B2/en
Publication of JPS6421583A publication Critical patent/JPS6421583A/en
Publication of JPH0624019B2 publication Critical patent/JPH0624019B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、文書画像に対し方向性をもつ膨張処理を逐
次的に行なうことにより、各文字パターンの外接長方形
パターンを演算する演算回路に関する。これは、一般文
書から文字パターンのみを切り出すための前処理として
行なわれ、弧立パターンの中で外接枠が重なるものを1
つのパターンとして抽出したい場合などに利用すること
ができる。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic circuit for calculating a circumscribing rectangular pattern of each character pattern by sequentially performing directional expansion processing on a document image. This is performed as a pre-process for cutting out only character patterns from a general document, and one of the arcuate patterns whose circumscribed frames overlap is 1
It can be used when you want to extract as one pattern.

〔従来の技術〕[Conventional technology]

文書画像から文字パターンを分離する方法として、連結
性解析により個々のパターンの外接長方形を求める方法
が知られている。連結性解析はパターンが複雑な場合は
時間が掛かるが、外接長方形同志が重複する領域をもつ
場合でも、別個のパターンとして分離することが可能で
ある。しかし、文字パターンの場合には複数のパターン
で構成されていても1個のパターンとして取り扱いたい
場合があり、このような場合には不便となる。
As a method of separating a character pattern from a document image, a method of obtaining a circumscribed rectangle of each pattern by connectivity analysis is known. The connectivity analysis takes time when the pattern is complicated, but even if the circumscribed rectangles have overlapping regions, they can be separated as separate patterns. However, in the case of a character pattern, it may be desired to handle it as one pattern even if it is composed of a plurality of patterns, which is inconvenient in such a case.

第8図に文書画像の例を示す。こゝに、11が文書画像
であり、12は文字パターン、13は外接長方形であ
る。つまり、同図のような外接長方形13を連結性解析
で求めようとすると、「字」,「切」,「外」,
「接」,「形」の各文字パターンがそれぞれ2個,2
個,2個,3個,4個のパターンで構成されているた
め、しかるべき後処理をしてパターンの統合を図ること
が必要となる。
FIG. 8 shows an example of a document image. Here, 11 is a document image, 12 is a character pattern, and 13 is a circumscribed rectangle. That is, when trying to obtain the circumscribed rectangle 13 as shown in the figure by the connectivity analysis, "character", "cut", "outside",
There are two character patterns of "contact" and "shape" respectively, 2
Since each pattern is composed of two, three, four patterns, it is necessary to perform appropriate post-processing to integrate the patterns.

一方、連結性解析以外の方法としては、投影法(プロジ
ェクション)による切出し法が良く知られている。この
場合には、縦書きと横書き文書で垂直,水平方向のプロ
ジェクションの取る順番が変わる。そして、行切出しを
行なったあとで、各行ごとに文字を切出すためにプロジ
ェクションを行なう。
On the other hand, as a method other than the connectivity analysis, a clipping method using a projection method is well known. In this case, the order in which the vertical and horizontal projections are taken differs between vertically written and horizontally written documents. Then, after the line is cut out, projection is performed to cut out the character for each line.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

しかしながら、投影法の場合には第8図のように文書の
傾きが少い場合には良いが、傾いた文書からは文字を切
出すことができないという問題点がある。また、文書に
写真や図形が混在する場合などでは、切出しが困難であ
る。
However, in the case of the projection method, there is a problem in that it is not possible to cut out a character from a tilted document, which is good when the tilt of the document is small as shown in FIG. Further, it is difficult to cut out a document when photographs and figures are mixed.

したがって、この発明は傾いた文書や、写真や図形が混
在する文書等でも、高速に文字パターンの外接長方形パ
ターンを求め得るようにすることを目的とする。
Therefore, an object of the present invention is to make it possible to obtain a circumscribing rectangular pattern of a character pattern at high speed even in an inclined document, a document in which photographs and figures are mixed, and the like.

〔問題点を解決するための手段〕[Means for solving problems]

文書画像を撮像し、画素毎に2値化して得られる文書画
像データを記憶する記憶手段と、水平方向の走査を上下
と左右を組み合わせた4つの方向から実行して文書画像
データを読み出す読出手段と、読み出す走査方向別にし
かも各着目画素に対して2×2画素の所定のウインドウ
を形成し、走査方向に従って逐次的にウインドウ内の着
目画素を除く他の画素が黒画素の場合に着目画素の値を
黒画素に決定する手段と、決定された画像値を次のウイ
ンドウ位置で用いてその着目画素の値を決定する処理
を、逐次走査方向別に行うことで文書画像データの異方
性膨張処理を実現して外接長方形パターンを演算する演
算手段とを設ける。
A storage unit that captures a document image and stores the document image data obtained by binarizing each pixel, and a reading unit that reads the document image data by executing horizontal scanning from four directions that are a combination of upper and lower sides and left and right sides. In addition, a predetermined window of 2 × 2 pixels is formed for each pixel of interest in each scanning direction to be read out, and when the other pixels except the pixel of interest in the window are black pixels sequentially in accordance with the scanning direction, Anisotropic expansion processing of document image data by sequentially performing the means for determining the value as a black pixel and the processing for determining the value of the pixel of interest by using the determined image value at the next window position for each scanning direction. And calculating means for calculating a circumscribing rectangular pattern.

〔作用〕[Action]

4種類のウインドウ(2×2画素サイズ)を使い、逐次
的に文書画像を4つの方向に膨張処理を施すことによ
り、外接長方形パターンを、メモリを4回読み書きの走
査をするだけで高速に演算しようとするものである。さ
らに、膨張処理を実行した画像メモリに角点フィルタを
作用させて4隅の角点座標を検出することにより、外接
長方形の位置と大きさとを求め得るようにする。
By using four types of windows (2 x 2 pixel size) and sequentially expanding the document image in four directions, the circumscribed rectangular pattern can be calculated at high speed simply by reading and writing four times in the memory. Is what you are trying to do. Furthermore, the position and size of the circumscribed rectangle can be obtained by applying the corner point filter to the image memory that has undergone the expansion process and detecting the corner point coordinates of the four corners.

〔実施例〕〔Example〕

第1図はこの発明の実施例を示す構成図である。同図に
おいて、1はアドレス発生回路、2は文書画像メモリ、
3A,3Bはマルチプレクサ、4A,4Bはラインメモ
リ、5A,5Bはラッチ回路、6はアンドゲート、7は
オアゲート、8はバッファである。
FIG. 1 is a block diagram showing an embodiment of the present invention. In the figure, 1 is an address generation circuit, 2 is a document image memory,
3A and 3B are multiplexers, 4A and 4B are line memories, 5A and 5B are latch circuits, 6 is an AND gate, 7 is an OR gate, and 8 is a buffer.

こゝでは要するに、第2図のような文字パターン12に
対して異方性膨張処理を施すことにより、外接長方形パ
ターン13を演算するものである。こゝに、異方性膨張
処理とは、第3図に示すような条件C〜C、つまり
斜線を施して示す黒画素BLが同図(イ),(ロ),
(ハ),(ニ)のような4種類の配置の時だけ、着目画
素CPを黒画素に変換する処理と定義する。この時、黒
画素BL以外の画素DCは白画素または黒画素のいずれ
でも良い。文書画像に対して、同図の3×3の条件を並
列処理で実行する場合、収束する回数は文字パターンに
より異なる。そこで、ここではこの4つの条件C〜C
に対して、それぞれ画像メモリ2の読出し順番を第4
図に示す4種類の走査態様S〜Sで行なうことと
し、着目画素の新しい値を隣の画素の膨張処理で使うこ
とによって逐次的画素演算を行ない、任意文字パターン
に対して第4図に示す4種類の走査だけで、外接長方形
パターンの演算処理を完了するようにしたものである。
このように、条件Cは走査Sに、条件Cは走査S
に、条件Cは走査Sに、条件Cは走査Sにそ
れぞれ対応させることで、条件の判定を着目画素を含む
2×2のウインドウで行なうことができる。
In this case, in short, the circumscribed rectangular pattern 13 is calculated by subjecting the character pattern 12 as shown in FIG. 2 to anisotropic expansion processing. Here, the anisotropic expansion processing means that the conditions C 1 to C 4 shown in FIG. 3, that is, the black pixels BL shown by hatching are shown in FIGS.
Only when there are four types of arrangements such as (C) and (D), it is defined as a process of converting the pixel of interest CP into a black pixel. At this time, the pixels DC other than the black pixels BL may be white pixels or black pixels. When the 3 × 3 condition shown in the figure is executed in parallel for the document image, the number of times of convergence differs depending on the character pattern. Therefore, here, these four conditions C 1 to C
4 , the image memory 2 is read out in the fourth order.
It is assumed that the four scanning modes S 1 to S 4 shown in the figure are performed, and the new value of the pixel of interest is used in the expansion processing of the adjacent pixel to perform the sequential pixel calculation. The calculation processing of the circumscribing rectangular pattern is completed by only the four types of scanning shown in FIG.
As described above, the condition C 1 is the scan S 1 and the condition C 2 is the scan S 1.
The condition C 3 corresponds to the scan S 3 , and the condition C 4 corresponds to the scan S 4 , so that the condition can be determined in the 2 × 2 window including the pixel of interest.

第1図を参照してもう少し具体的に説明する。A more specific description will be given with reference to FIG.

アドレス発生回路1は、例えば2値化された文書画像デ
ータを記憶する文書画像メモリ2をアドレッシングする
ための水平(X),垂直方向アドレスA,Aを発生
する。これにより、アドレスA,Aの画像データP
Dが読み出され、マルチプレクサ3Aにより、Aアド
レスに対応するラインメモリ4Aまたは4Bが選択され
る。例えば、アドレスAが奇数の時にはラインメモリ
4Aに画像データPDを書き込み、偶数ならばラインメ
モリ4Bに書き込む。そして、アドレスAの一つ前の
アドレスに対応するラインメモリ4Aまたは4Bの内容
を読み出し、マルチプレクサ3Bで選択して、前記ライ
ンの画像データfを出力する。この時、一つ前隣りの
画素の値fをラッチ回路5Aにラッチしている。ここ
に、ラインメモリ4A,4Bは文書画像の水平画素数H
maxと同じサイズのメモリである。また、画像データ
は一つ前の値をラッチ回路5Bに値fとして記憶
しており、これら4つの画素の値(f,f,f
)が第5図に示す2×2ウインドウを形成する。同
図はC条件の場合の配置を示す。そして、値f,f
,fの論理積をAND素子6により求めて、着目画
像fとの論理和をOR素子7で求める。れにより、C
条件を満たしたらfは値“1”となり、OR素子7
の出力値f′として、ラッチ回路5Bにラッチされ
る。また、この新しい値f′はバッファ8を通して画
像メモリ2に記憶される。以上の処理を全画面について
繰り返すことにより、異方性膨張処理が実行される。第
4図(イ),(ロ),(ハ),(ニ)に示す4種類の方
向に異方性膨張処理を実行すると、第2図の外接長方形
パターン13がメモリ2に残ることとなる。
The address generation circuit 1 generates horizontal (X) and vertical direction addresses A X and A Y for addressing the document image memory 2 that stores, for example, binarized document image data. As a result, the image data P of the addresses A X and A Y
D is read out, and the multiplexer 3A selects the line memory 4A or 4B corresponding to the A Y address. For example, when the address A Y is an odd number, the image data PD is written in the line memory 4A, and when the address A Y is an even number, the image data PD is written in the line memory 4B. Then, reading the contents of the line memory 4A or 4B corresponding to the previous address of the address A Y, is selected by the multiplexer 3B, and outputs the image data f C of said line. At this time, the value f D of the immediately preceding pixel is latched in the latch circuit 5A. Here, the line memories 4A and 4B are the number of horizontal pixels H of the document image.
It is a memory of the same size as max . Further, the image data f A stores the previous value as the value f B in the latch circuit 5B, and the values (f A , f B , f C , and
f D ) forms the 2 × 2 window shown in FIG. The figure shows the arrangement for the C 1 condition. And the values f B , f
The logical product of C and f D is obtained by the AND element 6, and the logical sum with the target image f A is obtained by the OR element 7. By this, C
When 1 condition is satisfied, f A becomes the value “1”, and the OR element 7
Is latched by the latch circuit 5B as the output value f A ′ of Also, this new value f A ′ is stored in the image memory 2 through the buffer 8. The anisotropic expansion process is executed by repeating the above process for all screens. When the anisotropic expansion processing is executed in the four kinds of directions shown in FIGS. 4 (a), (b), (c), and (d), the circumscribed rectangular pattern 13 of FIG. 2 remains in the memory 2. .

第1図の回路により、第2図に示す文字画像11を膨張
処理した場合の処理例を第6に示す。すなわち、同図
(イ)の如く、走査Sで条件Cを使って膨張する
と、メモリ2の中で黒画素Fの部分が白画素から黒画
素に変更される。さらに、同図(ロ)の如く走査S
条件Cで膨張すると、メモリ2の黒画素Fの領域が
膨張される。さらに、同図(ハ)の如く走査S,条件
を使って膨張すると、メモリ2の領域Fが黒画素
となる。そして、最後に同図(ニ)の如く走査S,条
件Cで膨張すると、メモリ2の中の領域Fが黒画素
となり、外接長方形パターン13が得られる。
A sixth processing example in which the character image 11 shown in FIG. 2 is expanded by the circuit shown in FIG. 1 is shown. That is, as shown in FIG. 9A, when the scan S 1 is expanded using the condition C 1 , the portion of the black pixel F 1 in the memory 2 is changed from the white pixel to the black pixel. Furthermore, the scanning S 2 as shown in FIG (B),
When expanded under the condition C 2 , the area of the black pixel F 2 in the memory 2 is expanded. Further, when the scan S 3 and the condition C 3 are used for expansion as shown in FIG. 7C, the area F 3 of the memory 2 becomes a black pixel. Finally, as shown in FIG. 4D, when the scan S 4 and the condition C 4 are expanded, the area F 4 in the memory 2 becomes a black pixel, and the circumscribed rectangular pattern 13 is obtained.

このようにして得られた外接長方形パターン13に対し
ては、例えば第7図の如く角点フィルタ(テンプレー
ト)TL〜TLを用いることにより、長方形パター
ンの1つの角点、例えば第2図のA〜Aを簡単に求
めることができる。
For the circumscribed rectangular pattern 13 thus obtained, for example, by using the corner point filters (templates) TL 1 to TL 4 as shown in FIG. 7, one corner point of the rectangular pattern, for example, FIG. A 1 to A 4 can be easily obtained.

以上、本実施例によれば、4種類の2×2ウインドウを
用いて各ウインドウに対する全面走査を行うことで、高
速に外接長方形を得ることができる。つまり、文書が傾
いていたり、図形や写真などが混在していても、文字の
外接長方形に弧立していれば、正確かつ高速に長方形が
得られる利点がある。また、角点フィルタを利用するこ
とにより、長方形の位置、大きさを簡単に求めることが
できる。
As described above, according to the present embodiment, the circumscribing rectangle can be obtained at high speed by scanning the entire surface of each window using four types of 2 × 2 windows. In other words, even if the document is tilted or mixed with figures and photographs, if the rectangle circumscribing the characters stands up, there is an advantage that the rectangle can be obtained accurately and at high speed. Moreover, the position and size of the rectangle can be easily obtained by using the corner point filter.

〔発明の効果〕〔The invention's effect〕

この発明によれば、膨張処理の判定条件を4種類に限定
し、しかも条件に対応して画像メモリの走査を変えてや
ることにより異方性膨張処理を実現し、4回の走査で外
接長方形パターンを高速に演算することができる。ま
た、外接長方形パターンから角点フィルタを使えば、長
方形の位置,サイズを演算できるので、文書が傾斜した
り、図形などが混在している文書でも、外接長方形を高
速に演算することが可能となる。
According to the present invention, the judgment conditions of the expansion process are limited to four types, and the anisotropic expansion process is realized by changing the scanning of the image memory according to the conditions, and the circumscribing rectangle is circumscribed by four times of scanning. The pattern can be calculated at high speed. In addition, since the position and size of the rectangle can be calculated by using the corner point filter from the circumscribed rectangle pattern, it is possible to calculate the circumscribed rectangle at high speed even in a document with a slanted document or a mixture of figures. Become.

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

第1図はこの発明の実施例を示す構成図、第2図は文字
パターンと外接長方形の例を説明するための説明図、第
3図は着目画素を黒画素にするための隣接画素条件を説
明するための説明図、第4図は第3図の各条件に対応す
る文書画像の走査方向を説明するための説明図、第5図
は或る隣接画素条件(C)の場合の2×2ウインドウ
を説明するための説明図、第6図はこの発明による異方
性膨張処理の実行過程を説明するための説明図、第7図
は角点フィルタ(テンプレート)を説明するための説明
図、第8図は文書画像の例を説明するための説明図であ
る。 符号説明 1……アドレス発生回路、2……文書画像メモリ、3
A,3B……マルチプレクサ、4A,4B……ラインメ
モリ、5A,5B……ラッチ回路、6……アンドゲー
ト、7……オアゲート、8……バッファ、11……文書
画像、12……文字パターン、13……外接長方形。
FIG. 1 is a configuration diagram showing an embodiment of the present invention, FIG. 2 is an explanatory diagram for explaining an example of a character pattern and a circumscribed rectangle, and FIG. 3 is an adjacent pixel condition for making a target pixel a black pixel. FIG. 4 is an explanatory diagram for explaining, FIG. 4 is an explanatory diagram for explaining the scanning direction of the document image corresponding to each condition of FIG. 3, and FIG. 5 is 2 in the case of a certain adjacent pixel condition (C 1 ). FIG. 6 is an explanatory diagram for explaining a × 2 window, FIG. 6 is an explanatory diagram for explaining an execution process of anisotropic expansion processing according to the present invention, and FIG. 7 is an explanatory diagram for explaining a corner point filter (template). 8 and 9 are explanatory diagrams for explaining an example of a document image. Explanation of code 1 ... Address generation circuit, 2 ... Document image memory, 3
A, 3B ... Multiplexer, 4A, 4B ... Line memory, 5A, 5B ... Latch circuit, 6 ... AND gate, 7 ... OR gate, 8 ... Buffer, 11 ... Document image, 12 ... Character pattern , 13 ... circumscribed rectangle.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】文書画像を撮像し、画素毎に2値化して得
られる文書画像データを記憶する記憶手段と、 水平方向の走査を上下と左右を組み合わせた4つの方向
から実行して文書画像データを読み出す読出手段と、 読み出す走査方向別にしかも各着目画素に対して2×2
画素の所定のウインドウを形成し、走査方向に従って逐
次的にウインドウ内の着目画素を除く他の画素が黒画素
の場合に着目画素の値を黒画素に決定する手段と、 決定された画像値を次のウインドウ位置で用いてその着
目画素の値を決定する処理を、逐次走査方向別に行うこ
とで文書画像データの異方性膨張処理を実現して外接長
方形パターンを演算する演算手段と、 を備えてなることを特徴とする外接長方形パターン演算
回路。
1. A document image obtained by capturing a document image and storing document image data obtained by binarizing each pixel, and performing horizontal scanning from four directions, which are a combination of vertical and horizontal directions. Read-out means for reading out data and 2 × 2 for each pixel of interest for each scanning direction for reading out
A method for forming a predetermined window of pixels and sequentially determining the value of the pixel of interest to be a black pixel when the other pixels except the pixel of interest in the window are black pixels sequentially according to the scanning direction, and the determined image value Arithmetic processing means for realizing the anisotropic expansion processing of the document image data by sequentially performing the processing for determining the value of the pixel of interest using the next window position for each scanning direction, and calculating the circumscribed rectangular pattern. A circumscribing rectangular pattern operation circuit characterized by the following.
JP62177098A 1987-07-17 1987-07-17 Circumscribing rectangular pattern arithmetic circuit Expired - Lifetime JPH0624019B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62177098A JPH0624019B2 (en) 1987-07-17 1987-07-17 Circumscribing rectangular pattern arithmetic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62177098A JPH0624019B2 (en) 1987-07-17 1987-07-17 Circumscribing rectangular pattern arithmetic circuit

Publications (2)

Publication Number Publication Date
JPS6421583A JPS6421583A (en) 1989-01-24
JPH0624019B2 true JPH0624019B2 (en) 1994-03-30

Family

ID=16025104

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62177098A Expired - Lifetime JPH0624019B2 (en) 1987-07-17 1987-07-17 Circumscribing rectangular pattern arithmetic circuit

Country Status (1)

Country Link
JP (1) JPH0624019B2 (en)

Also Published As

Publication number Publication date
JPS6421583A (en) 1989-01-24

Similar Documents

Publication Publication Date Title
US6738154B1 (en) Locating the position and orientation of multiple objects with a smart platen
JP3950777B2 (en) Image processing method, image processing apparatus, and image processing program
JP2840133B2 (en) How to align images
JPS6357831B2 (en)
JPH0256708B2 (en)
JPH0624019B2 (en) Circumscribing rectangular pattern arithmetic circuit
JP2993007B2 (en) Image area identification device
JPH04105186A (en) automatic document input device
JP2786355B2 (en) How to determine the attributes of text images
JP2003317107A (en) Ruled line extraction method and apparatus
JP2634905B2 (en) How to paint shapes
JPH0799532B2 (en) Character cutting device
JPS6248941B2 (en)
JPH0214392A (en) Document area analyzing device
JP3084726B2 (en) Image processing area recognition device
JP2800205B2 (en) Image processing device
JP2966448B2 (en) Image processing device
JPH0685557B2 (en) Image processing method
JP2954218B2 (en) Image processing method and apparatus
JPH05143733A (en) Contour extracting device
JP2762691B2 (en) Embroidery data processing device
JP2785269B2 (en) Noise removal device
JPH03233787A (en) Character image extracting device
JPH0522598A (en) Image input device
JPH087042A (en) Image recognition method and apparatus thereof