JPH0758427B2 - Image processing device - Google Patents

Image processing device

Info

Publication number
JPH0758427B2
JPH0758427B2 JP1024239A JP2423989A JPH0758427B2 JP H0758427 B2 JPH0758427 B2 JP H0758427B2 JP 1024239 A JP1024239 A JP 1024239A JP 2423989 A JP2423989 A JP 2423989A JP H0758427 B2 JPH0758427 B2 JP H0758427B2
Authority
JP
Japan
Prior art keywords
data
run
color value
run length
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1024239A
Other languages
Japanese (ja)
Other versions
JPH02204780A (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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP1024239A priority Critical patent/JPH0758427B2/en
Priority to DE69031446T priority patent/DE69031446T2/en
Priority to EP96110758A priority patent/EP0737937B1/en
Priority to PCT/JP1990/000110 priority patent/WO1990009018A1/en
Priority to DE69033539T priority patent/DE69033539T2/en
Priority to US07/582,198 priority patent/US5377023A/en
Priority to EP90902373A priority patent/EP0407614B1/en
Publication of JPH02204780A publication Critical patent/JPH02204780A/en
Publication of JPH0758427B2 publication Critical patent/JPH0758427B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Color Image Communication Systems (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は画像処理装置、特に印刷物の無地網部分の画像
を処理するのに適した画像処理装置に関する。
The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus suitable for processing an image of a solid halftone portion of a printed matter.

〔従来の技術〕[Conventional technology]

カラー印刷物の中には、色が一定の部分、いわゆる無地
網部分が多数存在する。このような無地網部分の製版工
程は一般のカラー部分の製版工程とは異なった特殊な工
程によって行われる。各無地網部分には、イエロー
(Y)、マゼンタ(M)、シアン(C)、ブラック
(K)の4色の混合で表現される色が与えられるが、こ
の混合色は印刷時に各色について用いる分解版における
網点面積率をパーセントで表した数値(以下、網パーセ
ントと呼ぶ)によって決定される。従来は、同一の網パ
ーセント領域を抽出するためのマスクと、所望の網パー
セントで網点が設けられた透明フィルム(平網)とを何
種類も用意し、露光フィルムに露光を繰り返すことによ
り、無地網フィルムを作成する作業を行っていた。
In a color printed matter, there are a large number of areas of constant color, so-called solid mesh areas. The plate-making process of such a solid mesh portion is performed by a special process different from the general plate-making process of the color portion. A color represented by a mixture of four colors of yellow (Y), magenta (M), cyan (C), and black (K) is given to each solid halftone dot portion, and this mixed color is used for each color at the time of printing. The halftone dot area ratio in the disassembled version is determined by a numerical value (hereinafter referred to as halftone dot percentage). Conventionally, many kinds of masks for extracting the same halftone percentage area and transparent films (flat halftone dots) provided with halftone dots at a desired halftone percentage are prepared, and the exposure film is repeatedly exposed, I was working on making a solid mesh film.

最近では、このような無地網フィルムの作成をコンピュ
ータを利用して行う技術が提案されている。たとえば、
特願昭60−213259号明細書、特願昭60−270501号明細
書、特願昭62−231365号明細書には、コンピュータを用
いた無地網フィルム作成装置が開示されている。これら
の装置では、版下原稿に描画された輪郭線画像をスキャ
ナなどで読み取り、この読み取った画像データに基づい
てコンピュータによる着色を行い、直接各色ごとの無地
網フィルムが作成される。
Recently, a technique has been proposed in which such a solid mesh film is produced using a computer. For example,
Japanese Patent Application No. 60-213259, Japanese Patent Application No. 60-270501 and Japanese Patent Application No. 62-231365 disclose a solid network film producing apparatus using a computer. In these apparatuses, a contour line image drawn on a block copy document is read by a scanner or the like, and coloring is performed by a computer based on the read image data, and a plain net film for each color is directly created.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上述したコンピュータを用いた無地網フィルム作成装置
は、一般に外部記憶装置としてディスク装置を有し、こ
のディスク装置内に画像データを保存している。着色な
どの画像処理を行う場合には、このディスク装置内の画
像データをコンピュータ内のメインメモリに読出し、こ
のメインメモリ内の画像データに対して着色などの画像
処理を施すことになる。この画像処理を行う間、処理対
象となる画像をディスプレイに表示する必要があるが、
この表示のためにフレームメモリが設けられ、表示に必
要な画像データをメインメモリからフレームメモリに転
送することによって必要な画像表示を行っている。
The above-described solid mesh film producing apparatus using a computer generally has a disk device as an external storage device and stores image data in the disk device. When performing image processing such as coloring, the image data in the disk device is read into the main memory in the computer, and the image data in the main memory is subjected to image processing such as coloring. While performing this image processing, it is necessary to display the image to be processed on the display,
A frame memory is provided for this display, and necessary image display is performed by transferring image data required for display from the main memory to the frame memory.

通常、画像データとしては、各画素の色値を画素の配列
のとおり並べたラスターデータと、同じ色値をもった画
素の並びを示すランレングスデータと、が用いられてい
る。従来の装置では、メインメモリおよびフレームメモ
リでは画像データをラスターデータの形で記憶し、ディ
スク装置では画像データをランレングスデータの形で記
憶している。これは、フレームメモリはディスプレイに
直接接続されているため、データをラスターデータの形
で保持する必要があるのに対し、いくつもの画像を記憶
するディスク装置にはデータの全容量がより少なくなる
ラスターデータの形でデータを保存した方が便利である
という理由によるものである。フレームメモリにデータ
を転送するメインメモリでは、フレームメモリと同様の
ラスターデータの形が用いられている。したがって、従
来の装置では、ディスク装置内のランレングスデータ形
式の画像データを、ラスターデータに変換してメインメ
モリ上に読出し、このメインメモリ上のラスターデータ
をラスターデータの形式のままフレームメモリに転送し
て画像表示を行っている。
Usually, as image data, raster data in which color values of each pixel are arranged according to an array of pixels and run-length data indicating an array of pixels having the same color value are used. In the conventional device, the image data is stored in the form of raster data in the main memory and the frame memory, and the image data is stored in the form of run length data in the disc device. This is because the frame memory is directly connected to the display, so it is necessary to hold the data in the form of raster data, whereas a disk drive that stores several images has less total data capacity. This is because it is more convenient to save the data in the form of data. The main memory that transfers data to the frame memory uses the same raster data format as the frame memory. Therefore, in the conventional device, the image data in the run-length data format in the disk device is converted into raster data and read out on the main memory, and the raster data on this main memory is transferred to the frame memory in the raster data format. Then, the image is displayed.

しかしながら、このような装置ではメインメモリの容量
が非常に多く必要になるという問題がある。前述のよう
にラスターデータは、全画素数と同じ数のデータが必要
になるため、解像度の高い画像の場合には膨大なデータ
量を記憶するメモリが必要になるのである。一般にコン
ピュータのメインメモリはディスクなどに比べて1ビッ
トあたりの単価が高いため、容量の大きなメインメモリ
を確保するとそれだけコストが高くなるという問題があ
る。
However, such a device has a problem that the capacity of the main memory is very large. As described above, raster data requires the same number of data as the total number of pixels, and thus a memory for storing a huge amount of data is required in the case of an image with high resolution. In general, the main memory of a computer has a higher unit price per bit than a disk or the like. Therefore, securing a main memory having a large capacity causes a problem of an increase in cost.

従来装置のもう1つの問題は、画像に着色処理を施す場
合、着色演算の効率が非常に悪く、演算時間が長くかか
るという点である。通常、着色処理はメインメモリ内の
画像データに対して行うことになるが、前述のように従
来装置ではメインメモリはラスターデータの形式で画像
データを保持しているから、このラスターデータに対し
て着色処理を施すことになる。このような膨大な量のラ
スターデータに対して着色処理を施すことは非常に効率
が悪く、処理時間が長くかかるのである。
Another problem of the conventional device is that, when a coloring process is performed on an image, the efficiency of the coloring calculation is very low and the calculation time is long. Usually, the coloring process is performed on the image data in the main memory, but as described above, in the conventional device, the main memory holds the image data in the format of raster data. It will be colored. Coloring the enormous amount of raster data is very inefficient and takes a long processing time.

そこで本発明は、メインメモリの容量を低下させること
によりコストダウンを図ることができ、しかも効率の良
い着色演算を行うことのできる画像処理装置を提供する
ことを目的とする。
Therefore, it is an object of the present invention to provide an image processing apparatus which can reduce the cost by reducing the capacity of the main memory and can perform an efficient coloring operation.

〔課題を解決するための手段〕[Means for Solving the Problems]

本願第1の発明は、画像処理装置において、 XY平面上に配列された画素によって構成される画像を記
憶するメモリであって、X方向に並んだ画素列を、画素
のもつ色値cと、同じ色値を有する画素の並びの終端を
示すX座標値aと、によって表現される一連のランレン
グスデータ(c,a)で定義し、これを記憶するメインメ
モリと、 このメインメモリ内のランレングスデータをラスターデ
ータに変換するデータ形式変換部と、 ディスプレイに画像表示を行うために、画像データ変換
部で変換されたラスターデータを保持するフレームメモ
リと、 メインメモリ内の画像について、画像内の1点Pおよび
新たな色値c′を指定するための入力部と、 1点Pの位置を包含するランレングスデータ(c0,a0
を抽出し、このデータの色値c0を色値c′に変更し、変
更後のデータ(c′,a0)によってメインメモリ内のも
とのデータを置換する初期色値変換部と、 第1のX座標値S、第2のX座標値E、およびY方向位
置を示すデータY、の3つのデータ(S,E,Y)によって
構成される指標データを蓄積するスタック部と、 与えられたランレングスデータ(c,a)によって定義さ
れる画素列について、その始点に関するデータs、終点
に関するデータe、およびそのY方向位置を示すデータ
yを求め、Y方向位置(y+1)で示される下方に隣接
する画素列のために(s,e,y+1)なる指標データを、
Y方向位置(y−1)で示される上方に隣接する画素列
のために(s,e,y−1)なる指標データを、それぞれ生
成する指標データ生成部と、 指標データ生成部に、ランレングスデータ(c0,a0)を
与え、生成した指標データをスタック部に蓄積させる初
期データ蓄積部と、 スタック部から1指標データ(S,E,Y)を読出し、この
指標データが示すY方向位置Yにあり、色値c0をもち、
しかも定義される画素列が区間SEに重複するという3条
件を満たすランレングスデータを抽出するランレングス
データ抽出部と、 このランレングスデータ抽出部によって抽出されたデー
タの色値c0を色値c′に変更し、変更後のデータによっ
てメインメモリ内のもとのデータを置換する順次色値変
換部と、 ランレングスデータ抽出部によって抽出されたデータ
を、指標データ生成部に与え、生成した指標データをス
タック部に蓄積させる順次データ蓄積部と、 を設けたものである。
A first invention of the present application is, in an image processing apparatus, a memory for storing an image composed of pixels arranged on an XY plane, in which a pixel column arranged in the X direction has a color value c of a pixel, A main memory that is defined by a series of run-length data (c, a) represented by an X coordinate value a indicating the end of the array of pixels having the same color value, and stores the run-length data (c, a), and a run in this main memory. The data format conversion unit that converts the length data to raster data, the frame memory that holds the raster data converted by the image data conversion unit to display the image on the display, and the image in the main memory An input section for designating one point P and a new color value c ′, and run length data (c 0 , a 0 ) including the position of one point P
An initial color value conversion unit that extracts the color value c 0 of the data, changes the color value c 0 of this data to the color value c ′, and replaces the original data in the main memory with the changed data (c ′, a 0 ). A stack unit for accumulating index data composed of three data (S, E, Y) of a first X coordinate value S, a second X coordinate value E, and data Y indicating a Y-direction position; For a pixel row defined by the generated run-length data (c, a), data s regarding the start point, data e regarding the end point, and data y indicating the Y-direction position thereof are obtained, and shown by the Y-direction position (y + 1). The index data of (s, e, y + 1) for the pixel columns adjacent to the lower part is
The index data generation unit that generates index data (s, e, y-1) for the pixel columns that are adjacent to each other at the position (y-1) in the Y direction and that is adjacent to the pixel data generation unit, The length data (c 0 , a 0 ) is given, and one index data (S, E, Y) is read from the initial data storage section that stores the generated index data in the stack section and the Y indicated by this index data. Is in the directional position Y, has a color value c 0 ,
Moreover, a run length data extraction unit that extracts run length data that satisfies the three conditions that the defined pixel row overlaps the section SE, and the color value c 0 of the data extracted by the run length data extraction unit To the index data generation unit, and the data extracted by the run-length data extraction unit and the sequential color value conversion unit that replaces the original data in the main memory with the changed data. A sequential data storage unit that stores data in the stack unit is provided.

本願第2の発明は、画像処理装置において、 XY平面上に配列された画素によって構成される画像を記
憶するメモリであって、X方向に並んだ画素列を、画素
のもつ色値cと、同じ色値を有する画素の並びの終端を
示すX座標値aと、によって表現される一連のランレン
グスデータ(c,a)で定義し、これを記憶するメインメ
モリと、 このメインメモリ内のランレングスデータをラスターデ
ータに変換するデータ形式変換部と、 ディスプレイに画像表示を行うために、画像データ変換
部で変換されたラスターデータを保持するフレームメモ
リと、 メインメモリ内の画像について、画像内の1点Pおよび
新たな色値c′を指定するための入力部と、 1点Pの位置を包含するランレングスデータ(c0,a0
を抽出し、このデータの色値c0を色値c′に変更し、変
更後のデータ(c′,a0)によってメインメモリ内のも
とのデータを置換する初期色値変換部と、 第1のX座標値S、第2のX座標値E、およびY方向位
置を示すデータY、方向を示すフラグFの4つのデータ
(S,E,Y,F)によって構成される指標データを蓄積する
スタック部と、 与えられたランレングスデータ(c,a)と、指標データ
が与えられた場合にはこの与えられた指標データ(S,E,
Y,F)と、を参照し、次の検索すべき検索対象区間の始
点sおよび終点e、ならびにこの区間のY方向の位置y
および方向fを求め、(s,e,y,f)なる指標データを生
成する指標データ生成部と、 この指標データ生成部に、ランレングスデータ(c0,
a0)を与え、生成した指標データをスタック部に蓄積さ
せる初期データ蓄積部と、 スタック部から1指標データ(S,E,Y,F)を読出し、こ
の指標データが示すY方向位置Yにあり、色値c0をも
ち、しかも定義される画素列が区間SEに重複するという
3条件を満たすランレングスデータを抽出するランレン
グスデータ抽出部と、 このランレングスデータ抽出部によって抽出されたデー
タの色値c0を色値c′に変更し、変更後のデータによっ
てメインメモリ内のもとのデータを置換する順次色値変
換部と、 ランレングスデータ抽出部によって抽出されたランレン
グスデータ(c,a)と、このランレングスデータを抽出
する際に用いた指標データ(S,E,Y,F)とを、それぞれ
指標データ生成部に与え、生成した指標データをスタッ
ク部に蓄積させる順次データ蓄積部と、 を設けたものである。
A second invention of the present application is, in an image processing device, a memory for storing an image composed of pixels arranged on an XY plane, in which a pixel column arranged in the X direction has a color value c of the pixel, A main memory that is defined by a series of run-length data (c, a) represented by an X coordinate value a indicating the end of the array of pixels having the same color value, and stores the run-length data (c, a), and a run in this main memory. The data format conversion unit that converts the length data to raster data, the frame memory that holds the raster data converted by the image data conversion unit to display the image on the display, and the image in the main memory An input section for designating one point P and a new color value c ′, and run length data (c 0 , a 0 ) including the position of one point P
An initial color value conversion unit that extracts the color value c 0 of the data, changes the color value c 0 of this data to the color value c ′, and replaces the original data in the main memory with the changed data (c ′, a 0 ). Index data composed of four data (S, E, Y, F) of a first X coordinate value S, a second X coordinate value E, data Y indicating a Y-direction position, and flag F indicating a direction. The stack part to be accumulated, the given run length data (c, a), and the given index data (S, E,
Y, F), and the start point s and end point e of the next search target section to be searched, and the position y in the Y direction of this section.
And the direction f, and generates index data of (s, e, y, f), and an index data generating unit, and the run length data (c 0 ,
a 0 ), the 1st index data (S, E, Y, F) is read from the initial data storage part that stores the generated index data in the stack part and the stack part, and it is stored in the Y direction position Y indicated by this index data. Yes, a run-length data extraction unit that extracts run-length data that has the color value c 0 , and the defined pixel row overlaps the section SE, and the data extracted by the run-length data extraction unit. Of the run-length data extracted by the run-length data extraction unit, which changes the color value c 0 of the color value c 0 to the color value c ′ and replaces the original data in the main memory with the changed data. c, a) and the index data (S, E, Y, F) used when extracting this run length data are given respectively to the index data generation unit, and the generated index data is accumulated in the stack unit in order. De A data storage unit, in which the provided.

〔作 用〕[Work]

本発明による画像処理装置では、画像データはランレン
グスデータの形式でメインメモリに記憶される。したが
って、ラスターデータの形式で記憶する従来装置に比べ
てメインメモリの容量を低減することができ、コストダ
ウンを図ることができる。また、画像の着色処理は、メ
インメモリ内のランレングスデータに対して行われるた
め、ラスターデータに対して行う従来の方法に比べ、演
算効率が改善され、処理速度が向上する。ランレングス
データに対する着色処理は、次のとおりである。
In the image processing apparatus according to the present invention, the image data is stored in the main memory in the form of run length data. Therefore, it is possible to reduce the capacity of the main memory and to reduce the cost as compared with the conventional device that stores in the format of raster data. Further, since the image coloring process is performed on the run length data in the main memory, the calculation efficiency is improved and the processing speed is improved as compared with the conventional method performed on the raster data. The coloring process for the run length data is as follows.

本願第1の発明によれば、「画像内の1点Pを含む閉領
域を所定の色に着色せよ」という形式で着色指示が与え
られる。そこで、まず、メインメモリからこの1点Pを
包含するランレングスデータ(c0,a0)が抽出され、こ
のデータの色値が所定の色に変更される。続いて、この
ランレングスデータに基づいて、指標データが作られ、
スタック部に蓄積される。指標データは(S,E,Y)なる
形式をもったデータで、Yは検索すべき列を表わし、S
およびEはその列内の検索すべき区間を表わす。指標デ
ータは初めは2つ作られる。抽出されたランレングスデ
ータの上の列と下の列とのそれぞれについてのものであ
る。このように蓄積された指標データ(S,E,Y)は、1
つずつ読み出され、これに基づいて、Y列目の検索すべ
き区間SE内に、色値c0をもったランレングスデータがあ
るかどうかが検索される。該当するランレングスデータ
があればこれを抽出し、色値の変更処理を行う。そし
て、この抽出したランレングスデータに基づいて新たな
指標データを生成し、スタック部に蓄積する。以上の処
理を繰り返すことにより、ランレングスデータに対する
着色処理がなされる。
According to the first invention of the present application, the coloring instruction is given in the form of "color the closed region including one point P in the image with a predetermined color". Therefore, first, the run length data (c 0 , a 0 ) including this one point P is extracted from the main memory, and the color value of this data is changed to a predetermined color. Then, based on this run length data, index data is created,
It is accumulated in the stack part. The index data has a format of (S, E, Y), where Y represents the column to be searched and S
And E represent the section to be searched in that column. Initially, two sets of index data are created. It is for each of the upper row and the lower row of the extracted run length data. The index data (S, E, Y) thus accumulated is 1
They are read out one by one, and based on this, it is searched whether or not there is run length data having the color value c 0 in the section SE to be searched in the Y-th column. If there is corresponding run length data, it is extracted and the color value changing process is performed. Then, new index data is generated based on the extracted run length data, and accumulated in the stack section. By repeating the above process, the coloring process for the run length data is performed.

本願第2の発明によれば、上述の第1の発明の指標デー
タの3つの要素の他に、第4の要素として検索方向を示
すフラグFが加えられる。このフラグにより、既に検索
済みのランレングスデータについての区間を、検索対象
区間から除外することができ、より効率的な処理が可能
になる。
According to the second invention of the present application, in addition to the three elements of the index data of the first invention, a flag F indicating a search direction is added as a fourth element. With this flag, the section for the run length data that has already been searched can be excluded from the search target section, and more efficient processing becomes possible.

〔実施例〕〔Example〕

装置の構成 以下、本発明を図示する実施例に基づいて説明する。第
1図は本発明の一実施例に係る画像処理装置の構成を示
すブロック図である。この装置は、無地網フィルム作成
装置に本発明を適用したものであり、第1図の装置は実
際には無地網フィルム作成装置を構成している。この装
置の本体はコンピュータ100であり、このコンピュータ1
00に、ディスク装置200、入力装置300、ディスプレイ40
0が接続されている。入力装置300としては、キーボー
ド、マウスなどの一般的な入力デバイスを用いればよ
い。また、ディスク装置200にはレイアウトスキャナ500
が接続されている。輪郭線で構成されるモノクロ画像の
データはレイアウトスキャナ500で取り込まれ、一旦デ
ィスク装置200に保存される。ここでは、画像データは
容量を低減できるランレングスデータの形になってい
る。この画像データはコンピュータ100に取り込まれ、
ここで着色などの画像処理が施され、再びディスク装置
200に戻される。レイアウトスキャナ500は、ディスク装
置200から処理済みの画像データを取り込み、この画像
データに基づいて無地網フィルムが作成される。
Configuration of Device Hereinafter, the present invention will be described based on illustrated embodiments. FIG. 1 is a block diagram showing the arrangement of an image processing apparatus according to an embodiment of the present invention. This apparatus is an application of the present invention to a plain net film producing apparatus, and the apparatus of FIG. 1 actually constitutes a plain net film producing apparatus. The main body of this device is a computer 100, and this computer 1
00, disk device 200, input device 300, display 40
0 is connected. As the input device 300, a general input device such as a keyboard or a mouse may be used. In addition, the disk device 200 has a layout scanner 500.
Are connected. The monochrome image data composed of contour lines is captured by the layout scanner 500 and temporarily stored in the disk device 200. Here, the image data is in the form of run-length data that can reduce the capacity. This image data is taken into the computer 100,
Image processing such as coloring is performed here, and the disk device is restored again.
Returned to 200. The layout scanner 500 takes in the processed image data from the disk device 200 and creates a plain net film based on this image data.

続いて、コンピュータ100の内部の構成について説明す
る。コンピュータ100の内部構成は実際には、CPU、メモ
リなどのハードウェアと、これを動作させるためのソフ
トウェアの有機的な結合によって構築されているが、こ
こでは構成要素を機能部に分けてとらえることにする。
ディスク装置200から読出した画像データはメインメモ
リ110に記憶される。このメインメモリ110内の画像デー
タは、ランレングスデータであるが、データ形式変換部
115においてラスターデータに変換されてフレームメモ
リ120に転送される。このフレームメモリ120内の画像デ
ータに基づいて、ディスプレイ400に画像表示がなされ
る。オペレータはこの画像表示を見ながら、着色などの
画像処理を行うことになる。オペレータからの画像処理
の指示は入力装置300を介して、元色入力部131、更新色
入力部132、指定色入力部133に与えられる。
Next, the internal configuration of the computer 100 will be described. The internal configuration of the computer 100 is actually constructed by organically combining hardware such as a CPU and a memory and software for operating the same, but here, it is necessary to separate the components into functional parts. To
The image data read from the disk device 200 is stored in the main memory 110. The image data in the main memory 110 is run length data, but the data format conversion unit
In 115, it is converted into raster data and transferred to the frame memory 120. An image is displayed on the display 400 based on the image data in the frame memory 120. The operator performs image processing such as coloring while looking at this image display. The image processing instruction from the operator is given to the original color input unit 131, the updated color input unit 132, and the designated color input unit 133 via the input device 300.

この装置における着色処理には、2とおりの方法が用意
されている。第1の方法は元色入力による方法、第2の
方法は指定点入力による方法である。前者の方法では、
「画像内の第1の色(元色)の部分を第2の色(更新
色)に着色せよ」という形式で着色指示が与えられる。
すなわち、元色入力部131に元色を、更新色入力部132に
更新色を入力すると、画像の中の元色の閉領域が更新色
によって着色されることになる。この処理は、順次デー
タ抽出部141と色変換部142によってなされる。一方、後
者の方法では、「画像内の1点Pを含む閉領域を所定の
色(更新色)に着色せよ」という形式で着色指示が与え
られる。すなわち、指定点入力部133に画像内の1点P
の座標値を、更新色入力部132に更新色を入力すると、
画像内の1点Pを含む閉領域(同一色をもった連続部
分)が更新色によって着色されることになる。この処理
は、符号151〜157で示す各部によってなされ、本発明に
関連する。
Two methods are prepared for the coloring process in this apparatus. The first method is a method of inputting original colors, and the second method is a method of inputting designated points. In the former method,
A coloring instruction is given in the form of "color the portion of the first color (original color) in the image with the second color (updated color)".
That is, when the original color is input to the original color input unit 131 and the updated color is input to the updated color input unit 132, the closed region of the original color in the image is colored with the updated color. This process is sequentially performed by the data extraction unit 141 and the color conversion unit 142. On the other hand, in the latter method, the coloring instruction is given in the form of "color the closed region including one point P in the image with a predetermined color (updated color)". That is, one point P in the image is input to the designated point input unit 133.
When the update color is input to the update color input unit 132, the coordinate value of
A closed area (a continuous portion having the same color) including one point P in the image is colored with the updated color. This processing is performed by each unit indicated by reference numerals 151 to 157 and is related to the present invention.

画像データの形式 ここで、ラスターデータおよびランレングスデータのデ
ータ構造について、第2図および第3図を参照しなが
ら、簡単に説明しておくことにする。いま、第2図
(a)に示すように、横方向に25画素、縦方向に16画
素、合計400画素からなる画像を考える。ここで、各画
素の各値を第2図(b)のように定義するものとする。
このような画像をラスターデータで表現すると、25×16
のマトリックスを用意し、ここに各色値を並べることに
なる。1画素の色値をたとえば4バイトのデータで表現
したとすれば、4×400=1600バイトもデータ量が必要
になる。これに対し、この画像をランレングスデータで
表現すると第3図のようになる。データの1単位は(c,
a)なる形をもち、cは画素のもつ色値、aは同じ色値
を有する画素の並びの終端を示すコラム値である。たと
えば、ライン1には、(1,25)なるデータが記されてい
るが、これは色値1の画素が25コラム目まで連続して並
んでいることを示す。また、ライン3には、(1,5)、
(2,8)、(1,25)なるデータが記されているが、これ
はまず、色値1の画素が5コラムまで並び、6コラム目
から8コラム目までは色値2の画素が並び、更に9コラ
ム目から25コラム目までは色値1の画素が並んでいるこ
とを示す。このようなランレングスデータの形式で表現
すると、1単位データを4バイトで構成しても、全部で
18バイトあれば全画像を表現することができる。ラスタ
ーデータの形式による表現では、1600バイト必要であっ
たことに比べると、メモリ容量を大幅に節約することが
できる。特に、無地網フィルムの絵柄では、両形式によ
るデータ量の差が著しく、無地網フィルム作成装置では
ランレングスデータの形式でデータを保存した方が好ま
しい。
Image Data Format Here, the data structures of the raster data and the run length data will be briefly described with reference to FIGS. 2 and 3. Now, as shown in FIG. 2A, consider an image having 25 pixels in the horizontal direction and 16 pixels in the vertical direction, which is 400 pixels in total. Here, each value of each pixel is defined as shown in FIG.
If such an image is expressed by raster data, it will be 25 × 16
Prepare a matrix of and arrange each color value here. If the color value of one pixel is represented by, for example, 4-byte data, a data amount of 4 × 400 = 1600 bytes is required. On the other hand, when this image is expressed by run length data, it becomes as shown in FIG. One unit of data is (c,
In the form a), c is a color value of a pixel, and a is a column value indicating the end of a row of pixels having the same color value. For example, in line 1, data (1,25) is written, which means that pixels having color value 1 are continuously arranged up to the 25th column. In line 3, (1,5),
The data of (2,8) and (1,25) are written. First, pixels of color value 1 are arranged in up to 5 columns, and pixels of color value 2 are arranged in columns 6 to 8. It is shown that pixels of color value 1 are lined up in columns 9 to 25. When expressed in such a run length data format, even if one unit data is composed of 4 bytes,
All images can be represented with 18 bytes. Raster data format representation can save a large amount of memory compared to 1600 bytes required. Particularly, in the case of the pattern of the plain net film, the difference in the amount of data between the two formats is remarkable, and it is preferable that the data is stored in the run length data format in the plain net film making apparatus.

前述のように、従来装置ではメインメモリ110はラスタ
ーデータの形式で画像データを保持していたが、本装置
ではメインメモリ110はランレングスデータの形式で画
像データを保持している点に特徴がある。しかしなが
ら、フレームメモリ120はディスプレイ400に画像を表示
するためにラスターデータの形式を要求する。そのた
め、メインメモリ110から、フレームメモリ120へ画像デ
ータを転送するプロセスで、データ形式の変換を行わね
ばならない。データ形式変換部115は、このデータ変換
の処理を行う機能を有するわけである。
As described above, in the conventional device, the main memory 110 holds image data in the format of raster data, but in the present device, the main memory 110 holds image data in the form of run length data. is there. However, the frame memory 120 requires the format of the raster data to display the image on the display 400. Therefore, in the process of transferring the image data from the main memory 110 to the frame memory 120, the data format must be converted. The data format conversion unit 115 has a function of performing this data conversion process.

元色入力による着色方法 それでは、まず、元色入力による着色方法を説明する。
説明の便宜上、メインメモリ110に第4図に示すような
画像が記憶されているものとする。この画像は、背景と
なる領域Q0と、絵柄となる領域Q1,Q2(いずれもハッチ
ングを施して示す)という3つの閉領域によって構成さ
れており、領域Q0は色値0をもった画素の集合からな
り、領域Q1,Q2はそれぞれ色値1をもった画素の集合か
らなる。領域Q1は、第5図に示すように、R1〜R9までの
9つの部分に分けられ、これらの各部の境界のコラム値
を図のようにa〜xで示せば、ライン6までのランレン
グスデータは第6図のようになる。なお、以後このよう
なランレングスデータの各要素(c,a)の1つ1つを
「ラン」と呼ぶことにする。
Coloring Method by Inputting Primary Colors First, a coloring method by inputting primary colors will be described.
For convenience of description, it is assumed that an image as shown in FIG. 4 is stored in the main memory 110. This image is composed of three closed areas, a background area Q0 and picture areas Q1 and Q2 (both are shown hatched), and the area Q0 is a set of pixels with a color value of 0. The areas Q1 and Q2 are each composed of a set of pixels having a color value of 1. As shown in FIG. 5, the area Q1 is divided into nine parts R1 to R9. If the column values at the boundaries of these parts are indicated by a to x as shown in the figure, the run lengths up to line 6 are The data is as shown in FIG. In addition, hereinafter, each of the elements (c, a) of such run length data will be referred to as a "run".

さて、このような画像について、「色値1(元色)の部
分をすべて色値2(更新色)に着色せよ」という指示を
与えた場合の動作を、第7図の流れ図に基づいて説明す
る。まず、ステップS1において、オペレータは元色と更
新色を入力する。すなわち、キーボードなどの入力装置
300によって、元色入力部131に色値1を入力し、更新色
入力部132に色値2を入力することになる。
Now, with respect to such an image, an operation when an instruction of "color all parts of color value 1 (original color) to color value 2 (updated color)" is given will be described based on the flowchart of FIG. To do. First, in step S1, the operator inputs the original color and the updated color. That is, an input device such as a keyboard
With 300, the color value 1 is input to the original color input unit 131, and the color value 2 is input to the update color input unit 132.

続く、スイッチS2において、ランの抽出が行われる。す
なわち、順次データ抽出部141がメインメモリ110内のラ
ンレングスデータから1つずつランを抽出し、これを色
変換部142に転送する。ランの抽出は所定の順番に行え
ばよい。たとえば、上のラインから順に、同じライン内
では左のランから順に抽出すればよい。第6図の例で
は、(0,a)、(0,b)、(1,c)、…といった順に抽出
される。
Then, in the switch S2, the run is extracted. That is, the data extraction unit 141 sequentially extracts runs one by one from the run length data in the main memory 110, and transfers the runs to the color conversion unit 142. Runs may be extracted in a predetermined order. For example, the lines may be extracted in order from the upper line and from the left run in the same line. In the example of FIG. 6, they are extracted in the order of (0, a), (0, b), (1, c), ....

ステップS3では、この抽出したランについて、色値が元
色に等しいか否かが判断される。上述の例では、(0,
a)、(0,b)はともに色値が0であり元色に等しくない
が、(1,c)は色値が1であり元色に等しい。元色に等
しいランについては、ステップS4で色値が更新色に変更
される。したがって、ラン(1,c)は、新たに(2,c)に
変更される。このような処理を全ランについて繰り返す
(ステップS5)。このようなランの変更は、色変換部14
2で行われ、変更されたランデータによってメインメモ
リ110が書き換えられる。結局、第6図で色値1である
ランのすべてが、色値2に書き換えられ、第4図の領域
Q1,Q2が更新色で着色されることになる。
In step S3, it is determined whether or not the color value of the extracted run is equal to the original color. In the example above, (0,
Both a) and (0, b) have a color value of 0 and are not equal to the original color, but (1, c) have a color value of 1 and are equal to the original color. For a run equal to the original color, the color value is changed to the updated color in step S4. Therefore, the run (1, c) is newly changed to (2, c). Such processing is repeated for all runs (step S5). Such a change of run is performed by the color conversion unit 14
2, the main memory 110 is rewritten with the changed run data. Eventually, all of the runs with color value 1 in FIG. 6 were rewritten to color value 2 and the region in FIG.
Q1 and Q2 will be colored with the updated color.

このように、この方法によれば、第6図に示すようなラ
ンレングスデータの色値の部分だけを変更するだけで、
所望の着色処理が完了する。したがって、膨大なラスタ
ーデータに対して処理を行う従来の方法に比べ、演算効
率がはるかに向上し、演算時間の短縮が図れる。
As described above, according to this method, it is possible to change only the color value portion of the run length data as shown in FIG.
The desired coloring process is complete. Therefore, as compared with the conventional method of processing a large amount of raster data, the calculation efficiency is much improved and the calculation time can be shortened.

指定点入力による着色方法I 続いて、本願発明に関連する指定点入力による着色方法
を、前述の方法と同じ例に基づいて説明する。なお、こ
こで説明する実施例は、本願第2の発明に関連するもの
である。本願第1の発明によるものは、ここで述べる実
施例とは若干の相違があるだけなので、後に相違点だけ
を述べることにする。
Coloring Method by Specified Point Input I Next, the coloring method by designated point input related to the present invention will be described based on the same example as the above method. The embodiment described here is related to the second invention of the present application. Since the first invention of the present application is slightly different from the embodiment described here, only the difference will be described later.

この指定入力による方法では、「1点Pが所属する閉領
域を、色値2(更新色)に着色せよ」という指示を与え
ることになる。たとえば、第4図に示すように1点Pを
指定すれば、領域Q1が色値2に着色されることになる。
この場合、同じ色値1をもつ領域であっても、領域Q2は
着色されないことが1つの特徴である。このような着色
指示を与えた場合の動作を第8図の流れ図に基づいて以
下に説明する。
In the method based on this designation input, an instruction to "color the closed region to which one point P belongs with the color value 2 (updated color)" is given. For example, if one point P is designated as shown in FIG. 4, the area Q1 is colored with the color value 2.
In this case, one characteristic is that the area Q2 is not colored even if the areas have the same color value 1. The operation when such a coloring instruction is given will be described below with reference to the flowchart of FIG.

はじめに、この着色処理の基本原理を簡単に述べておこ
う。第4図の1点Pは、第5図の部分R5に包含されてい
る。したがって、まず、部分R5に対応するランを着色す
ればよい。すなわち、第6図のラン4のラン(l,m)
を、(2,m)に変更する。次に、部分R5の上または下に
隣接している部分であって、色値が1である部分を探す
検索処理を行う。この例の場合、部分R3とR6が見付か
る。そうしたら、この部分R3とR6に対応するランを抽出
して、色値を2に変更する処理をする。今度は、部分R3
およびR6の上または下に隣接している部分であって、色
値が1である部分を探す検索処理を行う。部分R3につい
ては部分R1が、部分R6については部分R4,R7,R8が見付か
る。そこで、部分R1,R4,R7,R8に対応するランを抽出し
て、色値を2に変更する処理をする。このような処理を
繰り返してゆけば、最終的には、既に抽出した部分に隣
接しており、かつ、色値が1であるような部分が見付か
らなくなる。そのときは、作業が完了である。上または
下に隣接する部分を検索するのに、ここでは指標データ
というものを用いている。1つの指標データは、(S,E,
Y,F)という4つの要素からなる。ここで、SおよびE
は図のコラム方向の座標値であり、たとえば、第5図に
おいて、部分R5に関連してS=l、E=mのような値が
与えられる。また、Yは図のライン番号に相当するもの
で、たとえば、部分R5の上のラインを示す場合にはY=
3、下のラインを示す場合にはY=5が与えられる。最
後にFは、検索方向を示すフラグであり、ここでは上を
示す↑と、下を示す↓とを用いることにする。この指標
データを用いた検索処理の詳細は後述する。
First, let me briefly explain the basic principle of this coloring process. One point P in FIG. 4 is included in the portion R5 in FIG. Therefore, first, the run corresponding to the portion R5 may be colored. That is, the run (l, m) of run 4 in FIG. 6
To (2, m). Next, a search process is performed to search for a portion that is adjacent above or below the portion R5 and has a color value of 1. In this example, the parts R3 and R6 are found. Then, the run corresponding to the portions R3 and R6 is extracted, and the color value is changed to 2. This time, part R3
Then, a search process is performed to search for a portion adjacent to above or below R6 and having a color value of 1. Part R1 is found for part R3 and parts R4, R7, R8 are found for part R6. Therefore, the run corresponding to the portions R1, R4, R7, R8 is extracted, and the color value is changed to 2. If such a process is repeated, finally, the portion adjacent to the already extracted portion and having the color value of 1 cannot be found. At that time, the work is completed. Index data is used here to search for adjacent parts above or below. One index data is (S, E,
It consists of four elements, Y and F). Where S and E
Is a coordinate value in the column direction of the figure. For example, in FIG. 5, values such as S = 1 and E = m are given in relation to the portion R5. Further, Y corresponds to the line number in the figure. For example, when the line above the portion R5 is shown, Y =
3, Y = 5 is given to indicate the lower line. Finally, F is a flag indicating the search direction, and here, ↑ indicating the upper side and ↓ indicating the lower side are used. Details of the search processing using this index data will be described later.

それでは、第8図の流れ図に基づいた着色処理について
詳述しよう。まず、ステップS6において、指定点P(x,
y)を入力する。すなわち、入力装置300を介して、指定
点入力部133に座標値(x,y)を与えるのである。入力装
置300として、マウスなどの座標入力デバイスを用いれ
ば、オペレータはディスプレイ400に表示された画面を
見ながら、所望の位置指定を行うことができる。続い
て、ステップS7において、更新色を入力する。すなわ
ち、入力装置300を介して、更新色入力部132に更新色の
色値c′(この例の場合、c′=2)を与えるのであ
る。以上までが、オペレータの作業である。これ以後の
作業は、コンピュータ100によって自動的に行われる。
Now, the coloring process based on the flowchart of FIG. 8 will be described in detail. First, in step S6, the designated point P (x,
Enter y). That is, the coordinate value (x, y) is given to the designated point input unit 133 via the input device 300. If a coordinate input device such as a mouse is used as the input device 300, the operator can specify a desired position while looking at the screen displayed on the display 400. Then, in step S7, the update color is input. That is, the color value c ′ of the updated color (c ′ = 2 in this example) is given to the updated color input section 132 via the input device 300. The above is the work of the operator. The subsequent work is automatically performed by the computer 100.

まず、ステップS8において、起点ラン(c0,a0)が抽出
される。この起点ランとは、入力した1点Pの位置を包
含するランである。たとえば、第4図の1点Pが入力さ
れた場合、第5図における部分R5がこの1点Pの位置を
包含する部分であり、これに対応するランは第6図でラ
イン4の4番目のラン(1,m)となる。すなわち、この
例の場合、ラン(1,m)が起点ランとして抽出される。
続いて、ステップS9でこの起点ランの色値が元色として
認識される。すなわち、色値「1」が元色として認識さ
れ、以後、この色値1の領域を、更新色2で着色する作
業を行ってゆくことになる。まず、手初めに、ステップ
S10において、起点ランの色値を更新色に変更する。す
なわち、起点ラン(1,m)が(2,m)に変更され、メイン
メモリ110に書き込まれる。これによって、第5図の部
分R5は、更新色に変わることになる。以上のステップS8
〜10までの処理は、初期色値変換部151においてなされ
る。結局、初期色値変換部151の動作を、第1図のブロ
ック図に基づいて説明すると次のようになる。まず、指
定点入力部133から与えられた1点Pの座標値(x,y)に
基づいて、メインメモリ110から起点ラン(c0,a0)を抽
出する。これは、y座標値から該当ラインを決定し、そ
の該当ライン上のラン(c,a)を左側から順に調べてゆ
き、はじめてa≧xとなるようなランを起点ランとして
抽出すればよい。第6図の例では、まずy座標値から該
当ラインがライン4であることが決定され、ライン4上
のランを左側から順に調べてゆくと、j,k,l<xである
から、条件を満たす初めてのランは4番目のラン(1,
m)ということになる。続いて、この起点ランから元色c
0を認識し、これを記憶する。そして、更新色入力部132
から与えられた更新色c′によって、起点ランを
(c′,a0)を変更し、これをメインメモリ110に書き込
むのである。
First, in step S8, the starting point run (c 0 , a 0 ) is extracted. This starting point run is a run that includes the position of the input point P. For example, when one point P in FIG. 4 is input, the part R5 in FIG. 5 is the part including the position of this one point P, and the corresponding run is the fourth line 4 in FIG. It becomes the run (1, m). That is, in the case of this example, the run (1, m) is extracted as the starting point run.
Then, in step S9, the color value of the starting point run is recognized as the original color. That is, the color value “1” is recognized as the original color, and thereafter, the area having the color value 1 is colored with the updated color 2. First of all, step by step
In S10, the color value of the starting point run is changed to the updated color. That is, the starting point run (1, m) is changed to (2, m) and written in the main memory 110. As a result, the portion R5 in FIG. 5 is changed to the updated color. Step S8 above
The processes up to 10 are performed in the initial color value conversion unit 151. After all, the operation of the initial color value conversion unit 151 will be described below with reference to the block diagram of FIG. First, the starting point run (c 0 , a 0 ) is extracted from the main memory 110 based on the coordinate value (x, y) of one point P given from the designated point input unit 133. To do this, the relevant line is determined from the y-coordinate value, the runs (c, a) on the relevant line are sequentially examined from the left side, and the run in which a ≧ x is first extracted as the starting point run. In the example of FIG. 6, first, it is determined from the y-coordinate value that the relevant line is the line 4, and when the runs on the line 4 are examined sequentially from the left side, j, k, l <x, so the condition The first run that satisfies is the fourth run (1,
m). Then, from this starting point run, the original color c
Recognize 0 and memorize it. Then, the update color input unit 132
The starting color (c ', a 0 ) is changed by the update color c'given by the above, and this is written in the main memory 110.

さて、続くステップS11では、起点ランに基づいて指標
データが生成され、これがスタックに積まれる。すなわ
ち、初期データ蓄積部152が、起点ラン(c0,a0)を指標
データ生成部153に与え、その結果生成された指標デー
タをスタック部154に積むのである。指標データ生成部1
53が生成する指標データは、 (s,e,y+1,↓)と (s,e,y−1,↑) の2つである。ここで、sは起点ランより1つ前のラン
のX座標値、eは起点ランのX座標値(すなわちa0)、
yは起点ランが位置するライン番号である。理解を容易
にするために、第4図〜第6図に示す具体例に即して説
明すれば、起点ランは前述のように、ライン4(y=
4)の4番目のラン(1,m)であるから、これに基づい
て生成される指標データは、 (l,m,5,↓)と (l,m,3,↑) の2つである。この2つの指標データが初期データとし
てスタック部154に積まれることになる。初期データ蓄
積部152の任務はこれで完了である。これ以後の指標デ
ータの生成とその蓄積作業は、順次データ蓄積部155に
よって行われる。
Now, in the following step S11, index data is generated based on the starting point run and is stacked on the stack. That is, the initial data storage unit 152 gives the starting point run (c 0 , a 0 ) to the index data generation unit 153, and stacks the index data generated as a result on the stack unit 154. Index data generator 1
The index data generated by 53 are (s, e, y + 1, ↓) and (s, e, y−1, ↑). Here, s is the X coordinate value of the run immediately before the starting run, e is the X coordinate value of the starting run (that is, a 0 ),
y is the line number where the starting run is located. In order to facilitate understanding, the description will be given with reference to the specific examples shown in FIGS. 4 to 6. As described above, the starting point run is line 4 (y =
Since it is the fourth run (1, m) of 4), the index data generated based on this is two (l, m, 5, ↓) and (l, m, 3, ↑). is there. The two index data are stacked on the stack unit 154 as initial data. The task of the initial data storage unit 152 is now complete. Subsequent generation of index data and its storage operation are sequentially performed by the data storage unit 155.

ここで、指標データの意味するところを簡単に述べてお
こう。一般に、指標データは、(S,E,Y,F)の形をもっ
ているが、この指標データは次のような3条件を満たす
ランを抽出する作業を行う指示を与えるものであり、検
索対象区間を示していると考えてよい。すなわち、 条件1:ラインYにあるランであること、 条件2:区間S〜Eに重複するランであること、 条件3:ランの色値が起点ランの色値c0に等しいこと、 という3条件である。ここで、区間S〜Eに重複するラ
ンとは、コラム(S+1)〜コラムEにその一部(ある
いは全部)が位置するような画素列を示すランを意味す
る。また、方向を示すフラグである↓や↑は、抽出され
たランに基づいて新たな指標データを生成する場合のパ
ターン認識(後述)に利用される。なお、条件3は、指
標データに直接含まれている条件ではなく、全指標デー
タに共通の条件となる。したがって、上述の具体例の指
標データ(l,m,5,↓)は、次のような3条件を満たすラ
ンを検索する作業を行う指示を与えていると考えてよ
い。すなわち、 条件1:ライン5にあるランであること、 条件2:区間l〜mに重複するランであること、 条件3:ランの色値が起点ランの色値c0に等しいこと、 という3条件である。結局、第5図の例では、検索の結
果、部分R6についてのランが上記3条件を満たしてお
り、このランが抽出されることになる。また、指標デー
タ(l,m,3,↑)は、ライン3にあるランのうちから同様
のランを抽出する指示を意味し、第5図の例では、部分
R3についてのランが抽出される結果となる。
Here, I will briefly explain what the indicator data means. Generally, the index data has a form of (S, E, Y, F), but this index data gives an instruction to perform the work of extracting runs satisfying the following three conditions, and the search target section Can be considered to indicate. That is, condition 1: a run on line Y, condition 2: a run that overlaps sections S to E, condition 3: the color value of the run is equal to the color value c 0 of the starting run, and 3 It is a condition. Here, the run overlapping the sections S to E means a run indicating a pixel row such that a part (or all) thereof is located in the column (S + 1) to the column E. In addition, ↓ and ↑, which are flags indicating the direction, are used for pattern recognition (described later) when new index data is generated based on the extracted run. The condition 3 is not a condition directly included in the index data but a condition common to all the index data. Therefore, it can be considered that the index data (l, m, 5, ↓) in the above-described specific example gives an instruction to perform a search operation for a run satisfying the following three conditions. That is, condition 1: the run is on line 5, condition 2: the runs overlap in the sections 1 to m, condition 3: the color value of the run is equal to the color value c 0 of the starting run, and 3 It is a condition. After all, in the example of FIG. 5, as a result of the search, the run for the part R6 satisfies the above three conditions, and this run is extracted. Further, the index data (l, m, 3, ↑) means an instruction to extract a similar run from the runs on line 3, and in the example of FIG.
This results in the run being extracted for R3.

さて、以上述べたステップS11までの手順が、いわば初
期設定を行う処理である。この処理によって、スタック
部154には、2つの指標データが初期データとして積ま
れることになる。続く、ステップS12〜S17までの繰り返
し作業は、スタックから1つの指標データを読出し、こ
の指標データの指示に基づいて該当ランを抽出し、この
該当ランについて着色処理を施し、更にこの該当ランに
基づいて新たな指標データを生成し、生成した指標デー
タをスタックに積むという処理を繰り返す作業である。
こういった繰り返しをスタックが空になるまで続ける
と、所望の着色作業が完了する。以下、この繰り返し作
業について説明する。
Now, the procedure up to step S11 described above is, so to speak, a process of performing initial setting. By this processing, two index data are stacked on the stack unit 154 as initial data. In the subsequent repetitive work of steps S12 to S17, one index data is read from the stack, the corresponding run is extracted based on the instruction of the index data, the coloring process is applied to the corresponding run, and further, based on the corresponding run. It is a work of repeating the process of generating new index data by using the stack and stacking the generated index data on the stack.
By repeating such repetition until the stack is empty, the desired coloring work is completed. The repetitive work will be described below.

はじめに、ステップS12でスタックが空か否か判断され
る。前述のように、スタックが空になった時点でこの繰
り返し作業は完了する。スタックに指標データが残って
いる場合には、ステップS13においてどれか1つの指標
データを読み出す。指標データが複数積まれている場
合、どの指標データから読出してもかまわないが、本実
施例では、先入れ後出し(First In Last Out)の順に
よって読出しを行っている。続いて、ステップS14にお
いて、この指標データの示す検索対象区間を検索し、該
当するランがあるか否かを判断し、該当するランがあれ
ば、ステップS15でこれを抽出する。以上のステップS12
〜S15までの処理は、第1図に示す装置におけるランレ
ングスデータ抽出部156によって行われる。すなわち、
ランレングスデータ抽出部156は、スタック部154から1
つの指標データを読出し、この指標データと初期色値変
換部151に記憶されている起点ランの色値c0とに基づい
てメインメモリ110を検索して該当ランを抽出する機能
を有する。抽出された該当ランは順次データ蓄積部155
および順次色値変換部157に与えられる。なお、ランレ
ングスデータ抽出部156は、抽出したランとともに、ス
タック部から読出した指標データを、順次データ蓄積部
155に与える。
First, in step S12, it is determined whether or not the stack is empty. As mentioned above, this repetitive work is completed when the stack becomes empty. If index data remains in the stack, one of the index data is read in step S13. When a plurality of index data are stacked, it does not matter which index data is read, but in the present embodiment, reading is performed in the order of first in last out. Subsequently, in step S14, the search target section indicated by the index data is searched to determine whether there is a corresponding run. If there is a corresponding run, this is extracted in step S15. Step S12 above
The processing from S15 to S15 is performed by the run length data extraction unit 156 in the apparatus shown in FIG. That is,
The run-length data extraction unit 156 uses the stack units 154 to 1
It has a function of reading out one index data, searching the main memory 110 based on this index data and the color value c 0 of the starting run stored in the initial color value conversion unit 151, and extracting the corresponding run. The extracted corresponding runs are sequentially stored in the data storage unit 155.
And are sequentially given to the color value conversion unit 157. The run length data extraction unit 156 sequentially stores the extracted runs and the index data read from the stack unit in the data storage unit.
Give to 155.

さて、該当ランが抽出されたら、ステップS16におい
て、この該当ランの色値c0が更新色の色値c′に変更さ
れる。すなわち、第1図における順次色値変換部157
が、抽出された該当ラン(c0,a)を(c′,a)に変更
し、この変更したランをメインメモリ110に書き込む作
業を行う。
Now, when the relevant run is extracted, the color value c 0 of this relevant run is changed to the color value c ′ of the updated color in step S16. That is, the sequential color value conversion unit 157 in FIG.
Changes the extracted corresponding run (c 0 , a) to (c ′, a) and writes the changed run to the main memory 110.

続く、ステップS17では、該当ランおよびこの該当ラン
を検索するのに用いた指標データに基づいて、新たな指
標データが生成され、これがスタックに積まれる。この
作業は順次データ蓄積部155が行う。順次データ蓄積部1
55は、前述のように、ランレングスデータ抽出部156か
ら、ランと指標データを受け取るが、これを指標データ
生成部153に与えて新たな指標データを生成させ、この
新たな指標データをスタック部154に積むのである。
Subsequently, in step S17, new index data is generated based on the corresponding run and the index data used for searching the corresponding run, and this is added to the stack. This work is sequentially performed by the data storage unit 155. Sequential data storage unit 1
As described above, the 55 receives the run and the index data from the run-length data extraction unit 156, and supplies this to the index data generation unit 153 to generate new index data, and the new index data is stacked in the stack unit. It is loaded on 154.

ステップS17までの処理が完了すると、再びステップS14
に戻る。すなわち、同じ指標データに基づく該当ランが
他にあるかを検索することになる。一般に、1つの指標
データが示す3条件を満たす該当ランは1つとは限らな
いので、すべての該当ランについてステップS15〜S17の
処理が繰り返されるのである。すべての該当ランについ
ての処理が完了したら、ステップS14からステップS12に
戻る。すなわち、スタックから新たな指標データが読み
出され、この指標データに基づいて全く同様の処理が繰
り返されることになる。このような作業が、スタックが
空になるまで繰り返される。
When the processing up to step S17 is completed, step S14 is executed again.
Return to. That is, it is searched whether there is another corresponding run based on the same index data. In general, the number of applicable runs that satisfy the three conditions indicated by one index data is not limited to one, and therefore the processes of steps S15 to S17 are repeated for all the applicable runs. When the processing for all the corresponding runs is completed, the process returns from step S14 to step S12. That is, new index data is read from the stack, and exactly the same processing is repeated based on this index data. This process is repeated until the stack becomes empty.

続いて、ステップS17における新たな指標データの生成
処理を詳述する。この処理は、結局、「指標データ(S,
E,Y,F)と、この指標データに基づいて抽出されたラン
(c0,a)と、に基づいて、新たな指標データを生成する
処理」ということができる。この処理を、方向を示すフ
ラグFが↓の場合と、↑の場合とに分けて説明する。
Next, the process of generating new index data in step S17 will be described in detail. In the end, this process ends with “index data (S,
E, Y, F) and the run (c 0 , a) extracted based on this index data can be referred to as a process of generating new index data ”. This processing will be described separately for the case where the flag F indicating the direction is ↓ and the case where it is ↑.

まず、F=↓の場合を第9図に基づいて説明する。はじ
めに、この図の概念について述べよう。説明の便宜上、
第9図(a)を例にとって説明する。この図は、ライン
(Y−1)とその下のラインYに位置する画素列を示し
ており、画素列内の数字はその画素列の色値を示す。ラ
ンレングスデータで、これらの画素列を表わすと、 (0,a) (1,b) (0,c) (0,α) (1,β) (0,γ) ということになる。ここで、色値1(元色)の部分を色
値2(更新色)とする着色処理を行っているものとす
る。したがって、図でハッチングを施した部分が、色値
2に変更されることになる。いま、ライン(Y−1)の
(1,b)なるランが起点ランであると考えられると、こ
のランに基づいて、(a,b,Y,↓)という指標データと、
(a,b,Y−2,↑)という指標データが生成されることは
前述のとおりである。もっとも、ラン(1,b)は起点ラ
ンである必要はなく、任意のラン(1,b)が抽出され、
このランが(2,b)に変更され着色処理が完了してお
り、このランに基づいて指標データ(a,b,Y,↓)が生成
されたという状態を考えてもよい。さて、指標データ
(a,b,Y,↓)を読出してこの指標データに基づいて検索
を行うと、ラインYに(1,β)というランが見付かり、
このランが抽出されることになる。ラン(1,β)は、 条件1:ラインYにあるランであること、 条件2:区間a〜bに重複するランであること、 条件3:ランの色値が起点ランの色値1に等しいこと、 という3条件を満たしている。第9図(a)は、このよ
うなラン(1,β)が抽出された状態を示している。ライ
ンYにランが抽出される場合は、同図(a)の場合に限
られるわけではなく、他に同図(b)〜(d)に示すよ
うな場合もある。結局、ラインYの該当ランのパターン
としては、同図(a)〜(d)に示すパターン1〜4の
いずれかになる。それぞれのパターンについての論理条
件を図の中に一緒に示してある。したがって、検索作業
としては、この4パターンのいずれかの論理条件を満た
すランを探すという論理作業になるわけである。
First, the case of F = ↓ will be described with reference to FIG. First, let's talk about the concept of this figure. For convenience of explanation,
An example will be described with reference to FIG. This figure shows a pixel row located on the line (Y-1) and the line Y below it, and the numbers in the pixel row indicate the color values of the pixel row. When these pixel columns are represented by run length data, they are (0, a) (1, b) (0, c) (0, α) (1, β) (0, γ). Here, it is assumed that the coloring process is performed by setting the color value 1 (original color) portion to the color value 2 (updated color). Therefore, the hatched portion in the figure is changed to the color value 2. Now, if it is considered that the run of (1, b) on the line (Y-1) is the starting run, based on this run, the index data of (a, b, Y, ↓),
As described above, the index data of (a, b, Y-2, ↑) is generated. However, the run (1, b) does not have to be the starting run, and an arbitrary run (1, b) is extracted,
It may be considered that the run is changed to (2, b), the coloring process is completed, and the index data (a, b, Y, ↓) is generated based on the run. Now, when the index data (a, b, Y, ↓) is read and a search is performed based on this index data, a run of (1, β) is found on the line Y,
This run will be extracted. Run (1, β) is as follows: Condition 1: Run on line Y, Condition 2: Run that overlaps sections a and b, Condition 3: Color value of run is set to color value 1 of the starting run The three conditions of being equal are satisfied. FIG. 9A shows a state in which such a run (1, β) is extracted. The case where the run is extracted on the line Y is not limited to the case of FIG. 7A, but there are other cases as shown in FIGS. Eventually, the pattern of the corresponding run on the line Y is any of patterns 1 to 4 shown in FIGS. The logical conditions for each pattern are shown together in the figure. Therefore, the search operation is a logical operation of searching for a run that satisfies any one of the four patterns.

さて、第1図の装置において、指標データ(a,b,Y,↓)
に基づいて、ラインYに該当ラン(1,β)が見付かる
と、ランレングスデータ抽出部156は、この該当ラン
(1,β)を順次色値変換部157に与える。ここで、該当
ラン(1,β)は(2,β)に変更され、メインメモリ110
に書き込まれる。一方、順次データ蓄積部155には、該
当ラン(1,β)とともに、指標データ(a,b,Y,↓)が与
えられ、指標データ生成部153は、これらのデータに基
づいて新たな指標データを生成することになる。生成さ
れる指標データは、上述の4パターンによってそれぞれ
異なる。以下に、各パターンについて生成される指標デ
ータを示す。
Now, in the device of Fig. 1, index data (a, b, Y, ↓)
When the corresponding run (1, β) is found on the line Y based on the above, the run length data extraction unit 156 sequentially supplies the corresponding run (1, β) to the color value conversion unit 157. Here, the corresponding run (1, β) is changed to (2, β), and the main memory 110
Written in. On the other hand, the index data (a, b, Y, ↓) is given to the sequential data storage unit 155 together with the corresponding run (1, β), and the index data generation unit 153 creates a new index based on these data. Will generate the data. The generated index data differs depending on the above-mentioned four patterns. The index data generated for each pattern is shown below.

パターン1:A(α,a,Y−1,↑) B(b,β,Y−1,↑) C(α,β,Y+1,↓) パターン2:A(α,β,Y+1,↓) パターン3:A(α,a,Y−1,↑) B(b,β,Y+1,↓) パターン4:A(b,β,Y−1,↓) B(α,β,Y+1,↓) このように、パターンによって、生成される指標データ
の数も異なる。結局、この生成される指標データを一般
的に(s,e,y,f)とすれば、これから検出すべき検索対
象区間の始点sおよび終点eと、そのライン番号yと、
現在抽出して処理を行っているランのラインとこれから
検索すべきライン(ライン番号y)との位置関係を示す
方向フラグfと、を並べることによって、新たな指標デ
ータが生成されるということになる。たとえば、パター
ン1では、上述のようにA,B,Cの3つの新たな指標デー
タが生成されることになるが、これは第9図(a)に、
各アルファベットを円で囲った記号で模式的に示すよう
な検索対象区間に対応することになる。なお、1つの指
標データの条件を満足するランが複数見付かる場合があ
る。たとえば、第9図(e)では、(a,b,Y,↓)なる条
件を満足するランは3つ存在する。この場合は、各ラン
についてそれぞれパターン1〜4のどれかを当てはめ、
図のA〜Eで示すような検索対象に対応する新たな指標
データがそれぞれ生成されることになる。
Pattern 1: A (α, a, Y-1, ↑) B (b, β, Y-1, ↑) C (α, β, Y + 1, ↓) Pattern 2: A (α, β, Y + 1, ↓) Pattern 3: A (α, a, Y−1, ↑) B (b, β, Y + 1, ↓) Pattern 4: A (b, β, Y−1, ↓) B (α, β, Y + 1, ↓) In this way, the number of generated index data differs depending on the pattern. After all, if the generated index data is generally (s, e, y, f), the start point s and the end point e of the search target section to be detected, the line number y thereof,
By arranging the direction flag f indicating the positional relationship between the line of the run currently being extracted and processed and the line to be searched (line number y), new index data is generated. Become. For example, in pattern 1, three new index data of A, B, and C will be generated as described above, which is shown in FIG. 9 (a).
This corresponds to a search target section as schematically shown by a symbol enclosing each alphabet. Note that there may be a case where a plurality of runs satisfying the condition of one index data is found. For example, in FIG. 9 (e), there are three runs that satisfy the condition (a, b, Y, ↓). In this case, apply one of patterns 1 to 4 for each run,
New index data corresponding to the search targets as shown by A to E in the figure are respectively generated.

一方、F=↑の場合のパターン5〜8は、第10図(a)
〜(d)のようになり、複数のランが存在する場合の例
は同図(e)のようになる。生成される指標データは、
やはり4パターンによってそれぞれ異なり、下記のよう
になる。
On the other hand, patterns 5 to 8 in the case of F = ↑ are shown in FIG.
(D), and an example of the case where there are a plurality of runs is as shown in (e). The generated index data is
After all, it is different for each of the four patterns, and is as follows.

パターン5:A(α,β,Y−1,↑) パターン6:A(α,β,Y−1,↑) B(α,a,Y+1,↓) C(b,β,Y+1,↓) パターン7:A(α,β,Y−1,↑) B(b,β,Y+1,↓) パターン8:A(α,β,Y−1,↑) B(α,a,Y+1,↓) なお、方向を示すフラグFは、第9図のパターンを適用
するのか、第10図のパターンを適用するのか、を決定す
るために必要になる。たとえば、ラン(α,β)ととも
に、(a,b,Y,F)なる指標データが与えられた場合に、
a>αかつb<βであった場合、フラグFを参照しない
と、パターン1を適用するのか、あるいはパターン6を
適用するのか区別することができないのである。
Pattern 5: A (α, β, Y−1, ↑) Pattern 6: A (α, β, Y−1, ↑) B (α, a, Y + 1, ↓) C (b, β, Y + 1, ↓) Pattern 7: A (α, β, Y−1, ↑) B (b, β, Y + 1, ↓) Pattern 8: A (α, β, Y−1, ↑) B (α, a, Y + 1, ↓) The flag F indicating the direction is necessary to determine whether to apply the pattern shown in FIG. 9 or the pattern shown in FIG. For example, when index data (a, b, Y, F) is given along with runs (α, β),
If a> α and b <β, it is impossible to distinguish whether the pattern 1 or the pattern 6 is applied without referring to the flag F.

最後に、第4図〜第6図に示す例について、第8図の流
れ図に示す処理を適用した場合の作業の流れを簡単に述
べておく。まず、起点ランとして部分R5についてのラン
(1,m)が取り出され、これが(2,m)に変更されるとと
もに、2つの指標データ(l,m,3,↑)と(l,m,5,↓)が
生成される。次に、(l,m,5,↓)が読み出され、ライン
5に部分R6についてのラン(1,p)が該当ランとして抽
出される。このときの適用パターンはパターン1であ
る。そこで、該当ラン(1,p)が(2,p)に変更された
後、次の3つの指標データが生成され、スタックに積ま
れる。
Finally, with respect to the examples shown in FIGS. 4 to 6, the flow of work when the processing shown in the flowchart of FIG. 8 is applied will be briefly described. First, the run (1, m) for the part R5 is extracted as the starting point run, and this is changed to (2, m), and two index data (l, m, 3, ↑) and (l, m, 5, ↓) is generated. Next, (l, m, 5, ↓) is read, and the run (1, p) for the portion R6 is extracted as the corresponding run on the line 5. The applied pattern at this time is pattern 1. Therefore, after the corresponding run (1, p) is changed to (2, p), the following three index data are generated and stacked on the stack.

D1(o,l,4,↑) D2(m,p,4,↑) D3(o,p,6,↓) 続いて、上述の指標データD3が読み出され、ライン6に
部分R7についてのラン(1,s)と、部分R8についてのラ
ン(1,u)とが、該当ラインとして抽出される。前者に
ついての適用パターンはパターン3であり、後者につい
てはパターン2である。そこで、前者について、 D4(r,o,5,↑) D5(r,s,7,↓) 後者について、 D6(t,u,7,↓) なる指標データが生成され、スタックに積まれる。続い
て、指標データD6が読み出され、ライン7内の該当ラン
を検索するが、該当ランは見付からない。この場合、新
たな指標データは生成されないことになる。そこで次の
指標データD5が読み出され、ライン7の部分R9について
のランが抽出される。以下、同様にして処理は継続され
てゆく。
D1 (o, l, 4, ↑) D2 (m, p, 4, ↑) D3 (o, p, 6, ↓) Then, the above-mentioned index data D3 is read out, and the line 6 for the part R7 is read. The run (1, s) and the run (1, u) for the portion R8 are extracted as the relevant line. The pattern applied to the former is pattern 3, and the pattern applied to the latter is pattern 2. Therefore, for the former, D4 (r, o, 5, ↑) D5 (r, s, 7, ↓) and for the latter D6 (t, u, 7, ↓) index data are generated and stacked on the stack. Then, the index data D6 is read and the corresponding run in the line 7 is searched, but the corresponding run is not found. In this case, new index data will not be generated. Then, the next index data D5 is read and the run for the portion R9 of the line 7 is extracted. Thereafter, the processing is continued in the same manner.

指定点入力による着色方法II 以上、本願第2の発明に関連する指定点入力による着色
方法を、一実施例に基づいて説明した。ここでは本願第
1の発明の方法と、上述の方法との相違点だけを説明す
る。上述の方法では、指標データは、方向を示すフラグ
Fをもっていたが、ここで述べる方法は、このフラグF
を使わない点が異なる。すなわち、指標データは(S,E,
Y)の形になる。そして、新たな指標データとしては、
パターン1〜8のいずれの場合にも常に、 (α,β,Y−1) (α,β,Y+1) の2つを生成することにする。
Coloring Method by Inputting Designated Points II The coloring method by inputting designated points, which is related to the second invention of the present application, has been described above based on the embodiment. Here, only the differences between the method of the first invention of the present application and the method described above will be described. In the above-mentioned method, the index data has the flag F indicating the direction, but the method described here uses this flag F.
The difference is not to use. That is, the index data is (S, E,
Y) form. And as new index data,
In any of patterns 1 to 8, two (α, β, Y−1) (α, β, Y + 1) are always generated.

したがって、この方法では、新たな指標データの生成論
理が非常に単純になる。その反面、既に抽出済みの区間
についても再度検索が行われるため、無駄な検索作業を
避けることができないというデメリットがある。これ
は、たとえば第9図の各パターンについて考えれば、容
易に理解できる。同図(a)に示すパターン1におい
て、前述の実施例では、アルファベットを円で囲った記
号で示す検索対象区間A,B,Cについて、該当ランの有無
を検索していたわけであるが、ここで述べる方法では、
ライン(Y−1)の区間abも検索対象区間に入ってしま
うわけである。もちろん、区間abに存在するランは、既
に抽出済みのランであり、既に色値が2に変更されてい
るために該当ランとして再度抽出されるおそれはないの
で、作業に何ら支障を及ぼすことはない。しかしなが
ら、無駄な区間が検索対象に入ってくることは否めな
い。パターン2は、この無駄がより顕著に現れる例であ
る。前述の実施例では、検索対象区間は区間Aだけであ
り、このパターンから生成される新たな指標データは、
(α,β,Y+1)の1つだけであるが、ここで述べる方
法では、更に(α,β,Y−1)という無駄な指標データ
が生成されることになる。この無駄な指標データに基づ
いて、無駄な検索作業が行われることになる。
Therefore, this method greatly simplifies the generation logic of the new index data. On the other hand, since the search is performed again for the already-extracted section, there is a demerit that wasteful search work cannot be avoided. This can be easily understood by considering each pattern of FIG. 9, for example. In the pattern 1 shown in FIG. 7A, in the above-described embodiment, the search target sections A, B, and C indicated by the symbols enclosing the alphabet are searched for the corresponding run. In the method described in
The section ab of the line (Y-1) also falls within the search target section. Of course, the run existing in the section ab is a run that has already been extracted, and since the color value has already been changed to 2, there is no danger of being extracted again as a corresponding run, so there is no hindrance to the work. Absent. However, it cannot be denied that useless sections are included in the search target. Pattern 2 is an example in which this waste appears more prominently. In the above-described embodiment, the search target section is only the section A, and the new index data generated from this pattern is
Although there is only one (α, β, Y + 1), in the method described here, useless index data of (α, β, Y−1) is further generated. Useless search work is performed based on this useless index data.

このように、無駄な検索作業が行われるというデメリッ
トがあるものの、方向を示すフラグFに関する処理、パ
ターン判断処理、などを省くことができるというメリッ
トが得られるため、いずれの方法を用いるかは、種々の
適用条件に基づいて決定するのが好ましい。
As described above, although there is a demerit that wasteful search work is performed, it is possible to obtain a merit that a process related to the flag F indicating a direction, a pattern determination process, and the like can be omitted. It is preferable to make a decision based on various application conditions.

以上、本願2つの発明を、第1図に示す装置に基づく実
施例について述べてきたが、これらの発明はこの実施例
に限定されるわけではなく、種々の改変が可能である。
特に、第1図に示す各構成要素は、本発明を機能的にと
らえてブロック化したものであり、実際には、これらの
各機能ブロックはソフトウェアの中で実現されるべきも
のとなろう。このような機能はソフトウェアの中にどの
ような形で盛り込んでもかまわない。
Although the two inventions of the present application have been described above with reference to the embodiments based on the apparatus shown in FIG. 1, these inventions are not limited to these embodiments, and various modifications can be made.
In particular, the components shown in FIG. 1 are functional blocks of the present invention, and in practice, each of these functional blocks should be realized in software. It doesn't matter what kind of function is included in the software.

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

以上のとおり、本願発明によれば画像処理装置におい
て、メインメモリにはランレングスデータの形式で画像
データを保持し、このランレングスデータに対して着色
処理を行うようにしたため、メインメモリの容量を低下
させコストダウンを図ることができるとともに、効率の
よい着色演算が可能になる。
As described above, according to the present invention, in the image processing apparatus, since the main memory holds the image data in the format of the run length data and the coloring process is performed on the run length data, the capacity of the main memory is reduced. It is possible to reduce the cost and reduce the cost, and it is possible to perform efficient coloring calculation.

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

第1図は本発明の一実施例に係る画像処理装置の構成を
示すブロック図、第2図は画像の一例を示す図、第3図
は第2図の画像をランレングスデータで表示した例を示
す図、第4図は本発明の装置による着色処理の対象とな
る画像を示す図、第5図は第4図に示す画像の着色処理
プロセスを説明する図、第6図は第4図に示す画像をラ
ンレングスデータで表示した図、第7図は元色入力によ
る着色処理を示す流れ図、第8図は本願発明による着色
処理を示す流れ図、第9図および第10図は本願発明にお
ける着色処理で利用するパターンを示す図である。
FIG. 1 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention, FIG. 2 is a diagram showing an example of an image, and FIG. 3 is an example in which the image of FIG. 2 is displayed in run length data. FIG. 4, FIG. 4 is a diagram showing an image to be colored by the apparatus of the present invention, FIG. 5 is a diagram for explaining the coloring process of the image shown in FIG. 4, and FIG. 6 is FIG. FIG. 7 is a flow chart showing a coloring process by inputting an original color, FIG. 8 is a flow chart showing a coloring process according to the present invention, and FIGS. 9 and 10 are diagrams showing the image shown in FIG. It is a figure which shows the pattern utilized by coloring processing.

フロントページの続き (56)参考文献 特開 昭55−28666(JP,A) 特開 昭59−193492(JP,A) 特開 昭58−56575(JP,A) 特開 昭63−177277(JP,A) 特開 昭63−94372(JP,A) 特開 昭63−104085(JP,A) 電子通信学会論文誌VOL.J63−D, No.10,P.899−906Continuation of the front page (56) Reference JP 55-28666 (JP, A) JP 59-193492 (JP, A) JP 58-56575 (JP, A) JP 63-177277 (JP , A) JP-A-63-94372 (JP, A) JP-A-63-104085 (JP, A) IEICE Transactions VOL. J63-D, No. 10, P. 899-906

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】XY平面上に配列された画素によって構成さ
れる画像を記憶するメモリであって、X方向に並んだ画
素列を、画素のもつ色値cと、同じ色値を有する画素の
並びの終端を示すX座標値aと、によって表現される一
連のランレングスデータ(c,a)で定義し、これを記憶
するメインメモリと、 前記メインメモリ内のランレングスデータをラスターデ
ータに変換するデータ形式変換部と、 ディスプレイに画像表示を行うために、前記画像データ
変換部で変換されたラスターデータを保持するフレーム
メモリと、 前記メインメモリ内の画像について、画像内の1点Pお
よび新たな色値c′を指定するための入力部と、 前記1点Pの位置を包含するランレングスデータ(c0,a
0)を抽出し、このデータの色値c0を前記色値c′に変
更し、変更後のデータ(c′,a0)によって前記メイン
メモリ内のもとのデータを置換する初期色値変換部と、 第1のX座標値S、第2のX座標値E、およびY方向位
置を示すデータY、の3つのデータ(S,E,Y)によって
構成される指標データを蓄積するスタック部と、 与えられたランレングスデータ(c,a)によって定義さ
れる画素列について、その始点に関するデータs、終点
に関するデータe、およびそのY方向位置を示すデータ
yを求め、Y方向位置(y+1)で示される下方に隣接
する画素列のために(s,e,y+1)なる指標データを、
Y方向位置(y−1)で示される上方に隣接する画素列
のために(s,e,y−1)なる指標データを、それぞれ生
成する指標データ生成部と、 前記指標データ生成部に、前記ランレングスデータ
(c0,a0)を与え、生成した指標データを前記スタック
部に蓄積させる初期データ蓄積部と、 前記スタック部から1指標データ(S,E,Y)を読出し、
この指標データが示すY方向位置Yにあり、前記色値c0
をもち、しかも定義される画素列が区間SEに重複すると
いう3条件を満たすランレングスデータを抽出するラン
レングスデータ抽出部と、 前記ランレングスデータ抽出部によって抽出されたラン
レングスデータの色値c0を前記色値c′に変更し、変更
後のデータによって前記メインメモリ内のもとのデータ
を置換する順次色値変換部と、 前記ランレングスデータ抽出部によって抽出されたラン
レングスデータを、前記指標データ生成部に与え、生成
した指標データを前記スタック部に蓄積させる順次デー
タ蓄積部と、 を備えることを特徴とする画像処理装置。
1. A memory for storing an image composed of pixels arranged on an XY plane, wherein a pixel column arranged in the X direction is stored in a pixel having the same color value as the color value c of the pixel. A main memory that is defined by a series of run length data (c, a) represented by the X coordinate value a indicating the end of the array and stores the run length data, and the run length data in the main memory is converted to raster data. A data format conversion unit, a frame memory that holds the raster data converted by the image data conversion unit for displaying an image on a display, and an image in the main memory, one point P in the image and a new one. An input section for designating a different color value c ', and run length data (c 0 , a
0 ), the color value c 0 of this data is changed to the color value c ′, and the original data in the main memory is replaced by the changed data (c ′, a 0 ). A stack for accumulating index data composed of a conversion unit and three data (S, E, Y) of a first X coordinate value S, a second X coordinate value E, and data Y indicating a Y direction position. Part and the pixel row defined by the given run length data (c, a), data s regarding the start point, data e regarding the end point, and data y indicating the Y direction position thereof are obtained, and the Y direction position (y + 1 ), The index data of (s, e, y + 1) for the pixel columns adjacent to
An index data generation unit that generates index data (s, e, y-1) for the pixel columns that are adjacent to each other and that are adjacent to each other at the position (y-1) in the Y direction; An initial data storage unit that gives the run length data (c 0 , a 0 ) and stores the generated index data in the stack unit; and reads one index data (S, E, Y) from the stack unit,
At the position Y in the Y direction indicated by the index data, the color value c 0
And a run length data extraction unit that extracts run length data that satisfies the three conditions that the defined pixel row overlaps the section SE, and the color value c of the run length data extracted by the run length data extraction unit. A sequential color value conversion unit that changes 0 to the color value c ′ and replaces the original data in the main memory with the changed data; and run length data extracted by the run length data extraction unit, An image processing apparatus, comprising: a sequential data storage unit that supplies the index data generation unit and stores the generated index data in the stack unit.
【請求項2】XY平面上に配列された画素によって構成さ
れる画像を記憶するメモリであって、X方向に並んだ画
素列を、画素のもつ色値cと、同じ色値を有する画素の
並びの終端を示すX座標値aと、によって表現される一
連のランレングスデータ(c,a)で定義し、これを記憶
するメインメモリと、 前記メインメモリ内のランレングスデータをラスターデ
ータに変換するデータ形式変換部と、 ディスプレイに画像表示を行うために、前記画像データ
変換部で変換されたラスターデータを保持するフレーム
メモリと、 前記メインメモリ内の画像について、画像内の1点Pお
よび新たな色値c′を指定するための入力部と、 前記1点Pの位置を包含するランレングスデータ(c0,a
0)を抽出し、このデータの色値c0を前記色値c′に変
更し、変更後のデータ(c′,a0)によって前記メイン
メモリ内のもとのデータを置換する初期色値変換部と、 第1のX座標値S、第2のX座標値E、およびY方向位
置を示すデータY、方向を示すフラグFの4つのデータ
(S,E,Y,F)によって構成される指標データを蓄積する
スタック部と、 与えられたランレングスデータ(c,a)と、指標データ
が与えられた場合にはこの与えられた指標データ(S,E,
Y,F)と、を参照し、次の検索すべき検索対象区間の始
点sおよび終点e、ならびにこの区間のY方向の位置y
および方向fを求め、(s,e,y,f)なる指標データを生
成する指標データ生成部と、 前記指標データ生成部に、前記ランレングスデータ
(c0,a0)を与え、生成した指標データを前記スタック
部に蓄積させる初期データ蓄積部と、 前記スタック部から1指標データ(S,E,Y,F)を読出
し、この指標データが示すY方向位置Yにあり、前記色
値c0をもち、しかも定義される画素列が区間SEに重複す
るという3条件を満たすランレングスデータを抽出する
ランレングスデータ抽出部と、 前記ランレングスデータ抽出部によって抽出されたデー
タの色値c0を前記色値c′に変更し、変更後のデータに
よって前記メインメモリ内のもとのデータを置換する順
次色値変換部と、 前記ランレングスデータ抽出部によって抽出されたラン
レングデータ(c,a)と、このランレングスデータを抽
出する際に用いた指標データ(S,E,Y,F)とを、それぞ
れ前記指標データ生成部に与え、生成した指標データを
前記スタック部に蓄積させる順次データ蓄積部と、 を備えることを特徴とする画像処理装置。
2. A memory for storing an image composed of pixels arranged on an XY plane, wherein a pixel row arranged in the X direction is a pixel having the same color value as the color value c of the pixel. A main memory that is defined by a series of run length data (c, a) represented by the X coordinate value a indicating the end of the array and stores the run length data, and the run length data in the main memory is converted to raster data. A data format conversion unit, a frame memory that holds the raster data converted by the image data conversion unit for displaying an image on a display, and an image in the main memory, one point P in the image and a new one. An input section for designating a different color value c ', and run length data (c 0 , a
0 ), the color value c 0 of this data is changed to the color value c ′, and the original data in the main memory is replaced by the changed data (c ′, a 0 ). It is composed of a conversion unit, four data (S, E, Y, F) of a first X coordinate value S, a second X coordinate value E, data Y indicating the Y direction position, and flag F indicating the direction. The stack part for accumulating the index data, the given run length data (c, a), and the index data (S, E,
Y, F), and the start point s and end point e of the next search target section to be searched, and the position y in the Y direction of this section.
And the direction f, the index data generation unit that generates index data of (s, e, y, f), and the run length data (c 0 , a 0 ) are given to the index data generation unit and generated. An initial data storage unit that stores index data in the stack unit, and one index data (S, E, Y, F) is read from the stack unit, and is located at the Y direction position Y indicated by the index data, and the color value c A run length data extraction unit that extracts run length data that has three conditions of 0 and that the defined pixel row overlaps the section SE; and a color value c 0 of the data extracted by the run length data extraction unit. To the color value c ′ and replace the original data in the main memory with the changed data, and the run-length data (c, c) extracted by the run-length data extraction unit. a) and The index data (S, E, Y, F) used when extracting the run length data of is given to the index data generation unit, respectively, and a sequential data storage unit that accumulates the generated index data in the stack unit. An image processing apparatus comprising:
JP1024239A 1989-02-02 1989-02-02 Image processing device Expired - Lifetime JPH0758427B2 (en)

Priority Applications (7)

Application Number Priority Date Filing Date Title
JP1024239A JPH0758427B2 (en) 1989-02-02 1989-02-02 Image processing device
DE69031446T DE69031446T2 (en) 1989-02-02 1990-01-30 IMAGE TREATMENT ARRANGEMENT
EP96110758A EP0737937B1 (en) 1989-02-02 1990-01-30 Image processing apparatus
PCT/JP1990/000110 WO1990009018A1 (en) 1989-02-02 1990-01-30 Image processing apparatus
DE69033539T DE69033539T2 (en) 1989-02-02 1990-01-30 Image processing device
US07/582,198 US5377023A (en) 1989-02-02 1990-01-30 Pictorial image processing system
EP90902373A EP0407614B1 (en) 1989-02-02 1990-01-30 Image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1024239A JPH0758427B2 (en) 1989-02-02 1989-02-02 Image processing device

Publications (2)

Publication Number Publication Date
JPH02204780A JPH02204780A (en) 1990-08-14
JPH0758427B2 true JPH0758427B2 (en) 1995-06-21

Family

ID=12132700

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1024239A Expired - Lifetime JPH0758427B2 (en) 1989-02-02 1989-02-02 Image processing device

Country Status (1)

Country Link
JP (1) JPH0758427B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6019517B2 (en) * 1978-08-22 1985-05-16 日本電信電話株式会社 Color figure creation processing device
JPS59193492A (en) * 1983-04-18 1984-11-02 富士通株式会社 Display control system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
電子通信学会論文誌VOL.J63−D,No.10,P.899−906

Also Published As

Publication number Publication date
JPH02204780A (en) 1990-08-14

Similar Documents

Publication Publication Date Title
US5740285A (en) Image reduction/enlargement technique
EP0407614B1 (en) Image processing apparatus
JPH04284246A (en) Coloring treatment method of picrure region
JPH0481227B2 (en)
JPH0758427B2 (en) Image processing device
JPH06175342A (en) Plate making processor
JPH03179873A (en) Picture processing method
JPH0693185B2 (en) Image processing device
JP2596204B2 (en) High-speed layout device for image data
JPH0366157B2 (en)
JPS63233465A (en) Input display system for numerical format code
JPH02216590A (en) Image processor
JP2618017B2 (en) Layout simulation device and layout device
JPH0329059A (en) Method and equipment for processing image
JPH0411020B2 (en)
JP2989261B2 (en) Coloring equipment
JPS59167748A (en) Information storage device
JPH0560598B2 (en)
JPH0666871B2 (en) Image processing device
JPH0581397A (en) Page scroll method and image processor
EP0637811A2 (en) Method for defining a plurality of form definition data sets
JPH0548851A (en) Picture recording device
JPH01134673A (en) Method and device for displaying data of block chart
JPS58208864A (en) Plotting system of semigraphic display
JPS61173951A (en) Printing control apparatus