JPH06333038A - Image processor - Google Patents

Image processor

Info

Publication number
JPH06333038A
JPH06333038A JP5148723A JP14872393A JPH06333038A JP H06333038 A JPH06333038 A JP H06333038A JP 5148723 A JP5148723 A JP 5148723A JP 14872393 A JP14872393 A JP 14872393A JP H06333038 A JPH06333038 A JP H06333038A
Authority
JP
Japan
Prior art keywords
area
data
area data
contour line
contour
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP5148723A
Other languages
Japanese (ja)
Other versions
JP3354629B2 (en
Inventor
Yukio Yamaguchi
幸男 山口
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP14872393A priority Critical patent/JP3354629B2/en
Publication of JPH06333038A publication Critical patent/JPH06333038A/en
Application granted granted Critical
Publication of JP3354629B2 publication Critical patent/JP3354629B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To provide an image processor which can curely perform a designated area processing job even at an intersecting point or an apex of each area and even at a part where both areas are approximate to each other. CONSTITUTION:An image processor contains a bit map memory which stores the contents of the area processing job carried out to the subject image data as the area data having the prescribed length in the main scanning direction. Then the image processor applies an area processing job to a part held between the area data of the same kind in a single line and in response to the types of these area data. Then an area processing control part decides whether the area data to be newly written is overlapping or not the existing area data already written on a bit map (S601) when the area data are written on the bit map. If the new area data overlaps the existing one, the position of the new area data is corrected in the main scanning direction based on the position of the existing area data (S602).

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は,プリンタ,デジタル複
写機等に使用される画像処理装置に関し,より詳細に
は,入力された対象画像データの指定された領域に任意
の画像処理(エリア処理)を施して外部に出力する画像
処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus used in a printer, a digital copying machine, or the like, and more specifically, to an arbitrary image processing (area processing) in a designated area of input target image data. ) And output to the outside.

【0002】[0002]

【従来の技術】デジタル複写機等の画像処理装置では,
通常のコピー時には読み取り原稿全体に対して画像処理
が均一に行われるが,例えば,絵柄や,文字や写真が混
在した原稿に対する画像処理や,特殊効果を得るための
画像処理では,読み取り原稿の特定の領域に対して他の
領域と異なる画像処理が行われる。このような場合に
は,画像処理装置において処理対象となる閉領域(エリ
ア)が指定されると共に,画像処理内容(エリアデー
タ)が指定され,前記閉領域内の画像に対して指定内容
の画像処理(エリア処理)が行われる。
2. Description of the Related Art In an image processing apparatus such as a digital copying machine,
During normal copying, image processing is performed uniformly on the entire read document, but for example, image processing for a document with a mixture of pictures, characters, and photographs, or image processing for obtaining a special effect, specifies the read document. The image processing that is different from the other areas is performed on the area. In such a case, the closed area (area) to be processed in the image processing apparatus is specified, the image processing content (area data) is specified, and the image of the specified content is specified for the image in the closed area. Processing (area processing) is performed.

【0003】このような画像処理装置として,例えば,
特開昭59−45765号公報に開示されている「画像
処理装置」がある。この装置は,ビットマップメモリに
あらかじめ処理のオン/オフに対応する切り換え情報を
記憶しておき,画像処理中にあってはラスター走査の信
号にしたがってビットマップメモリ内のデータを順に読
み出して処理のオン/オフ制御に供する構成としたもの
である。
As such an image processing apparatus, for example,
There is an "image processing device" disclosed in Japanese Patent Laid-Open No. 59-45765. In this device, switching information corresponding to ON / OFF of processing is stored in a bitmap memory in advance, and during image processing, data in the bitmap memory is sequentially read according to a raster scanning signal to perform processing. The configuration is used for on / off control.

【0004】ところが,ビットマップメモリに記憶され
るデータが画像処理のオン/オフ制御に直結しているた
め,制御を行う画像処理の種類が増加するに伴ってビッ
トマップメモリを深さ方向に増設する必要があり,大容
量のメモリが必要となるという欠点がある。従って,実
質的には複数種の画像処理の切換制御を行うことができ
ないという不都合があった。
However, since the data stored in the bit map memory is directly connected to the on / off control of the image processing, the bit map memory is expanded in the depth direction as the type of image processing to be controlled increases. However, there is a drawback that a large capacity memory is required. Therefore, there is a disadvantage that switching control of a plurality of types of image processing cannot be performed substantially.

【0005】このため,これを解決するものとして,対
象画像データに対するエリア処理の内容を,主走査方向
に対して所定の長さを有したエリアデータとして記憶す
るビットマップメモリを備え,1ライン中において同種
エリアデータで挟まれる部分に対して,該エリアデータ
の種類に応じたエリア処理を施す画像処理装置が提案さ
れている。この装置によれば,特に大容量のメモリを必
要とせず,矩形あるいは非矩形の領域に対して複数種類
のエリア処理の切換制御を行うことができる。
Therefore, in order to solve this, a bit map memory for storing the contents of the area processing for the target image data as area data having a predetermined length in the main scanning direction is provided, and There is proposed an image processing apparatus that performs area processing according to the type of area data on a portion sandwiched by area data of the same type. According to this device, it is possible to perform switching control of a plurality of types of area processing for a rectangular or non-rectangular area without requiring a large capacity memory.

【0006】[0006]

【発明が解決しようとする課題】しかしながら,上記従
来の技術によれば,エリアデータが主走査方向に対して
所定の長さを有しているため,エリアの交点や頂点,お
よびエリアどうしの近接部において,エリアデータをビ
ットマップメモリに書き込む際に,新たに書き込むエリ
アデータが既にビットマップ上に書き込まれている既存
のエリアデータと重なってしまい,新たに書き込むエリ
アデータによって既存のエリアデータが上書きされて消
えてしまうという問題点があった。換言すれば,既存の
エリアデータで指定された内容のエリア処理を行うこと
ができない恐れがあるという問題点があった。
However, according to the above-mentioned conventional technique, since the area data has a predetermined length in the main scanning direction, the intersections or vertices of the areas and the proximity of the areas to each other. Part, when writing area data to the bitmap memory, the newly written area data overlaps the existing area data already written on the bitmap, and the newly written area data overwrites the existing area data. There was a problem that it was erased and disappeared. In other words, there is a problem that it may not be possible to perform area processing with the contents specified by the existing area data.

【0007】また,ビットマップメモリ上の1ラインの
主走査方向において,出現するエリアデータの順序でエ
リア処理を実行するため,複数のエリアデータによって
複数のエリアが指定された際に,指定された複数のエリ
アにおいて重複する領域がある場合には,必ずしも所望
のエリア処理を施した出力を得ることができない恐れが
あるという問題点があった。
Further, since the area processing is executed in the order of the appearing area data in the main scanning direction of one line on the bit map memory, it is specified when a plurality of areas are specified by a plurality of area data. If there are overlapping areas in a plurality of areas, there is a problem that it may not always be possible to obtain an output that has been subjected to desired area processing.

【0008】また,上記従来の技術によれば,指定され
たエリアに対して複数種類のエリア処理を行うことがで
きるものの,エリアを矩形あるいは非矩形の領域として
指定する構成であるため,原稿画像の任意の閉ループ内
のみに対して選択的にエリア処理を施すことができず,
使い勝手が悪いという問題点があった。
Further, according to the above-mentioned conventional technique, although a plurality of types of area processing can be performed on the designated area, the area is designated as a rectangular or non-rectangular area, so that the original image Area processing cannot be performed selectively only within an arbitrary closed loop of
There was a problem that it was not easy to use.

【0009】本発明は上記に鑑みてなされたものであっ
て,エリアの交点や頂点,およびエリアどうしの近接部
においても,確実に指定されたエリア処理を実行できる
ことを第1の目的とする。
The present invention has been made in view of the above, and it is a first object of the present invention that it is possible to surely execute designated area processing even at intersections and vertices of areas and in the vicinity of areas.

【0010】また,本発明は上記に鑑みてなされたもの
であって,複数のエリアが指定された場合に,後に指定
されたエリアが優先されて処理された画像出力を得るこ
とを第2の目的とする。
Further, the present invention has been made in view of the above, and when a plurality of areas are designated, a second designated area is given priority to obtain a processed image output. To aim.

【0011】また,本発明は上記に鑑みてなされたもの
であって,予めエリア処理前に読み込んだ画像データか
ら輪郭線情報を取得することにより,その輪郭内部(閉
ループ)に対して任意のエリア処理を施せるようにする
ことを第3の目的とする。
Further, the present invention has been made in view of the above, and by acquiring the contour line information from the image data read in advance before the area processing, an arbitrary area with respect to the inside of the contour (closed loop) is obtained. The third purpose is to enable processing.

【0012】[0012]

【課題を解決するための手段】本発明は上記の目的を達
成するために,対象画像データに対するエリア処理の内
容を,主走査方向に対して所定の長さを有したエリアデ
ータとして記憶するビットマップメモリを備え,1ライ
ン中において同種エリアデータで挟まれる部分に対し
て,該エリアデータの種類に応じたエリア処理を施す画
像処理装置において,前記エリアデータをビットマップ
メモリに書き込む際に,新たに書き込むエリアデータが
既にビットマップ上に書き込まれている既存のエリアデ
ータと重なるか否かを判定する判定手段と,前記判定手
段で既存のエリアデータと重なると判定された場合,既
存のエリアデータの位置に基づいて,新たに書き込むエ
リアデータの位置を主走査方向に補正する書込位置補正
手段とを備えた画像処理装置を提供するものである。
In order to achieve the above object, the present invention is a bit for storing the contents of area processing for target image data as area data having a predetermined length in the main scanning direction. In an image processing apparatus that includes a map memory and performs area processing according to the type of area data on a portion sandwiched by area data of the same type in one line, when writing the area data to a bit map memory, Determining means for determining whether or not the area data to be written to the existing area data already written on the bit map, and if the determining means determines to overlap with the existing area data, the existing area data An image including a writing position correcting means for correcting the position of newly written area data in the main scanning direction based on the position of There is provided a management device.

【0013】また,前述した構成に加えて,複数のエリ
アデータによって複数のエリアが指定された際に,指定
された複数のエリアにおいて重複する領域がある場合,
あらかじめエリアデータ毎に設定された優先順位に基づ
いて,重複した領域に対するエリア処理として最も優先
順位の高いエリアデータを選択するエリアデータ選択手
段を備えた画像処理装置を提供するものである。
In addition to the above-mentioned structure, when a plurality of areas are designated by a plurality of area data, if there are overlapping areas in the designated plurality of areas,
An image processing apparatus provided with area data selection means for selecting area data having the highest priority as area processing for overlapping areas based on a priority set in advance for each area data.

【0014】また,対象画像データに対するエリア処理
の内容を,主走査方向に対して所定の長さを有したエリ
アデータとして記憶するビットマップメモリを備え,1
ライン中において同種エリアデータで挟まれる部分に対
して,該エリアデータの種類に応じたエリア処理を施す
画像処理装置において,対象画像の2値化データを前記
ビットマップメモリに取り込んで,ビットマップメモリ
上の2値化データに対して輪郭追跡処理を施し,輪郭線
情報を抽出する輪郭線抽出手段と,前記輪郭線抽出手段
で抽出した輪郭線情報を記憶する輪郭線記憶手段と,前
記輪郭線抽出手段による輪郭線情報の抽出の終了後,前
記ビットマップメモリをクリアし,前記輪郭線記憶手段
に記憶されている輪郭線情報に基づいて,エリアデータ
をビットマップメモリに書き込むエリアデータ書込手段
とを備えた画像処理装置を提供するものである。
Further, a bitmap memory for storing the contents of the area processing for the target image data as area data having a predetermined length in the main scanning direction is provided.
In an image processing device that performs area processing according to the type of area data on a portion sandwiched by similar area data in a line, the binarized data of the target image is taken into the bitmap memory, and the bit map memory Contour tracking processing is performed on the above binarized data to extract contour line information, contour line storage means for storing the contour line information extracted by the contour line extraction unit, and the contour line. Area data writing means for clearing the bit map memory after the extraction of the contour line information by the extracting means and writing area data in the bit map memory based on the contour line information stored in the contour line storing means And an image processing apparatus including.

【0015】また,前述した構成に加えて,2値化デー
タに太らせ処理を施す画像太らせ処理手段を備え,前記
ビットマップメモリに取り込む対象画像の2値化データ
が,太らせ処理後の画像データとするものである。
In addition to the above-mentioned configuration, an image thickening processing means for thickening the binarized data is provided, and the binarized data of the target image to be taken into the bitmap memory is This is image data.

【0016】また,前記輪郭線抽出手段は,前記ビット
マップメモリ上の2値化データから輪郭線情報を抽出す
る際に,輪郭線が途中で途切れている場合,輪郭線が途
切れた位置より,所定方向・所定範囲のビットマップメ
モリ上に存在する画像を検出し,検出位置より輪郭追跡
処理を継続するものである。
Further, when the contour line extracting means extracts the contour line information from the binarized data on the bitmap memory, if the contour line is interrupted on the way, An image existing on a bitmap memory in a predetermined direction and a predetermined range is detected, and the contour tracking process is continued from the detected position.

【0017】また,前記輪郭線抽出手段は,前記ビット
マップメモリ上の2値化データから輪郭線情報を抽出す
る際に,輪郭線の輪郭長を検出して,所定のしきい値と
比較し,前記輪郭長がしきい値より小さい場合には,検
出した輪郭線情報を破棄し,あらたに別の輪郭線を検出
して輪郭線情報の抽出を行うものである。
Further, the contour line extracting means detects the contour length of the contour line when extracting the contour line information from the binarized data on the bitmap memory, and compares it with a predetermined threshold value. When the contour length is smaller than the threshold value, the detected contour line information is discarded, another contour line is newly detected, and the contour line information is extracted.

【0018】また,前記輪郭線抽出手段は,前記ビット
マップメモリ上の2値化データから輪郭線情報を抽出す
る際に,追跡している輪郭線が内輪郭・外輪郭の何れで
あるかを検出し,外輪郭である場合には,検出した輪郭
線情報を破棄し,あらたに別の輪郭線を検出して輪郭線
情報の抽出を行うものである。
Further, when the contour line extraction means extracts the contour line information from the binarized data on the bitmap memory, it is determined whether the contour line being traced is an inner contour or an outer contour. If the detected contour is an outer contour, the detected contour information is discarded, another contour is newly detected, and the contour information is extracted.

【0019】また,前記エリアデータ書込手段は,エリ
アデータをビットマップメモリに書き込む際に,書き込
み位置が輪郭線上になるように補正するものである。
The area data writing means corrects the writing position so that the writing position is on the contour line when writing the area data in the bit map memory.

【0020】[0020]

【作用】本発明の画像処理装置(請求項1)は,エリア
データをビットマップメモリに書き込む際に,新たに書
き込むエリアデータが既にビットマップ上に書き込まれ
ている既存のエリアデータと重なるか否かを判定し,既
存のエリアデータと重なる場合には,既存のエリアデー
タの位置に基づいて,新たに書き込むエリアデータの位
置を主走査方向に補正することにより,既存のエリアデ
ータを失うことなく,確実にビットマップメモリに記憶
させる。
According to the image processing apparatus (Claim 1) of the present invention, when the area data is written in the bitmap memory, whether the newly written area data overlaps with the existing area data already written on the bitmap or not. If it overlaps with the existing area data, the position of the newly written area data is corrected in the main scanning direction based on the position of the existing area data so that the existing area data is not lost. , Make sure to store in bitmap memory.

【0021】また,本発明の画像処理装置(請求項2)
は,複数のエリアデータによって複数のエリアが指定さ
れた際に,指定された複数のエリアにおいて重複する領
域がある場合,あらかじめエリアデータ毎に設定された
優先順位に基づいて,重複した領域に対するエリア処理
として最も優先順位の高いエリアデータを選択すること
により,所望のエリア処理を実現する。
An image processing apparatus according to the present invention (claim 2)
When multiple areas are specified by multiple area data, if there are overlapping areas in the specified multiple areas, the area for the overlapping areas is based on the priority set in advance for each area data. The desired area processing is realized by selecting the area data with the highest priority as the processing.

【0022】また,本発明の画像処理装置(請求項3)
は,対象画像の2値化データをビットマップメモリに取
り込んで,ビットマップメモリ上の2値化データに対し
て輪郭追跡処理を施し,輪郭線情報を抽出して所定のメ
モリに記憶する。その後,ビットマップメモリをクリア
し,記憶されている輪郭線情報に基づいて,エリアデー
タをビットマップメモリに書き込むことにより,輪郭線
情報の内部(閉ループ内)をエリアとして取得する。
An image processing apparatus of the present invention (claim 3)
Captures the binarized data of the target image in a bitmap memory, performs contour tracking processing on the binarized data on the bitmap memory, extracts contour line information, and stores it in a predetermined memory. After that, the bitmap memory is cleared, and the area data is written in the bitmap memory based on the stored contour line information to acquire the inside of the contour line information (in the closed loop) as an area.

【0023】また,本発明の画像処理装置(請求項4)
は,ビットマップメモリに取り込む対象画像の2値化デ
ータに太らせ処理を施すことにより,正しく輪郭線情報
を取得する。
An image processing apparatus of the present invention (claim 4)
Corrects the contour line information by performing a thickening process on the binarized data of the target image to be taken into the bitmap memory.

【0024】また,本発明の画像処理装置(請求項5)
は,ビットマップメモリ上の2値化データから輪郭線情
報を抽出する際に,輪郭線が途中で途切れている場合,
輪郭線が途切れた位置より,所定方向・所定範囲のビッ
トマップメモリ上に存在する画像を検出し,検出位置よ
り輪郭追跡処理を継続することにより,正しく輪郭線情
報を取得する。
Further, the image processing apparatus of the present invention (claim 5).
When extracting the contour line information from the binarized data on the bitmap memory, if the contour line is interrupted,
An image existing on the bitmap memory in a predetermined direction and in a predetermined range is detected from the position where the contour line is interrupted, and the contour tracking process is continued from the detected position, whereby the contour line information is correctly acquired.

【0025】また,本発明の画像処理装置(請求項6)
は,ビットマップメモリ上の2値化データから輪郭線情
報を抽出する際に,輪郭線の輪郭長を検出して,所定の
しきい値と比較し,輪郭長がしきい値より小さい場合に
は,検出した輪郭線情報を破棄し,あらたに別の輪郭線
を検出して輪郭線情報の抽出を行うことにより,2値化
データ中の孤立点を判別して,正しく輪郭線情報を取得
する。
Further, the image processing apparatus of the present invention (claim 6).
Detects the contour length of the contour line when extracting the contour line information from the binarized data on the bitmap memory, compares it with a predetermined threshold value, and when the contour length is smaller than the threshold value, Discards the detected contour line information, newly detects another contour line, and extracts the contour line information to determine the isolated points in the binarized data and acquire the contour line information correctly. To do.

【0026】また,本発明の画像処理装置(請求項7)
は,ビットマップメモリ上の2値化データから輪郭線情
報を抽出する際に,追跡している輪郭線が内輪郭・外輪
郭の何れであるかを検出し,外輪郭である場合には,検
出した輪郭線情報を破棄し,あらたに別の輪郭線を検出
して輪郭線情報の抽出を行うことにより,所望の閉ルー
プ(輪郭線情報)を正しく取得する。
An image processing apparatus of the present invention (claim 7)
Detects whether the contour line being tracked is an inner contour or an outer contour when the contour line information is extracted from the binarized data on the bitmap memory. By discarding the detected contour line information, newly detecting another contour line and extracting the contour line information, a desired closed loop (contour line information) is correctly acquired.

【0027】また,本発明の画像処理装置(請求項8)
は,エリアデータをビットマップメモリに書き込む際
に,書き込み位置が輪郭線上になるように補正すること
により,輪郭線付近においても適切にエリアを習得す
る。
An image processing apparatus of the present invention (claim 8)
When writing the area data to the bitmap memory, corrects the writing position so that it is on the contour line, so that the area is properly learned even near the contour line.

【0028】[0028]

【実施例】以下,本発明の画像処理装置をデジタル複写
機に適用した場合を実施例として図面を参照して詳細に
説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The case where the image processing apparatus of the present invention is applied to a digital copying machine will be described in detail below as an embodiment with reference to the drawings.

【0029】図1は,本実施例の画像処理装置を適用し
たデジタル複写機のブロック構成図を示し,原稿を読み
取ってラスタースキャン型の画像データを出力する画像
読取部101と,エリア処理を含む各種画像処理を施す
本実施例の画像処理装置としての画像処理部102と,
画像処理後の画像データを記録紙に出力する画像記録部
103と,エリア処理におけるエリア指定用の座標を入
力するためのディジタイザ104と,上記各部を制御す
るシステム制御部105とから構成される。
FIG. 1 is a block diagram of a digital copying machine to which the image processing apparatus of the present embodiment is applied, which includes an image reading unit 101 for reading a document and outputting raster scan type image data, and area processing. An image processing unit 102 as an image processing apparatus of the present embodiment which performs various image processing;
An image recording unit 103 that outputs image data after image processing to recording paper, a digitizer 104 for inputting coordinates for area designation in area processing, and a system control unit 105 that controls each of the above units.

【0030】図2は,画像処理部102の構成を示し,
画像読取部101から入力した画像データに空間フィル
タ処理を施すフィルタ処理部201と,フィルタ処理部
201から入力した画像データに対して,影付け,中抜
き(輪郭抽出),ネガポジ反転の順で加工処理を施す加
工処理部202と,加工処理部202から入力した画像
データに対して濃度調整,ディザ,イレースの順で処理
を施す中間調処理部203と,画像読取部101から解
像度400dpiの2値化データ(画像データ)を入力
し,100dpiの2値化データに変換する400/1
00変換部204と,画像データに対するエリア処理の
内容を,主走査方向に対して所定の長さ(本実施例で
は,4ビット)を有したエリアデータとして記憶するビ
ットマップメモリ205と,ビットマップメモリ205
に対するエリアデータの書き込み制御およびエリアデー
タに基づくエリア処理の制御を行うエリア処理制御部2
06と,後述する閉ループモードにおいて,輪郭追跡処
理で抽出した輪郭線情報を記憶する輪郭線記憶手段とし
てもRAM207とを備えている。
FIG. 2 shows the structure of the image processing unit 102.
A filter processing unit 201 that performs a spatial filter process on the image data input from the image reading unit 101, and the image data input from the filter processing unit 201 is processed in the order of shadowing, hollowing (outline extraction), and negative / positive inversion. A processing unit 202 that performs processing, a halftone processing unit 203 that processes the image data input from the processing unit 202 in the order of density adjustment, dithering, and erasing, and a binary value with a resolution of 400 dpi from the image reading unit 101. Input the digitized data (image data) and convert it to 100 dpi binarized data 400/1
00 conversion unit 204, a bit map memory 205 for storing the contents of the area processing for the image data as area data having a predetermined length (4 bits in this embodiment) in the main scanning direction, and a bit map. Memory 205
Area control unit 2 for controlling writing of area data to the area and controlling area processing based on the area data
06 and a RAM 207 as a contour line storage unit for storing the contour line information extracted by the contour tracking process in the closed loop mode described later.

【0031】図3は,エリア処理に使用するエリアデー
タのデータ構造を示す。本実施例では,エリアデータを
4ビットで構成し,先頭1ビットが「1」でエリアデー
タの開始を示し,後の3ビットで8種類のエリア番号を
指定可能としている。このエリア番号はエリアの指定順
序を示す。
FIG. 3 shows the data structure of area data used for area processing. In this embodiment, the area data is composed of 4 bits, the first 1 bit is "1" to indicate the start of the area data, and the latter 3 bits can specify 8 types of area numbers. This area number indicates the order of area designation.

【0032】従って,ビットマップメモリ205のエリ
ア処理を開始するビットの座標に,エリアデータの先頭
ビットの座標を一致させて,先頭ビットを含めむ4ビッ
トを用いてエリアデータを書き込むことになる。また,
エリアデータが4ビットの長さを有しているため,先頭
ビットの書き込み位置(座標)から前後3ビットの範囲
に既存のエリアデータの先頭ビットが存在する場合に
は,エリアデータの書き込み位置が重複することにな
る。
Therefore, the coordinates of the first bit of the area data are made to coincide with the coordinates of the bit for starting the area processing of the bit map memory 205, and the area data is written using 4 bits including the first bit. Also,
Since the area data has a length of 4 bits, if the leading bit of the existing area data exists within a range of 3 bits before and after the writing position (coordinates) of the leading bit, the writing position of the area data is It will overlap.

【0033】図4は,エリア処理の対象となるエリア
(領域)を指定する方法を示し,図示の如く,矩形モー
ド,直角多角形モード,多角形モード,閉ループモード
の4つのモードで指定することが可能である。矩形モー
ドは,同図(a)に示すように,2点(,)の指定
順序は任意で,指定された2点の対角線上の矩形をエリ
アとして入力するものである。また,直角多角形モード
は,同図(b)に示すように,始点()の位置,指定
の回転方向が任意で,指定された順序(〜)で各点
を直角の頂点とする多角形をエリアとして入力するもの
である。また,多角形モードは,同図(c)に示すよう
に,始点()の位置,指定の回転方向が任意で,指定
された順序(〜)で各点を直線で結んだ多角形をエ
リアとして入力するものである。ここで,各点の入力は
ディジタイザ104を介して行われる。なお,〜の
点をエリア指定点を呼ぶ。
FIG. 4 shows a method of designating an area (area) to be subjected to area processing. As shown in the figure, it is designated in four modes of a rectangular mode, a rectangular polygon mode, a polygon mode and a closed loop mode. Is possible. In the rectangular mode, as shown in (a) of the figure, the designation order of two points (,) is arbitrary, and a rectangle on the diagonal line of the designated two points is input as an area. In the right-angled polygon mode, as shown in FIG. 7B, the position of the starting point () and the specified rotation direction are arbitrary, and the polygons with each point as a right-angled vertex in the specified order (...) Is input as an area. In the polygon mode, as shown in FIG. 7C, the position of the start point () and the specified rotation direction are arbitrary, and a polygon that connects each point with a straight line in the specified order (to) is an area. Is to be entered as. Here, the input of each point is performed via the digitizer 104. The points designated by are called area designation points.

【0034】また,閉ループモードは,同図(d)に示
すように,原稿上の閉ループ内の一点(図中の×)をデ
ィジタイザ104を介して指定した後,プレスキャンに
よって原稿画像を2値化データとして入力し,さらに輪
郭線を抽出することにより,閉ループを認識し,閉ルー
プ内をエリアとして入力するものである。
In the closed loop mode, as shown in FIG. 3D, a point in the closed loop (X in the figure) on the original is designated via the digitizer 104, and then the original image is binarized by prescanning. The closed loop is recognized by inputting it as converted data and further extracting the contour line, and the inside of the closed loop is input as an area.

【0035】以上の構成において, (1)矩形モード,直角多角形モード,多角形モードの
エリア入力 (2)エリアデータの出力 (3)閉ループモードのエリア入力 (3−1)開始ポイント検出処理 (3−2)輪郭追跡処理 (3−3)孤立点・内閉ループ検出処理 の順序で,その動作を詳細に説明する。
In the above configuration, (1) rectangular mode, right-angled polygon mode, polygon mode area input (2) area data output (3) closed loop mode area input (3-1) start point detection processing ( 3-2) Contour tracking process (3-3) Isolated point / inner closed loop detection process The operation will be described in detail.

【0036】(1)矩形モード,直角多角形モード,多
角形モードのエリア入力 図5は,矩形モード,直角多角形モード,多角形モード
でのエリア入力のフローチャートを示す。先ず,操作部
(図示せず)を介してエリア処理を指定した後,ディジ
タイザ104を用いて,図4(a)〜(c)に示したよ
うに,エリア指定点の座標を入力することにより,エリ
ア処理を施す領域(エリア)を指定する(S501)。
(1) Area Input in Rectangular Mode, Right-angled Polygon Mode, and Polygonal Mode FIG. 5 shows a flowchart of area input in the rectangular mode, right-angled polygon mode, and polygonal mode. First, after the area processing is designated through the operation unit (not shown), the digitizer 104 is used to input the coordinates of the area designation points as shown in FIGS. , A region (area) to be subjected to area processing is designated (S501).

【0037】エリア処理制御部206は,エリア指定点
の座標に基づいて,エリア処理を施すエリアの輪郭線の
座標を演算し(S502),求めた座標およびエリアの
指定順序に基づいて,ビットマップメモリ205にエリ
アデータを書き込むエリアデータ書き込み処理を実行す
る(S503)。なお,ビットマップメモリ205はエ
リア指定を開始する前にあらかじめクリア(全てのビッ
トが「0」に設定)されているものとする。
The area processing control unit 206 calculates the coordinates of the contour line of the area to be subjected to the area processing based on the coordinates of the area designation points (S502), and based on the obtained coordinates and the designation order of the areas, the bit map. Area data write processing for writing area data to the memory 205 is executed (S503). It is assumed that the bitmap memory 205 has been cleared (all bits are set to “0”) before the area designation is started.

【0038】図6は,ステップS503のエリアデータ
書き込み処理の詳細フローを示す。エリア処理制御部2
06は,エリアデータをビットマップメモリ205に書
き込む際に,先ず,ビットマップメモリ205上におい
て,書き込もうとする注目エリアデータの書き込み位置
に既存のエリアデータ(既に書き込まれているエリアデ
ータ)があるか否かを判定する(S601)。具体的に
は,エリアデータが4ビットの長さを有しているため,
注目エリアデータの先頭ビットの書き込み位置から前後
3ビットの範囲に既存のエリアデータの先頭ビットが存
在するか否か検索し,既存のエリアデータの先頭ビット
がある場合には注目エリアデータの書き込み位置と重複
する,すなわち,既存のエリアデータが存在すると判定
する。
FIG. 6 shows a detailed flow of the area data writing process in step S503. Area processing control unit 2
When writing area data to the bit map memory 205, first, is there any existing area data (area data already written) at the write position of the attention area data to be written on the bit map memory 205? It is determined whether or not (S601). Specifically, since the area data has a length of 4 bits,
It is searched whether or not the leading bit of the existing area data exists within the range of 3 bits before and after the writing position of the leading bit of the attention area data. If the leading bit of the existing area data exists, the writing position of the attention area data , That is, existing area data exists.

【0039】ステップS601で既存のエリアデータが
あると判定された場合には,既存のエリアデータの先頭
ビットの座標に基づいて,注目エリアデータの書き込み
位置を±4ドットの範囲で主走査方向に移動させて,書
き込み位置の補正を行う(S602)。ここで,注目エ
リアデータの書き込み位置の補正を行うのは,注目エリ
アデータをそのままの座標で書き込むと,既存のエリア
データが上書きされてしまい,既存のエリアデータが消
えてしまったり,あるいは,エリアデータの内容が変わ
ってしまう恐れがあるためである。また,±4ドットの
範囲で主走査方向に移動させるのは,エリアデータが4
ドットで構成されているためである。なお,本実施例で
は,注目エリアデータの書き込み位置を補正する構成と
したが,注目エリアデータの書き込み位置あるいは既存
のエリアデータの書き込み位置のどちらを補正しても良
いのは勿論である。
If it is determined in step S601 that there is existing area data, the writing position of the area data of interest is within the range of ± 4 dots in the main scanning direction based on the coordinates of the first bit of the existing area data. It is moved to correct the writing position (S602). Here, the correction of the writing position of the attention area data is performed by writing the attention area data with the coordinates as it is, the existing area data is overwritten and the existing area data is erased, or This is because the content of the data may change. The area data is moved in the main scanning direction within ± 4 dots.
This is because it is composed of dots. In this embodiment, the writing position of the attention area data is corrected, but it goes without saying that either the writing position of the attention area data or the writing position of the existing area data may be corrected.

【0040】一方,ステップS601で既存のエリアデ
ータがないと判定された場合,およびステップS602
で注目エリアデータの書き込み位置を補正した後,注目
エリアデータをビットマップメモリ205に書き込む
(S603)。その後,全てのエリアデータの書き込み
が終了するまでS601〜S603を繰り返して処理を
終了する(S604)。なお,エリア処理制御部206
は,エリアの指定順序に応じてエリア番号を割り付けて
エリアデータを書き込むとともに,エリア番号に対応さ
せてエリア処理の内容をテーブルとして内部のメモリに
記憶する。
On the other hand, when it is determined in step S601 that there is no existing area data, and in step S602.
After the writing position of the attention area data is corrected by, the attention area data is written in the bitmap memory 205 (S603). After that, S601 to S603 are repeated until the writing of all area data is completed, and the processing is completed (S604). The area processing control unit 206
Writes area data by allocating area numbers according to the order in which the areas are specified, and stores the contents of area processing as a table in the internal memory corresponding to the area numbers.

【0041】(2)エリアデータの出力 次に,エリア処理制御部206によるエリアデータの出
力処理について説明する。エリア処理制御部206は,
ビットマップメモリ205に書き込まれているエリアデ
ータを,1ライン(副走査方向)ずつ読み出して,主走
査方向に1ドットずつ検索してエリアデータを検出し,
エリアデータ中のエリア番号に応じて,エリアデータの
書き込み時に作成したテーブルを参照してエリア処理の
内容を特定し,フィルタ処理部201,加工処理部20
2,中間調処理部203を制御してエリア処理の内容に
応じた画像処理を実行する。
(2) Area Data Output Next, area data output processing by the area processing control unit 206 will be described. The area processing control unit 206
The area data written in the bitmap memory 205 is read line by line (in the sub-scanning direction) and searched one dot in the main scanning direction to detect the area data.
According to the area number in the area data, the contents of the area processing are specified by referring to the table created at the time of writing the area data, and the filter processing unit 201 and the processing processing unit 20 are specified.
2. The halftone processing unit 203 is controlled to execute the image processing according to the content of the area processing.

【0042】図7は,エリアデータの出力処理のフロー
チャートを示し,先ず,注目ライン(1ライン)中にエ
リア(領域)の重複するエリアデータがあるかを判定し
(S701),エリアの重複するエリアデータがある場
合には,それぞれのエリアデータ(エリア番号)を比較
し,重複する部分に関しては優先順位の高いエリアデー
タを選択し(S702),ステップS703へ進む。こ
こで,エリア番号の大きいエリアデータが後から指定さ
れたエリアであり,本実施例では,後から指定されたエ
リアを優先的に処理することを前提として,エリア番号
の大きなエリアデータの優先順位が高いものとする。
FIG. 7 shows a flow chart of area data output processing. First, it is judged whether or not there is area data in which the area (region) overlaps in the target line (1 line) (S701), and the area overlaps. If there is area data, the respective area data (area numbers) are compared, area data having a higher priority is selected for the overlapping portion (S702), and the process proceeds to step S703. Here, the area data having a large area number is an area specified later, and in this embodiment, the priority order of the area data having a large area number is premised on preferentially processing the area specified later. Shall be high.

【0043】一方,エリアの重複するエリアデータがな
い場合には,ステップS703において,エリアデータ
に基づいて,1ライン分のエリア処理を実行する。
On the other hand, if there is no area data in which the areas overlap, in step S703, area processing for one line is executed based on the area data.

【0044】その後,ビットマップメモリ205内の全
てのラインが終了するまで上記ステップS701〜S7
03を繰り返し,処理を終了する(S704)。
After that, steps S701 to S7 are executed until all the lines in the bit map memory 205 are completed.
03 is repeated, and the process ends (S704).

【0045】(3)閉ループモードのエリア入力 次に,本発明の要部である閉ループモードのエリア入力
について説明する。図8は,閉ループモードのエリア入
力処理のフローチャートを示す。閉ループモードのエリ
ア入力は,操作部(図示せず)を用いて閉ループモード
を指定し,原稿上の閉ループ内の一点(指定ポイント)
をディジタイザ104を介して指定した後,エリア処理
制御部206によって実行される。
(3) Area Input in Closed Loop Mode Next, the area input in the closed loop mode, which is a main part of the present invention, will be described. FIG. 8 shows a flowchart of area input processing in the closed loop mode. For area input in closed loop mode, the closed loop mode is specified using the operation unit (not shown), and one point (specified point) in the closed loop on the document is specified.
Is designated via the digitizer 104, and then executed by the area processing control unit 206.

【0046】先ず,プレスキャンによって原稿画像を2
値化データとして入力し(S801),次に,開始ポイ
ント検出処理で閉ループを検出するための輪郭線の開始
点(座標)を求め(S802),さらに輪郭追跡処理で
輪郭線を抽出し(S803),孤立点・内閉ループ検出
処理において,輪郭線が孤立点(文字等)や,目的とす
る閉ループ内に存在する内閉ループでないことを確認後
(S804),閉ループのエリアを確定し,エリアデー
タ書き込み処理において,閉ループの座標に基づいてエ
リアデータをビットマップメモリ205に書き込む(S
805)。
First, the original image is divided into two by prescan.
It is input as digitized data (S801), then the start point (coordinates) of the contour line for detecting the closed loop is obtained by the start point detection processing (S802), and the contour line is extracted by the contour tracking processing (S803). ), In the isolated point / inner closed loop detection processing, after confirming that the contour line is not an isolated point (such as a character) or an inner closed loop existing in the target closed loop (S804), the closed loop area is determined, and the area data is determined. In the writing process, the area data is written in the bitmap memory 205 based on the closed loop coordinates (S
805).

【0047】ステップS801の2値化データの入力で
は,原稿をプレスキャンして,原稿読取部101で2値
化画像(解像度400dpi)として読み取り,400
/100変換部204を介して,4×4画素のOR処理
を行って100dpiの2値化データに変換して,ビッ
トマップメモリ205に記憶させる。これによって,結
果的に2値化データの太らせ処理を行ったことになり,
読み取った2値化画像に線切れがあったときでも,ある
程度の線切れ幅(最大3画素の線切れ幅,約0.178
5mm相当)の場合には自動補正される。
In inputting the binarized data in step S801, the document is pre-scanned and read by the document reading unit 101 as a binarized image (resolution 400 dpi).
An OR process of 4 × 4 pixels is performed via the / 100 conversion unit 204 to convert into binary data of 100 dpi, and the binary data is stored in the bitmap memory 205. As a result, it means that the binarized data is thickened.
Even if there is a line break in the read binary image, the line break width to some extent (maximum line break width of 3 pixels, about 0.178
In case of 5 mm), it is automatically corrected.

【0048】(3−1)開始ポイント検出処理 次に,図9を参照して,図8のステップS802の開始
ポイント検出処理について詳細に説明する。先ず,ディ
ジタイザ104を介して指定した指定ポイントの座標に
基づいて,ビットマップメモリ205から指定ポイント
の座標位置の2値化データを入力し(S901),指定
ポイントの画素が黒か否かを判定する(S902)。
(3-1) Start Point Detection Process Next, the start point detection process of step S802 of FIG. 8 will be described in detail with reference to FIG. First, based on the coordinates of the designated point designated via the digitizer 104, the binarized data of the coordinate position of the designated point is input from the bitmap memory 205 (S901), and it is determined whether the pixel of the designated point is black or not. Yes (S902).

【0049】ここで,指定ポイントの画素が黒の場合に
は,エラーとしてシステム制御部105にエラーコード
を出力して(S903),処理を終了する。
Here, if the pixel at the designated point is black, an error code is output to the system control unit 105 as an error (S903), and the process ends.

【0050】一方,指定ポイントの画素が黒でない場
合,すなわち白画素の場合には,指定ポイントの画素を
注目画素に設定し(S904),注目画素の左隣の画素
が黒か否か判定する(S905)。ここで,注目画素の
左隣の画素が黒ならば,左隣の画素を開始ポイントとし
て設定し,その座標をスタックし(S906),処理を
終了する。
On the other hand, if the pixel at the designated point is not black, that is, if it is a white pixel, the pixel at the designated point is set as the pixel of interest (S904), and it is determined whether the pixel to the left of the pixel of interest is black. (S905). If the pixel on the left side of the pixel of interest is black, the pixel on the left side is set as the start point, the coordinates are stacked (S906), and the process ends.

【0051】一方,注目画素の左隣の画素が白ならば,
黒画素を検出するまで逐次左隣の画素を調べ,A3サイ
ズメモリ左端に相当するアドレスまで黒画素が検出され
ない場合には(S907),エラーとしてシステム制御
部105にエラーコードを出力して(S908),処理
を終了する。
On the other hand, if the pixel to the left of the pixel of interest is white,
The pixel on the left is sequentially examined until a black pixel is detected. If no black pixel is detected up to the address corresponding to the left end of the A3 size memory (S907), an error code is output to the system control unit 105 (S908). ), The processing ends.

【0052】上記の処理によって,例えば,図10
(a)の原稿画像の1001で示す部分が,図10
(b)のようにビットマップメモリ205上に2値化デ
ータとして取り込まれており,指定ポイントとして閉ル
ープ内に×で示す位置が指定された場合に,指定ポイン
トの左隣の画素を逐次調べて,黒画素である閉ループ端
の画素を開始ポイントとして得ることになる。
By the above processing, for example, as shown in FIG.
The portion indicated by 1001 in the original image of (a) is shown in FIG.
As shown in (b), when it is fetched as binary data in the bitmap memory 205 and the position indicated by x in the closed loop is designated as the designated point, the pixel to the left of the designated point is sequentially examined. , The pixel at the end of the closed loop, which is a black pixel, is obtained as the starting point.

【0053】(3−2)輪郭追跡処理 次に,図11を参照して,輪郭追跡処理(図8のステッ
プS803)について詳細に説明する。先ず,開始ポイ
ントを注目画素に設定し(S1101),注目画素の左
隣の画素が白・黒のいずれかを判定する(S110
2)。
(3-2) Contour Tracking Process Next, the contour tracking process (step S803 in FIG. 8) will be described in detail with reference to FIG. First, the start point is set to the target pixel (S1101), and it is determined whether the pixel on the left of the target pixel is white or black (S110).
2).

【0054】ステップS1102において白画素なら
ば,注目画素の左隣の画素を始点として,反時計回り
に,8近接画素の最初の黒画素を検出する(S110
3)。ステップS1102において黒画素ならば,注目
画素の左隣の画素を始点として,時計回りに,8近接画
素の最初の白画素の前の黒画素を検出する(S111
0)。
If it is a white pixel in step S1102, the first black pixel of eight adjacent pixels is detected counterclockwise starting from the pixel to the left of the pixel of interest (S110).
3). If it is a black pixel in step S1102, the black pixel before the first white pixel of the eight adjacent pixels is detected clockwise starting from the pixel on the left of the pixel of interest as the starting point (S111).
0).

【0055】ステップS1103あるいはステップS1
104で,黒画素の検出に成功しなかった場合,すなわ
ち8近接画素が全て白画素であった場合,あるいは,全
て黒画素であった場合には(S1105),エラーとし
てシステム制御部105にエラーコードを出力して(S
1106),処理を終了する。ただし,この場合には一
度黒画素として検出された画素(前回の注目画素あるい
は前前回の注目画素)を再度黒画素として検出しないも
のとする。
Step S1103 or step S1
If the black pixel detection is not successful in 104, that is, if the eight adjacent pixels are all white pixels or all are black pixels (S1105), an error is output to the system control unit 105 as an error. Output the code (S
1106), and the process ends. However, in this case, a pixel once detected as a black pixel (previous pixel of interest or previous previous pixel of interest) is not detected again as a black pixel.

【0056】また,黒画素の検出に成功した場合には
(S1105),検出した黒画素と注目画素との相対位
置よりチェインコードを求めて,黒画素の座標値および
チェインコードを輪郭線情報としてRAM207にスタ
ックし(S1107),所定のカウンタをカウントアッ
プして輪郭追跡処理を開始してからの通算の画素数をカ
ウントする(S1108)。次に,検出画素をあらたな
注目画素として(S1109),あらたな注目画素と開
始ポイントとが一致するまでステップS1102以下の
ステップを繰り返し,あらたな注目画素と開始ポイント
とが一致したら処理を終了する(S1110)。
If the black pixel is successfully detected (S1105), the chain code is obtained from the relative position between the detected black pixel and the target pixel, and the coordinate value of the black pixel and the chain code are used as contour line information. The pixels are stacked in the RAM 207 (S1107), a predetermined counter is counted up, and the total number of pixels after the contour tracking process is started is counted (S1108). Next, the detected pixel is set as a new target pixel (S1109), the steps from step S1102 are repeated until the new target pixel and the start point match, and the process ends when the new target pixel and the start point match. (S1110).

【0057】上記の輪郭追跡処理によって,例えば,図
12(a)に示すように,閉ループの内側の領域におい
て,指定ポイントが指定され,指定ポイントから開始ポ
イントが求められている場合には,矢印の進行方向で示
すようにして閉ループの輪郭追跡が実施され,閉ループ
が輪郭として習得される。
By the contour tracing process, for example, as shown in FIG. 12A, when the designated point is designated in the area inside the closed loop and the start point is obtained from the designated point, the arrow The closed-loop contour tracking is performed as indicated by the direction of travel of, and the closed-loop is acquired as the contour.

【0058】ところが,図12(b)あるいは図12
(c)に示すように,本来検出したい閉ループと指定ポ
イントとの間に文字や,内閉ループ(閉ループ内閉ルー
プ)が存在した場合には,開始ポイント検出処理で文字
や,内閉ループの黒画素を開始ポイントとして検出する
ため,輪郭追跡処理で文字や,内閉ループの輪郭追跡を
行ってしまう場合がある。このため,輪郭追跡処理の後
に孤立点・内閉ループ検出処理を実行して,文字および
内閉ループが検出されいないか判定する。
However, FIG. 12B or FIG.
As shown in (c), when there is a character or an inner closed loop (closed loop inner closed loop) between the originally desired closed loop and the specified point, the start point detection process detects a character or a black pixel of the inner closed loop. Since it is detected as the start point, there are cases where the contour tracing processing may perform tracing of characters or the contour of the inner closed loop. Therefore, the isolated point / inner closed loop detection process is executed after the contour tracking process to determine whether or not the character and the inner closed loop are detected.

【0059】(3−3)孤立点・内閉ループ検出処理 次に,図13を参照して,孤立点・内閉ループ検出処理
(図8のステップS804)について詳細に説明する。
先ず,開始ポイントと同じY座標の画素のチェインコー
ドを検出し(S1301),チェインコードが下方向か
否かを判定する(S1302)。ここで,チェインコー
ドが下方向の場合には,注目画素に対して右下,左下,
下のいずれかの方向で黒画素が検出されたことを示す。
換言すれば,指定ポイントが検出した閉ループの外側に
存在することを示すため,エラーとしてシステム制御部
105にエラーコードを出力して(S1303),処理
を終了する。
(3-3) Isolated Point / Inner Closed Loop Detection Processing Next, the isolated point / inner closed loop detection processing (step S804 in FIG. 8) will be described in detail.
First, the chain code of the pixel having the same Y coordinate as the start point is detected (S1301), and it is determined whether the chain code is in the downward direction (S1302). Here, when the chain code is downward, the lower right, lower left, and
Indicates that a black pixel has been detected in one of the following directions.
In other words, in order to indicate that the designated point exists outside the detected closed loop, an error code is output to the system control unit 105 as an error (S1303), and the process ends.

【0060】一方,チェインコードが下方向でない場合
には,画素カウント値(輪郭追跡処理を開始してからの
通算の画素数:輪郭画素数)と所定のしきい値とを比較
し(S1304),画素カウント値がしきい値以下であ
れば,孤立点と見なし,エラーとしてシステム制御部1
05にエラーコードを出力して(S1305),処理を
終了する。
On the other hand, if the chain code is not in the downward direction, the pixel count value (total number of pixels after the contour tracing process is started: number of contour pixels) is compared with a predetermined threshold value (S1304). If the pixel count value is less than or equal to the threshold value, it is regarded as an isolated point and an error is detected by the system control unit 1.
An error code is output to 05 (S1305), and the process ends.

【0061】エリア処理制御部206は,孤立点・内閉
ループ検出処理でエラーが検出されなかった場合に,閉
ループが正しく検出されたと判断し,先ず,ビットマッ
プメモリ205をクリアし,続いて,RAM207内に
スタックされている輪郭線情報に基づいて,エリアデー
タが輪郭線上になるように,すなわち,エリアデータの
先頭ビットが輪郭線上の黒画素の位置に重なるように補
正して,エリアデータをビットマップメモリ205に書
き込む。なお,このときのエリアデータ書き込み処理
は,図6のフローチャートと基本的に同様であるので説
明を省略する。
When no error is detected in the isolated point / inner closed loop detection processing, the area processing control unit 206 determines that the closed loop is correctly detected, first clears the bitmap memory 205, and then the RAM 207. Based on the contour line information stacked in the area, the area data is corrected so that the area data is on the contour line, that is, the first bit of the area data is overlapped with the position of the black pixel on the contour line. Write to map memory 205. The area data writing process at this time is basically the same as the flowchart of FIG.

【0062】また,前述したの実施例では,輪郭追跡処
理,孤立点・内閉ループ検出処理でエラーを検出したら
システム制御部105へエラーコードを出力して処理を
終了するようにしたが,エリア処理制御部206におい
て,エラーの内容に応じて,輪郭追跡を行う注目画素の
位置を補正して輪郭追跡処理を再度実行するようにして
も良い。
Further, in the above-described embodiment, when an error is detected in the contour tracking processing and the isolated point / inner closed loop detection processing, an error code is output to the system control unit 105 to terminate the processing. In the control unit 206, the position of the pixel of interest for contour tracing may be corrected and the contour tracing processing may be executed again according to the content of the error.

【0063】また,前述した実施例の輪郭追跡処理で
は,ステップS1105,S1106において,黒画素
の検出に成功しなかった場合に,エラーとして処理を終
了したが,原稿画像が薄くて,2値化データの輪郭線が
途中で切れている場合もあるので,例えば,図14に示
すように,黒画素の検出に成功しなかった位置(その時
の注目画素)より,所定方向・所定範囲のビットマップ
メモリ205上に存在する画素を検出し,黒画素が検出
された場合にその黒画素の位置より輪郭追跡処理を継続
することにより,所定の範囲で輪郭線が切れた場合に
は,輪郭追跡処理を中止することなく,閉ループを検出
することができる。図14においては,画素を検出する
方向を過去の注目画素の進行方向の左右を含む前方向と
し,注目画素から3画素離れた位置の画素までを検出し
ている。
In the contour tracing process of the above-described embodiment, if the black pixels are not successfully detected in steps S1105 and S1106, the process ends as an error, but the original image is thin and binarized. Since the contour line of the data may be cut off in the middle, for example, as shown in FIG. 14, a bit map of a predetermined direction and a predetermined range from a position (a target pixel at that time) at which the black pixel is not successfully detected. A pixel existing on the memory 205 is detected, and when a black pixel is detected, the contour tracing process is continued from the position of the black pixel, so that the contour tracing process is performed when the contour line is cut in a predetermined range. The closed loop can be detected without stopping. In FIG. 14, the pixel detection direction is the forward direction including the left and right of the traveling direction of the past target pixel, and pixels up to three pixels away from the target pixel are detected.

【0064】また,輪郭追跡処理において,ビットマッ
プメモリ205上の2値化データから輪郭線情報を抽出
する際に,注目画素周辺の画像の有無,注目画素周辺の
2値化データの白・黒および注目画素の前後の輪郭線方
向に応じて,エリアデータの書き込み禁止/許可情報を
生成し,輪郭線情報と共に前記禁止/許可情報をRAM
207に記憶し,エリアデータ書き込み処理において,
エリアデータをビットマップメモリに書き込む際に,前
記禁止/許可情報に基づいて,エリアデータの書き込み
位置を補正するようにしても良い。
Further, in the contour tracking processing, when the contour line information is extracted from the binarized data on the bit map memory 205, the presence or absence of an image around the pixel of interest and the white / black of the binarized data around the pixel of interest. Area information write prohibition / permission information is generated according to the contour direction before and after the target pixel, and the prohibition / permission information is stored in RAM together with the contour line information.
207, and in the area data writing process,
When writing the area data in the bitmap memory, the writing position of the area data may be corrected based on the prohibition / permission information.

【0065】[0065]

【発明の効果】以上説明したように本発明の画像処理装
置は,対象画像データに対するエリア処理の内容を,主
走査方向に対して所定の長さを有したエリアデータとし
て記憶するビットマップメモリを備え,1ライン中にお
いて同種エリアデータで挟まれる部分に対して,該エリ
アデータの種類に応じたエリア処理を施す画像処理装置
において,前記エリアデータをビットマップメモリに書
き込む際に,新たに書き込むエリアデータが既にビット
マップ上に書き込まれている既存のエリアデータと重な
るか否かを判定する判定手段と,前記判定手段で既存の
エリアデータと重なると判定された場合,既存のエリア
データの位置に基づいて,新たに書き込むエリアデータ
の位置を主走査方向に補正する書込位置補正手段とを備
えたため,エリアの交点や頂点,およびエリアどうしの
近接部においても,確実に指定されたエリア処理を実行
することができる。
As described above, the image processing apparatus of the present invention includes a bitmap memory for storing the contents of the area processing for the target image data as area data having a predetermined length in the main scanning direction. An area to be newly written when the area data is written in a bit map memory in an image processing device that performs area processing according to the type of the area data for a portion sandwiched by the same type area data in one line. The determination means for determining whether or not the data overlaps with the existing area data already written on the bit map, and when the determination means determines that the data overlaps with the existing area data, the position of the existing area data is determined. Based on the writing position correction means for correcting the position of newly written area data in the main scanning direction, Intersections and vertices, and also in the proximity of each other area, it is possible to reliably perform the specified area process.

【0066】また,本発明の画像処理装置は,複数のエ
リアデータによって複数のエリアが指定された際に,指
定された複数のエリアにおいて重複する領域がある場
合,あらかじめエリアデータ毎に設定された優先順位に
基づいて,重複した領域に対するエリア処理として最も
優先順位の高いエリアデータを選択するエリアデータ選
択手段を備えたため,複数のエリアが指定された場合
に,後に指定されたエリアを優先的に処理した画像出力
を確実に得ることができる。
In the image processing apparatus of the present invention, when a plurality of areas are designated by a plurality of area data, if there are overlapping areas in the designated plurality of areas, the area data is set in advance for each area data. Since the area data selecting means for selecting the area data having the highest priority as the area processing for the overlapping area based on the priority order is provided, when a plurality of areas are specified, the area specified later is given priority. It is possible to surely obtain the processed image output.

【0067】また,本発明の画像処理装置は,対象画像
データに対するエリア処理の内容を,主走査方向に対し
て所定の長さを有したエリアデータとして記憶するビッ
トマップメモリを備え,1ライン中において同種エリア
データで挟まれる部分に対して,該エリアデータの種類
に応じたエリア処理を施す画像処理装置において,対象
画像の2値化データを前記ビットマップメモリに取り込
んで,ビットマップメモリ上の2値化データに対して輪
郭追跡処理を施し,輪郭線情報を抽出する輪郭線抽出手
段と,前記輪郭線抽出手段で抽出した輪郭線情報を記憶
する輪郭線記憶手段と,前記輪郭線抽出手段による輪郭
線情報の抽出の終了後,前記ビットマップメモリをクリ
アし,前記輪郭線記憶手段に記憶されている輪郭線情報
に基づいて,エリアデータをビットマップメモリに書き
込むエリアデータ書込手段とを備えたため,予めエリア
処理前に読み込んだ画像データから輪郭線情報を取得す
ることにより,その輪郭内部(閉ループ)に対して任意
のエリア処理を施すことができる。また,エリア処理の
指定の簡単化およびエリア処理の使い勝手を向上させる
ことができる。
Further, the image processing apparatus of the present invention is provided with a bit map memory for storing the contents of the area processing for the target image data as area data having a predetermined length in the main scanning direction, In an image processing device that performs area processing according to the type of the area data on a portion sandwiched by the same type area data, the binarized data of the target image is fetched in the bitmap memory, and stored in the bitmap memory. Contour tracking processing is performed on the binarized data to extract contour line information, contour line storage means for storing the contour line information extracted by the contour line extraction means, and the contour line extraction means. After the contour line information is extracted by the above, the bitmap memory is cleared, and the error is deleted based on the contour line information stored in the contour line storage means. Since the area data writing means for writing data to the bit map memory is provided, by acquiring the contour line information from the image data read in advance before the area processing, arbitrary area processing can be performed on the inside of the contour (closed loop). Can be given. Further, it is possible to simplify the designation of area processing and improve the usability of area processing.

【0068】また,本発明の画像処理装置は,太らせ処
理後の画像データをビットマップメモリに取り込むた
め,原稿画像の輪郭線が薄い場合や,途切れている場合
も,ある程度の範囲で輪郭線の抽出を行え,正しく輪郭
線情報を検出して,適切なエリア処理を施すことができ
る。
Further, since the image processing apparatus of the present invention loads the image data after the thickening processing into the bit map memory, even if the contour line of the original image is thin or discontinuous, the contour line is within a certain range. Can be extracted, contour information can be correctly detected, and appropriate area processing can be performed.

【0069】また,本発明の画像処理装置は,ビットマ
ップメモリ上の2値化データから輪郭線情報を抽出する
際に,輪郭線が途中で途切れている場合,輪郭線が途切
れた位置より,所定方向・所定範囲のビットマップメモ
リ上に存在する画像を検出し,検出位置より輪郭追跡処
理を継続するため,原稿画像の輪郭線が途切れている場
合も,ある程度の範囲で輪郭線の抽出を行え,正しく輪
郭線情報を検出して,適切なエリア処理を施すことがで
きる。
Further, in the image processing apparatus of the present invention, when the contour line is interrupted when extracting the contour line information from the binarized data on the bit map memory, from the position where the contour line is interrupted, An image existing in the bitmap memory in a predetermined direction and a predetermined range is detected, and contour tracing processing is continued from the detected position. Therefore, even if the contour line of the original image is interrupted, the contour line can be extracted within a certain range. Therefore, it is possible to correctly detect contour line information and perform appropriate area processing.

【0070】また,本発明の画像処理装置は,ビットマ
ップメモリ上の2値化データから輪郭線情報を抽出する
際に,輪郭線の輪郭長を検出して,所定のしきい値と比
較し,前記輪郭長がしきい値より小さい場合には,検出
した輪郭線情報を破棄し,あらたに別の輪郭線を検出し
て輪郭線情報の抽出を行うため,原稿画像中に孤立点や
閉ループ画像でない画像が存在する場合にも,正しい輪
郭線情報を習得し,適切なエリア処理を施すことができ
る。
Further, the image processing apparatus of the present invention detects the contour length of the contour line when extracting the contour line information from the binarized data on the bit map memory and compares it with a predetermined threshold value. If the contour length is smaller than the threshold value, the detected contour line information is discarded, another contour line is newly detected, and the contour line information is extracted. Even if there is an image that is not an image, it is possible to learn correct contour information and perform appropriate area processing.

【0071】また,本発明の画像処理装置は,ビットマ
ップメモリ上の2値化データから輪郭線情報を抽出する
際に,追跡している輪郭線が内輪郭・外輪郭の何れであ
るかを検出し,外輪郭である場合には,検出した輪郭線
情報を破棄し,あらたに別の輪郭線を検出して輪郭線情
報の抽出を行うため,原稿画像中のエリアとして指定す
る閉ループ内に他の閉ループが存在している場合にも,
正しい輪郭線情報を習得し,適切なエリア処理を施すこ
とができる。
Further, the image processing apparatus of the present invention, when extracting the contour line information from the binarized data on the bit map memory, determines whether the traced contour line is the inner contour or the outer contour. If the detected contour is an outer contour, the detected contour information is discarded, another contour is newly detected, and the contour information is extracted. Therefore, the contour information is extracted in a closed loop specified as an area in the original image. If there are other closed loops,
You can learn correct contour information and perform appropriate area processing.

【0072】また,本発明の画像処理装置は,エリアデ
ータをビットマップメモリに書き込む際に,書き込み位
置が輪郭線上になるように補正するため,得られた輪郭
線情報に応じて閉ループ内部に任意のエリア処理を施す
際に,輪郭線付近においても適切なエリア処理を施した
画像出力を得ることができる。
Further, since the image processing apparatus of the present invention corrects the writing position so that the writing position is on the contour line when writing the area data in the bit map memory, the image processing apparatus can arbitrarily set the inside of the closed loop according to the obtained contour line information. When performing the area processing of, it is possible to obtain an image output that has been subjected to the appropriate area processing even near the contour line.

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

【図1】本実施例の画像処理装置を適用したデジタル複
写機のブロック構成図である。
FIG. 1 is a block configuration diagram of a digital copying machine to which an image processing apparatus of this embodiment is applied.

【図2】本実施例の画像処理装置である画像処理部の構
成図である。
FIG. 2 is a configuration diagram of an image processing unit that is an image processing apparatus according to the present exemplary embodiment.

【図3】エリア処理に使用するエリアデータのデータ構
造を示す説明図である。
FIG. 3 is an explanatory diagram showing a data structure of area data used for area processing.

【図4】エリア処理の対象となるエリア(領域)を指定
する方法を示す説明図である。
FIG. 4 is an explanatory diagram showing a method of designating an area (area) to be subjected to area processing.

【図5】矩形モード,直角多角形モード,多角形モード
でのエリア入力のフローチャートである。
FIG. 5 is a flowchart of area input in a rectangular mode, a right-angled polygon mode, and a polygonal mode.

【図6】エリアデータ書き込み処理の詳細フローであ
る。
FIG. 6 is a detailed flow of area data writing processing.

【図7】エリアデータの出力処理のフローチャートであ
る。
FIG. 7 is a flowchart of an area data output process.

【図8】閉ループモードのエリア入力処理のフローチャ
ートである。
FIG. 8 is a flowchart of area input processing in a closed loop mode.

【図9】開始ポイント検出処理のフローチャートであ
る。
FIG. 9 is a flowchart of start point detection processing.

【図10】開始ポイントの検出例を示す説明図である。FIG. 10 is an explanatory diagram showing an example of detection of a start point.

【図11】輪郭追跡処理のフローチャートである。FIG. 11 is a flowchart of contour tracking processing.

【図12】輪郭追跡処理を示す説明図である。FIG. 12 is an explanatory diagram showing contour tracking processing.

【図13】孤立点・内閉ループ検出処理のフローチャー
トである。
FIG. 13 is a flowchart of isolated point / inner closed loop detection processing.

【図14】輪郭線が途中で切れている場合の輪郭追跡処
理の継続を示す説明図である。
FIG. 14 is an explanatory diagram showing continuation of the contour tracking processing when the contour line is cut off in the middle.

【符号の説明】[Explanation of symbols]

101 画像読取部 102 画像処理部 103 画像記録部 104 ディジタイザ 105 システム制御部 201 フィルタ処理部 202 加工処理部 203 中間調処理部 204 400/100変換部 205 ビットマップメモリ 206 エリア処理制御部 207 RAM 101 image reading unit 102 image processing unit 103 image recording unit 104 digitizer 105 system control unit 201 filter processing unit 202 processing unit 203 halftone processing unit 204 400/100 conversion unit 205 bitmap memory 206 area processing control unit 207 RAM

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 対象画像データに対するエリア処理の内
容を,主走査方向に対して所定の長さを有したエリアデ
ータとして記憶するビットマップメモリを備え,1ライ
ン中において同種エリアデータで挟まれる部分に対し
て,該エリアデータの種類に応じたエリア処理を施す画
像処理装置において,前記エリアデータをビットマップ
メモリに書き込む際に,新たに書き込むエリアデータが
既にビットマップ上に書き込まれている既存のエリアデ
ータと重なるか否かを判定する判定手段と,前記判定手
段で既存のエリアデータと重なると判定された場合,既
存のエリアデータの位置に基づいて,新たに書き込むエ
リアデータの位置を主走査方向に補正する書込位置補正
手段とを備えたことを特徴とする画像処理装置。
1. A portion provided with a bit map memory for storing the contents of area processing for target image data as area data having a predetermined length in the main scanning direction, and sandwiched by area data of the same type in one line. On the other hand, in an image processing device that performs area processing according to the type of the area data, when writing the area data in a bitmap memory, new area data to be written is already written on the bitmap. A determination unit that determines whether or not the data overlaps with the area data, and if the determination unit determines that the data overlaps with the existing area data, the position of the newly written area data is main-scanned based on the position of the existing area data. An image processing apparatus comprising: a writing position correcting unit that corrects in a direction.
【請求項2】 複数のエリアデータによって複数のエリ
アが指定された際に,指定された複数のエリアにおいて
重複する領域がある場合,あらかじめエリアデータ毎に
設定された優先順位に基づいて,重複した領域に対する
エリア処理として最も優先順位の高いエリアデータを選
択するエリアデータ選択手段を備えたことを特徴とする
請求項1記載の画像処理装置。
2. When a plurality of areas are designated by a plurality of area data and there are overlapping areas in the designated plurality of areas, the areas are overlapped based on a priority order set for each area data in advance. The image processing apparatus according to claim 1, further comprising area data selection means for selecting area data having the highest priority as area processing for the area.
【請求項3】 対象画像データに対するエリア処理の内
容を,主走査方向に対して所定の長さを有したエリアデ
ータとして記憶するビットマップメモリを備え,1ライ
ン中において同種エリアデータで挟まれる部分に対し
て,該エリアデータの種類に応じたエリア処理を施す画
像処理装置において,対象画像の2値化データを前記ビ
ットマップメモリに取り込んで,ビットマップメモリ上
の2値化データに対して輪郭追跡処理を施し,輪郭線情
報を抽出する輪郭線抽出手段と,前記輪郭線抽出手段で
抽出した輪郭線情報を記憶する輪郭線記憶手段と,前記
輪郭線抽出手段による輪郭線情報の抽出の終了後,前記
ビットマップメモリをクリアし,前記輪郭線記憶手段に
記憶されている輪郭線情報に基づいて,エリアデータを
ビットマップメモリに書き込むエリアデータ書込手段と
を備えたことを特徴とする画像処理装置。
3. A bit map memory for storing the content of area processing for target image data as area data having a predetermined length in the main scanning direction, and a portion sandwiched by similar area data in one line. On the other hand, in an image processing device that performs area processing according to the type of the area data, the binarized data of the target image is taken into the bitmap memory, and the outline of the binarized data on the bitmap memory Contour line extraction means for performing tracking processing to extract contour line information, contour line storage means for storing contour line information extracted by the contour line extraction means, and end of extraction of contour line information by the contour line extraction means Then, the bitmap memory is cleared, and the area data is stored in the bitmap memory based on the contour line information stored in the contour line storage means. An image processing apparatus comprising: area data writing means for writing.
【請求項4】 2値化データに太らせ処理を施す画像太
らせ処理手段を備え,前記ビットマップメモリに取り込
む対象画像の2値化データが,太らせ処理後の画像デー
タであることを特徴とする請求項3記載の画像処理装
置。
4. An image thickening processing means for performing a thickening process on the binarized data, wherein the binarized data of the target image captured in the bitmap memory is the image data after the thickening process. The image processing device according to claim 3.
【請求項5】 前記輪郭線抽出手段は,前記ビットマッ
プメモリ上の2値化データから輪郭線情報を抽出する際
に,輪郭線が途中で途切れている場合,輪郭線が途切れ
た位置より,所定方向・所定範囲のビットマップメモリ
上に存在する画像を検出し,検出位置より輪郭追跡処理
を継続することを特徴とする請求項3記載の画像処理装
置。
5. The contour line extracting means extracts the contour line information from the binarized data on the bitmap memory, if the contour line is interrupted in the middle, 4. The image processing apparatus according to claim 3, wherein an image existing on the bitmap memory in a predetermined direction and a predetermined range is detected, and the contour tracking process is continued from the detected position.
【請求項6】 前記輪郭線抽出手段は,前記ビットマッ
プメモリ上の2値化データから輪郭線情報を抽出する際
に,輪郭線の輪郭長を検出して,所定のしきい値と比較
し,前記輪郭長がしきい値より小さい場合には,検出し
た輪郭線情報を破棄し,あらたに別の輪郭線を検出して
輪郭線情報の抽出を行うことを特徴とする請求項3記載
の画像処理装置。
6. The contour line extracting means detects the contour length of the contour line when extracting the contour line information from the binarized data on the bitmap memory, and compares the contour length with a predetermined threshold value. If the contour length is smaller than a threshold value, the detected contour line information is discarded, another contour line is newly detected, and the contour line information is extracted. Image processing device.
【請求項7】 前記輪郭線抽出手段は,前記ビットマッ
プメモリ上の2値化データから輪郭線情報を抽出する際
に,追跡している輪郭線が内輪郭・外輪郭の何れである
かを検出し,外輪郭である場合には,検出した輪郭線情
報を破棄し,あらたに別の輪郭線を検出して輪郭線情報
の抽出を行うことを特徴とする請求項3記載の画像処理
装置。
7. The contour line extraction means, when extracting contour line information from the binarized data on the bitmap memory, determines whether the contour line being tracked is an inner contour or an outer contour. 4. The image processing apparatus according to claim 3, wherein when the detected contour is an outer contour, the detected contour information is discarded, another contour is newly detected, and the contour information is extracted. .
【請求項8】 前記エリアデータ書込手段は,エリアデ
ータをビットマップメモリに書き込む際に,書き込み位
置が輪郭線上になるように補正することを特徴とする請
求項3記載の画像処理装置。
8. The image processing apparatus according to claim 3, wherein the area data writing unit corrects the writing position so that the writing position is on the contour line when writing the area data in the bitmap memory.
JP14872393A 1993-05-26 1993-05-26 Image processing device Expired - Fee Related JP3354629B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14872393A JP3354629B2 (en) 1993-05-26 1993-05-26 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14872393A JP3354629B2 (en) 1993-05-26 1993-05-26 Image processing device

Publications (2)

Publication Number Publication Date
JPH06333038A true JPH06333038A (en) 1994-12-02
JP3354629B2 JP3354629B2 (en) 2002-12-09

Family

ID=15459171

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14872393A Expired - Fee Related JP3354629B2 (en) 1993-05-26 1993-05-26 Image processing device

Country Status (1)

Country Link
JP (1) JP3354629B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001307105A (en) * 2000-04-25 2001-11-02 Canon Inc Image processor and its method
JP2007149139A (en) * 2001-12-06 2007-06-14 Nec Corp Method and device of segmenting multidimensional image

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001307105A (en) * 2000-04-25 2001-11-02 Canon Inc Image processor and its method
JP4612760B2 (en) * 2000-04-25 2011-01-12 キヤノン株式会社 Image processing apparatus and method
JP2007149139A (en) * 2001-12-06 2007-06-14 Nec Corp Method and device of segmenting multidimensional image

Also Published As

Publication number Publication date
JP3354629B2 (en) 2002-12-09

Similar Documents

Publication Publication Date Title
JP4586241B2 (en) Image processing device
JP3354629B2 (en) Image processing device
JPH01168163A (en) Picture processing unit
JPH09120450A (en) Image processor
JP2812401B2 (en) Image processing device
JP2557480B2 (en) Color image processor
JPS63260265A (en) Color picture processing method
JP3814547B2 (en) Image processing apparatus and method
JPH11308438A (en) Image processor
JP2985303B2 (en) Recording device area recognition method
JP2687380B2 (en) Image processing device
JPH09135331A (en) Image processor
JP3587586B2 (en) Image processing device
JPH10191026A (en) Image processing device and method
JP2978550B2 (en) Mark detection device
JP2957050B2 (en) Image data enlarger
JPH0690346A (en) Picture processor
KR970010488B1 (en) Digital image editing method and apparatus
JPH07160897A (en) Picture processor
JP2557481B2 (en) Color image processor
JPH05211607A (en) Device and method for image processing
JPH09186875A (en) Image processing unit
JPH0416059A (en) Picture processor
JPH1127516A (en) Image-processing unit
JPH0638021A (en) Color image processor

Legal Events

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