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
JP2947566B2 - In-frame area detection device - Google Patents
[go: Go Back, main page]

JP2947566B2 - In-frame area detection device - Google Patents

In-frame area detection device

Info

Publication number
JP2947566B2
JP2947566B2 JP15054689A JP15054689A JP2947566B2 JP 2947566 B2 JP2947566 B2 JP 2947566B2 JP 15054689 A JP15054689 A JP 15054689A JP 15054689 A JP15054689 A JP 15054689A JP 2947566 B2 JP2947566 B2 JP 2947566B2
Authority
JP
Japan
Prior art keywords
frame
raster
ground
run
level
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 - Fee Related
Application number
JP15054689A
Other languages
Japanese (ja)
Other versions
JPH0317787A (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.)
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 JP15054689A priority Critical patent/JP2947566B2/en
Publication of JPH0317787A publication Critical patent/JPH0317787A/en
Application granted granted Critical
Publication of JP2947566B2 publication Critical patent/JP2947566B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は画像上に操作者の指定した領域を抽出するこ
とにより、画像の編集を容易する処理に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to a process for extracting an area specified by an operator on an image to facilitate editing of the image.

(従来の技術) 近年、ディジタル技術の進歩に従ってG3ファクシミリ
やドキュメントファイル、ディジタル複写機などのよう
な画像をディジタル信号で扱う機器が増えている。この
ような機器では、画像をディジタル信号として扱うこと
により、画質の向上および補正のための処理、画像の蓄
積並びに伝送などの処理とともに、操作者の意志に応じ
た濃度変換や領域移動などの編集処理が容易に行えると
いう利点がある。
(Prior Art) In recent years, with the progress of digital technology, devices that handle images by digital signals, such as G3 facsimile, document files, and digital copying machines, have been increasing. In such devices, by handling images as digital signals, processing such as image quality improvement and correction, image accumulation and transmission, and editing such as density conversion and area movement according to the operator's will are performed. There is an advantage that processing can be easily performed.

画像編集処理は既存の画像の一部の領域または全部を
移動したり、大きさ、濃度、色などを変換して、操作者
の意志に従った新しい画像を作成するものである。この
ような処理を行う装置には操作者の意志に応じて多様な
処理を行うために使い勝手のよいものが望まれる。
The image editing process is to create a new image according to the operator's intention by moving a part or all of the existing image, converting the size, density, color, and the like. An apparatus that performs such processing is desired to be easy to use in order to perform various processing according to the will of the operator.

画像編集を行う上で最も重要な要素として領域指定が
挙げられる。領域指定は、これと色置換やマスキング、
トリミング、画像の2値化および移動などの単純な処理
を組合わせることにより、多様な編集処理を可能とし、
非常に汎用的な処理要素である。メモリ上に読み込まれ
た画像に対して領域を指定する方法としては、操作者が
カーソルやマウスなどを用いて位置を指定し、コンソー
ルなどを通して位置を確認しながらインタラクティブに
領域指定を行うことができる。
The most important factor in performing image editing is area designation. Specify the area with this, color replacement, masking,
By combining simple processing such as trimming, image binarization and movement, various editing processes are possible,
It is a very general processing element. As a method of specifying an area for an image read into the memory, an operator can specify a position using a cursor or a mouse, and interactively specify an area while confirming the position through a console or the like. .

一方、画像メモリはコストが高いので通常のオフィス
ユースなどの機器では画像をメモリに書き込まずに、実
時間で処理を行うものが望まれる。このような機器にお
いては画像の読み取り時に領域指定を行うのがよい。こ
の場合の領域指定の方法として画像の読み取り前に、領
域の端点の座標をタブレットによって入力したり数値と
してテンキーにより入力しておく方法がある。しかし、
この方法は指定領域の形状が矩形などの単純な図形に限
られてしまったり、テンキーやタブレットで与える座標
値と原稿上の位置との対応がわかりにくく使い勝手が悪
いなどの欠点がある。
On the other hand, since the image memory is expensive, it is desired that a device for ordinary office use or the like performs processing in real time without writing an image in the memory. In such a device, it is preferable to specify an area when reading an image. In this case, as a method of specifying the area, there is a method of inputting the coordinates of the end point of the area using a tablet or numerical values using a numeric keypad before reading the image. But,
This method has disadvantages such as that the shape of the designated area is limited to a simple figure such as a rectangle, and that the correspondence between the coordinate values given by the numeric keypad and the tablet and the position on the document is difficult to understand, and the usability is poor.

そこで、上記の方法の他に枠線による領域指定方法が
知られている。この方法は領域の境界を表す枠線を作成
し、この枠線の内部の領域を指定するものである。この
方法では、枠線と原稿情報とが区別されることが必要で
ある。そのためには、原稿上の原情報と色や濃度の異な
る線を枠線として原稿上に書き加える方法と、原稿とは
別個に透明なシートを用意し、この透明シートを原稿の
上に重ねて枠線を形成しておき、原稿画像を読み込む前
にこの透明シートを読み取る方法とがある。枠線による
指定方法は、前者が枠線が原画像に使われていない色や
濃度に制限され、後者がシート入力の手間が増える、領
域情報を記憶しておくためのメモリが必要である、など
の欠点をもつが、自由な形状の領域を指定できる、指定
領域を原稿画像と同一面上で指定できるので対応が分か
りやすい等の大きな長所がある。
Therefore, in addition to the above method, a method of specifying an area by a frame line is known. In this method, a frame representing the boundary of a region is created, and a region inside the frame is specified. In this method, it is necessary to distinguish between the frame line and the document information. To do this, add a line with different color and density to the original information on the original as a frame line on the original, or prepare a transparent sheet separately from the original, overlay this transparent sheet on the original, and Is formed, and the transparent sheet is read before reading the original image. The method of specifying by the frame line is that the former is limited to colors and densities where the frame line is not used in the original image, the latter increases the time and effort of sheet input, and requires a memory for storing area information, However, there are major advantages such as the ability to specify a free-form area and the ability to specify the specified area on the same plane as the original image, so that the correspondence can be easily understood.

枠線から枠内領域を検出する方法としては一度メモリ
に枠線情報を書き込み、CPUなどによりこのメモリの内
容を参照しながら領域を決定していく方法が知られてい
る。この方法によれば複雑な枠などにも対応できるが、
枠線画像をそのまま記憶しておくメモリが必要であり、
また、実時間処理が不可能で処理の精度によっては処理
時間がかかるなどの欠点を有している。
As a method of detecting a region in a frame from a frame line, a method of once writing frame line information in a memory and determining an area by referring to the contents of the memory by a CPU or the like is known. According to this method, complicated frames can be handled,
It is necessary to have a memory that stores the frame image as it is,
Further, there is a drawback that real-time processing is impossible and processing time is required depending on the accuracy of the processing.

そこで、読み取ったラスタスキャン信号から逐次実時
間で枠内領域を検出していく方法も知られている。その
一つの方法は当該ラスタまでの情報の範囲で最も外側の
領域から連結性を調べるものである。この方法では、ま
ず画像から枠部分と地部分とを識別し、最も外側の地部
分を枠外部分とする。そして、現ラスタの地部分のうち
前ラスタの枠外部分に隣接している部分および、この部
分に主走査方向に連結している部分を現ラスタの枠外部
分とする。ここで、枠外部分が枠外領域となり、枠外部
分以外の地部分が枠内領域となる。
Therefore, a method of sequentially detecting the in-frame area in real time from the read raster scan signal is also known. One method is to check connectivity from the outermost area in the range of information up to the raster. In this method, first, a frame portion and a ground portion are identified from an image, and the outermost ground portion is set as an outer frame portion. Then, of the ground portion of the current raster, a portion adjacent to the portion outside the frame of the previous raster and a portion connected to this portion in the main scanning direction are defined as a portion outside the frame of the current raster. Here, the outside portion of the frame is an outside region, and the ground portion other than the outside portion is an inside region of the frame.

この方法によれば、ラスタスキャン信号から簡単な処
理により枠内領域を検出できる。しかし、検出できる枠
線は位相的にかなり単純な図形に限られ、例えば第24図
に示すように下側に凹部を有していたり、2重の枠など
の複雑な形状に対応できなかった。
According to this method, the area within the frame can be detected from the raster scan signal by simple processing. However, the frame lines that can be detected are limited to topographically simple figures, for example, as shown in FIG. 24, cannot have a concave portion on the lower side, or cannot correspond to a complicated shape such as a double frame. .

(発明が解決しようとする課題) このようにして、ラスタ信号から実時間的に枠内領域
を検出する従来の枠内領域検出方式では、位相的に極め
て単純な枠形状にしか適用できず、例えば2重枠や下側
に凹部を有する枠などでは一部検出誤りが生じるという
欠点があった。
(Problem to be Solved by the Invention) As described above, the conventional in-frame area detection method for detecting the in-frame area from the raster signal in real time can be applied only to a very simple topographic frame shape. For example, a double frame or a frame having a concave portion on the lower side has a disadvantage that a detection error occurs partially.

本発明はこのような問題点に鑑みてなされたものであ
って、複雑な枠線についても常に正確に枠内領域を検出
することができる枠内領域検出装置を提供することを目
的とする。
The present invention has been made in view of such a problem, and an object of the present invention is to provide an in-frame area detection device that can always accurately detect an in-frame area even with a complicated frame line.

[発明の構成] (課題を解決するための手段) 本発明に係る枠内領域検出装置は、ラスタスキャンに
より得られた画像信号を枠部分と枠部分以外である地部
分に識別する識別手段と、この識別手段により識別され
た前記画像信号の各ラスタの枠部分の連結領域である枠
ランおよび地部分の連結領域である地ランのそれぞれの
レベルを記憶する記憶手段と、この記憶手段により記憶
されたレベルを前ラスタの枠ランおよび地ランのそれぞ
れのレベルとし、該レベルを参照して現ラスタの枠ラン
および地ランのそれぞれのレベルを決定するレベル決定
手段と、このレベル決定手段により決定された現ラスタ
の枠ランおよび地ランのそれぞれのレベルを参照して、
現ラスタの地部分が枠の内であるか外であるかを判定す
る判定手段とを具備したことを特徴とする。
[Structure of the Invention] (Means for Solving the Problems) An in-frame area detection device according to the present invention includes an identification unit for identifying an image signal obtained by raster scanning into a frame portion and a ground portion other than the frame portion. Storage means for storing respective levels of a frame run which is a connection area of the frame part of each raster of the image signal identified by the identification means and a ground run which is a connection area of the ground part of the image signal; The determined levels are used as the respective levels of the frame run and the ground run of the previous raster, and the level determining means determines the respective levels of the frame run and the ground run of the current raster with reference to the levels. With reference to the levels of the frame run and ground run of the current raster
Determining means for determining whether the ground portion of the current raster is inside or outside the frame.

即ち、本発明では、画像から検出した地部分または枠
部分と地部分の両方にレベルの属性を与える。そして、
前ラスタとの連結関係によりレベルを定め、このレベル
にしたがって地または枠のネストの深さを検出する。
That is, in the present invention, the level attribute is given to the ground portion or both the frame portion and the ground portion detected from the image. And
The level is determined based on the connection relationship with the previous raster, and the depth of the nest of the ground or frame is detected according to this level.

なお、レベルの決定を行う前に枠部分を優先して信号
の間引きを行ったり、また、レベルの決定に際し、画像
信号をランを単位として扱うようにしても良い。
The signal may be thinned by prioritizing the frame portion before determining the level, or the image signal may be handled in units of runs when determining the level.

(作用) 本発明によれば、枠および地のレベルを定めることに
より、その枠のネストレベルすなわち最も外側に対して
何重目の枠であるかを検出でき、これにより2重枠や下
向き凹部などの枠に対しても、合理的な領域内の検出が
行えるとともに、手書きの枠を形成する際に生ずるひげ
などの影響も除くことができる。
(Operation) According to the present invention, by determining the level of the frame and the ground, it is possible to detect the nest level of the frame, that is, the level of the frame with respect to the outermost frame, and thereby the double frame or the downward concave portion. For such a frame, it is possible to detect a reasonable area, and to remove the influence of a beard or the like generated when a handwritten frame is formed.

また、枠部分を優先して信号を間引くことにより、間
引きによる枠線の消失が起こることなく、信号量を減ら
すことができ、処理の簡素化を図ることができる。ま
た、レベルの決定を行う際に画像信号をランを単位とし
て扱うことにより、レベル決定の処理を簡素化できる。
In addition, by thinning out the signal by giving priority to the frame portion, the signal amount can be reduced without losing the frame line due to the thinning, and the processing can be simplified. In addition, when the level is determined, the processing of the level determination can be simplified by treating the image signal in units of runs.

(実施例) 以下、添付の図面に基づいて本発明の実施例に係るカ
ラー画像編集装置について説明する。
Hereinafter, a color image editing apparatus according to an embodiment of the present invention will be described with reference to the accompanying drawings.

第1図は本発明の第1の実施例に係るカラー画像編集
装置の構成を示す図である。本装置は色付けやマスキン
グ・トリミングなどを行う領域を特定色の枠線によって
指定してなるモノクロの原稿画像を読み込み、指定され
た領域に指定された処理を施した画像を出力するもので
ある。本装置は、第1図に示すように画像入力部301、
色判別部302、間引き処理部309、枠内領域検出部303、
画像編集処理部304、および画像記録部305から構成され
ている。以下、各部分の機能について詳細に説明する。
FIG. 1 is a diagram showing a configuration of a color image editing apparatus according to a first embodiment of the present invention. This apparatus reads a monochrome document image in which an area to be colored, masked, trimmed, or the like is specified by a frame of a specific color, and outputs an image in which the specified area has been subjected to a specified process. The apparatus includes an image input unit 301 as shown in FIG.
A color determination unit 302, a thinning processing unit 309, an in-frame area detection unit 303,
It comprises an image editing unit 304 and an image recording unit 305. Hereinafter, the function of each part will be described in detail.

〈画像入力部101〉 画像入力部101は、原稿画像をRGBのディジタル画像信
号として読み取る。この画像入力部101は例えば、ライ
ンセンサの各受光面上にRGBのカラーフィルタを順に配
置した点順次のカラーラインセンサからなるもので1ラ
インごとに画像情報を読み取りながら、センサの長手方
向と垂直方向に読み取り走査を行う。これにより、原稿
画像をラスタスキャン信号として読み取ることができ
る。以下、ライン方向を主走査方向、それと垂直な方向
を副走査方向と呼ぶ。画像入力部101はラインセンサで
光電変換されたアナログ信号をA/D変換器でディジタル
信号に変換したのち、シェーディング補正する。この処
理はラインセンサの各素子のゲインおよびオフセットの
バラツキの補正、並びにRGB信号の白バランスの補正を
行うためのもので、黒および白の画素に対して、画像信
号がそれぞれ0および1になるように規格化される。こ
の部分の具体的な構成や機構については例えば特開昭61
−71764号に詳しく記述されている。
<Image Input Unit 101> The image input unit 101 reads a document image as an RGB digital image signal. The image input unit 101 includes, for example, a dot-sequential color line sensor in which RGB color filters are sequentially arranged on each light receiving surface of the line sensor. While reading image information line by line, the image input unit 101 is perpendicular to the longitudinal direction of the sensor. The reading scan is performed in the direction. As a result, the original image can be read as a raster scan signal. Hereinafter, the line direction is referred to as a main scanning direction, and the direction perpendicular thereto is referred to as a sub-scanning direction. The image input unit 101 converts an analog signal photoelectrically converted by the line sensor into a digital signal by an A / D converter, and then performs shading correction. This processing is for correcting the variation of the gain and offset of each element of the line sensor and correcting the white balance of the RGB signal, and the image signals become 0 and 1 for the black and white pixels, respectively. It is standardized as follows. For the specific configuration and mechanism of this part, see, for example,
It is described in detail in -71764.

画像入力部101はシェーディング補正を行った信号を
さらに点順次補正処理を施す。点順次のカラーセンサに
おいてはわずかにずれた3つの点の色情報を色分解して
いるため、画像上のエッジ部分で色ノイズが生じる。そ
こで、画像入力部101は点順次補正処理により、点のず
れに応じた補間処理を行うことにより、このノイズを除
去する。本処理の詳細は例えば特開昭61−154357号に記
述されている。
The image input unit 101 further performs a point-sequential correction process on the signal subjected to the shading correction. In a point-sequential color sensor, color information of three slightly shifted points is color-separated, so that color noise occurs at an edge portion on an image. Therefore, the image input unit 101 removes this noise by performing an interpolation process according to a point shift by a point sequential correction process. The details of this processing are described in, for example, JP-A-61-154357.

〈色判別部102〉 次に、色判別部102は、原稿上の無彩色の原画像成分
と有彩色の枠線との識別を行う。本実施例ではルックア
ップテーブル(LUT)を用いて識別を行う。周知のよう
に、色をLab空間で表現すると、白、黒などの無彩色は
a=b=0の無彩色軸上の点となり、枠線として用いら
れる赤や青などの純色は無彩色軸から離れた点となる。
したがって、Lab空間上を第2図に示すように分割する
ことにより、色の識別を行うことができる。本実施例で
は図に示すように赤、緑、青、黒および白の6色に識別
している。ここで、赤、緑、黄、青の4色の信号が枠を
表し、黒が本来の編集されるべき画像情報を表してい
る。そして、その当該画素が無彩色、赤、緑、青、黄の
いずれかであるかを示す枠信号と黒であるか否かを示す
黒信号とが色判別部102から出力される。ここで枠信号
は色をコードで表し、例えば無彩色、赤、緑、青、黄に
それぞれコード0,1,2,3,4を割当てている。
<Color Discrimination Unit 102> Next, the color discrimination unit 102 discriminates the achromatic original image component on the document from the chromatic frame line. In the present embodiment, identification is performed using a look-up table (LUT). As is well known, when colors are expressed in Lab space, achromatic colors such as white and black become points on the achromatic axis where a = b = 0, and pure colors such as red and blue used as frame lines are achromatic axes. Away from the point.
Therefore, the color can be identified by dividing the Lab space as shown in FIG. In this embodiment, six colors of red, green, blue, black and white are identified as shown in the figure. Here, signals of four colors of red, green, yellow, and blue represent frames, and black represents image information to be originally edited. Then, a frame signal indicating whether the pixel is achromatic, red, green, blue, or yellow and a black signal indicating whether the pixel is black are output from the color determination unit 102. Here, the frame signal represents colors by codes, and codes 0, 1, 2, 3, and 4 are assigned to achromatic colors, red, green, blue, and yellow, for example.

ここでLUTはLab空間上での分割面をRGB空間上に変換
することによって構成できる。また、RGB信号をLab信号
などの信号系に変換してから、LUTを参照してもよい。
これによりLUTの量子化効率をあげることができる。
Here, the LUT can be configured by converting the division plane in the Lab space into the RGB space. Alternatively, the LUT may be referred to after converting the RGB signal into a signal system such as a Lab signal.
As a result, the quantization efficiency of the LUT can be increased.

色識別された信号にはノイズなどによる識別誤りが多
く含まれている。原稿上の色枠に色むらやノイズなどが
あると、枠線以外の部分に枠が生じたり、枠線の内部に
穴ができる場合ある。このようなノイズが生ずると、枠
検出において検出誤りを起こす可能性がある。このノイ
ズは面積が小さいので、この色判別部102では色判別後
に孤立点除去などの処理を施すことにより、これらのノ
イズを抑制する。
A color-identified signal contains many identification errors due to noise or the like. If the color frame on the document has color unevenness or noise, a frame may be formed in a portion other than the frame line, or a hole may be formed inside the frame line. When such noise occurs, a detection error may occur in frame detection. Since this noise has a small area, the color discrimination unit 102 suppresses these noises by performing processing such as removal of isolated points after color discrimination.

〈間引き処理部103〉 間引き処理部103は、色判別部102で識別された枠色信
号113に対し、主走査方向の画素の間引きを行う。これ
は画像信号の情報量を少なくして後述する枠内領域検出
部104での計算量を減らすことを目的としている。間引
き率は例えば1/4が好適である。すなわち4画素のうち
3画素を間引いて1画素に減らす。また、4画素のうち
特定位置の1画素を選択して出力する単純な間引きを行
うのではなく、有彩色を優先して間引いて行う。すなわ
ち、いま、第3図中W,R,G.Bがそれぞれ無彩色、赤、
緑、青のコードを表わすものとすると、第3図中Aで示
すように、4画素のうち1画素でも有彩色(赤、緑、青
または黄)の信号があればその各間引きの出力とする。
そして、第3図中Bで示すように、4画素とも無彩色の
場合にのみ、無彩色を出力する。また、第3図中Cで示
すように、4画素のうち2色以上の枠色がある場合は、
その中で最も前の色を間引き出力する。但し、異なる色
の枠線を狭い部分に密集して描くことはまれなので、第
3図中Cのような状態は通常は起こらない。後で述べる
ように、本実施例では枠内領域検出部104で1ラスタの
信号を一度メモリに記憶させている。このため、信号を
間引くことによりこのメモリの容量を小さくすることが
できる。また、信号の転送速度も遅くなるため、時分割
処理などが可能となり、処理回路の規模も小さくでき
る。一方、枠色の線を白地より優先して間引いて行って
いるので、間引きにより細い枠線がかすれたり、消失す
ることもなく、枠内領域検出精度の劣化も非常に少な
い。なお、上述したように、間引き処理部103は、処理
規模の縮小を目的としたものであり、場合によっては、
この処理を省略することも可能である。
<Thinning Processing Unit 103> The thinning processing unit 103 thins out the pixels in the main scanning direction with respect to the frame color signal 113 identified by the color determining unit 102. This aims to reduce the amount of information of the image signal and reduce the amount of calculation in the in-frame area detection unit 104 described later. The thinning rate is preferably, for example, 1/4. That is, three of the four pixels are thinned out and reduced to one pixel. Further, instead of performing simple thinning-out of selecting and outputting one pixel at a specific position among the four pixels, thinning-out is performed by giving priority to chromatic colors. That is, in FIG. 3, W, R, and GB are achromatic, red,
Assuming that green and blue codes are represented, as shown by A in FIG. 3, if there is a chromatic (red, green, blue or yellow) signal in at least one of the four pixels, the output of each of the thinning-out signals is obtained. I do.
Then, as shown by B in FIG. 3, an achromatic color is output only when all four pixels are achromatic. Also, as shown by C in FIG. 3, when there are two or more frame colors among the four pixels,
The foremost color is thinned out. However, since it is rare to draw different color frame lines densely in a narrow portion, a state as shown in C in FIG. 3 does not usually occur. As described later, in the present embodiment, the one-raster signal is once stored in the memory by the in-frame area detecting unit 104. Therefore, the capacity of the memory can be reduced by thinning out the signals. Further, since the signal transfer speed is reduced, time-division processing can be performed, and the scale of the processing circuit can be reduced. On the other hand, since the line of the frame color is thinned out in preference to the white background, the thin frame line is not faded or lost due to the thinning, and the accuracy of the in-frame area detection accuracy is very little deteriorated. Note that, as described above, the thinning processing unit 103 is for the purpose of reducing the processing scale, and in some cases,
This processing can be omitted.

〈枠内領域検出部104〉 枠内領域検出部104は間引き処理部103から出力された
枠色信号より枠内領域を識別する。まず、本実施例にお
ける枠内領域検出のアルゴリズムについて説明する。本
実施例では枠色の種類として4色を独立に用いている
が、ここでは便宜上1色の場合について説明する。
<In-frame area detection unit 104> The in-frame area detection unit 104 identifies the in-frame area from the frame color signal output from the thinning processing unit 103. First, an algorithm for detecting a region in a frame according to the present embodiment will be described. In the present embodiment, four colors are independently used as types of frame colors, but the case of one color will be described here for convenience.

本処理のアルゴリズムを第4図に示す。本アルゴリズ
ムでは各枠画素に枠レベル、地画素に地レベルという属
性を与え、前ラスタの枠信号、枠レベル、地レベルおよ
び現ラスタの枠信号から現ラスタの枠レベルまたは地レ
ベルを判定し、地レベルにより枠の内外のいずれかを決
定する。そして、この処理を1ラスタごとに進めながら
順次繰り返していくことにより、画像全面の枠内領域を
検出する。ここで、画像の最初のラスタである第1ラス
タの前にはラスタが存在しないので、仮想的に第0ラス
タを考える。第0ラスタはすべて地でその地レベルは初
期値0であるとする。第0ラスタは画像の端であると考
えられ、ここでの地レベル0は基準値となる。
FIG. 4 shows the algorithm of this processing. In this algorithm, each frame pixel is given a frame level attribute and a ground pixel is a ground level attribute, and the frame level or ground level of the current raster is determined from the frame signal of the previous raster, the frame level, the ground level, and the frame signal of the current raster. Depending on the ground level, either inside or outside the frame is determined. Then, by sequentially repeating this process while proceeding for each raster, the in-frame region of the entire image is detected. Here, since there is no raster before the first raster which is the first raster of the image, the zeroth raster is considered virtually. It is assumed that the 0th raster is all ground and its ground level is an initial value 0. The 0th raster is considered to be the end of the image, and the ground level 0 here is a reference value.

次に、各ラスタの枠レベルまたは地レベルの決定を行
う。この決定の手順を第5図に基づいて詳細に説明す
る。当該ラスタの枠信号をP(x)、その前ラスタ各画
素の枠信号、枠レベル、地レベルをそれぞれP0(x)、
LF(x)、LG(x)とする。ここで枠信号は前述したよ
うに枠の部分で1、それ以外の部分で0をとる2値信号
であり、xは主走査方向の位置を表す。
Next, the frame level or ground level of each raster is determined. The procedure for this determination will be described in detail with reference to FIG. The frame signal of the raster is P (x), the frame signal, frame level, and ground level of each pixel of the previous raster are P0 (x),
LF (x) and LG (x). Here, the frame signal is a binary signal that takes 1 in the frame portion and 0 in other portions as described above, and x represents a position in the main scanning direction.

まず、現ラスタの枠信号をラン表現に変換する。すな
わち、各ラスタ内で同じ枠信号値をとる連結領域をラン
と呼び、1ラスタをランごとに分割する。以下、n番目
のランをRnと表記する。これらのランは一つおきにそれ
ぞれ枠、地を表す。次に、地のランRnの地レベルを次の
規則乃至により決定する。
First, the frame signal of the current raster is converted into a run expression. That is, a connected area having the same frame signal value in each raster is called a run, and one raster is divided for each run. Hereinafter, the n-th run is denoted as Rn. Each of these runs represents a frame and the ground, respectively. Next, the ground level of the ground run Rn is determined by the following rules.

ランRnに隣接する地のランが前ラスタに一つもない場
合は、前ラスタの隣接する枠のランの枠レベルに1を加
えたものをランRnの地レベルとする[第6図(a)]。
If there is no run on the ground adjacent to the run Rn in the previous raster, the ground level of the run Rn is obtained by adding 1 to the frame level of the run adjacent to the previous raster [FIG. 6 (a)]. ].

ランRnに隣接する地のランが前ラスタに一つだけある
場合は、そのランの地レベルをランRnの地レベルとする
[第6図(b)]。
When there is only one run on the ground adjacent to the run Rn in the previous raster, the ground level of the run is set to the ground level of the run Rn (FIG. 6B).

ランRnに隣接する地のランが前ラスタに複数ある場合
は、その複数の地の地レベルのうち最小値をランRnの地
レベルとする[第6図(c)]。
When there are a plurality of runs of the ground adjacent to the run Rn in the preceding raster, the minimum value among the ground levels of the plurality of grounds is set as the ground level of the run Rn [FIG. 6 (c)].

また、枠のランの枠レベルを次の規則乃至により
決定する。
Further, the frame level of the frame run is determined by the following rules and the like.

ランRnに隣接する枠のランが前ラスタに一つもない場
合は、前ラスタの隣接する地のランの地レベルをランRn
の枠レベルとする[第6図(d)]。
If there is no run in the frame adjacent to the run Rn in the previous raster, the ground level of the run adjacent to the previous raster is set to run Rn.
[FIG. 6 (d)].

ランRnに隣接する枠のランが前ラスタに一つだけある
場合は、そのランの枠レベルをランRnの枠レベルとす
る。[第6図(e)]。
When there is only one run of the frame adjacent to the run Rn in the previous raster, the frame level of that run is set to the frame level of the run Rn. [FIG. 6 (e)].

ランRnに隣接する枠のランが前ラスタに複数ある場合
は、その複数の枠の枠レベルのうち最大値をランRnの枠
レベルとする[第6図(f)]。
When there are a plurality of runs of the frame adjacent to the run Rn in the previous raster, the maximum value among the frame levels of the plurality of frames is set as the frame level of the run Rn [FIG. 6 (f)].

なお、これらの規則乃至と第5図の条件a.,b.,
c.,d.とは、a.が、b.がと、c.が、d.がと
にそれぞれ対応している。第5図ではと、とを
それぞれ区別していないが、ここでは以下の説明の都合
上、分類している。しかし、本質的には同じ意味であ
る。
Note that these rules and the conditions a., B.,
c. and d. correspond to a., b., c., and d., respectively. Although FIG. 5 does not distinguish between and, they are classified here for convenience of the following description. However, they have essentially the same meaning.

ここで、前ラスタのランが現ラスタのランに隣接する
とは現ラスタを構成する画素のいずれかが前ラスタの当
該ランの構成画素のいずれかに隣接している場合をい
う。さらに、現ラスタの画素P(x)に隣接している画
素とは、本実施例では第7図(a)に示すように主走査
位置の同じ画素P0(x)のみを意味する。但し、この隣
接関係はこの定義に限るものではなく、例えば、現ラス
タの画素P(x)に対して、前ラスタの同じ主走査位置
の画素P0(x)と1画素前の画素P0(x−1)の2画素
を隣接画素と定義したり[第7図(b)]、さらに1画
素後の画素P0(x+1)も加えた3画素を隣接する画素
と定義してもよい[第7図(c)]。特に、2番目の定
義では枠と地が前ラスタと現ラスタとの間で交差する場
合につねに枠、地のいずれか一方が連結し、他方が連結
しないので合理的である。しかし、通常はそのような細
かい枠線が形成されることはまれなので、本実施例のよ
うに第7図(a)に示すように隣接する関係を用いても
実用上、問題となることは少ない。
Here, that the run of the previous raster is adjacent to the run of the current raster means that any of the pixels constituting the current raster is adjacent to any of the pixels of the run of the previous raster. Further, the pixel adjacent to the pixel P (x) of the current raster means only the same pixel P0 (x) at the main scanning position in this embodiment as shown in FIG. 7 (a). However, the adjacent relationship is not limited to this definition. For example, for the pixel P (x) of the current raster, the pixel P0 (x) at the same main scanning position of the previous raster and the pixel P0 (x -1) may be defined as adjacent pixels [FIG. 7 (b)], or three pixels including the next pixel P0 (x + 1) may be defined as adjacent pixels [FIG. 7 (b)]. Figure (c)]. In particular, in the second definition, when the frame and the ground intersect with each other between the previous raster and the current raster, one of the frame and the ground is always connected, and the other is not connected. However, since such a fine frame line is rarely formed, it is not practically a problem even if the adjacent relation is used as shown in FIG. 7A as in this embodiment. Few.

前記の規則により決定した地レベルの値よりその地部
分が枠内領域か枠外領域かを判定できる。同一ランの画
素のレベルは同じなので主走査方向に連結する部分は同
じレベルとなる。また、規則および規則より副走査
方向に連結した部分も同じレベルとなる。したがって、
主走査方向または副走査方向の下方向に連結した地部
分、枠部分は同じ地レベルまたは枠レベルを継承する
[第8図(a)]。また、地部分から新たに枠が生じた
場合[第8図(b)]は規則より、その隣接する地部
分の地レベルが新たに生じた枠の枠レベルとなる。ま
た、枠部分から新たに地部分が生じた場合[第8図
(c)]は規則により、その枠の枠レベルに1を加え
た値が新たに生じた地部分の地レベルとなる。したがっ
て、新たに上凸の枠線が発生した場合、その枠線により
囲まれる部分[第8図(d)]の地レベルはその外側の
地部分の地レベルに1を加えた値となる。すなわち、多
重にネストした枠線の内側の地レベルはネストが深くな
るにしたがって1ずつ増加していく。したがって、2重
以上の枠線の内部を交互に枠内、枠外とみなせば、地レ
ベルが偶数か奇数かで、枠内領域か枠外領域かを判定で
きる。画像の最も外側の部分の地レベルは0としている
ので、地レベルが偶数の部分が枠外領域、奇数の部分が
枠内領域と判定する。なお、本実施例では規則におい
て、前ラスタの隣接する枠の枠レベルの最大値を当該枠
の枠レベルとしている。しかし、この規則は本質的では
なく、変形例として規則を下記の規則′に書き換え
た方式も可能である。
From the value of the ground level determined by the above-described rule, it is possible to determine whether the ground portion is an in-frame area or an out-of-frame area. Since the pixels of the same run have the same level, the portions connected in the main scanning direction have the same level. Also, the rules and the parts connected in the sub-scanning direction according to the rules are at the same level. Therefore,
The ground portion and the frame portion connected in the main scanning direction or the sub-scanning direction in the downward direction inherit the same ground level or frame level [FIG. 8 (a)]. When a new frame is formed from the ground portion (FIG. 8B), the ground level of the adjacent ground portion becomes the frame level of the newly generated frame according to the rules. When a new ground portion is generated from the frame portion [FIG. 8 (c)], a value obtained by adding 1 to the frame level of the frame becomes the ground level of the newly generated ground portion according to the rules. Therefore, when a newly convex frame line is generated, the ground level of the portion surrounded by the frame line [FIG. 8 (d)] is a value obtained by adding 1 to the ground level of the ground portion outside the frame line. That is, the ground level inside the multiply nested frame increases by one as the nest becomes deeper. Therefore, if the inside of a double or more frame line is alternately regarded as inside or outside the frame, it can be determined whether the ground level is an even number or an odd number, and whether the area is within the frame or outside the frame. Since the ground level of the outermost part of the image is 0, it is determined that even-numbered ground levels are outside the frame and odd-numbered areas are inside the frame. In this embodiment, in the rule, the maximum value of the frame level of the frame adjacent to the previous raster is set as the frame level of the frame. However, this rule is not essential, and a system in which the rule is rewritten to the following rule 'as a modified example is also possible.

′ランRnに隣接する枠のランが前ラスタに複数ある
場合は、その複数の枠の枠レベルのうち最小値をランRn
の枠レベルとする。
'If there are a plurality of runs of the frame adjacent to the run Rn in the previous raster, the minimum value among the frame levels of the plurality of frames is set to the run Rn
Frame level.

この変形例のアルゴリズムでは枠線の位相関係が特殊
な場合に、本実施例と異なる領域判定結果が得られる。
しかし、本実施例による判定結果との得失は枠線の位相
により、一長一短であり、また通常の枠線ではこのよう
な特殊な場合は極めて少ないので、どちらの方式を用い
ても実用上、大差はない。
In the algorithm of this modified example, when the phase relationship between the frame lines is special, an area determination result different from that of the present embodiment is obtained.
However, the advantages and disadvantages of the determination result according to the present embodiment have advantages and disadvantages depending on the phase of the frame line, and there are very few such special cases in a normal frame line. There is no.

次に、上述した枠内領域検出アルゴリズムによる枠内
検出の具体例について説明する。
Next, a specific example of the in-frame detection by the above-described in-frame area detection algorithm will be described.

(1)円形の枠線の場合 まず、第9図(a)に示すような単純な円形の枠の場
合について説明する。以下の図はすべて副走査方向を図
の上から下向きとする。図のラスタ901まではすべてに
地なので地レベルは初期値0のままである。ラスタ901
で初めて枠線にかかる。この部分をラスタレベルまで拡
大した模式図を第9図(b)に示す。図中ハッチングし
た部分が枠線部分、それ以外の部分が地部分を表してい
る。ラスタ901で初めて枠線のラン902が生じる。ラン90
2の前ラスタには枠部分がないので、前記アルゴリズム
の規則に従い、ラン902の枠レベルは0となる。これ
に続くラスタの枠のラン903乃至904の枠レベルは規則
に従いそれぞれラン902の枠レベルを継承して0とな
る。次に、初めて枠に囲まれた地にかかるラスタ905
で、枠のラン906,907の間に地のラン908が生じる。ラン
908の地レベルは規則により、ラン904の枠レベルに1
を加えたもの、すなわち1となり、枠の内部であること
が検出される。以下のラスタでは規則により、このレ
ベルが継承されていく。これにより、枠線の内部の領域
910はすべて地レベルが1すなわち枠内領域と判定さ
れ、枠線の外部領域911は全て地レベルが0すなわち枠
外領域と判定され、正しく枠の内外が判定される。
(1) Case of Circular Frame First, a case of a simple circular frame as shown in FIG. 9A will be described. In the following drawings, the sub-scanning direction is downward from the top of the drawing. The ground level remains at the initial value 0 because the ground is all ground up to raster 901 in the figure. Raster 901
It's the first time that the border is on. FIG. 9B is a schematic diagram in which this portion is enlarged to the raster level. In the figure, the hatched portion represents the frame line portion, and the other portions represent the ground portion. For the first time in the raster 901, a frame run 902 occurs. Run 90
Since the front raster of No. 2 has no frame portion, the frame level of the run 902 becomes 0 according to the rules of the algorithm. The frame levels of runs 903 to 904 of the subsequent raster frames are set to 0 by inheriting the frame levels of the runs 902 according to the rules. Next, the raster 905 on the ground surrounded by the frame for the first time
Then, a ground run 908 occurs between the run 906 and the run 907 of the frame. run
By rule, the 908 ground level is 1 per run 904 frame level.
, That is, 1, and it is detected that it is inside the frame. In the following rasters, this level is inherited by rules. This allows the area inside the border to be
910 are all determined to have a ground level of 1, that is, an area inside the frame, and all the outer areas 911 of the frame line are determined to have a ground level of 0, that is, an area outside the frame, and the inside and outside of the frame are correctly determined.

(2)下向き凹部を有する枠線の場合 次に、第10図(a)に示すように下向き凹部を有する
形状の枠線の場合を説明する。前の例と同様に、初めて
枠線にかかるラスタ1001まではすべてレベル0の地とな
り、初めて下向き凹部の枠にかかるラスタ1002までは枠
内の領域1012の地レベルは1となる。ラスタ1002で初め
て下向き凹部の枠線のラン1003が生じる[第10図
(b)]。このランは地レベル1の地にしか隣接してい
ないので、規則により枠レベル1となる。そして、下
向き凹部の外部の地が初めて現れるラン1004の地レベル
は規則により2となる。したがって、ラスタ1005まで
は下向き凹部の領域1010の地レベルは2となる。ラスタ
1005で下向き凹部の領域1010と外の地領域1011が結合す
るが、規則によりこのラスタ以降の地レベルは0とな
る。これにより、枠線の内部の領域は全て地レベルが0
または2となり、正しく枠の内外が判定される。
(2) In the case of a frame line having a downward concave portion Next, a case of a frame line having a downward concave portion as shown in FIG. 10 (a) will be described. As in the previous example, the ground level of the area 1012 in the frame is set to 1 for the first time until the raster 1001 corresponding to the frame line, and the raster 1002 corresponding to the frame of the downward concave portion for the first time. For the first time, a run 1003 of the frame line of the downward concave portion occurs on the raster 1002 [FIG. 10 (b)]. Since this run is adjacent only to the ground at the ground level 1, it is set to the frame level 1 according to the rules. Then, the ground level of the run 1004 where the ground outside the downward concave portion first appears is 2 by the rule. Therefore, the ground level of the area 1010 of the downward concave portion is 2 up to the raster 1005. Raster
At 1005, the area 1010 of the downward concave portion and the outside ground area 1011 are combined, but the ground level after this raster becomes 0 according to the rule. As a result, the ground level is 0 for all the areas inside the frame.
Or it becomes 2, and inside and outside of the frame are correctly determined.

(3)n重枠の場合 第11図の斜線部に示すドーナツ状の領域や、さらにド
ーナツの穴の中にさらに孤立した島をもつ領域などを枠
線により指定するには第12図に示す2重または3重の枠
線により指定するのが幾何学的な意味からも常識的な意
味からも合理的である。本アルゴリズムではつぎに示す
ように、このような2重以上の枠線に対しても領域の内
外を上記の意味で正しく判定できる。すなわち、第13図
に示すような3重の枠の場合、最も外側の枠1301の枠レ
ベルは0となり、その内側の地部分1302の地レベルは1
となる。同様に外から2番目の枠1303の枠レベルは1、
その内部の地部分1304の地レベルは2となる。このよう
に、枠のネストが増えるにつれて枠および地のレベルは
1つずつ大きくなる。これにより、最も内側、すなわち
外から3番目の枠1305の内部1306、外部から2番目の枠
1303と外から2番目の枠1305の間の部分1304、最も外側
の枠1301と外から2番目の枠1303の間の部分1302の地レ
ベルはそれぞれ、3,2,1となり、それぞれ枠内領域、枠
外領域、枠内領域と判定される。これは3重の枠線の場
合に限らず、枠線のネストが4以上に増えても同様に判
定される。
(3) In the case of an n-folded frame To specify a donut-shaped area shown by the hatched portion in FIG. 11 or an area having a further isolated island in the hole of the donut by using a frame line, FIG. It is reasonable from a geometrical sense and a common sense to specify by a double or triple border. In the present algorithm, as shown below, the inside and outside of the region can be correctly determined in the above-described meaning even for such a double or more frame line. That is, in the case of a triple frame as shown in FIG. 13, the frame level of the outermost frame 1301 is 0, and the ground level of the inner ground portion 1302 is 1
Becomes Similarly, the frame level of the second frame 1303 from the outside is 1,
The ground level of the ground portion 1304 inside is 2. Thus, as the number of nests increases, the level of the frame and the level of the ground increase by one. As a result, the innermost, that is, the inner 1306 of the third frame 1305 from the outside, the second frame from the outside
The ground level of the portion 1304 between 1303 and the second outermost frame 1305, and the ground level of the portion 1302 between the outermost frame 1301 and the second outermost frame 1303 are 3, 2, and 1, respectively, and are the areas within the respective frames. , Outside the frame and inside the frame. This is not limited to the case of a triple frame line, and the same determination is made even if the number of frame line nests increases to four or more.

(4)ひげがある場合 ところで、以上の各例では枠線はすべて円と位相が同
じである1本の閉曲線であったが、手で枠線を描く場合
には、枠線の始点と終点が一致せず、第14図に示すよう
に枠線が開曲線になったり、第15図(a)、(b)に示
すように内側または外側にひげの分岐した閉曲線となる
場合がある。このいずれの状態にもならないように、閉
曲線を描くのは困難であり、使い勝手を著しく損なう。
本アルゴリズムでは副走査の方向性により、第14図
(a)のように、下側の開いた枠線に対しては枠内領域
を検出できるが、第14図(b)のように上側に開いた枠
線などでは枠内領域を検出できない。すなわち、開曲線
に対しては必ずしも常識にあった枠内領域検出が行えな
い。
(4) When there is a beard By the way, in each of the above examples, the frame line is a single closed curve having the same phase as the circle, but when the frame line is drawn by hand, the start point and the end point of the frame line are used. May not match, and the frame may become an open curve as shown in FIG. 14 or a closed curve with a whisker branching inward or outward as shown in FIGS. 15 (a) and 15 (b). It is difficult to draw a closed curve so as not to be in any of these states, which significantly impairs usability.
According to the present algorithm, the area inside the frame can be detected for the lower open frame line as shown in FIG. 14 (a) due to the directionality of the sub-scan, but it can be detected at the upper side as shown in FIG. 14 (b). An area inside the frame cannot be detected with an open frame line or the like. That is, it is not always possible to detect the in-frame area with respect to the open curve.

しかし、第15図(a),(b)のように閉曲線になっ
ていればひげがあっても、正しい枠線の内外を判別す
る。すなわち、第15図(a)のように閉曲線に内側にひ
げがある場合は、枠レベルはどの部分の0となり、閉曲
線の内側の地レベルはすべて1、すなわち枠内領域とな
る。また、第15図(b)に示すように閉曲線に外側にひ
げのある場合は枠線の枠レベルはすべて0となる。そし
て、閉曲線の内側部分1501およびひげと閉曲線にはさま
れた部分1502の地レベルは1となる。しかし、閉曲線に
はさまれた部分はひげの終点であるラスタ1503で外側の
地レベルが0である地部分と連結する。前記アルゴリズ
ムの規則よりラスタ1503以降は地レベルの小さい方が
0となる。このため、閉曲線の内部1501および、ひげと
閉曲線の間にはさまれた領域1502が枠内領域と判定され
る。領域1502の枠外領域と考えるのが常識的であるが、
ひげは小さいので領域1502は十分小さい領域となり、こ
のような判定結果での実用上は問題はないと考えられ
る。枠線が閉曲線になるように留意して枠線を描けばよ
く、枠線を描く上での制約条件が少なく、使い勝手のよ
いものとなる。
However, if the curve is a closed curve as shown in FIGS. 15 (a) and 15 (b), even if there is a beard, the inside and outside of the correct frame line are determined. That is, when there is a beard inside the closed curve as shown in FIG. 15 (a), the frame level is 0 in any part, and the ground level inside the closed curve is all 1, that is, the area within the frame. When the closed curve has a beard on the outside as shown in FIG. 15 (b), the frame levels of the frame lines are all zero. Then, the ground level of the inner portion 1501 of the closed curve and the portion 1502 sandwiched between the beard and the closed curve is 1. However, the portion sandwiched between the closed curves is connected to the ground portion having the outer ground level of 0 on the raster 1503 which is the end point of the beard. According to the rule of the algorithm, the smaller the ground level becomes 0 after the raster 1503. For this reason, the inside 1501 of the closed curve and the area 1502 sandwiched between the beard and the closed curve are determined as the in-frame areas. It is common sense to think of it as an area outside the area of the area 1502,
Since the beard is small, the area 1502 is a sufficiently small area, and it is considered that there is no practical problem with such a determination result. It is sufficient to draw the frame line while paying attention so that the frame line becomes a closed curve, and there are few restrictions on the drawing of the frame line, which is convenient.

次に、前記アルゴリズムを実現する枠内領域検出部10
4の具体的な構成を説明する。枠内領域検出部104の構成
の一例を第16図に示す。間引き処理部103から出力され
た枠色信号114をデコーダ1641でデコードし、それぞれ
赤、緑、青、黄の有無を示す4色の枠信号1651乃至1654
を作成する。これらの枠信号1651乃至1654は各色ごとに
設けられたレベル判定部1601乃至1604およびメモリ部16
05乃至1608に入力される。これら4つのレベル判定部16
01乃至1604およびメモリ部1605乃至1608は、すべて同じ
構成となっている。したがって、ここでは赤の枠信号16
51に対応したレベル判定部1601とメモリ部1605について
説明する。
Next, the in-frame area detection unit 10 for realizing the above algorithm
The specific configuration of 4 will be described. FIG. 16 shows an example of the configuration of the in-frame area detection unit 104. The frame color signal 114 output from the thinning processing unit 103 is decoded by the decoder 1641, and four color frame signals 1651 to 1654 indicating the presence or absence of red, green, blue, and yellow, respectively.
Create These frame signals 1651 to 1654 are supplied to the level determination units 1601 to 1604 and the memory unit 16 provided for each color.
05 to 1608 are input. These four level determination units 16
01 to 1604 and the memory units 1605 to 1608 all have the same configuration. Therefore, here the red frame signal 16
The level determination unit 1601 and the memory unit 1605 corresponding to 51 will be described.

(I)レベル判定部1601 レベル判定部1601は現ラスタの枠信号1651、前ラスタ
の枠信号1655および前ラスタのレベル信号1656から現ラ
スタのレベルを判定する。判定は現ラスタのラン、すな
わち連絡する枠部分および連結する地部分を単位として
行う。この判定部1601は判定論理回路1609、6ビットの
内部状態レジスタ1610および出力レジスタ1611よりな
る。判定論理回路1609は現ラスタの枠信号1651、前ラス
タの枠信号1655、前ラスタのレベル信号1656およびレジ
スタ1611の出力信号1660を入力し2ビットの連結状態と
4ビットのレベル状態よりなる内部状態信号1657および
1ビットのラン終了信号1658を生成する。内部状態レジ
スタ1611は上記の内部状態信号1657を画素単位に同期し
て記憶する。これにより、連結状態2ビットによる4つ
の状態S0,S1,S2,S3および4ビットのレベル状態LSをも
つ状態遷移回路を構成する。
(I) Level Determination Unit 1601 The level determination unit 1601 determines the level of the current raster from the frame signal 1651 of the current raster, the frame signal 1655 of the previous raster, and the level signal 1656 of the previous raster. The determination is made in units of the run of the current raster, that is, the connected frame portion and the connected ground portion. The determination unit 1601 includes a determination logic circuit 1609, a 6-bit internal state register 1610, and an output register 1611. The decision logic circuit 1609 receives the frame signal 1651 of the current raster, the frame signal 1655 of the previous raster, the level signal 1656 of the previous raster, and the output signal 1660 of the register 1611, and receives an internal state consisting of a 2-bit connection state and a 4-bit level state. A signal 1657 and a 1-bit run end signal 1658 are generated. The internal state register 1611 stores the internal state signal 1657 in synchronization with each pixel. As a result, a state transition circuit having four states S0, S1, S2, S3 based on the connection state 2 bits and a 4-bit level state LS is configured.

判定論理回路1609の入出力関係を第17図に示す。これ
はレベル判定部状態遷移を表す。ここで、ラン終了信号
が1となる画素、すなわち現ラスタが枠から地または地
から枠に変化する画素での内部状態LSが出力レジスタ16
11に記憶され、これがこのランレベルなどの情報を表
す。このレベル信号がこのランの地レベルまた枠レベル
となる。
FIG. 17 shows the input / output relationship of the decision logic circuit 1609. This represents a state transition of the level determination unit. Here, the internal state LS of the pixel for which the run end signal is 1, that is, the pixel whose current raster changes from the frame to the ground or from the ground to the frame, is stored in the output register 16
11, which represents information such as the run level. This level signal becomes the ground level or frame level of this run.

ここで内部状態STのS0,S1,S2,S3はそれぞれ、現ラ
スタが地で前ラスタに地の画素がある、現ラスタが枠
で前ラスタすべて地、現ラスタが地で前ラスタがすべ
て枠、現ラスタが枠で前ラスタに枠の画素があるとい
う構造に対応している。これらの内部状態はラン終了時
点で確定し、第17図に示すような状態遷移にすることに
より、各ランの終了時の状態S0,S1,S2,S3がそれぞれ規
則と、規則、規則、規則と規則のランの条
件に対応し、前記の規則に応じたレベル判定のアルゴリ
ズムを実行する。このように、前記のレベル決定のアル
ゴリズムは簡易な構成で実現できる。
Here, S0, S1, S2, and S3 of the internal state ST are respectively the current raster is the ground and the previous raster has the ground pixel, the current raster is the frame and the previous raster is all the ground, the current raster is the ground and the previous raster is all the frame. , The current raster is a frame, and the previous raster has pixels of the frame. These internal states are determined at the end of the run, and by making the state transitions as shown in FIG. 17, the states S0, S1, S2, and S3 at the end of each run are rules, rules, rules, and rules. And an algorithm for level determination corresponding to the rule is executed in accordance with the condition of the run of the rule. As described above, the algorithm for determining the level can be realized with a simple configuration.

(II)メモリ部1605 レベル判定部1601で判定されたレベル信号はランを単
位に定義されており、ランの最終画素でそのレベル値が
確定する。このため、次段のメモリ部1605においてレベ
ル判定部1601で判定した1ラスタ分のレベル信号を記憶
し、次のラスタでランの最初の画素からレベルの確定す
る画素単位の信号として読み出す。
(II) Memory unit 1605 The level signal determined by the level determination unit 1601 is defined in units of runs, and the level value is determined at the last pixel of the run. For this reason, the level signal for one raster determined by the level determining unit 1601 is stored in the memory unit 1605 at the next stage, and is read out as a pixel-based signal whose level is determined from the first pixel of the run in the next raster.

メモリ部1605は2個のメモリ1612,1613、読み出し用
のアドレスカウンタ1614、書き込み用のアドレスカウン
タ1615、読み出しレジスタ1616、比較器1617、画素位置
カウンタ1618、切替え器1619および論理回路1620から構
成されている。
The memory unit 1605 includes two memories 1612 and 1613, an address counter 1614 for reading, an address counter 1615 for writing, a reading register 1616, a comparator 1617, a pixel position counter 1618, a switch 1619, and a logic circuit 1620. I have.

書き込み動作は次のように行う。まず、各ラスタの最
初の書き込み用のアドレスカウンタ1615を初期値0にク
リアする。そして、ランの最終画素になるごとに、一方
のメモリ1612または1613にそのランの枠信号、レベル信
号およびランの最終画素の位置座標を1ワードとして書
き込み、書き込み用アドレスカウンタ1615を1つカウン
トアップする。ここで、画素位置カウンタ1618はラスタ
の最初にクリアし、主走査方向の画素ごとにカウントア
ップしておくことにより、主走査方向の画素位置を表す
信号を出力する。ランの最終画素位置としてこのカウン
タ1618の内容を書き込めばよい。そして、これらの操作
を1つのランが終了するごとに、このラスタの終わりま
で繰り返し、ラスタの最終画素で最後の書き込みを行
う。この一連の操作によりメモリ1612または1613上には
1ラスタ上のすべてのランの枠信号、並びにレベル信号
および最終画素位置の情報がランの位置の若い順に書き
込まれる。
The write operation is performed as follows. First, the first write address counter 1615 of each raster is cleared to the initial value 0. Each time the last pixel of a run is reached, the frame signal of the run, the level signal, and the position coordinates of the last pixel of the run are written to one of the memories 1612 or 1613 as one word, and the write address counter 1615 is incremented by one. I do. Here, the pixel position counter 1618 clears at the beginning of the raster and counts up for each pixel in the main scanning direction to output a signal indicating the pixel position in the main scanning direction. What is necessary is just to write the content of this counter 1618 as the last pixel position of the run. Each time one run is completed, these operations are repeated until the end of the raster, and the last writing is performed with the last pixel of the raster. Through this series of operations, frame signals of all runs on one raster, level signals, and information on the last pixel position are written in the memory 1612 or 1613 in ascending order of the run position.

そして、次のラスタでこの情報を読み取りながら、画
素単位の信号として出力する。まず、各ラスタの最初
に、読み出し用のアドレスカウンタ1614を初期値0にク
リアし、メモリ1612または1613の内容を読み出しレジス
タ1616に書き込む。読み出しレジスタ1616には1番目の
ランの枠信号、レベルおよびそのランの最終画素位置が
書き込まれる。そして、主走査方向の画素位置を示す画
素位置カウンタ1618の内容と読み出しレジスタ1616のラ
ン最終画素位置とを比較器1617で比較する。この比較結
果が等しくなっ時に、読み出し用アドレスカウンタ1614
の内容をカウントアップし、メモリの内容を読み出しレ
ジスタに書き込み、この操作をラスタの終わりまで繰り
返す。この一連の処理により、読み出しレジスタ1616か
ら画素単位に同期して枠信号およびレベル信号が出力さ
れる。
Then, while reading this information with the next raster, it outputs as a signal in pixel units. First, at the beginning of each raster, the read address counter 1614 is cleared to the initial value 0, and the contents of the memory 1612 or 1613 are written to the read register 1616. In the read register 1616, the frame signal and level of the first run and the last pixel position of the run are written. Then, the comparator 1617 compares the content of the pixel position counter 1618 indicating the pixel position in the main scanning direction with the last pixel position of the run of the readout register 1616. When the comparison result becomes equal, the read address counter 1614
, The contents of the memory are read out and written into the register, and this operation is repeated until the end of the raster. Through this series of processing, the frame signal and the level signal are output from the read register 1616 in synchronization with each pixel.

ここで、1ラスタの信号の書き込みと読み出しに2ラ
スタ分の時間がかかるため、メモリを2個用い、一方を
書き込み用、他方を読み出し用として用い、1ラスタご
とに切替え器1619により読み出し操作と書き込み操作を
交互に切り替えることにより、全ラスタの信号を間断な
く処理することができる。
Here, it takes time for two rasters to write and read a signal of one raster, so two memories are used, one is used for writing, and the other is used for reading. By alternately switching the write operation, signals of all rasters can be processed without interruption.

また、本実施例では2個のメモリを用いているが、例
えば1個のメモリを時分割で用いることも可能である。
In this embodiment, two memories are used. However, for example, one memory can be used in a time-division manner.

前述したように地レベルが奇数の部分が枠内領域とな
るので、論理回路1620により、読み出しレジスタ1616か
ら出力されるレベル信号1661の最下位1ビットと枠信号
1662の否定すなわち地信号との論理積をとり、この出力
が枠内信号1671であるとする。ただし、本実施例では枠
部分は領域外とみなしているが、枠部分を領域内とみな
す考え方なども可能である。この場合はレベル信号最下
位1ビットと枠信号の論理和を枠内領域信号とすればよ
い。また、読み出しレジスタ1616から出力される枠信号
およびレベル信号はレベル判別部1601で前ラスタの参照
信号として用いる。
As described above, since the portion where the ground level is an odd number is the region within the frame, the logic circuit 1620 outputs the least significant bit of the level signal 1661 output from the read register 1616 and the frame signal.
The negation of 1662, that is, the logical product with the ground signal, is taken, and this output is assumed to be the in-frame signal 1671. However, in the present embodiment, the frame portion is regarded as being outside the region, but it is also possible to consider the frame portion as being within the region. In this case, the logical sum of the least significant bit of the level signal and the frame signal may be used as the in-frame area signal. The frame signal and the level signal output from the read register 1616 are used by the level determination unit 1601 as a reference signal of the previous raster.

このように、ランを単位にレベルの決定を行うことに
より、ランの終端で確定する判定結果をラン全体の画素
に反映できる。これは、主走査方向と反対の方向に任意
の画素数だけ情報を先読みすることにに相当し、これに
より、主走査方向に連結した領域内ではどちらの方向に
もレベルを継承することができる。通常のラスタスキャ
ン信号に対する画素単位の処理では信号の先読みの画素
数を大きくしようとすると、回路規模が膨大となるので
先読みの画素数は数画素に限られる。また、1ラスタの
信号をメモリに記憶してCPUなどを用いて一括してレベ
ル決定を行うと、メモリのアクセスやレベル決定のため
の計算に高速性が要求される。
As described above, by determining the level in units of the run, the determination result determined at the end of the run can be reflected on the pixels of the entire run. This is equivalent to pre-reading information by an arbitrary number of pixels in the direction opposite to the main scanning direction, whereby the level can be inherited in both directions in a region connected to the main scanning direction. . In a pixel-by-pixel process for a normal raster scan signal, if the number of prefetched pixels of a signal is increased, the circuit scale becomes enormous, so the number of prefetched pixels is limited to several pixels. Also, if one raster signal is stored in a memory and the level is determined collectively by using a CPU or the like, high speed is required for the access to the memory and the calculation for determining the level.

しかし、本実施例のようにラン表現に変換してレベル
決定を行うことにより、ラスタスキャン信号に対し、主
走査方向の方向依存性のないレベル決定を簡易な構成で
行うことができる。
However, by performing the level determination by converting to the run expression as in the present embodiment, it is possible to determine the level of the raster scan signal without direction dependency in the main scanning direction with a simple configuration.

また、このように決定されたレベル情報をラン表現の
まま、全画面分記憶しておくことにより、全画面をスキ
ャンした後も枠領域情報を保存しておくことができる。
ラン表現で記憶することにより、小さいメモリ容量で枠
領域を保存できる。
In addition, by storing the level information determined in this way for the entire screen in the run expression, the frame area information can be stored even after the entire screen is scanned.
By storing in the run expression, the frame area can be saved with a small memory capacity.

この情報を用いることにより、1枚の画像の枠内部分
に、その後でスキャンした2枚目の画像をはめこむ、い
わゆるはめこみ合成処理等が実現できる。
By using this information, it is possible to realize a so-called inset synthesizing process or the like in which the second image scanned afterwards is inserted into the frame portion of one image.

(III)エンコーダ1631 上記の処理を4色の枠色についてそれぞれ独立して行
うことにより、4色の枠内信号1671乃至1674が得られ
る。エンコーダ1631はこれらの信号から領域の色を決定
し、これを領域色信号115として出力する。前記枠内信
号1671乃至1674は複数の色枠について独立して枠内領域
を検出しているため、複数の色枠の内部である領域が発
生する可能性がある。そこで、領域色決定部であるエン
コーダ1631でこの複数の色から1つの色を決定する。本
実施例では、色枠に優先順位を設け、次のようなアルゴ
リズムで領域色を決定する。すなわち、まず4色の枠内
信号のうちすべてが0の領域はどの色の枠内にも入らな
い領域とし、この領域色を便宜上黒と定義する。また、
4色の枠内信号のうち1色のみが1の場合は1である枠
色を領域色とする。そして、同時に2色以上の枠信号が
1となった場合には1となる枠色のうち優先順位の高い
枠色を領域色とする。本実施例では枠色の優先順位を
赤、緑、青、黄の順としてエンコーダ1631に入出力関係
を第18図に示すように設定し、領域色信号115に変換し
ている。
(III) Encoder 1631 By performing the above processing independently for each of the four frame colors, the four-color in-frame signals 1671 to 1674 are obtained. The encoder 1631 determines the color of the area from these signals, and outputs this as the area color signal 115. Since the in-frame signals 1671 to 1674 detect the in-frame regions independently for a plurality of color frames, there is a possibility that an area inside the plurality of color frames may occur. Therefore, one color is determined from the plurality of colors by the encoder 1631 which is an area color determination unit. In this embodiment, priorities are assigned to the color frames, and the region color is determined by the following algorithm. That is, first, an area where all the signals are 0 in the four-color in-frame signals is an area that does not fall within any of the color frames, and this area color is defined as black for convenience. Also,
When only one of the four in-frame signals is 1, the frame color of 1 is set as the region color. When two or more frame signals become 1 at the same time, a frame color having a higher priority among frame colors that become 1 is set as an area color. In this embodiment, the input / output relationship is set in the encoder 1631 as shown in FIG. 18 with the priority order of the frame colors in the order of red, green, blue, and yellow, and is converted into the area color signal 115.

本実施例では複数の枠内領域が重複した場合に色の優
先関係でその色を決めているが、これは本発明により限
定されるものではなく、例えば異なる色枠間の包含関係
により優先順位を定めるなどの方法をとってもなんら支
障はない。
In the present embodiment, when a plurality of in-frame areas overlap, the color is determined by the color priority relationship. However, this is not limited by the present invention. For example, the priority order is determined by the inclusion relationship between different color frames. There is no hindrance to taking such measures as determining

〈画像編集処理部105及び画像記録部106〉 次に、画像編集処理部105は枠内領域検出部104で検出
された枠内信号にしたがって、枠内領域に操作者の指定
した編集処理を施す。本実施例では、編集処理として色
の置き換え処理およびマスキング処理を行う場合につい
て説明する。色の置き換え処理は枠内領域の黒部分を指
定した色に置き換えるもので、また、マスキング処理は
枠内領域の黒部分を消去する(白色に置き換える)もの
である。この処理は例えば黒信号352と領域色信号355と
を入力とし、記録信号を出力とする書き替え可能な色置
換テーブルにより実現することができる。
<Image Editing Processing Unit 105 and Image Recording Unit 106> Next, the image editing processing unit 105 performs editing processing specified by the operator on the in-frame area according to the in-frame signal detected by the in-frame area detection unit 104. . In the present embodiment, a case will be described in which color replacement processing and masking processing are performed as editing processing. The color replacement process replaces the black portion of the in-frame region with a designated color, and the masking process deletes the black portion of the in-frame region (replaces with white). This processing can be realized by, for example, a rewritable color replacement table that receives a black signal 352 and an area color signal 355 as input and outputs a recording signal.

枠色と処理との関係は操作者がコントロールパネルか
ら指定することができ、この指定内容にしたがった色置
換テーブルの内容を書き替える。例えば、赤、緑、青の
枠色の枠内領域に対してはその枠色と同じ色への置換を
行い、黄色の枠色の枠内領域に対してマスキング処理を
行う場合には、テーブルの入出力関係を例えば第19図の
ように設定する。すなわち、黒信号が0の場合には記録
信号として白を出力し、黒信号が1でかつ領域色信号が
赤、緑、青の場合はそれぞれ赤、緑、青を表す記録信号
を出力し、黒色信号が1でかつ領域色信号が黄色の場合
は白を表す記録信号を出力する。また、黒色信号が1で
かつ領域色信号が黒の場合は黒を表す記録信号を出力す
る。最後に、この記録信号にしたがって、画像記録部30
5で記録紙面上に画像を記録する。これにより、例えば
第20図(a)に示すようなモノクロ画像に色枠を書き加
えた画像[第20図(b)]を入力して、第20図(c)に
示すような編集画像を記録することができる。すなわ
ち、操作者が各枠色に対応させて指定した色置換処理や
マスキング処理などを実現することがきる。
The operator can specify the relationship between the frame color and the processing from the control panel, and rewrites the content of the color replacement table according to the specified content. For example, if the area inside the red, green, and blue frame colors is replaced with the same color as the frame color, and the area inside the yellow frame color is masked, the table Are set, for example, as shown in FIG. That is, when the black signal is 0, white is output as a recording signal, and when the black signal is 1 and the area color signal is red, green, and blue, a recording signal representing red, green, and blue is output, When the black signal is 1 and the area color signal is yellow, a recording signal representing white is output. When the black signal is 1 and the area color signal is black, a recording signal representing black is output. Finally, according to this recording signal, the image recording unit 30
In step 5, an image is recorded on the recording paper. Thereby, for example, an image [FIG. 20 (b)] in which a color frame is added to a monochrome image as shown in FIG. 20 (a) is input, and an edited image as shown in FIG. 20 (c) is input. Can be recorded. That is, a color replacement process, a masking process, and the like designated by the operator in correspondence with each frame color can be realized.

なお、本実施例では編集処理として指定枠内の色置換
処理としてマスキング処理のみを行っているが、このよ
うな処理に限るものではなく、枠内領域すべてに色付け
する色付け処理や、枠内領域に他の部分の画像を移動す
るはめ込み合成処理などにも応用できる。
In the present embodiment, only the masking process is performed as the color replacement process in the designated frame as the editing process. However, the present invention is not limited to such a process. Can be applied to an inset synthesizing process in which an image of another portion is moved.

以上のような構成によりモノクロ原稿上に書き加えた
色枠に応じて、色置換などの編集処理を行うカラー画像
編集装置を実現できる。特に、本発明を用いて枠、他に
レベルを定義することにより、2重以上の枠線や下向き
凹部の枠線に囲まれた領域も正しく検出でき、操作者に
とって使いやすい画像編集装置が実現できる。
With the above configuration, it is possible to realize a color image editing apparatus that performs editing processing such as color replacement in accordance with a color frame added to a monochrome original. In particular, by defining a frame and other levels using the present invention, an area surrounded by a frame line of double or more and a frame line of a downward concave portion can be correctly detected, thereby realizing an image editing device which is easy for the operator to use. it can.

なお、本実施例では画像メモリを用いずにラスタスキ
ャンの画像信号に対してパイプライン処理を行ってい
る。しかし、本発明はこのようなパイプライン処理への
適用に限るものではなく、例えば、画像メモリに記憶さ
れた画像を順次1ラスタずつ読み取りながら、本実施例
に示す枠内領域検出処理を行い、検出した枠内領域情報
を再び画像メモリに書き込むような装置にも適用でき
る。また、CPUなどを用いて、本実施例のアルゴリズム
にしたがって、ソフトウェアにより枠内領域検出処理を
行う方法も可能である。この場合、画像をランダムスキ
ャンして枠内領域を検出するアルゴリズムに比して、領
域検出能力は劣る場合もあるが処理速度は極めて速い。
In this embodiment, pipeline processing is performed on a raster scan image signal without using an image memory. However, the present invention is not limited to the application to such pipeline processing. For example, while reading the images stored in the image memory one raster at a time, the in-frame area detection processing shown in the present embodiment is performed. The present invention is also applicable to an apparatus in which the detected in-frame area information is written into the image memory again. In addition, a method of performing an in-frame area detection process by software using a CPU or the like according to the algorithm of the present embodiment is also possible. In this case, the processing speed is extremely high, although the area detection capability may be inferior to an algorithm for detecting an area in a frame by randomly scanning an image.

次に、本発明の第2の実施例に係るカラー画像編集装
置について説明する。本実施例が第1の実施例と異なっ
ている点は、枠内領域検出処理である。したがって、こ
こでは本実施例における枠内領域検出処理について説明
する。第21図に枠内領域検出処理のアルゴリズムを示
す。このアルゴリズムでは地の画素に地レベルという属
性を与え、前ラスタの枠信号、地レベル、現ラスタの枠
信号および既に決定した現ラスタの地レベルにより現ラ
スタの地部分の地レベルを決定する。そして、地レベル
により枠の内外を判定する。この処理を1ラスタごと進
めながら順次繰り返すことにより、画像全面について枠
内領域を検出する。
Next, a color image editing apparatus according to a second embodiment of the present invention will be described. This embodiment is different from the first embodiment in the in-frame area detection processing. Therefore, here, the in-frame area detection processing in this embodiment will be described. FIG. 21 shows an algorithm of the in-frame area detection processing. In this algorithm, an attribute called a ground level is given to the ground pixel, and the ground level of the ground portion of the current raster is determined based on the frame signal of the previous raster, the ground level, the frame signal of the current raster, and the ground level of the current raster already determined. Then, the inside and outside of the frame are determined based on the ground level. This processing is sequentially repeated while advancing one raster at a time, thereby detecting an in-frame area for the entire image.

現ラスタの地部分の地レベルの決定手順を第22図に示
す。まず、第1の実施例と同様に第0ラスタを仮想的に
考える。第0ラスタはすべての画素が地でかつその地レ
ベルは0とする。次に、第1ラスタ以降の各ラスタの地
レベルを以下の手順で判定していく。
FIG. 22 shows a procedure for determining the ground level of the ground portion of the current raster. First, the 0th raster is virtually considered as in the first embodiment. In the 0th raster, all pixels are ground and the ground level is 0. Next, the ground level of each raster after the first raster is determined in the following procedure.

まず、当該ラスタの枠信号P(x)をラン表現に変換
する。そして、地のランについて次の規則にしたがって
地レベルを決定していく。
First, the frame signal P (x) of the raster is converted into a run expression. Then, the ground level is determined for the ground run according to the following rules.

ランRnに隣接する地のランが前ラスタに1つだけある
場合は、そのランの地レベルをランRnの地レベルとする
[第23図(a)]。
If there is only one run on the ground before the run Rn, the ground level of the run is set to the ground level of the run Rn [FIG. 23 (a)].

ランRnに隣接する地のランが前ラスタに複数ある場合
は、その複数のランの地レベルのうち最小値をランRnの
地レベルとする[第23図(b)]。
When there are a plurality of runs on the ground adjacent to the run Rn in the preceding raster, the minimum value among the ground levels of the plurality of runs is set as the ground level of the run Rn [FIG. 23 (b)].

そして、これらの条件を満たさないラン、すなわち、
Rnに隣接する地のランが前ラスタに1つもない場合[第
23図(c)]は、前記のまたはに規則によりレベル
が確定したランのうちランRnを挟んでかつランRnに最も
近い2つのランレベルをL1,L2とし、L1,L2の関係により
次の規則によってランRnのレベルLnを決定する。ただ
し、ランRnの両側もしくはそのいずれかにレベルの確定
したランのない場合は確定したランのない側のレベルを
0として決定する。
And a run that does not satisfy these conditions, that is,
If there is no run in the previous raster adjacent to Rn [No.
23 (c)] shows that, among the runs whose levels have been determined by the above or rules, the two run levels sandwiching the run Rn and closest to the run Rn are L1 and L2, and the following relationship is obtained based on the relationship between L1 and L2. The rule determines the level Ln of the run Rn. However, when there is no run whose level has been determined on both sides of the run Rn or any of them, the level on the side having no determined run is determined as 0.

L1−L2が奇数ならば Ln=max(L1,L2) L1−L2が偶数ならば Ln=max(L1,L2)+1 規則により、主走査方向および副走査方向に下方向
に連結した地部分はその他レベルを継承する。また、他
部分から上凸の枠線により隔てられた新たな地部分が生
じる場合[第23図(a)]は規則により、外側の地部
分のレベルに1を加えた値が新たに生じた地部分の地レ
ベルとなり、枠の内側は外側より地レベルが1だけ大き
くなる。したがって、このように決定された地レベルは
第1の実施例と同様に、偶数ならば枠外領域、奇数なら
ば枠内領域を表す。また、規則,により枠線にひげ
のある場合にもひげの部分以外は正しく判定される。し
たがって、以下第1の実施例と同様の処理を行うことに
より、2重以上の枠や下向き凹部の枠線に対しても正し
く枠内領域を検出することができる。
If L1-L2 is odd, Ln = max (L1, L2) If L1-L2 is even, Ln = max (L1, L2) +1 According to the rule, the ground part connected in the main scanning direction and sub-scanning direction is Inherit other levels. In the case where a new ground portion is separated from the other portion by an upwardly convex frame line (FIG. 23 (a)), a value obtained by adding 1 to the level of the outer ground portion is newly generated by a rule. The ground level is the ground level, and the ground level inside the frame is larger than the ground level by one. Therefore, as in the first embodiment, the ground level determined in this way represents an out-of-frame area if an even number, and an in-frame area if an odd number. In addition, even if the frame has a beard, rules other than the beard are correctly determined according to the rules. Therefore, by performing the same processing as in the first embodiment, the in-frame area can be correctly detected even with respect to a frame of a double or more frame or a frame of a downward concave portion.

[発明の効果] 以上詳述したように、本発明を用いて枠内検出を行う
ことにより、二重以上の枠線や下方に凹部が形成された
枠線に囲まれた領域においても下側の凹部や二重枠の内
部を枠の外であると検出することができ、位相的かつ常
識的に合理的な枠内検出を行うことができる。また、手
書きに起因して生じる枠線上のひげなどにも安定な検出
を行うことができる。また、レベル決定の前に枠部分を
優先した間引きを行うことにより、枠線を消失すること
なく信号量を減らすことができる。また、レベル決定の
際にランを単位に処理を行うことにより、1回の走査で
レベル決定を行うことができる。これらの処理を併用す
ることにより、枠内検出の処理の規模を簡素化でき、本
発明を効率的に実現することができる。
[Effects of the Invention] As described above in detail, by performing the in-frame detection using the present invention, the lower side can be obtained even in an area surrounded by a double or more frame line or a frame line having a concave portion formed below. The inside of the concave portion or the double frame can be detected as being outside the frame, and a reasonable in-frame detection can be performed topologically and with common sense. In addition, stable detection can be performed even on a beard on a frame generated due to handwriting. In addition, by performing thinning with priority given to the frame portion before determining the level, the signal amount can be reduced without losing the frame line. In addition, when the level is determined, the processing is performed in units of runs, so that the level can be determined by one scan. By using these processes together, the scale of the in-frame detection process can be simplified, and the present invention can be realized efficiently.

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

第1図乃至第20図は本発明の第1の実施例に係るカラー
画像編集装置を説明するための図で、第1図は装置の全
体構成を示すブロック図、第2図は色判定部における色
判定方法を説明するための図、第3図は間引きの処理部
の動作を説明するための図、第4図および第5図は枠内
領域検出部のアルゴリズムを示す流れ図、第6図は隣接
する2ラスタの連接関係を説明するための図、第7図は
画素の隣接関係を説明するための図、第8図は枠線内の
レベル決定を説明するための図、第9図は円形の枠線の
枠内領域の検出例を説明するための図、第10図は下側凹
部を有する枠線の枠内領域の検出例を説明するための
図、第11図はドーナツ状領域を示す図、第12図はドーナ
ツ状領域を指定するための枠線を示す図、第13図は3重
の枠線の枠内領域の検出例を説明するための図、第14図
は開いた枠線を示す図、第15図はひげのある枠線を示す
図、第16図は枠内領域検出部の具体的な構成を示す図、
第17図は枠内領域検出部におけるレベル判定論理回路の
入出力関係を示す図、第18図は内領域検出部におけるエ
ンコーダ回路の入出力関係を示す図、第19図は色置換テ
ーブルの入出力関係を示す図、第20図は画像編集処理例
を示す図、第21図乃至第23図は第2の実施例に係るカラ
ー画像編集装置を説明するための図で、第21図および第
22図は枠内領域検出のアルゴリズムを示す流れ図、第23
図は隣接する2ラスタ連接関係を説明するための図、第
24図は従来の枠内領域検出の問題点を説明するための図
である。 101……画像入力部、102……色判定部、103……間引き
処理部、104……枠内領域検出部、105……画像編集処理
部、106……画像記録部、1601乃至1604……レベル判定
部、1605乃至1608……メモリ部、1609……判定論理回
路、1610……内部状態レジスタ、1611……出力レジス
タ、1612,1613……メモリ、1614,1615……アドレスカウ
ンタ、1616……読み出しレジスタ、1617……比較器、16
18……画素位置カウンタ、1619……切替え器、1620……
論理回路、1631……エンコーダ、1641……デコーダ。
1 to 20 are views for explaining a color image editing apparatus according to a first embodiment of the present invention. FIG. 1 is a block diagram showing the overall configuration of the apparatus, and FIG. , FIG. 3 is a diagram for explaining the operation of the thinning processing unit, FIGS. 4 and 5 are flowcharts showing an algorithm of the in-frame area detecting unit, and FIG. FIG. 7 is a diagram for explaining the connection relationship between two adjacent rasters, FIG. 7 is a diagram for explaining the adjacency relationship of the pixels, FIG. 8 is a diagram for explaining the level determination within the frame, FIG. Is a diagram for explaining an example of detection of the in-frame region of the circular frame line, FIG. 10 is a diagram for explaining an example of detection of the in-frame region of the frame line having the lower concave portion, and FIG. 11 is a donut shape FIG. 12 is a diagram showing a region, FIG. 12 is a diagram showing a frame for designating a donut-shaped region, and FIG. 13 is detection of a region within a frame of a triple frame. FIG. 14 is a diagram illustrating an open frame, FIG. 15 is a diagram illustrating a bearded frame, and FIG. 16 is a diagram illustrating a specific configuration of an in-frame area detection unit. ,
FIG. 17 is a diagram showing the input / output relationship of the level determination logic circuit in the in-frame region detection unit, FIG. 18 is a diagram showing the input / output relationship of the encoder circuit in the inside region detection unit, and FIG. FIG. 20 is a diagram showing an output relationship, FIG. 20 is a diagram showing an example of an image editing process, and FIGS. 21 to 23 are diagrams for explaining a color image editing apparatus according to the second embodiment.
FIG. 22 is a flowchart showing an algorithm for detecting an area within a frame, and FIG.
The figure is a diagram for explaining the adjacent two raster connection relationship.
FIG. 24 is a diagram for explaining the problem of the conventional in-frame area detection. 101 image input unit, 102 color determination unit, 103 thinning processing unit, 104 area detection unit within frame, 105 image editing processing unit, 106 image recording unit, 1601 to 1604 Level determination section, 1605 to 1608 Memory section, 1609 Determination logic circuit, 1610 Internal state register, 1611 Output register, 1612, 1613 Memory, 1614, 1615 Address counter, 1616 Read register, 1617 ... Comparator, 16
18 ... Pixel position counter, 1619 ... Switcher, 1620 ...
Logic circuit, 1631 ... encoder, 1641 ... decoder.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭57−176482(JP,A) 特開 昭63−56763(JP,A) 特開 昭61−80473(JP,A) (58)調査した分野(Int.Cl.6,DB名) G06T 7/40 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-57-176482 (JP, A) JP-A-63-56763 (JP, A) JP-A-61-80473 (JP, A) (58) Field (Int.Cl. 6 , DB name) G06T 7/40

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】ラスタスキャンにより得られた画像信号を
枠部分と枠部分以外である地部分に識別する識別手段
と、 前記識別手段により識別された前記画像信号の各ラスタ
の枠部分の連結領域である枠ランおよび地部分の連結領
域である地ランのそれぞれのレベルを記憶する記憶手段
と、 前記記憶手段により記憶されたレベルを前ラスタの枠ラ
ンおよび地ランのそれぞれのレベルとし、該レベルを参
照して現ラスタの枠ランおよび地ランのそれぞれのレベ
ルを決定するレベル決定手段と、 前記レベル決定手段により決定された現ラスタの枠ラン
および地ランのそれぞれのレベルを参照して、現ラスタ
の地部分が枠の内であるか外であるかを判定する判定手
段とを具備したことを特徴とする枠内領域検出装置。
1. An identification means for identifying an image signal obtained by a raster scan into a frame portion and a ground portion other than the frame portion, and a connection area of a frame portion of each raster of the image signal identified by the identification means. Storage means for storing respective levels of a frame run and a ground run which is a connection area of the ground portion, and the levels stored by the storage means as the respective levels of the frame run and the ground run of the previous raster; Level determining means for determining the respective levels of the frame run and the ground run of the current raster with reference to the current raster and the respective levels of the frame run and the ground run of the current raster determined by the level determining means. Determining means for determining whether the ground portion of the raster is inside or outside the frame;
【請求項2】画像信号から各画素ごとに枠色か地色かを
判別する手段と、 ある画素数を単位に前記画像信号をグループ分けし、そ
のグループ内の全ての画素が地色の場合に地色を出力
し、そのグループ内に1画素以上の枠色がある場合にそ
の枠色のうちいずれかの枠色を間引いて出力する手段
と、 この手段により出力された枠色の情報から枠内領域を検
出する手段とを具備したことを特徴とする枠内領域検出
装置。
2. A means for determining whether each pixel is a frame color or a ground color from an image signal, and the image signals are grouped in units of a certain number of pixels, and all the pixels in the group are ground color. Means for outputting a background color to a frame color, and when there is a frame color of one pixel or more in the group, outputting one of the frame colors by thinning out the frame color. Means for detecting an in-frame area.
JP15054689A 1989-06-15 1989-06-15 In-frame area detection device Expired - Fee Related JP2947566B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15054689A JP2947566B2 (en) 1989-06-15 1989-06-15 In-frame area detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15054689A JP2947566B2 (en) 1989-06-15 1989-06-15 In-frame area detection device

Publications (2)

Publication Number Publication Date
JPH0317787A JPH0317787A (en) 1991-01-25
JP2947566B2 true JP2947566B2 (en) 1999-09-13

Family

ID=15499241

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15054689A Expired - Fee Related JP2947566B2 (en) 1989-06-15 1989-06-15 In-frame area detection device

Country Status (1)

Country Link
JP (1) JP2947566B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3786213B2 (en) * 1993-03-24 2006-06-14 株式会社東芝 Image forming apparatus
JP3090848B2 (en) * 1994-06-28 2000-09-25 株式会社東芝 In-frame area rectangularization device
JP4499811B2 (en) 2008-05-28 2010-07-07 株式会社トキワ Coating material extrusion container

Also Published As

Publication number Publication date
JPH0317787A (en) 1991-01-25

Similar Documents

Publication Publication Date Title
US5028991A (en) Image signal processing apparatus for use in color image reproduction
JP4568460B2 (en) Image processing apparatus and recording medium
US5644366A (en) Image reproduction involving enlargement or reduction of extracted contour vector data for binary regions in images having both binary and halftone regions
JP3636332B2 (en) Image processing method and image processing apparatus
JPH02295348A (en) Picture processor
JPH1084475A (en) Image area determination method and image processing apparatus
JP2947566B2 (en) In-frame area detection device
JPH11298716A (en) Image processing device
JPH05316377A (en) Picture processing unit
US6798544B1 (en) Image reading method, image reading device and image processing device
JP2000022943A (en) Device and method for discriminating image area, and recording medium recorded with image area discriminating program
JP2006031245A (en) Image processing method and image processing apparatus by contour tracking of digital image
JPS6359272A (en) Picture processor
JP2557480B2 (en) Color image processor
JP3584329B2 (en) Image forming device
JPH07123240A (en) Method and apparatus for domain signal generation in digital image processing system
JP2921860B2 (en) Frame attribute determination device
JPH0550187B2 (en)
JP2812401B2 (en) Image processing device
JP2557481B2 (en) Color image processor
JP2557479B2 (en) Color image processor
JP2556336B2 (en) Color image processor
JPH02295351A (en) Picture processing system
JPH02295347A (en) Picture processor
JP2006203939A (en) Image processing device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees