JP2001076120A - Image processor and method for image processing - Google Patents

Image processor and method for image processing

Info

Publication number
JP2001076120A
JP2001076120A JP24530899A JP24530899A JP2001076120A JP 2001076120 A JP2001076120 A JP 2001076120A JP 24530899 A JP24530899 A JP 24530899A JP 24530899 A JP24530899 A JP 24530899A JP 2001076120 A JP2001076120 A JP 2001076120A
Authority
JP
Japan
Prior art keywords
color
appearances
colors
representative
palette
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP24530899A
Other languages
Japanese (ja)
Inventor
Masanori Onda
昌徳 恩田
Tadashi Yanagida
正 柳田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP24530899A priority Critical patent/JP2001076120A/en
Publication of JP2001076120A publication Critical patent/JP2001076120A/en
Pending legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Input (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processor and an image processing method which can fast prepare a color palette composed of only colors that are appropriately and originally used. SOLUTION: The primary representative color deciding part 2 of this image processor compares the number of appearances of each color with a 1st threshold on the basis of a histogram prepared by an appearance color histogram preparing part 1 and selects the color of the number of appearances being equal to or more than the 1st threshold as a candidate color. The part 2 further calculates the total of the number of appearances of the selected candidate color and compares the total value with a 2nd threshold. When the total value does not reach the 2nd threshold, the 1st threshold is lowered, and the selection of a candidate color and its comparison with the 2nd threshold are repeated. A candidate color selected at a time when the total value reaches the 2nd threshold is defined as a representative color, and a palette registering part 3 registers the representative color in a color palette. Further, a secondary representative color deciding part 4 registers a color other than the color registered in the color palette and its similar colors as a secondary representative color in the color palette.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、カラー画像中の代
表色からなるカラーパレットを作成する画像処理装置及
び画像処理方法に関するものである。
[0001] 1. Field of the Invention [0002] The present invention relates to an image processing apparatus and an image processing method for creating a color palette composed of representative colors in a color image.

【0002】[0002]

【従来の技術】フルカラー画像を限られた色数で表現す
ることを限定色化という。この限定色化の技術は、例え
ば、フルカラー表示のできないディスプレイ装置を利用
して画像を表示する場合などに利用される。
2. Description of the Related Art Expressing a full-color image with a limited number of colors is called limited colorization. This limited color conversion technique is used, for example, when displaying an image using a display device that cannot perform full color display.

【0003】また、この限定色化により画像のデータ量
を削減する効果もある。通常、フルカラーを表現するの
に1画素あたり24ビットを使用する。実際の使用色数
が少なければそれを表現するのに必要なビット数は少な
くなる。限定色化により使用色数を減少させることによ
り、必要な1画素あたりのビット数を減少させ、データ
量を削減することができる。
There is also an effect of reducing the data amount of an image by this limited color conversion. Normally, 24 bits per pixel are used to represent full color. The smaller the actual number of colors used, the fewer bits required to represent it. By reducing the number of colors used by limiting color, the required number of bits per pixel can be reduced, and the data amount can be reduced.

【0004】例えば、もともと使用色数の少ない画像を
カラースキャナで読み込む場合、フルカラーで読み込む
と無駄に大きなデータ量となってしまうが、限定色化に
よりデータ量を削減することができる。また、もともと
使用色数の少ない画像であれば、限定色化しても画質の
劣化は最小限に抑えられる。限定色化は、このような無
駄を取り除くための手法のひとつとしてとらえることが
できる。
For example, when an image originally used in a small number of colors is read by a color scanner, reading in full color results in an unnecessary large data amount, but the data amount can be reduced by limiting the color. In addition, if an image is originally used with a small number of colors, deterioration of the image quality can be minimized even if the color is limited. Limited colorization can be considered as one of the methods for eliminating such waste.

【0005】実際に、図面や地図などは、もともと使用
されている色の数は少なく、数色から数十色程度であ
る。さらに、色でオブジェクトを区別できるようにして
いるため、人間の目で識別できる程度に、それぞれの色
同士の距離(色差)が十分に大きいという特徴がある。
そのため、使用している色数に限定色化できれば、非常
にデータ量を少なくすることができる。
[0005] Actually, the number of colors originally used in a drawing or a map is small, about several to several tens of colors. Furthermore, since the objects can be distinguished by color, the distance (color difference) between the colors is sufficiently large that the objects can be identified by human eyes.
Therefore, if the number of colors used can be limited to the number of colors used, the data amount can be extremely reduced.

【0006】限定色化を行った後に使用する色数は少な
いが、その色を表現するためには、やはりもとの画像デ
ータにおけるビット数、例えば1色あたり24ビットが
必要である。そのままのビット数を用いたのではデータ
量は少なくならないので、使用する色数に応じたビット
数のデータを用い、そのデータと実際の色との対応付け
を行っている。この対応付けをカラーパレットと呼んで
いる。例えば2色しか用いない画像であれば、1ビット
のデータを用い、値0に対してある色を対応付け、また
値1に対して別の色を対応付けておく。これにより画像
データは1画素1ビットで表現することが可能になる。
Although the number of colors to be used after performing limited colorization is small, the number of bits in the original image data, for example, 24 bits per color, is required to express the color. Since the data amount does not decrease if the number of bits is used as it is, data of the number of bits corresponding to the number of colors to be used is used to associate the data with actual colors. This association is called a color palette. For example, in the case of an image using only two colors, 1-bit data is used to associate a value 0 with a certain color and a value 1 with another color. This makes it possible to represent image data with one bit per pixel.

【0007】ここで、どのような色をカラーパレットに
登録しておくかが問題となる。従来より各種の方法が提
案されている。1つの方法として、Computer
Graphics,Vol.16,No.3,198
2,Paul Heckbert,“COLOR IM
AGE QUANTIZATION FOR FRAM
E BUFFER DISPLAY”,p.297−p
307等に記載されているメディアンカット法がある。
この方法は、まず、対象となる画像の色分布からヒスト
グラムを作成する。このヒストグラムを色成分(例え
ば、R,G,B)の各軸に投影し、それらの中でもっと
も広範囲に色の分布が見られる軸を選び、出現色数がち
ょうど半分になる位置(ヒストグラム中央値)で分割す
る。これにより作成されたおのおのの部分空間に対して
同様の操作を繰り返す。繰り返し停止条件は、これらの
部分空間の数がある特定数に達することである。こうし
て作成された部分空間の中の1つを代表色として、カラ
ーパレットを作成する。
Here, it becomes a problem how colors are registered in the color palette. Conventionally, various methods have been proposed. As one method, Computer
Graphics, Vol. 16, No. 3,198
2, Paul Heckbert, "COLOR IM
AGE QUANTIZATION FOR FRAM
E BUFFER DISPLAY ", p.297-p
307 and the like.
In this method, first, a histogram is created from the color distribution of a target image. This histogram is projected on each axis of the color component (for example, R, G, B), and the axis on which the color distribution is seen in the widest range among them is selected. Value). The same operation is repeated for each of the created subspaces. The repetition stop condition is that the number of these subspaces reaches a certain number. A color palette is created using one of the created partial spaces as a representative color.

【0008】この方法では、色の出現頻度の高いものが
集中しているような部分には多くの代表色が割り当てら
れるので、高い精度のカラーパレットを作成することが
できる。しかし、繰り返し行われるヒストグラムの生成
とその中央値の検索により、多大な処理時間が必要とな
るという欠点を有している。
In this method, many representative colors are assigned to a portion where colors having a high frequency of appearance are concentrated, so that a highly accurate color palette can be created. However, there is a disadvantage that a large amount of processing time is required due to the repeated generation of the histogram and retrieval of the median.

【0009】また別の方法として、対象の画像の色分布
からヒストグラムを作成し、出現頻度の高い順にソート
して、上位の色を選択する方法がある。この方法は比較
的単純であり、広く用いられている。しかし、ソートに
多大な処理時間が必要であるという欠点を有している。
さらに、1つの色でも色ずれなどによって多数の色に分
散した場合には、その色がカラーパレットに登録されな
い可能性があるという欠点もある。
As another method, there is a method of creating a histogram from the color distribution of a target image, sorting the histogram in descending order of appearance frequency, and selecting an upper color. This method is relatively simple and widely used. However, there is a disadvantage that a large processing time is required for sorting.
Furthermore, when one color is dispersed into many colors due to color shift or the like, there is a disadvantage that the color may not be registered in the color palette.

【0010】この方法の欠点である、ある色が分散した
場合にその色が登録されなくなるという問題を解決する
方法としては、例えば特開平4−257984号公報に
記載されている方法が提案されている。この文献に記載
されている方法では、全色空間をいくつかの部分空間に
分け、各部分空間の出現頻度の合計の全体に対する比率
によりその部分空間から選択する代表色数を算出し、部
分空間の出現頻度の高い色から順にその数だけ代表色を
決定している。これによって、適切に代表色を決定して
カラーパレットに登録することができる。また、単純な
アルゴリズムを用いているので、比較的高速に処理する
ことができるという利点がある。しかし、画像内に出現
頻度が突出した色が存在すると、その色が属する部分空
間に対して必要以上の代表色が割り当てられるため、本
来出現頻度の比較的高い色が代表色として選択されない
可能性がある。
As a method for solving the drawback of this method, that is, when a certain color is dispersed, the color is not registered, a method described in, for example, Japanese Patent Application Laid-Open No. Hei 4-257984 has been proposed. I have. In the method described in this document, the total color space is divided into several subspaces, and the number of representative colors to be selected from the subspace is calculated based on the ratio of the total appearance frequency of each subspace to the whole, and the subspace is calculated. The representative colors are determined by the number of colors in the order of frequency of appearance. Thus, the representative color can be appropriately determined and registered in the color palette. In addition, since a simple algorithm is used, there is an advantage that processing can be performed at a relatively high speed. However, if there is a color whose appearance frequency is prominent in the image, more representative colors than necessary are assigned to the subspace to which the color belongs, and a color with a relatively high appearance frequency may not be selected as a representative color. There is.

【0011】また、この特開平4−257984号公報
に記載されている方法を改善するものとして、例えば特
開平8−202327号公報に記載されているように、
画像内の出現頻度が突出した色を全体の平均頻度に修正
することにより、上記問題の発生を抑えることも考えら
れている。
As a method for improving the method described in Japanese Patent Application Laid-Open No. 4-259798, for example, as described in Japanese Patent Application Laid-Open No. 8-202327,
It is also considered that the occurrence of the above-described problem is suppressed by correcting a color having a prominent appearance frequency in an image to an average frequency of the entire image.

【0012】同じく適切にカラーパレットを作成する方
法として、例えば特許第2890275号公報に記載さ
れているように、まずN色をM色に限定色化する際に、
Nより少なくMより多い色数に間引き、その後、色分布
のヒストグラムを作成してソートし、M色を決定する。
さらに、決定したM色に似ている色をM色中の色に変換
し、残りの色とM色中の頻度の少ない色とを入れ替え
て、カラーパレットを作成している。このように最初の
色数の間引きと、最後の入れ替え処理によって、適切に
色を選択して、カラーパレットを作成することができ
る。
Similarly, as a method of appropriately creating a color palette, for example, as described in Japanese Patent No. 2890275, when N colors are first limited to M colors,
The number of colors is reduced to less than N and less than M, and then a histogram of the color distribution is created and sorted to determine M colors.
Further, the color similar to the determined M color is converted into a color in the M colors, and the remaining colors are replaced with the less frequent colors in the M colors to create a color palette. As described above, the color pallet can be created by appropriately selecting the colors by the thinning-out of the first number of colors and the last replacement process.

【0013】しかし、上述の特開平4−257984号
公報や特開平4−257984号公報、特許第2890
275号公報等に記載されている方法は、いずれも色分
布のヒストグラムを作成した後にソートの処理を行って
いる。このソートの処理は、例えばフルカラーの画像で
は、約1670万色の頻度データをソートしなければな
らないため、非常に時間がかかる処理である。これらの
従来の方法では、このように処理時間がかかるという問
題を有していた。
However, the above-mentioned Japanese Patent Application Laid-Open Nos. 4-257983 and 4-257983, and Japanese Patent No. 2890
In any of the methods described in Japanese Patent Application Publication No. 275/275, a sort process is performed after a histogram of a color distribution is created. This sorting process is a very time-consuming process because, for example, in a full-color image, frequency data of about 16.7 million colors must be sorted. These conventional methods have a problem that the processing time is thus long.

【0014】さらに、上述のような図面や地図など、使
用色数の少ないドキュメントに対して限定色化の処理を
行うと、余計な色までカラーパレットに登録してしまう
という問題がある。図5は、従来のヒストグラム及びソ
ートを用いた限定色化における問題点の一例の説明図で
ある。例えば上述のような使用色数の少ないドキュメン
トをスキャナで読み込んだ場合、ノイズやデジタル化の
過程での誤差により色のずれが生じ、使用している色以
外の色が混入してしまうことがある。例えば色aと色b
を用いたドキュメントをスキャナで読み取って色分布の
ヒストグラムを作成すると、図5(A)に示すように、
ドキュメントにおいて使用している色a及び色bととも
に、色a及び色bと類似した色についてもある程度の頻
度が計数される。図5において、ハッチングを施した頻
度の色が本来の色a及び色bであり、ハッチングを施し
ていない頻度の色は、色ずれなどによって生じた色であ
る。
Further, if the limited color processing is performed on a document with a small number of colors, such as a drawing or a map as described above, there is a problem that extra colors are registered in a color palette. FIG. 5 is an explanatory diagram of an example of a problem in limited color conversion using a conventional histogram and sorting. For example, when a document with a small number of used colors is read by a scanner as described above, a color shift may occur due to noise or an error in the digitization process, and colors other than the colors used may be mixed. . For example, color a and color b
When a color distribution histogram is created by reading a document using a scanner with a scanner, as shown in FIG.
In addition to the colors a and b used in the document, a certain frequency is counted for colors similar to the colors a and b. In FIG. 5, the colors with hatching frequency are the original colors a and b, and the colors with no hatching frequency are colors generated due to color shift or the like.

【0015】従来の方法に従って、図5(A)に示すヒ
ストグラムをソートすると、図5(B)に示すように並
べられる。ここで、例えばカラーパレットに5つの色が
登録可能であるとすると、従来は頻度の多い色から5つ
を選択してカラーパレットを作成する。そのため、色ず
れによって生じた、頻度の小さい色までカラーパレット
に登録され、画像再生時には色ずれが生じたままの画像
が再生されてしまう。
When the histograms shown in FIG. 5A are sorted according to the conventional method, they are arranged as shown in FIG. 5B. Here, for example, if five colors can be registered in the color palette, conventionally, five colors are selected from frequently used colors to create a color palette. For this reason, even infrequent colors generated due to the color shift are registered in the color palette, and the image in which the color shift has occurred is reproduced at the time of image reproduction.

【0016】このように、上述した従来のいずれの限定
色化の方法においても、予め与えられた数の代表色を選
択してカラーパレットを作成するため、必要以上の数の
色を求めている可能性がある。非常に少ない色で表現さ
れた画像(例えば16色の地図画像など)であっても、
読み込み時の誤差により分散した色を含めて画像の代表
色を決定する可能性があり、本来使用しているより多く
の色を選択してしまうという問題があった。
As described above, in any of the above-described conventional limited colorization methods, a predetermined number of representative colors are selected to create a color palette, so that more colors than necessary are obtained. there is a possibility. Even if the image is represented in very few colors (for example, a 16-color map image),
There is a possibility that the representative color of the image is determined including the dispersed colors due to an error at the time of reading, and there is a problem that more colors are selected than originally used.

【0017】[0017]

【発明が解決しようとする課題】本発明は、上述した事
情に鑑みてなされたもので、適切に本来使用されていた
色のみからなるカラーパレットを、高速に作成すること
ができる画像処理装置および画像処理方法を提供するこ
とを目的とするものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned circumstances, and an image processing apparatus and an image processing apparatus capable of appropriately producing a color palette composed of only originally used colors at high speed. An object of the present invention is to provide an image processing method.

【0018】[0018]

【課題を解決するための手段】本発明は、カラー画像中
の代表色からなるカラーパレットを作成する画像処理装
置および画像処理方法において、カラー画像中の各色の
出現回数を調べて出現色ヒストグラムを作成し、該出現
色ヒストグラムとして得られた各色ごとの出現回数ある
いは前記出現回数に基づく値を第1のしきい値と比較し
て候補色を選択し、選択した候補色の出現回数あるいは
該出現回数に基づく値の合計と第2のしきい値とを比較
し、選択した候補色の出現回数あるいは該出現回数に基
づく値の合計が前記第2のしきい値に達しない場合は前
記第1のしきい値を変更して候補色の選択及び前記第2
のしきい値との比較を繰り返し、選択した候補色の出現
回数あるいは該出現回数に基づく値の合計が前記第2の
しきい値に達したときに選択されている候補色を前記代
表色として決定し、決定した代表色をカラーパレットに
登録することを特徴とするものである。
SUMMARY OF THE INVENTION The present invention relates to an image processing apparatus and an image processing method for creating a color palette composed of representative colors in a color image. A candidate color is selected by comparing the number of appearances for each color obtained as the appearance color histogram or a value based on the number of appearances with a first threshold value, and the number of appearances of the selected candidate color or the number of appearances is selected. The sum of the values based on the number of times is compared with a second threshold, and if the number of appearances of the selected candidate color or the sum of the values based on the number of appearances does not reach the second threshold, the first threshold is used. Of the candidate color by changing the threshold value of
The candidate color selected when the number of appearances of the selected candidate color or the sum of the values based on the number of appearances reaches the second threshold is regarded as the representative color. It is characterized in that it is determined and the determined representative color is registered in a color palette.

【0019】特に図面や地図などの色数が少ないカラー
画像では、上述のようにそれぞれの色同士の距離(色
差)が十分に大きいという特徴がある。また、例えば色
ずれを起こしていても、本来の色以外の色の出現回数
(画素数)は本来の色の出現回数(画素数)に比べて少
数である。この点に着目し、出現回数あるいは出現頻度
などの出現回数に基づく値と第1のしきい値と比較し、
出現回数等の多い本来の色を候補色として選択する。こ
のとき、使用されている色数によって出現回数や出現回
数に基づく値は変動する。また、本来の色であっても使
用されている部分の多少によって出現回数や出現回数に
基づく値が変動する。そのため、第1のしきい値を変化
させながら、候補色が全体のどの程度をカバーしている
かを第2のしきい値で判定し、候補色によって第2のし
きい値までカバーできた時点で、候補色を代表色として
決定する。
In particular, a color image having a small number of colors, such as a drawing or a map, is characterized in that the distance (color difference) between the colors is sufficiently large as described above. Further, for example, even if a color shift occurs, the number of appearances (the number of pixels) of colors other than the original color is smaller than the number of appearances (the number of pixels) of the original color. Focusing on this point, a value based on the number of appearances, such as the number of appearances or the frequency of appearance, is compared with a first threshold value,
An original color having a large number of appearances is selected as a candidate color. At this time, the number of appearances and the value based on the number of appearances vary depending on the number of colors used. In addition, the number of appearances and the value based on the number of appearances vary depending on the number of used portions even in the original color. Therefore, while changing the first threshold value, the extent to which the candidate color covers the whole is determined by the second threshold value, and when the candidate color is able to cover up to the second threshold value Then, the candidate color is determined as the representative color.

【0020】このように本発明では、本来の色のみを抽
出して代表色としてカラーパレットに登録するので、色
ずれなどで発生した色を登録することがなく、適切にカ
ラーパレットを作成することができる。また、この処理
の過程では、しきい値との比較処理により代表色を決定
しており、ヒストグラムのソート処理を行わないので、
高速に処理を行うことができる。
As described above, according to the present invention, only the original colors are extracted and registered in the color palette as representative colors. Therefore, it is possible to appropriately create the color palette without registering the color generated due to color shift or the like. Can be. In this process, the representative color is determined by comparison with the threshold value, and the histogram is not sorted.
Processing can be performed at high speed.

【0021】また、このようにしてカラーパレットを作
成した後、カラーパレットに登録された色と、その色に
類似した色、例えば色空間における距離が第3のしきい
値以内である色については同色とし、それ以外の色の中
から2次代表色を選択する処理を行ってもよい。これに
よって、さらに的確にカラーパレットを作成することが
可能になる。
After the color pallet is created in this manner, the color registered in the color pallet and the color similar to the color, for example, the color whose distance in the color space is within the third threshold value, The same color may be used, and a process of selecting a secondary representative color from other colors may be performed. This makes it possible to create a color palette more accurately.

【0022】[0022]

【発明の実施の形態】図1は、本発明の実施の一形態を
示すブロック図である。図中、1は出現色ヒストグラム
作成部、2は1次代表色決定部、3はパレット登録部、
4は2次代表色決定部である。出現色ヒストグラム作成
部1は、処理対象のカラー画像中で用いられている各色
の出現回数を調べる。
FIG. 1 is a block diagram showing an embodiment of the present invention. In the figure, 1 is an appearance color histogram creation unit, 2 is a primary representative color determination unit, 3 is a palette registration unit,
Reference numeral 4 denotes a secondary representative color determination unit. The appearance color histogram creation unit 1 checks the number of appearances of each color used in the color image to be processed.

【0023】1次代表色決定部2は、出現色ヒストグラ
ム作成部1で調べた各色の出現回数をもとに、ある条件
に合致する色を代表色として決定する。具体的には、出
現色ヒストグラム作成部1で調べた各色ごとの出現回
数、あるいは、例えば出現頻度などの出現回数に基づく
値を計算し、これらの値と第1のしきい値とを比較す
る。第1のしきい値よりも大きい出現回数あるいは出現
回数に基づく値を有する色を候補色として選択する。そ
して、選択した候補色の出現回数あるい該出現回数に基
づく値の合計値を計算し、その合計値と第2のしきい値
とを比較する。合計値が第2のしきい値に達しない場合
は、第1のしきい値を変更して候補色の選択をやり直
し、合計値を計算して第2のしきい値との比較を行う。
この処理を繰り返し、選択した候補色の出現回数あるい
は該出現回数に基づく値の合計値が第2のしきい値に達
したときに選択されている候補色を前記代表色として決
定する。
The primary representative color determination unit 2 determines a color meeting a certain condition as a representative color based on the number of appearances of each color checked by the appearance color histogram creation unit 1. Specifically, the number of appearances for each color examined by the appearance color histogram creation unit 1 or a value based on the number of appearances such as the frequency of appearance is calculated, and these values are compared with a first threshold value. . A color having an appearance count larger than the first threshold value or a color based on the appearance count is selected as a candidate color. Then, the number of appearances of the selected candidate color or a total value based on the number of appearances is calculated, and the total value is compared with a second threshold value. When the total value does not reach the second threshold value, the first threshold value is changed and the selection of the candidate color is performed again, and the total value is calculated and compared with the second threshold value.
This process is repeated, and the candidate color selected when the number of appearances of the selected candidate color or the total value of the values based on the number of appearances reaches the second threshold is determined as the representative color.

【0024】パレット登録部3は、1次代表色決定部2
または2次代表色決定部4により決定された色をカラー
パレットに登録する。
The pallet registration unit 3 is a primary representative color determination unit 2
Alternatively, the color determined by the secondary representative color determination unit 4 is registered in a color palette.

【0025】2次代表色決定部4は、カラーパレットに
登録されている色及びその色と類似した色を除く色の中
から2次代表色を決定し、決定した2次代表色をパレッ
ト登録部3に渡す。類似した色とは、例えばカラーパレ
ットに登録されている色からの色空間における距離が第
3のしきい値以内の色とすることができる。これらの色
は、例えばスキャナなどで入力した際に色ずれによって
発生した可能性があるため、カラーパレットに登録する
2次代表色からはずしている。逆に2次代表色は、既に
カラーパレットに登録されている色から色空間の距離的
に離れた色、すなわち異なる色として用いられた可能性
が高い色である。1次代表色決定部2で選択されなくて
も、1次代表色決定部で決定された代表色と大きく異な
る色は、この2次代表色決定部4でカラーパレットに登
録することができる。
The secondary representative color determining section 4 determines a secondary representative color from colors other than colors registered in the color palette and colors similar to the color, and registers the determined secondary representative color in the palette. Hand over to Part 3. The similar color may be, for example, a color whose distance in a color space from a color registered in a color palette is within a third threshold value. These colors may have been generated due to color misregistration when input by, for example, a scanner, and are therefore excluded from the secondary representative colors registered in the color palette. Conversely, the secondary representative color is a color that is distant in the color space from a color already registered in the color palette, that is, a color that is highly likely to have been used as a different color. Even if not selected by the primary representative color determining unit 2, a color that is significantly different from the representative color determined by the primary representative color determining unit can be registered in the color palette by the secondary representative color determining unit 4.

【0026】図2は、本発明の実施の一形態における動
作の一例を示すフローチャートである。まずS11にお
いて、出現色ヒストグラム作成部1で処理対象のカラー
画像中で用いられている各色の出現回数を調べる。
FIG. 2 is a flowchart showing an example of the operation according to the embodiment of the present invention. First, in S11, the appearance color histogram creation unit 1 checks the number of appearances of each color used in the color image to be processed.

【0027】1次代表色決定部2は、S12において、
出現色ヒストグラム作成部1で調べた各色ごとの出現回
数と第1のしきい値とを比較し、第1のしきい値よりも
出現回数が大きい色を候補色として選択する。ここで、
第1のしきい値は、画像中で使用されている本来の色を
確実に選択するために用い、例えば色ずれなどによって
生じた色を排除する。第1のしきい値としては、例えば
画像全体の画素数に対して所定の比率で計算された画素
数とすることができる。例えば所定の比率を10%と
し、全体の画素数×10%で計算される画素数を第1の
しきい値の初期値として与えればよい。また、比較の処
理は出現比率で行うこともできる。すなわち、各色ごと
の出現回数から全体の画素数に対する比率を計算し、ま
た第1のしきい値として所定の比率(例えば10%)を
初期値として与えておけばよい。なお、第1のしきい値
の初期値として与える値は任意であり、色ずれなどによ
って発生した色が含まれない程度の値に設定しておけば
よい。
In step S12, the primary representative color determination unit 2
The number of appearances of each color checked by the appearance color histogram creation unit 1 is compared with a first threshold, and a color having a number of appearances greater than the first threshold is selected as a candidate color. here,
The first threshold value is used to reliably select an original color used in an image, and excludes a color caused by, for example, a color shift. As the first threshold value, for example, the number of pixels calculated at a predetermined ratio with respect to the number of pixels of the entire image can be used. For example, the predetermined ratio may be set to 10%, and the number of pixels calculated by the total number of pixels × 10% may be given as the initial value of the first threshold value. Further, the comparison process can be performed based on the appearance ratio. That is, the ratio to the total number of pixels may be calculated from the number of appearances for each color, and a predetermined ratio (for example, 10%) may be given as an initial value as the first threshold value. The value given as the initial value of the first threshold value is arbitrary, and may be set to a value that does not include a color generated due to a color shift or the like.

【0028】なお、この処理で選択された候補色の数が
既にカラーパレットに登録可能な色数を超えている場合
については、任意の方法でカラーパレットに登録可能な
色数だけの候補色を代表色として決定すればよい。例え
ば、選択される候補数がカラーパレットに登録可能な色
数となるまで、少しずつ第1のしきい値を上げて行けば
よい。あるいは、選択された候補色の中から、出現頻度
の多い順にカラーパレットに登録可能な色数だけを選択
してもよい。
If the number of candidate colors selected in this process has already exceeded the number of colors that can be registered in the color pallet, the number of candidate colors that can be registered in the color pallet is determined by an arbitrary method. What is necessary is just to determine as a representative color. For example, the first threshold may be increased little by little until the number of candidates to be selected becomes the number of colors that can be registered in the color palette. Alternatively, only the number of colors that can be registered in the color palette may be selected from the selected candidate colors in the order of appearance frequency.

【0029】次にS13において、S12で選択したす
べての候補色の出現回数を合計する。そしてS14にお
いて、S13で計算した出現回数の合計と第2のしきい
値とを比較する。ここで、第2のしきい値は、画像全体
として含まれている、色ずれなどによる誤差を排除する
ために用いる。この第2のしきい値は、例えば画像全体
の画素数に対して所定の比率で計算された画素数とする
ことができる。例えば色ずれなどによる誤差を5%見込
むのであれば、所定の比率を95%とし、全体の画素数
×95%で計算される画素数を第2のしきい値の初期値
として与えればよい。またこの場合も、出現比率による
比較も可能である。すなわち、すべての候補色ごとの出
現比率の合計(あるいはすべての候補色ごとの出現回数
の合計の画像全体に対する比率)を計算し、また第2の
しきい値として所定の比率(例えば95%)を与えてお
けばよい。なお、第2のしきい値は、上述のように画像
全体に含まれる誤差に応じて設定すればよく、例えばス
キャナなどによる読取時の色誤差を見込んで設定するこ
とができる。
Next, in S13, the number of appearances of all the candidate colors selected in S12 is summed. Then, in S14, the total number of appearances calculated in S13 is compared with the second threshold value. Here, the second threshold value is used to eliminate an error due to a color shift or the like included in the entire image. The second threshold value may be, for example, the number of pixels calculated at a predetermined ratio with respect to the number of pixels of the entire image. For example, if an error due to color shift or the like is expected to be 5%, the predetermined ratio is set to 95%, and the number of pixels calculated by the total number of pixels × 95% may be given as the initial value of the second threshold value. Also in this case, the comparison based on the appearance ratio is also possible. That is, the sum of the appearance ratios of all the candidate colors (or the ratio of the total number of appearances of all the candidate colors to the entire image) is calculated, and a predetermined ratio (for example, 95%) is used as the second threshold value. Should be given. The second threshold value may be set according to the error included in the entire image as described above. For example, the second threshold value can be set in consideration of a color error at the time of reading by a scanner or the like.

【0030】S13で候補色の出現回数の合計(あるい
は候補色全体の出現比率)が第2のしきい値に達しない
場合には、第1のしきい値の設定が高すぎて、画像中で
比較的少なく使用されている色を選択していない可能性
がある。そのため、S15において、第1のしきい値を
少しだけ下げ、S12に戻って候補色の選択および選択
された候補色全体の出現回数(出現比率)の判定を行
う。第1のしきい値を下げて行くことによって、出現回
数が少ない色についても次第に候補色として選択される
ようになり、候補色の出現回数の合計(あるいは候補色
全体の出現比率)も多くなって行く。
If the total number of appearances of the candidate colors (or the appearance ratio of the entire candidate colors) does not reach the second threshold in S13, the first threshold is set too high and the May not have selected a color that is used relatively rarely. Therefore, in S15, the first threshold value is slightly lowered, and the process returns to S12 to select a candidate color and determine the number of appearances (appearance ratio) of all the selected candidate colors. By lowering the first threshold value, a color having a small number of appearances is gradually selected as a candidate color, and the total number of appearances of the candidate color (or the appearance ratio of the entire candidate color) is also increased. Go.

【0031】図3は、1次代表色決定部における処理の
説明図である。S12〜S15の処理を、図3に示すグ
ラフで説明する。実際には、色空間中の各色について出
現回数が計算されているのであるが、ここでは説明のた
め、いくつかの色について横軸に並べるにとどめてい
る。また、縦軸は出現回数を取っているが、出現頻度で
も同様である。まず、第1のしきい値が出現回数Aであ
るとき、出現回数が第1のしきい値より大きい色は色b
と色cのみである。この色bと色cがこの時点での候補
色である。
FIG. 3 is an explanatory diagram of the processing in the primary representative color determination section. The processing of S12 to S15 will be described with reference to the graph shown in FIG. Actually, the number of appearances is calculated for each color in the color space, but here, for the sake of explanation, only some colors are arranged on the horizontal axis. Although the vertical axis indicates the number of appearances, the same applies to the frequency of appearance. First, when the first threshold is the number of appearances A, the color whose number of appearances is larger than the first threshold is color b.
And only the color c. The colors b and c are the candidate colors at this time.

【0032】この時点では、色bと色cの出現回数を合
計しても第2のしきい値を超えないとする。その場合、
例えば第1のしきい値を出現回数Bまで下げてみる。す
ると、出現回数が第1のしきい値より大きい候補色は、
色b、色cとともに、色aも候補色となる。そのため、
候補色(色a,色b,色c)の出現回数の合計は増加す
る。これでも第2のしきい値を超えない場合には、さら
に第1のしきい値を下げ、例えば出現回数Cまで下げる
と、さらに色dについても第1のしきい値より大きくな
る。
At this point, it is assumed that the total number of appearances of the color b and the color c does not exceed the second threshold value. In that case,
For example, the first threshold is reduced to the number of appearances B. Then, a candidate color whose appearance number is larger than the first threshold value is
Along with the colors b and c, the color a is also a candidate color. for that reason,
The total number of appearances of the candidate colors (color a, color b, color c) increases. If the second threshold value still does not exceed the first threshold value, the first threshold value is further reduced, for example, if the number of appearances is reduced to C, the color d also becomes larger than the first threshold value.

【0033】このようにして、第1のしきい値を徐々に
下げながら、第1のしきい値より大きい出現回数を有す
る色の合計値を計算し、第2のしきい値と比較して行く
処理を繰り返す。繰り返し処理を行ってゆく間に、合計
値が第2のしきい値に達する。この時点での候補色を代
表色として、S16においてパレット登録部3によりカ
ラーパレットに登録すればよい。このように第1のしき
い値を徐々に下げて候補色を増加させてゆくことによ
り、出現回数が多い、比較的重要な色のカラーパレット
への登録漏れを防ぐことができる。
In this way, while gradually decreasing the first threshold value, the total value of the colors having the number of appearances larger than the first threshold value is calculated and compared with the second threshold value. Repeat the process to go. During the repetitive processing, the total value reaches the second threshold value. The candidate color at this point may be registered as a representative color in the color palette by the palette registration unit 3 in S16. By gradually lowering the first threshold value and increasing the number of candidate colors in this way, it is possible to prevent omission of registration of a relatively important color having a large number of appearances into the color palette.

【0034】なお、このような繰り返し処理中に候補色
の数がカラーパレットに登録可能な色数を超える場合に
は、その時点で繰り返し処理を終了し、その直前の候補
色を代表色として、カラーパレット登録部3によりカラ
ーパレットに登録すればよい。
If the number of candidate colors exceeds the number of colors that can be registered in the color pallet during such repetition processing, the repetition processing is terminated at that point, and the immediately preceding candidate color is set as a representative color. What is necessary is just to register in a color pallet by the color pallet registration part 3.

【0035】このまま処理を終わってもよいが、この例
ではさらに出現回数は少ないが画像中で使用されている
色について、2次代表色として抽出してカラーパレット
に登録する。2次代表色選択部4は、図2のS17にお
いて、画像中に存在する色を1つ選択する。そしてS1
8において、カラーパレットに既に登録されている色の
うち、S17で選択した色に最も近い色までの距離(平
均二乗誤差、すなわち、色差)を計算する。距離は、対
象画像が表現されている色空間において求めることにな
る。例えばRGB色空間上の2つの色a,bのRGB色
空間上の座標を(r0,g0,b0)、(r1,g1,
b1)とすると、その間の距離(a,b)は、 距離(a,b)=((r0−r1)2+(g0−g1)2+(b0
−b1)2)1/2 で求めることができる。
Although the processing may be terminated as it is, in this example, the colors used in the image with a smaller number of appearances are extracted as secondary representative colors and registered in the color palette. The secondary representative color selection unit 4 selects one color existing in the image in S17 of FIG. And S1
In step 8, the distance (mean square error, that is, color difference) to the color closest to the color selected in S17 among the colors already registered in the color palette is calculated. The distance is obtained in a color space in which the target image is expressed. For example, the coordinates of two colors a and b in the RGB color space on the RGB color space are (r0, g0, b0), (r1, g1,
b1), the distance (a, b) therebetween is: distance (a, b) = ((r0−r1) 2 + (g0−g1) 2 + (b0)
−b1) 2 ) 1/2

【0036】S19において、S18で求めた距離と第
3のしきい値とを比較する。この比較によって、S17
で選択した色が、カラーパレットに既に登録されている
色よりも第3のしきい値以上、距離が離れているか否か
を判定することができる。ここで第3のしきい値は類似
の色の範囲を示している。例えば第3のしきい値とし
て、所定の距離を設定しておくことができる。なお、演
算量を少なくするため、第3のしきい値として所定の距
離の二乗を設定しておき、距離の二乗で比較するように
構成してもよい。
In S19, the distance obtained in S18 is compared with the third threshold value. By this comparison, S17
It is possible to determine whether or not the color selected in step 3 is at least a third threshold value greater than the color already registered in the color palette. Here, the third threshold value indicates a similar color range. For example, a predetermined distance can be set as the third threshold. Note that, in order to reduce the amount of calculation, a square of a predetermined distance may be set as the third threshold value, and the comparison may be made using the square of the distance.

【0037】S19における比較処理において、S18
で求めた距離が第3のしきい値よりも大きければ、S2
0において、その色を2次代表色としてカラーパレット
に登録する。また、S18で求めた距離が第3のしきい
値以下であれば、その色はカラーパレットに登録されて
いる色と類似の色であるとして、カラーパレットへの登
録は行わない。
In the comparison processing in S19, in S18
If the distance obtained in the step is larger than the third threshold, S2
At 0, the color is registered in the color palette as a secondary representative color. If the distance obtained in S18 is equal to or smaller than the third threshold, the color is determined to be similar to the color registered in the color palette, and the color is not registered in the color palette.

【0038】図4は、2次代表色決定部4における2次
代表色の選択処理の説明図である。色空間は3次元以上
であるが、説明のために、色空間中のある2次元平面に
ついて示している。図中の大きな黒丸は、カラーパレッ
トに登録されている色を示している。また破線の円は、
そのカラーパレットに登録されている色から第3のしき
い値で示される距離を示している。この破線の円内は、
カラーパレットに登録されている色に距離的に近く、類
似している色と判定する。例えば色ずれなどが発生して
いる場合、ずれた色は破線の円内に存在する。
FIG. 4 is an explanatory diagram of the secondary representative color selection processing in the secondary representative color determination section 4. Although the color space is three-dimensional or more, a certain two-dimensional plane in the color space is shown for explanation. Large black circles in the figure indicate colors registered in the color palette. The dashed circle is
The distance indicated by the third threshold from the color registered in the color palette is shown. Inside this dashed circle,
It is determined that the color is close to and similar to the color registered in the color palette. For example, when a color shift or the like has occurred, the shifted color exists within the dashed circle.

【0039】2次代表色決定部4は、S17で選択した
色が破線の円内の色であれば、カラーパレットには登録
しない。これによって、例えば色ずれを発生している場
合に、本来の色を1次代表色決定部2でカラーパレット
に登録し、ずれた色については登録しないようにするこ
とができる。
If the color selected in S17 is a color within the dashed circle, the secondary representative color determination unit 4 does not register it in the color palette. Thus, for example, when a color shift has occurred, the primary color can be registered in the color pallet by the primary representative color determination unit 2, and the shifted color can not be registered.

【0040】また、S17で選択した色がいずれの破線
の円よりも外側の色である場合には、その色を2次代表
色としてカラーパレットに登録する。例えば図4におい
て×印で示した色は、いずれの破線円内にも含まれてい
ないので、2次代表色としてカラーパレットに登録され
る。この2次代表色は、1次代表色決定部2では選択で
きない程度の少ない出現回数ではあるが、カラーパレッ
トに登録されている色とは明らかに異なる色である。こ
のような色についてカラーパレットに登録することによ
り、画像を再現したときの画質を向上させることができ
る。
If the color selected in S17 is a color outside any of the dashed circles, that color is registered in the color palette as a secondary representative color. For example, the color indicated by the mark x in FIG. 4 is not included in any of the dashed circles, and is registered in the color palette as a secondary representative color. This secondary representative color has a small number of appearances that cannot be selected by the primary representative color determination unit 2, but is a color that is clearly different from the color registered in the color palette. By registering such a color in the color palette, it is possible to improve the image quality when the image is reproduced.

【0041】また、図4に示す破線円の大きさは第3の
しきい値によって決定される。例えば対象画像を画像入
力装置を用いて入力する場合、その画像入力装置におけ
る色ずれの程度など、読取精度や装置特性に応じて第3
のしきい値を決定し、最適なカラーパレットを作成する
ことができる。
The size of the dashed circle shown in FIG. 4 is determined by the third threshold value. For example, when a target image is input using an image input device, a third image may be read in accordance with reading accuracy and device characteristics such as the degree of color shift in the image input device.
Is determined, and an optimum color palette can be created.

【0042】このような2次代表色の選択処理を、順次
行ってゆく。図2のS21において、未処理の色が存在
するか否かを判定し、存在する場合にはS17へ戻っ
て、未処理の色を選択して、上述のような処理を行う。
すべての色について処理を行うことによって、適切なカ
ラーパレットが作成される。
Such a process of selecting a secondary representative color is sequentially performed. In S21 of FIG. 2, it is determined whether or not there is an unprocessed color. If there is, the process returns to S17 to select an unprocessed color and perform the above-described processing.
By processing all colors, an appropriate color palette is created.

【0043】このような2次代表色決定部4における2
次代表色の決定処理、特に距離の比較を行う処理は、例
えばCIEL* * * やCIELuvといった均等色
空間において行うとよい。対象画像が均等色空間の画像
でない場合には、色空間変換処理などのため計算は複雑
となり、処理速度は遅くなるが、非常に高い精度で2次
代表色を選択することができる。これによって、1次代
表色から漏れた色から2次代表色を正確に識別し、カラ
ーパレットに登録することが可能になる。
In the secondary representative color determination unit 4,
The process of determining the next representative color, particularly the process of comparing distances, may be performed in a uniform color space such as CIEL * a * b * or CIElv. If the target image is not an image in a uniform color space, the calculation becomes complicated due to color space conversion processing and the processing speed is reduced, but the secondary representative color can be selected with extremely high accuracy. As a result, it is possible to accurately identify the secondary representative color from the colors leaked from the primary representative color and register the secondary representative color in the color palette.

【0044】なお、2次代表色のカラーパレットへの登
録を行ってゆく間に、カラーパレットに登録可能な色数
を超えてしまう場合には、2次代表色の間でカラーパレ
ットに登録する色を選択すればよい。例えば2次代表色
として登録した色のうち、最も出現回数の小さいもの
と、新たに登録しようとする2次代表色の出現回数を比
較し、出現回数の多い方の色に変更するなど、適切な処
理を行うことができる。
If the number of colors that can be registered in the color pallet exceeds the number of colors that can be registered in the color pallet during the registration of the secondary representative color, the color is registered in the color pallet between the secondary representative colors. You just have to select the color. For example, among colors registered as secondary representative colors, the color with the smallest number of appearances is compared with the frequency of appearance of the secondary representative color to be newly registered, and the color is changed to the color with the larger number of appearances. Processing can be performed.

【0045】上述した動作の一例からもわかるように、
本発明では、従来行っていたヒストグラムのソート処理
を行っていない。そのため、従来に比べて高速にカラー
パレットを作成することができる。また、1次代表色、
2次代表色とも、所定の個数だけ選択するのではなく、
所定の条件を満たす色のみを選択している。そのため、
本来必要な色だけを限定的に選択してカラーパレットを
作成することができる。このようにして作成したカラー
パレットを用いることによって、例えば地図や図面な
ど、使用している色が少ないドキュメントでは、使用し
ている色のみがカラーパレットに登録されるので、例え
ば色ずれなどの影響を受けず、良好な色により画像を再
生することが可能である。
As can be seen from an example of the operation described above,
In the present invention, the sorting of the histogram, which has been performed conventionally, is not performed. Therefore, a color palette can be created faster than in the past. Also, the primary representative color,
For the secondary representative colors, instead of selecting a predetermined number,
Only colors that meet a predetermined condition are selected. for that reason,
It is possible to create a color palette by restrictively selecting only the originally required colors. By using a color palette created in this way, for documents that use a small number of colors, such as maps and drawings, only the colors that are used are registered in the color palette. It is possible to reproduce an image with good colors without receiving the image.

【0046】[0046]

【発明の効果】以上の説明から明らかなように、本発明
によれば、限定色化の処理を行う際に、高速にカラーパ
レットを作成することができる。さらに、本来必要な色
だけをカラーパレットに登録するので、高画質で画像を
再生することができるという効果がある。
As is clear from the above description, according to the present invention, a color palette can be created at a high speed when performing the limited color processing. Further, since only the originally required colors are registered in the color palette, there is an effect that an image can be reproduced with high image quality.

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

【図1】 本発明の実施の一形態を示すブロック図であ
る。
FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】 本発明の実施の一形態における動作の一例を
示すフローチャートである。
FIG. 2 is a flowchart illustrating an example of an operation according to the embodiment of the present invention.

【図3】 1次代表色決定部における処理の説明図であ
る。
FIG. 3 is an explanatory diagram of a process in a primary representative color determination unit.

【図4】 2次代表色決定部4における2次代表色の選
択処理の説明図である。
FIG. 4 is an explanatory diagram of a process of selecting a secondary representative color in a secondary representative color determination unit 4.

【図5】 従来のヒストグラム及びソートを用いた限定
色化における問題点の一例の説明図である。
FIG. 5 is an explanatory diagram of an example of a problem in conventional limited colorization using histogram and sorting.

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

1…出現色ヒストグラム作成部、2…1次代表色決定
部、3…パレット登録部、4…2次代表色決定部。
1 ... Appearance color histogram creating unit, 2 ... Primary representative color determination unit, 3 ... Palette registration unit, 4 ... Secondary representative color determination unit.

フロントページの続き Fターム(参考) 5B047 AA01 AB04 DC04 DC09 5B057 AA11 CA01 CA08 CA12 CA16 CB01 CB08 CB12 CB16 CC01 CE16 DB02 DB06 DB09 DC19 DC25 Continued on the front page F-term (reference) 5B047 AA01 AB04 DC04 DC09 5B057 AA11 CA01 CA08 CA12 CA16 CB01 CB08 CB12 CB16 CC01 CE16 DB02 DB06 DB09 DC19 DC25

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 カラー画像中の代表色からなるカラーパ
レットを作成する画像処理装置において、前記カラー画
像中の各色の出現回数を調べる出現色ヒストグラム作成
手段と、該出現色ヒストグラム作成手段で調べた各色の
出現回数をもとに代表色を決定する代表色決定手段と、
該代表色決定手段で決定された代表色をカラーパレット
に登録するカラーパレット登録手段を有し、前記代表色
決定手段は、前記出現色ヒストグラム作成手段で調べた
各色ごとの出現回数あるいは前記出現回数に基づく値を
第1のしきい値と比較して候補色を選択し、選択した候
補色の出現回数あるいは該出現回数に基づく値の合計と
第2のしきい値とを比較し、選択した候補色の出現回数
あるいは該出現回数に基づく値の合計が前記第2のしき
い値に達しない場合は前記第1のしきい値を変更して候
補色の選択及び前記第2のしきい値との比較を繰り返
し、選択した候補色の出現回数あるいは該出現回数に基
づく値の合計が前記第2のしきい値に達したときに選択
されている候補色を前記代表色として決定することを特
徴とする画像処理装置。
1. An image processing apparatus for creating a color palette composed of representative colors in a color image, an appearance color histogram creating means for checking the number of appearances of each color in the color image, and an appearance color histogram created by the appearance color histogram creating means. Representative color determining means for determining a representative color based on the number of appearances of each color;
Color palette registering means for registering the representative color determined by the representative color determining means in a color palette, wherein the representative color determining means includes the number of appearances or the number of appearances for each color checked by the appearance color histogram creating means Is compared with the first threshold value to select a candidate color, the number of appearances of the selected candidate color or the sum of values based on the number of appearances is compared with the second threshold value, and the selected candidate color is selected. If the number of appearances of the candidate color or the sum of the values based on the number of appearances does not reach the second threshold, the first threshold is changed to select a candidate color and the second threshold. And determining the candidate color selected when the number of appearances of the selected candidate color or the sum of values based on the number of appearances reaches the second threshold value as the representative color. Characteristic image processing equipment .
【請求項2】 さらに、前記カラーパレットに登録され
た色及び該色に類似した色以外の色の中から2次代表色
を選択する2次代表色決定手段を有し、前記カラーパレ
ット登録手段は、前記2次代表色決定手段で決定された
2次代表色についても前記カラーパレットに順次登録す
ることを特徴とする請求項1に記載の画像処理装置。
2. The color palette registering means further comprising: a secondary representative color determining means for selecting a secondary representative color from colors other than colors registered in the color palette and colors similar to the colors. 2. The image processing apparatus according to claim 1, wherein the secondary representative color determined by the secondary representative color determination unit is also sequentially registered in the color palette.
【請求項3】 前記2次代表色決定手段は、前記カラー
パレットに登録された色からの色空間における距離が第
3のしきい値以内である色については、前記カラーパレ
ットに登録された色と類似した色として2次代表色の候
補としないことを特徴とする請求項2に記載の画像処理
装置。
3. The method according to claim 2, wherein the secondary representative color determining unit determines, for a color whose distance in a color space from a color registered in the color palette is within a third threshold, a color registered in the color palette. The image processing apparatus according to claim 2, wherein a color similar to the above is not set as a candidate for a secondary representative color.
【請求項4】 カラー画像中の代表色からなるカラーパ
レットを作成する画像処理方法において、前記カラー画
像中の各色の出現回数を調べて出現色ヒストグラムを作
成し、該出現色ヒストグラムとして得られた各色ごとの
出現回数あるいは前記出現回数に基づく値を第1のしき
い値と比較して候補色を選択し、選択した候補色の出現
回数あるいは該出現回数に基づく値の合計と第2のしき
い値とを比較し、選択した候補色の出現回数あるいは該
出現回数に基づく値の合計が前記第2のしきい値に達し
ない場合は前記第1のしきい値を変更して候補色の選択
及び前記第2のしきい値との比較を繰り返し、選択した
候補色の出現回数あるいは該出現回数に基づく値の合計
が前記第2のしきい値に達したときに選択されている候
補色を前記代表色として決定し、決定した代表色をカラ
ーパレットに登録することを特徴とする画像処理方法。
4. An image processing method for creating a color palette composed of representative colors in a color image, wherein an appearance color histogram is created by examining the number of appearances of each color in the color image and obtained as the appearance color histogram. The number of appearances for each color or a value based on the number of appearances is compared with a first threshold value to select a candidate color, and the number of appearances of the selected candidate color or the sum of the values based on the number of appearances and a second value are selected. When the number of appearances of the selected candidate color or the sum of values based on the number of appearances does not reach the second threshold value, the first threshold value is changed and the threshold value is changed. The selection and the comparison with the second threshold are repeated, and the number of appearances of the selected candidate color or the total of the values based on the number of appearances, the candidate color selected when the second threshold is reached. The above representative color and An image processing method, wherein the determined representative color is registered in a color palette.
JP24530899A 1999-08-31 1999-08-31 Image processor and method for image processing Pending JP2001076120A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24530899A JP2001076120A (en) 1999-08-31 1999-08-31 Image processor and method for image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24530899A JP2001076120A (en) 1999-08-31 1999-08-31 Image processor and method for image processing

Publications (1)

Publication Number Publication Date
JP2001076120A true JP2001076120A (en) 2001-03-23

Family

ID=17131753

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24530899A Pending JP2001076120A (en) 1999-08-31 1999-08-31 Image processor and method for image processing

Country Status (1)

Country Link
JP (1) JP2001076120A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011249947A (en) * 2010-05-25 2011-12-08 Yahoo Japan Corp Image color subtraction apparatus, method and program
JP2014078913A (en) * 2012-10-12 2014-05-01 Fuji Xerox Co Ltd Image processing device and image processing program
KR20160049620A (en) * 2014-10-27 2016-05-10 주식회사 큐램 System and method for image processing and restoring
JP2016140063A (en) * 2015-01-28 2016-08-04 財團法人工業技術研究院Industrial Technology Research Institute Encoding method and encoder
US11176378B2 (en) * 2018-09-28 2021-11-16 Fujifilm Corporation Image processing device, image processing method,program, and recording medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011249947A (en) * 2010-05-25 2011-12-08 Yahoo Japan Corp Image color subtraction apparatus, method and program
JP2014078913A (en) * 2012-10-12 2014-05-01 Fuji Xerox Co Ltd Image processing device and image processing program
KR20160049620A (en) * 2014-10-27 2016-05-10 주식회사 큐램 System and method for image processing and restoring
KR101652740B1 (en) * 2014-10-27 2016-09-02 주식회사 큐램 System and method for image processing and restoring
JP2016140063A (en) * 2015-01-28 2016-08-04 財團法人工業技術研究院Industrial Technology Research Institute Encoding method and encoder
US11176378B2 (en) * 2018-09-28 2021-11-16 Fujifilm Corporation Image processing device, image processing method,program, and recording medium

Similar Documents

Publication Publication Date Title
US6748108B2 (en) Method of selecting colors for pixels within blocks for block truncation encoding
EP0550243B1 (en) Color image processing
US7012617B2 (en) Method for representing a digital color image using a set of palette colors based on detected important colors
US9619897B2 (en) Correction of blotches in component images
US7636472B2 (en) Image quality correction apparatus and image quality correction method
US20070076954A1 (en) Face orientation identifying method, face determining method, and system and program for the methods
CN110533117B (en) Image comparison method, device, equipment and storage medium
JP2011078087A (en) Color determining apparatus, image processing apparatus, color determining method, and color determining program
JP2001076120A (en) Image processor and method for image processing
US8331658B2 (en) Texture reproduction system and method and chroma correction system and method for presence enhancement
US5778105A (en) Method of and apparatus for removing artifacts from a reproduction
JPH0654180A (en) Method and device for image area separation
JPH0822532A (en) Color picture processor for subtractive color processing
KR20010036671A (en) Block-based Image Histogram Generation Method
JP2812232B2 (en) Halftone image data compression method
US20230289931A1 (en) Method and device for changing a dynamic range of luminance of an image
JP3256267B2 (en) Image processing device
KR100484170B1 (en) Method and apparatus for improvement of digital image quality
KR100514734B1 (en) Method and apparatus for improvement of digital image quality
JP2002024817A (en) Image processing method and image processing device
JPH0554190A (en) Picture processor
JP2872241B2 (en) Image coding method
CN117251591A (en) Quick retrieval method and system for power distribution network images
JPH07182516A (en) Judgement method of color component of computer graphic picture
JP2017107378A (en) Super-resolution device, super-resolution method, and program